[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 02:39:02 PDT 2024


================
@@ -172,10 +172,8 @@ enum class GH42372_2 {
 #if __STDC_VERSION__ >= 202311L
 // FIXME: GCC picks __uint128_t as the underlying type for the enumeration
 // value and Clang picks unsigned long long.
-// FIXME: Clang does not yet implement WG14 N3029, so the warning about
-// restricting enumerator values to 'int' is not correct.
 enum GH59352 { // expected-warning {{enumeration values exceed range of largest integer}}
- BigVal = 66666666666666666666wb // expected-warning {{ISO C restricts enumerator values to range of 'int' (66666666666666666666 is too large)}}
+ BigVal = 66666666666666666666wb // c99-warning {{ISO C restricts enumerator values to range of 'int' (66666666666666666666 is too large)}}
----------------
Fznamznon wrote:

Hmm, but the intention is to leave the warning for pre-C23 modes, since only `int` values are technically correct there.

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


More information about the cfe-commits mailing list