[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 29 11:24:27 PST 2024


https://github.com/AaronBallman commented:

I've done another pass over the changes and in general, I think we're really close to done. I spotted these two issues:
```
#define NAN __builtin_nan("1")
#define FLT_SNAN __builtin_nansf("1")

constexpr float f2 = (long double)NAN; // 6.7.2p21 EXAMPLE 5: should be accepted
constexpr double d3 = FLT_SNAN; // 6.7.2p21 EXAMPLE 5: should be rejected
```
but would be okay with handling those in a follow-up if they turned out to be complicated. Please let me know your thoughts.

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


More information about the cfe-commits mailing list