Repository navigation
Conversation
|
This PR is stale because it has been open for 90 days with no activity. |
Contributor
Author
|
I am unsure what more activity I shall provide. I can rebase it perhaps. |
This fixes:
$ g++ -I/usr/include/python3.15 -c -Werror=undef test.cpp
In file included from /usr/include/python3.15/Python.h:68,
from test.cpp:1:
/usr/include/python3.15/pyport.h:494:9: error: ‘_Py_STDC_VERSION’ is not defined, evaluates to ‘0’ [-Werror=undef]
494 | # elif _Py_STDC_VERSION >= 201112L && !defined(__STDC_NO_THREADS__)
| ^~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
For any test.cpp that has #include <Python.h>.
For locating the place for the added test, I used LLM.
The main issue I could reproduce was in Include/pyport.h.
Include/cpython/pyatomic.h was updated for completeness.
Include/internal/mimalloc/mimalloc/atomic.h also has this
for __STDC_VERSION__
but was left untouched as it is code from a bundled project
and is likely not exposed publicly.
Assisted-By: Claude Opus 4.6
hroncok
force-pushed
the
__STDC_VERSION__
branch
from
October 29, 2026 12:07
19e8d7a to
2363a51
Compare
Contributor
Author
|
Rebased. |
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.
This fixes:
For any test.cpp that has #include <Python.h>.
For locating the place for the added test, I used LLM.
The main issue I could reproduce was in Include/pyport.h. Include/cpython/pyatomic.h was updated for completeness. Include/internal/mimalloc/mimalloc/atomic.h also has this but was left untouched as it is code from a bundled project and is likely not exposed publicly.
Assisted-By: Claude Opus 4.6