[clang] [C2y] Support WG14 N3457, the __COUNTER__ macro (PR #162662)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 09:14:02 PDT 2025
================
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -verify=ext -std=c23 -pedantic %s
+// RUN: %clang_cc1 -verify=pre -std=c2y -pedantic -Wpre-c2y-compat %s
+
+/* WG14 N3457: Clang 22
+ * The __COUNTER__ predefined macro
+ *
+ * This predefined macro was supported as an extension in earlier versions of
+ * Clang, but the required diagnostics for the limits were not added until 22.
----------------
AaronBallman wrote:
Sure! It will say "C2y extension", but that's expected.
https://github.com/llvm/llvm-project/pull/162662
More information about the cfe-commits
mailing list