Skip to content

More than thousand 'Py_DEBUG': macro redefinition warnings for Windows debug builds on 3.14 branch #134774

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

Closed
chris-eibl opened this issue May 27, 2025 · 2 comments
Labels
3.14 bugs and security fixes build The build process and cross-build OS-windows type-bug An unexpected behavior, bug, or error

Comments

@chris-eibl
Copy link
Member

chris-eibl commented May 27, 2025

Bug report

Bug description:

Since PR #134211 / issue #133779 was packported to 3.14, Windows debug builds show more than thousand such warnings:

pyconfig.h(390,16): warning C4005: 'Py_DEBUG': macro redefinition

For example

This stems from

cpython/PC/pyconfig.h

Lines 97 to 100 in b6e624a

/* _DEBUG implies Py_DEBUG */
#ifdef _DEBUG
# define Py_DEBUG 1
#endif

which got added in the above PR, but rather belong to PR #131944 / issue #131942, which did not get backported, and should just be deleted.

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Linked PRs

@chris-eibl chris-eibl added type-bug An unexpected behavior, bug, or error 3.14 bugs and security fixes labels May 27, 2025
@chris-eibl
Copy link
Member Author

@zooba: I can do a PR, but since this is 3.14 related, I assume this is one of the rare cases where the PR should not be created against main?

@chris-eibl chris-eibl added OS-windows build The build process and cross-build labels May 27, 2025
@zooba
Copy link
Member

zooba commented May 27, 2025

Yeah, probably just a bad backport. Make a PR directly against the 3.14 branch, and include [3.14] at the start of the title to satisfy the backport checker.

@picnixz picnixz changed the title [3.14] More than thousand 'Py_DEBUG': macro redefinition warnings for Windows debug builds on 3.14 branch More than thousand 'Py_DEBUG': macro redefinition warnings for Windows debug builds on 3.14 branch May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 bugs and security fixes build The build process and cross-build OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants