BENCHMARK_ENABLE_WERROR=Off should also disable -pedantic-errors#2183
BENCHMARK_ENABLE_WERROR=Off should also disable -pedantic-errors#2183LebedevRI merged 1 commit intogoogle:mainfrom
Conversation
Otherwise Clang 22 builds fail with:
```
/build/_deps/benchmark-src/include/benchmark/benchmark.h:1442:30: error: '__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]
1442 | #if defined(__COUNTER__) && (__COUNTER__ + 1 == __COUNTER__ + 0)
| ^
```
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
The change itself makes sense, but did you check that it solves the issue you were seeing? benchmark/include/benchmark/registration.h Lines 21 to 38 in f43ed80 |
|
You're right: the warning was only not silenced for me because I was testing with version 1.9.2 instead of the latest. (So updating to 1.9.5 solved the problem without needing the CMake change). I still think the proposed change is useful, though. |
Otherwise Clang 22 builds fail with: