Name Mangling changed from egcs 1.1.2 to gcc 2.95

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Mon Nov 1 08:57:00 GMT 1999


> It appears that name mangling has changed from egcs 1.1.2 to gcc 2.95.

Thanks for your bug report. I have problems reproducing that problem,
though. Given

struct snmpGroupProperties;
struct snmpTableGroup{
void _mkGroup(const snmpGroupProperties*, const char*, const char*);
};

void snmpTableGroup::_mkGroup(const snmpGroupProperties*, const char*, const char*){}

both egcs 1.1.2, and gcc 2.95.2 produce

_mkGroup__14snmpTableGroupPC19snmpGroupPropertiesPCcT2

and so does egcs 1.0.2.

> AFAIK, both compilers should support name-mangling-version 1 by default.
> Is there anything that can be done, short of recompiling everything with
> the new compiler?  Is this a bug in one or the other compiler?

I don't know how you've produced the other symbol; whatever compiler
did so, it was a bug in that compiler (perhaps an egcs snapshot??)

> Is this perhaps a linker issue?  Should the linker be able to
> recognize these two symbols as equivalent?  This would seem to be
> above the call of duty for a linker.

No. The linker is not involved with C++ mangling. There is one thing
you can do: write an assembler file (by hand), implementing the
missing symbol by jumping to the existing one.

Regards,
Martin


More information about the Gcc-bugs mailing list