Skip to content

[3.8] Fix compiler warning on Windows (GH-18012) #18014

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

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

miss-islington
Copy link
Contributor

Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be81
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d393)

Co-authored-by: Ammar Askar ammar@ammaraskar.com

Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be81
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d393)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
@miss-islington
Copy link
Contributor Author

@ammaraskar and @zware: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 9213577 into python:3.8 Jan 15, 2020
@miss-islington miss-islington deleted the backport-e92d393-3.8 branch January 15, 2020 17:07
@miss-islington
Copy link
Contributor Author

@ammaraskar and @zware: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@ammaraskar and @zware: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants