Commit 68e9116
committed
Fix build failure with ICX 2026 on Windows
ICX 2026 in clang-cl mode strictly enforces that C99 _Complex double
cannot be passed to UCRT's creal/cimag functions which expect _Dcomplex
(an MSVC struct type). This causes hard compilation errors in all three
build targets when C_STANDARD 99 is set, because CMake translates that
to -Qstd:c99 for ICX, enabling strict C99 complex type semantics.
numpy's npy_common.h defines npy_cdouble as 'double _Complex' for
IntelLLVM compilers regardless of platform. numpy's npy_math.h then
calls creal()/cimag() on npy_cdouble values. Under ICX 2025 this was
a warning; under ICX 2026 it is a hard error.
Fix: on Windows with IntelLLVM, unset C_STANDARD for all three targets
so CMake does not inject -Qstd:c99. ICX in its default clang-cl
compatibility mode handles the _Complex/_Dcomplex coercion without
error, matching the behavior of ICX 2025 and earlier.
Note: the underlying incompatibility is in numpy's npy_math.h which
should guard creal/cimag calls for __INTEL_LLVM_COMPILER on Windows,
similar to how npy_common.h already guards the npy_cdouble typedef.1 parent 2a16a65 commit 68e9116
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
132 | 143 | | |
133 | 144 | | |
134 | 145 | | |
| |||
140 | 151 | | |
141 | 152 | | |
142 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
143 | 157 | | |
144 | 158 | | |
145 | 159 | | |
| |||
0 commit comments