8000 BUG: Fix Clang warning in loops_half.dispatch.c.src by seiko2plus · Pull Request #28841 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix Clang warning in loops_half.dispatch.c.src #28841

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
Apr 27, 2025

Conversation

seiko2plus
Copy link
Member

Fix macro expansion warning [-Wexpansion-to-defined] by removing 'defined' usage in the NPY__SVML_IS_ENABLED macro expansion.

      |                                           ^
../numpy/_core/src/umath/loops_half.dispatch.c.src:70:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
../numpy/_core/src/umath/loops_half.dispatch.c.src:9:75: note: expanded from macro 'NPY__SVML_IS_ENABLED'
    9 | #define NPY__SVML_IS_ENABLED (NPY_SIMD && defined(NPY_HAVE_AVX512_SKX) && defined(NPY_CAN_LINK_SVML))
      |                                                                           ^
../numpy/_core/src/umath/loops_half.dispatch.c.src:70:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
   70 | #if NPY__SVML_IS_ENABLED
      |     ^
../numpy/_core/src/umath/loops_half.dispatch.c.src:9:43: note: expanded from macro 'NPY__SVML_IS_ENABLED'
    9 | #define NPY__SVML_IS_ENABLED (NPY_SIMD && defined(NPY_HAVE_AVX512_SKX) && defined(NPY_CAN_LINK_SVML))
      |                                           ^
../numpy/_core/src/umath/loops_half.dispatch.c.src:70:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
../numpy/_core/src/umath/loops_half.dispatch.c.src:9:75: note: expanded from macro 'NPY__SVML_IS_ENABLED'
    9 | #define NPY__SVML_IS_ENABLED (NPY_SIMD && defined(NPY_HAVE_AVX512_SKX) && defined(NPY_CAN_LINK_SVML))
      |                                                                           ^
../numpy/_core/src/umath/loops_half.dispatch.c.src:70:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
   70 | #if NPY__SVML_IS_ENABLED

Fix macro expansion warning [-Wexpansion-to-defined] by removing 'defined'
usage in the NPY__SVML_IS_ENABLED macro expansion.
@seberg
Copy link
Member
seberg commented Apr 27, 2025

Thanks Sayed!

@seberg seberg merged commit 4961a14 into numpy:main Apr 27, 2025
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0