You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incompatible with MSVC: initializer is not a constant #1275
The INFINITY macro and 1.0 / 0.0 are not constants in MSVC and need to be corrected for global.Infinity, number.NEGATIVE_INFINITY, and number.POSITIVE_INFINITY.
Visual Studio 2022
Exe Path: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64 cl.exe Version: Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64
Windows Kits: 10.0.22621.0
Activity
saghul commentedon Dec 20, 2025
Our CI compiles with MSVC just fine. What version are you trying to use?
kdada commentedon Dec 20, 2025
Visual Studio 2022
Exe Path: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64
cl.exeVersion: Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64Windows Kits: 10.0.22621.0
kdada commentedon Dec 20, 2025
for the 3 macros, it will generate:
bnoordhuis commentedon Dec 20, 2025
We've had that issue before with NAN, see f93dd58. I'll open a pull request.
Work around msvc definition of INFINITY
Work around msvc definition of INFINITY
Work around msvc definition of INFINITY (#1276)
kdada commentedon Mar 26, 2026
#1276 only fixed the definition in js_number_funcs, but not js_global_funcs, causing MSVC to still report compilation errors.
cc @bnoordhuis
Work around MSVC definition of infinity
saghul commentedon Mar 26, 2026
@kdada See #1424
Work around MSVC definition of infinity
Work around MSVC definition of infinity
Work around MSVC definition of infinity