defined(__COUNTER__) results in an unexpected extension diagnostic
Open
c2y
clang:diagnostics
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```
/home/rpnx/quxlang/dev-workspace/sources/benchmark/include/benchmark/benchmark.h:1483:30: error: '__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]
1483 | #if defined(__COUNTER__) && (__COUNTER__ + 1 == __COUNTER__ + 0)
```
Clang should not error when `__COUNTER__` is disabled by compiler flags, the defined clause should return false and then clang should continue on without an error.
Contributor guide
Assessment
This issue has not been assessed yet.