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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 05:16:22 PDT 2024


================
@@ -169,13 +169,19 @@ enum class GH42372_2 {
   One
 };
 
+enum IncOverflow {
+  V2 = __INT_MAX__,
+  V3 // c99-warning {{incremented enumerator value that is exceeding range of 'int' is a C23 extension}}
+#if __STDC_VERSION__ >= 202311L
----------------
AaronBallman wrote:

You can give the C23 RUN line its own `-verify` prefix rather than using `#if`

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


More information about the cfe-commits mailing list