Re: Name mangling

Alain Miniussi <>
6 Jul 2001 16:32:45 -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: 6 Jul 2001 16:32:45 -0400
Organization: HP
References: 01-07-008 01-07-027 01-07-038
Keywords: C++, GCC
Posted-Date: 06 Jul 2001 16:32:45 EDT

Fergus Henderson wrote:
> Young Wei Kuan wrote:
> > I understand g++ 3.0 has changed its name-mangling scheme.
> > [...] Why is it that object code compiled by g++ 2.95 is incompatible with
> > that of gcc3.0?
> Object code compiled by g++ 2.95 is incompatible with that of g++ 3.0
> because of changes in the way things are implemented. For example,
> g++ 3.0 uses a different implementation of exception handling than g++
> 2.95 did. This affected compatibility with code compiled with g++
> 2.95, i.e. the ABI (Application Binary Interface) changed.

Other changes probably includes object layout and vtables layout.

> When compilers change the way things are implemented in ways that
> change the ABI, they often change the name-mangling scheme at the same
> time, to prevent users from accidentally linking together components
> that are not compatible and which might fail mysteriously at run-time
> if they were linked together. Using a different name mangling scheme
> can ensure that such problems result in link errors rather than
> run-time crashes.
> However, I don't know if that is what motivated changes in name
> mangling between g++ 2.95 and g++ 3.0, or whether they were needed for
> other reasons (e.g. standard-conformant handling of certain template
> constructs).

That change was motivated by the fact that gcc plans to comply to
a new common C++ abi on IA64. Name mangling is part of that abi
(see and I guess that there
is no point in using a different mangling depending on the abi.


> Fergus Henderson <> | "I have always known that the pursuit
> The University of Melbourne | of excellence is a lethal habit"
> WWW: <> | -- the last words of T. S. Garp.

Post a followup to this message

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