[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:17:46 PDT 2025
================
@@ -226,7 +226,7 @@ class Preprocessor {
LangOptions::FPEvalMethodKind::FEM_UnsetOnCommandLine;
// Next __COUNTER__ value, starts at 0.
- unsigned CounterValue = 0;
+ unsigned long CounterValue = 0;
----------------
AaronBallman wrote:
I went with `unsigned long` because the standard requires the value to fit within a `signed long` explicitly; so it was for parity with the standards wording. WDYT?
https://github.com/llvm/llvm-project/pull/162662
More information about the cfe-commits
mailing list