[cxx-abi-dev] Mangling 0.0f

John McCall rjmccall at apple.com
Wed Jan 18 21:04:10 UTC 2012


On Jan 16, 2012, at 12: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.

This exact point seems to have come up nine years ago:
  http://communities.mentor.com/community/cs/archives/cxx-abi-dev/msg01527.html
Mark then suggested better wording that would've forced Lf00000000E, but apparently that did not make it into the document.

The only merit in using a fixed-size mangling here is because G++ and EDG already do so, but that's a good enough reason for me.  If we're interested in re-opening this, dropping leading zeroes is a really silly way to optimize for size;  a much better alternative, given the overwhelming probability of an IEEE 754 interchange format, would be to drop *trailing* zeroes.

John.



More information about the cxx-abi-dev mailing list