Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cxx-abi-dev] Name mangling question


  • To: nasgaard@xxxxxxxxxx
  • Subject: Re: [cxx-abi-dev] Name mangling question
  • From: loewis@xxxxxxxxxxxxxxxxxxxxxxx (Martin v. Löwis)
  • Date: 27 Nov 2002 13:53:19 +0100

nasgaard@xxxxxxxxxx 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