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

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 02:29:06 PDT 2024


================
@@ -1039,7 +1039,8 @@ def err_opencl_invalid_param : Error<
   "declaring function parameter of type %0 is not allowed%select{; did you forget * ?|}1">;
 def err_opencl_invalid_return : Error<
   "declaring function return value of type %0 is not allowed %select{; did you forget * ?|}1">;
-def warn_enum_value_overflow : Warning<"overflow in enumeration value">;
+def ext_c23_enum_value_int_overflow : Extension<"incremented enumerator value that is exceeding range of 'int' is a C23 extension">, InGroup<C23>;
+def warn_c17_compat_enum_value_int_overflow : Warning<"incremented enumerator value that is exceeding range of 'int' is incompatible with C standards before C23">, InGroup<CPre23Compat>;
----------------
Fznamznon wrote:

Yeah, makes sense. Done.

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


More information about the cfe-commits mailing list