[cxx-abi-dev] Name mangling question

nasgaard at ca.ibm.com nasgaard at ca.ibm.com
Wed Nov 27 15:17:59 UTC 2002


I expect _ZN6locale5_Impl3fooERNS_5_ImplE, based on the set of productions
as stated in my original note.  I think g++ is missing the fact that it is
nested.  There is no N...E in the name.  If I run that mangled name through
c++filt I get locale::_Impl::foo(locale::_Impl&), as I would expect.  Which
one is right and why?  They can't both be right.

Howard W. Nasgaard
C++ Compiler Development
e-mail: nasgaard at ca.ibm.com
C2/KD2/8200/MKM
905-413-3683
Tie: 969-3683



                                                                                                                                                    
                      loewis at informatik.h                                                                                                           
                      u-berlin.de (Martin        To:       Howard Nasgaard/Toronto/IBM at IBMCA                                                        
                      v. Löwis)                  cc:       cxx-abi-dev at codesourcery.com                                                             
                                                 Subject:  Re: [cxx-abi-dev] Name mangling question                                                 
                      11/27/2002 10:05 AM                                                                                                           
                                                                                                                                                    
                                                                                                                                                    



nasgaard at ca.ibm.com writes:

> I agree that the mangling you gave is correct for your example, but that
is
> not the example I gave and it is not the mangling g++ gives for my
example.
> In my example _Impl is nested inside locale.  The mangling g++ gives is
> _ZN6locale5_Impl3fooERS0_.
>
> Demangled this is locale::_Impl::foo(locale::_Impl&)

Yes, and this is indeed correct. What else would you have expected?

In the demangled signature, _Impl is nested inside locale, just as you
say it should be.

Regards,
Martin






More information about the cxx-abi-dev mailing list