[clang] [C23] Support the SNAN macros in <float.h> (PR #162858)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 10 10:48:53 PDT 2025


https://github.com/andykaylor commented:

I have a question about interpreting the standard. The standard says each of these macros "is defined if and only if the respective type contains signaling NaNs." Given that by default LLVM IR gives the compiler permission to treat all NaNs as if they were quiet NaNs, should we really be defining these macros in the default mode?

My understanding is that these built-ins will indeed produce a signaling NaN value, but the quiet/signaling behavior may not be respected by the optimizer.

https://github.com/llvm/llvm-project/pull/162858


More information about the cfe-commits mailing list