Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix variable initialization due to jump bypassing it#23051
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This fixes the following error in mingw gcc toolchain. Also clangalso have same error.src/_tkagg.cpp:274:26: note: crosses initialization of 'bool tk_ok' 274 | bool tcl_ok = false, tk_ok = false; | ^~~~~src/_tkagg.cpp:274:10: note: crosses initialization of 'bool tcl_ok' 274 | bool tcl_ok = false, tk_ok = false; | ^~~~~~According to C++ standard (6.7.3):It is possible to transfer into a block, but not in a way that bypassesdeclarations with initialization. A program that jumps from a point wherea variable with automatic storage duration is not in scope to a pointwhere it is in scope is ill-formed unless the variable has scalar type...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping@matplotlib/developers
or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
tacaswell commentedMay 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thank you! This fix is also included in#22999 [edit correct PR number] |
Should I close this? |
Given that#22999 is failing with error message "command did not succeed", it might be a while before that goes in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure there's actually a problem here, but if it fixes a warning, then LGTM.
Thanks for the fix, hoping to see you around again. |
@meeseeksbot please backport to v3.5.x |
meeseeksdev backport to v3.5.x |
thank you@QuLogic . |
…051-on-v3.5.xBackport PR#23051 on branch v3.5.x (Fix variable initialization due to jump bypassing it)
PR Summary
This fixes the following error in mingw gcc toolchain. Also clang
also have same error.
According to C++ standard (6.7.3):
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).