GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — bpo-37337: Fix a GCC 9 warning in Objects/descrobject.c by ZackerySpytz · Pull Request #14814 · python/cpython Conversation
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi, @methane. Can you please merge this PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The cast seems too complex to just avoid the warning. But I'm not sure there is a better way. If you want to this merged, please provide all casts you tried and demonstrate this is the simplest way to fix the warning. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is the standard way to avoid those warnings, there are many places in CPython with casts like that. It's also documented to do this: https://docs.python.org/3.8/extending/extending.html#keyword-parameters-for-extension-functions |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
See bpo-33012 for the discussion about those casts. As far as I know, this is indeed the simplest way to cast between incompatible function pointers which does not generate warnings with GCC 9 and which does not rely on undefined behaviour and which is compatible with C++. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @ZackerySpytz for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @ZackerySpytz and @methane, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Commit b1263d5 causes GCC 9.1.0 to give a warning in Objects/descrobject.c.
Commit b1263d5 causes GCC 9.1.0 to give a warning in Objects/descrobject.c.
Commit b1263d5 causes GCC 9.1.0 to give a warning in Objects/descrobject.c.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.