You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clang 22 error: '__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions] #3076
Reacted by rdong8, Jan Kelemen, João Carreira, Vlad Gheorghiu, Jean-Michaël Celerier, Federico Angelilli, mile.davidovic, lauren and Dipl.-Ing. Raoul Rubien, BSc
So, I looked into this and the result is not great.
In theory, we can add _Pragma to remove the warnings. In practice, we will have to suppress the warning for the whole TU, as Clang currently doesn't handle the warning and its suppression correctly: llvm/llvm-project#189645.
Activity
Suppress __COUNTER__ pedantic warning on Clang
horenmar commentedon Mar 31, 2026
So, I looked into this and the result is not great.
In theory, we can add
_Pragmato remove the warnings. In practice, we will have to suppress the warning for the whole TU, as Clang currently doesn't handle the warning and its suppression correctly: llvm/llvm-project#189645.offa commentedon Mar 31, 2026
Thanks for filing the llvm issue!
Suppress __COUNTER__ warning from newest Clang versions
Impl a temporary workaround for Clang 22.x
Impl a temporary workaround for Clang 22.x
Disable COUNTER in catch when building with clang
Sync with Master (#3)
merge conflict fix (#4)
Sync with master (#5)
[Base] remove __COUNTER__ from unique_name macro (clang-22 c2y extens…
Upgrade Catch2 to 3.14
Upgrade Catch2 to 3.14
Upgrade Catch2 to 3.15
Upgrade Catch2 to 3.16
Upgrade Catch2 to 3.15.latest
Upgrade Catch2 to 3.15.latest