This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug with -fleading-underscore doubling underscore in some cases on templates


hi, 

we have found a case where g++ will generate template instantiations with two 
underscore prefixes (std::string, "__ZNSs7reserveEm" instead of just 
"_ZNSs7reserveEm") while other .cpp files will compile just fine.

the template stabs sections are correctly setup as "_ZNSs7reserveEm" but the 
assembly code that calls the functions have two underscores instead so the 
linker cannot find the template and complain of undefined reference to 
__XXXXX

I tried moving things around in that particular cpp file to make the bug go 
away (and isolate the case) to no avail.

and std::string is the only template that seem to cause the behaviour

i386-unknown-elf-g++ (GCC) 4.1.1

-- 
Stephane Hockenhull
SSC-Studios.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]