[cxx-abi-dev] Name mangling question

nasgaard at ca.ibm.com nasgaard at ca.ibm.com
Wed Nov 27 17:12:18 UTC 2002


Ok...This is making more sense now.  Based on what you are saying we have
not interpreted the document correctly.
We interpreted it as having to walk the other productions first, then look
for a substitution for what was generated by the production.  That's how we
got to <nested name> before <substitution>.

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:       Mark Mitchell <mark at codesourcery.com>, cxx-abi-dev at codesourcery.com                      
                                                 Subject:  Re: [cxx-abi-dev] Name mangling question                                                 
                      11/27/2002 11:59 AM                                                                                                           
                                                                                                                                                    
                                                                                                                                                    



nasgaard at ca.ibm.com writes:

> Here the mangled name is _ZN6locale5_Impl3fooERNS_3BarE.  Note the N...E.
> Unless I have a gross misunderstanding (which is possible) we build up
the
> type by following productions through type and nested name.  Then, after
> building a name we look for a substitution.

No. You do that vice versa. You first look for substitutions, then you
start
mangling. This is necessary because, after substitution, you may find that
your identifier which was originally nested is not nested anymore. You emit
a nested-name only if it is still nested after substitutions.

So while you go through <type>, you don't go through <nested-name>;
instead,
you go through <substition>.

Regards,
Martin






More information about the cxx-abi-dev mailing list