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

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 06:23:01 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?
> > 
> > 
> > WHOOOOOOPPPPSSS yup, looks like I also missed some test coverage. :-D I'll get that fixed up ASAP, thank you!
> 
> This should be fixed now in [2f2b931](https://github.com/llvm/llvm-project/commit/2f2b931e1296aebe6c03fd969363683b637973e5), thank you!

Thanks a lot for the quick fix!

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


More information about the cfe-commits mailing list