[cxx-abi-dev] Name mangling question

Martin v. Löwis loewis at informatik.hu-berlin.de
Wed Nov 27 12:53:19 UTC 2002


nasgaard at ca.ibm.com writes:

> struct locale {
>    struct _Impl
>    {
>       void foo(_Impl&);
>    };
> };
> It would seem that 6locale would have S_ as a substitution, and
> 6locale5_Impl would have S0_.  Given that the parameter is a nested name
> and so should be within N/E delimiters,  I don't see how g++ arives at that
> mangling.

The parameter is not a nested name, the signature of foo really is

void ::locale::_Impl::foo(::locale::_Impl&);

That you can denote the parameter type as _Impl in C++ is irrelevant
for the mangling, since the mangling uses always the fully-qualified
names. The symbol

_ZN6locale5_Impl3fooER5_Impl

would denote the function

::locale::_Impl::foo(::_Impl&)

HTH,
Martin



More information about the cxx-abi-dev mailing list