This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12979] New: Possible ABI violation.
- From: "carlo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2003 16:41:43 -0000
- Subject: [Bug c++/12979] New: Possible ABI violation.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
floating literals are mangled with uppercase A-F,
I believe this is wrong, it should be lower case a-f.
The example given in http://www.codesourcery.com/cxx-abi/abi.html#mangling
supports this. <quote>For example: "Lf bf800000 E" is -1.0f on Itanium.</quote>
There is a problem with demangling symbols that use
uppercase here: when the hexadecimal number ends on an 'E'
it is impossible to know where the number ends.
For example, compile:
template<int i> struct A { typedef int q; };
template<int i>
void f(typename A<(int)(i * 222.5)>::q) { }
int g() { f<5>(0); }
this leads to a symbol
_Z1fILi5EEvN1AIXcvimlT_Ld110000000000000000000080DEEEE1qE
it would be very hard for a demangler to know after
which 'E' to stop (as leading zeroes are ommitted, the
total size cannot be used).
This should be mangled as
_Z1fILi5EEvN1AIXcvimlT_Ld110000000000000000000080deEEE1qE
--
Summary: Possible ABI violation.
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carlo at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12979