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
Build Python with -Wundef: don't use undefined macros #90828
Comments
Building Python with "gcc -Wundef" emits many warnings about usage of undefined macros. If a macro is not defined, it is equal to 0. The problem is that a macro can be undefined because of a missing #include, or because of a typo in its name, or because "#ifdef MACRO" should be used instead of "#if MACRO". It can hide bugs. I plan to fix these warnings. |
-Wexpansion-to-defined and -Wunused-macros options are also interesting. |
GH-98674 is a backport of this pull request to the 3.10 branch. |
1 similar comment
GH-98674 is a backport of this pull request to the 3.10 branch. |
GH-98677 is a backport of this pull request to the 3.10 branch. |
I fixed the usage of undefined macros, but I failed to find time to add -Wundef in the configure script. I'm always scared by modifying the Python build scripts which can break some platforms. If someone wants to add this compiler flag, please go ahead. I prefer to close this issue for now. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: