fix: Disable false warn for GGC 12 bound checking#5355
Merged
rwgk merged 1 commit intopybind:masterfrom Sep 15, 2024
Merged
Conversation
3 tasks
rwgk
reviewed
Sep 5, 2024
cd933d2 to
ffaae21
Compare
BobbyRBruce
added a commit
to BobbyRBruce/gem5
that referenced
this pull request
Sep 8, 2024
There is a compiler error with GCC 12 discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824 This Pybind code triggers the bug and was causing our compiler tests to fail. To fix gem5 compilation for gcc 12 these warnings/errors have been suppressed for this code. This is a copy and paste of: pybind/pybind11#5355 Change-Id: I9344951ef00d121ea0b609f4faa13dfe09aabb3b
ffaae21 to
02c1292
Compare
henryiii
approved these changes
Sep 9, 2024
rwgk
reviewed
Sep 11, 2024
Collaborator
|
(I'll reply quicker this time around. Sorry I didn't see your last commit until now.) |
nkrim
pushed a commit
to nkrim/gem5
that referenced
this pull request
Sep 11, 2024
There is a compiler error with GCC 12 discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824 This Pybind code triggers the bug and was causing our compiler tests to fail. To fix gem5 compilation for gcc 12 these warnings/errors have been suppressed for this code. This is a copy and paste of: pybind/pybind11#5355 Change-Id: I9344951ef00d121ea0b609f4faa13dfe09aabb3b
Issue: pybind#5224 The `internals.registered_types_py...` line in pybind11.h triggers a false-positive bounds checking warning in GCC 12. This is discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824. The workaround implemented is taken from suggestions then refactored to use the `PYBIND11_WARNING_PUSH` and `PYBIND11_WARNING_POP` MACROS.
02c1292 to
ca69278
Compare
Contributor
Author
Your replies are lightening fast compared to my own :). I'm very impressed with Pybind's response to my fix given i'm an outsider to the project. Thank you for the feedback. I've reduced the comment. |
Collaborator
|
Oh, could you please add a suggestion for a Changelog entry? See other open PRs for the template. |
Contributor
Author
I think I've added this correctly. I just update the PR description here, right? |
Collaborator
|
Yes, it gets collected from there. |
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.
Description
Issue: #5224
The
internals.registered_types_py...line in pybind11.h triggers afalse-positive bounds checking warning in GCC 12.
This is discussed in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824.
The workaround implemented is taken from suggestions then refactored to
use the
PYBIND11_WARNING_PUSHandPYBIND11_WARNING_POPMACROS.Suggested changelog entry: