libcxxabi uses the C99 library's %a format specifier to turn a floating point value into a hexadecimal string representation. The %a format specifier is rather loosely defined in the C spec though, and some C libraries emit a different (but valid) string for a given floating point value. In particular, the C spec only requires that there is a single, non-zero hexadecimal digit on the left of the decimal point. Given that constraint, there are typically four different valid representations of a floating point number. I have updated the test to accept any of the valid representations for demangled floating point literals.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM.
I don't see anything in the Itanium ABI spec that would prefer one demangling over another.
I also double checked that scanf("%a", ...) generates the expected bit-pattern for each test value.
Thanks for the patch.