[cxx-abi-dev] Clarification about mangling floating point literals

Matthew Dempsky matthew at dempsky.org
Tue Jun 11 06:18:36 UTC 2013


On Mon, Jun 10, 2013 at 10:40 PM, Dennis Handly <dhandly at cup.hp.com> wrote:
>>From: Matthew Dempsky <matthew at dempsky.org>
>>Can someone please clarify for me how floating-point literals can be
>>encoded as a "fixed-length" string but "without leading zeros"?  E.g.,
>>how should 0.0f be encoded?
>
> I would assume you remove all but the only zero nibble.
> I.e. The last zero isn't leading.

For what it's worth, GCC 4.6.3 and Clang 3.2 when targeting
x86_64-linux-gnu both mangle 0.0f as Lf00000000E.

(But Clang 3.2 mangles 0.0l as Le3fff8000000000000000E, whereas GCC
4.6.3 mangles it as Le0000000000003fff8000000000000000E.  I don't have
newer versions readily available to check.)


More information about the cxx-abi-dev mailing list