[clang] [C23] Add INFINITY and NAN macros to <float.h> (PR #96659)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 05:43:38 PDT 2024


bgra8 wrote:

@AaronBallman [N2848](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2848.pdf) explicitly mentions that `NAN` and `INFINITY` macros should  expand to a constant expression of type `float` not `double` like was implemented in this patch.

`__builtin_nanf` and `__builtin_inff` should have been used instead, right?

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


More information about the cfe-commits mailing list