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

Skip to content

BUG: restore MSVC complex typedefs for icx on Windows - #32512

Closed
mitre88 wants to merge 1 commit into
numpy:mainfrom
mitre88:fix/npy-common-icx-complex-typedefs
Closed

BUG: restore MSVC complex typedefs for icx on Windows#32512
mitre88 wants to merge 1 commit into
numpy:mainfrom
mitre88:fix/npy-common-icx-complex-typedefs

Conversation

@mitre88

@mitre88 mitre88 commented Sep 5, 2026

Copy link
Copy Markdown

Summary

After gh-31389, npy_common.h excludes __INTEL_LLVM_COMPILER from the _MSC_VER branch, so icx on Windows gets double _Complex for npy_cdouble while npy_math.h still calls UCRT creal/cimag (which expect _Dcomplex). Including <numpy/npy_math.h> alone then fails to compile.

This restores the 2.4.4 typedef selection in npy_common.h (drop the __INTEL_LLVM_COMPILER exclusion), matching the small back-portable fix preferred in the issue discussion. The meson.build part of gh-31389 is left alone.

Test plan

Fixes #32482

numpygh-31389 excluded __INTEL_LLVM_COMPILER from the _MSC_VER
branch in npy_common.h, so icx on Windows got C99 _Complex
for npy_cdouble while npy_math.h still calls UCRT
creal/cimag which expect _Dcomplex.

Restore the 2.4.4 typedef selection (drop the
__INTEL_LLVM_COMPILER exclusion) so installed headers
compile again for downstream icx builds. Leave the
meson.build part of numpygh-31389 alone.

Fixes numpy#32482
@rgommers

rgommers commented Sep 6, 2026

Copy link
Copy Markdown
Member

I was clearly in the middle of working on this, and this doesn't actually fix the issue in full, much more is needed. I'll open a PR rather than try reviewing this drive-by PR, sorry.

@rgommers rgommers closed this Sep 6, 2026
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.

BUG: npy_math.h complex accessors call UCRT creal/cimag, but npy_cdouble is C99 _Complex for icx on Windows

2 participants