[cxx-abi-dev] Mangling of floating-point literals

scott douglass sdouglass at arm.com
Thu Oct 17 10:04:46 UTC 2002


Mark Mitchell wrote:
> It was pointed out to me that the ABI spec made it sound like mangling
> floating-poit literals is optional -- but it's not:
> 
>   f<int(3.14159)>
> 
> is legal even in ISO C++, and the spec is very clear that no folding
> or simplification is supposed to take place.

As pointed out by John Spicer in the thread "Mangling of named constants", simplification _does_ take place unless the expression involves a template argument.  But Mark's point still applies to similar examples.

> I cleaned this up with the following patch.

That looks generally good to me.

But (since the original) isn't there a conflict between "fixed-length" and "without leading zeroes" in the following?

> Floating-point literals are encoded using a fixed-length lowercase
> hexadecimal string corresponding to the internal representation (IEEE
> on Itanium), high-order bytes first, without leading zeroes.  For
> example: "Lf bf800000 E" is -1.0f on Itanium.

Maybe it would be good to include an example of the mangling of 0.0 (a double).




More information about the cxx-abi-dev mailing list