-
Notifications
You must be signed in to change notification settings - Fork 2.2k
CI job name "🐍 3 • GCC 10 • C++2a • x64" (changed from C++20, which is misleading) #4074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…+20 vs C++17 mismatch).
…ore obvious what is actually being tested, and why PYBIND11_CPP20 is not defined.
gcc
std=20
vs PYBIND11_CPP17
mismatch
This complicates the CI config for very little benefit. And shouldn't we define |
I'm open to exploring alternatives, but the current reporting is misleading, which is bad because there is the danger that we slip into wrong conclusions.
That will get us into the weeds here, with plenty potential pitfalls: pybind11/include/pybind11/detail/common.h Line 39 in 59f03ee
I kind of like that, but do we really want to take the step of giving up on GCC 10 just to avoid fixing the reporting (with +3 trivial lines)? Another simple alternative is to test c++17 (instead of c++2a). That would be obvious & clean. I don't think we're gaining much exercising "experimental" C++20 features of an outdated compiler. What do you think? |
I wouldn't consider it "giving up", it's just that we don't test every version of GCC already, and GCC 8-10 works fine in 11-17, and it doesn't fully support 20 yet, so we could instead make this a test of whatever version was the first to support 20 (GCC 11?). I don't think we are gaining much with GCC 7+10 vs. 7+11 unless 10 is important for some special reason. Testing the first version of a compiler to support C++20 on C++20 mode is a very useful datapoint, though. (similarly with C++17, which I'm guessing was GCC 7? Hopefully not 10? :) ) |
Below are all the GCC versions we are testing with at the moment. Currently the job for which I want to tweak the reporting (with What do you want to do exactly? I'd prefer to:
What I don't know: Why does cmake automatically map from GCC version to first fully support
which is what it sounds to me you are suggesting?
|
https://gcc.gnu.org/projects/cxx-status.html seems to have all the information we need, although with a lot of extra details. Taking the max-by-eye in the "Available in GCC?" columns I'm arriving at:
But I also noticed this:
This suggests -std=c++20 should work with GCC 10. Could it be that cmake is interfering in an unfortunate way? Is there a way to disable the interference? |
Using
|
Raw data covering GCC 7 through 12:
|
I think the below would make sense. I'll try that out in another PR. The idea is:
|
* More systematic gcc coverage, based on #4074 (comment) * Fix complete fail. * Resolve GCC 11 & 12 "redundant move in return statement" warnings. * Also add clang 11, 12, 13 (to gather info for warning suppressions). * Add & use `PYBIND11_DETECTED_CLANG_WITH_MISLEADING_CALL_STD_MOVE_EXPLICITLY_WARNING`
Description
Distinguish
cmake_cxx_standard
&std_passed_to_compiler
, to make it more obvious what is actually being tested, and whyPYBIND11_CPP20
is not defined.Suggested changelog entry: