https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61319
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|testsuite |target
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No they are supposed to generate -nan. If it does not then there is a bug
somewhere else.
Really you should report this to Apple since it is a bug in their snprintf
implementation.
Here is the code:
// FIXME: Support floating-point formatting in sanitizer_common's
// printf, and stop using snprintf here.
char Buffer[32];
snprintf(Buffer, sizeof(Buffer), "%Lg", (long double)A.Float);
Printf("%s", Buffer);