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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 10 11:21:32 PDT 2025


AaronBallman wrote:

> 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?

I think we likely want them defined for GCC compatibility: https://godbolt.org/z/9PjdfM8hx they still define the macro even when passing `-fno-signaling-nans`. However, this is out of my wheelhouse, so I defer to the floating-point experts on this.

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


More information about the cfe-commits mailing list