Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT: Fix some undef warnings #29216

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
Jun 17, 2025
Merged

MAINT: Fix some undef warnings #29216

merged 1 commit into from
Jun 17, 2025

Conversation

seberg
Copy link
Member

@seberg seberg commented Jun 17, 2025

As noted by Chuck in gh-29138, there are some undef warnings that seem not nice this should fix them.

The fact that NPY_LONG, etc. are undefined at macro expansion time here is a bit of a trap, although the undef warning does tell us that it can't actually be used there.


Closes gh-29138, none of it is worrying in the end, though. #ifdef/#ifndef is used in many places, I didn't bother with #if defined(Py_GIL_DISABLED) && Py_GIL_DISABLED to make it safer.

As noted by Chuck in numpygh-29138, there are some undef warnings that seem not nice
this should fix them.

The fact that `NPY_LONG`, etc. are not defined at macro expansion time is a bit
of a trap, maybe it would be nice to have CI fail for this...
@charris charris merged commit 03d5730 into numpy:main Jun 17, 2025
88 of 90 checks passed
@seberg seberg deleted the undef-warning branch June 17, 2025 15:51
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.

Compiler warnings with -Wundef.
2 participants