BUG: restore MSVC complex typedefs for icx on Windows - #32512
Closed
mitre88 wants to merge 1 commit into
Closed
Conversation
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
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After gh-31389,
npy_common.hexcludes__INTEL_LLVM_COMPILERfrom the_MSC_VERbranch, so icx on Windows getsdouble _Complexfornpy_cdoublewhilenpy_math.hstill calls UCRTcreal/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_COMPILERexclusion), matching the small back-portable fix preferred in the issue discussion. Themeson.buildpart of gh-31389 is left alone.Test plan
_MSC_VER && !__INTEL_COMPILERagain selects_Dcomplex/_Fcomplex/_Lcomplex(including when__INTEL_LLVM_COMPILERis defined)<numpy/npy_math.h>on Windows should compile again (repro from BUG: npy_math.h complex accessors call UCRT creal/cimag, but npy_cdouble is C99 _Complex for icx on Windows #32482)Fixes #32482