[cxx-abi-dev] Mangling 0.0f

Mike Herrick mjh at edg.com
Wed Jan 18 20:13:13 UTC 2012


On Jan 16, 2012, at 3:29 PM, Jason Merrill wrote:

> I notice that G++ and EDG mangle 0.0f as Lf00000000E, while clang produces Lf0E.  I assume that the latter is based on the "without leading zeroes" in the ABI document, while the former is based on the "fixed-length" earlier in the sentence.

We proposed getting rid of "without leading zeros" in a post entitled "Clarification on floating point literal mangling" dated August 2, 2010:

> We recently ran across this seeming inconsistency with the description of mangling for floating point literals.  The current wording calls for both "fixed-length" and "without leading zeroes". We think the "without leading zeroes" portion should be removed to match existing practice:
> 
> *** abi.orig.html       Mon Aug  2 08:34:44 2010
> --- abi.html    Mon Aug  2 08:35:09 2010
> ***************
> *** 4578,4584 ****
>  <p>
>  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.
> 
>  <p>
> --- 4578,4584 ----
>  <p>
>  Floating-point literals are encoded using a fixed-length lowercase
>  hexadecimal string corresponding to the internal representation (IEEE
> ! on Itanium), high-order bytes first.  For
>  example: "Lf bf800000 E" is -1.0f on Itanium.
> 
>  <p>
> 
> 
> Thanks.
> 
> Mike Herrick
> Edison Design Group



More information about the cxx-abi-dev mailing list