[cxx-abi-dev] Name mangling question

Martin v. Löwis loewis at informatik.hu-berlin.de
Wed Nov 27 16:59:09 UTC 2002


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