C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Specify the mangled name

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Sun, 2 Feb 2025 20:57:45 +0000
On Sun, Feb 2, 2025 at 8:53 PM Andrey Semashev wrote:
> >
> > The C++ Standard doesn't mention the word 'mangle', however it is at
> > least on some level aware of mangling because you can write "extern C"
> > to tell the compiler not to mangle a name -- or at least to mangle it
> > the way it would get mangled if it were C instead of C++.
>
> That's not quite what it means. It specifies language linkage for the
> symbols affected by `extern "C"`, and how the language linkage is
> implemented is out of scope of the C++ standard. Symbol mangling is one
> possible implementation, but not necessarily the only one.


We don't need to be overt about it by mentioning mangling. Instead we
could say something like "Specify external linkage", maybe with syntax
such as:

    typedef vector<int> VecInt <=> extern "VecInt";

Received on 2025-02-02 20:57:54