This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: assembly code produced from G++
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: charfi asma <charfiasma at yahoo dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 15:10:48 +0100
- Subject: Re: assembly code produced from G++
- References: <1313675600.56257.YahooMailRC@web28506.mail.ukl.yahoo.com>
Names in C++ are mangled to ensure that MyClass::foo(int) is a
distinct symbol from MyClass::foo(char) and AnotherClass::foo(int)
The mangling needs to be repeatable, so that if I compile
MyClass::foo(int) into an object file, and you compile another object
file which depends on MyClass::foo(int), the two symbols have the same
name and can be linked.