Re: Name mangling

Alain Miniussi <>
18 Jul 2001 20:01:07 -0400

          From comp.compilers

Related articles
Name mangling (Young Wei Kuan) (2001-07-01)
Re: Name mangling (Thant Tessman) (2001-07-02)
Re: Name mangling (2001-07-03)
Re: Name mangling (Toon Moene) (2001-07-06)
Re: Name mangling (Alain Miniussi) (2001-07-06)
Re: Name mangling (Gabriel Dos Reis) (2001-07-17)
Re: Name mangling (Alain Miniussi) (2001-07-18)
Re: Name mangling (Gabriel Dos Reis) (2001-07-23)
| List of all articles for this month |

From: Alain Miniussi <>
Newsgroups: comp.compilers
Date: 18 Jul 2001 20:01:07 -0400
Organization: HP
References: 01-07-008 01-07-027 01-07-038 01-07-047 01-07-071
Keywords: C++
Posted-Date: 18 Jul 2001 20:01:07 EDT

Gabriel Dos Reis wrote:
> Toon Moene <> writes:
> | the new one is more efficient (leads to shorter mangled names). At
> | least, that's what I recall - IANAC++Guru.
> Your recollection is right. The new mangling scheme avoids repeated
> names. Try mangling and demangling "T" defined as
> using namespace std;
> typedef multimap<string, multiset<vector<list<vector<double> > > > > T;

This is a little bit unfair :-) you are using a lot of abbreviations
in that one ("std::string" is specificaly recognized and mangled as
"Ss" instead of (being mangled as a plain)
>" same thing for the implicit "std::allocator", "std" is compressed
in "st"... ok that last one is not...).

If you want to illustrate the substitution mechanism, you should not
rely on the catalog, or people are going to systematicaly expect a
miracle :-) Still, it is true that this mangling is more efficient. As
an approximation, it could be said that most of the saving comes from
the fact that a given source identifier only appears once in the
mangled name.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.