Add -Wno-c2y-extensions to test/CMakeLists.txt#2028
Merged
ericniebler merged 4 commits intoNVIDIA:mainfrom Apr 16, 2026
Merged
Conversation
As of some recent commit, building the tests with Clang 22.1 fails with
errors like this:
```
git/stdexec/test/stdexec/cpos/test_cpo_start.cpp:70:3: error: '__COUNTER__' is a
C2y extension [-Werror,-Wc2y-extensions]
70 | TEST_CASE("can call start on an operation state", "[cpo][cpo_start]")
| ^
```
Adding `-Wno-c2y-extensions` (or variations, like `-Wno-pedantic`) to
the `-DCMAKE_CXX_FLAGS` config-time parameters doesn't seems to help;
the flags added there end up *before* `-Wpedantic` in the compiler
command line, and, possibly because of llvm/llvm-project#184250, Clang
doesn't override `-Wpedantic` with an earlier-supplied suppression.
This diff just adds the required warning in the required place in the
hard-coded compiler warning flags to suppress the warning for everyone.
(llvm/llvm-project#184250)
Collaborator
|
/ok to test 2cfc4d2 |
Contributor
Author
|
That is a disappointing number of build failures. |
Collaborator
|
/ok to test 7185e64 |
ericniebler
reviewed
Apr 16, 2026
Collaborator
|
/ok to test 64999ed |
ispeters
commented
Apr 16, 2026
My attempt to add Clang 22 builds to the CI matrix needs fixing; let's do that in another PR.
Collaborator
|
/ok to test c7199d7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of some recent commit, building the tests with Clang 22.1 fails with errors like this:
Adding
-Wno-c2y-extensions(or variations, like-Wno-pedantic) to the-DCMAKE_CXX_FLAGSconfig-time parameters doesn't seems to help; the flags added there end up before-Wpedanticin the compiler command line, and, possibly because of llvm/llvm-project#184250, Clang doesn't override-Wpedanticwith an earlier-supplied suppression.This diff just adds the required warning in the required place in the hard-coded compiler warning flags to suppress the warning for everyone.