Skip to content

MSVC update causing compilation failures: error C2169: '__fmax': intrinsic function, cannot be defined #17817

@andrewrk

Description

GitHub Actions has started rolling out new versions which contain updated MSVC, which is causing sporadic test failures:

GitHub Actions Runner Image Version: 20231024.1.0: pass
GitHub Actions Runner Image Version: 20231029.1.0: fail

Build and run behavior tests with msvc...
test-x86_64-windows-msvc.c
D:\a\zig\zig\lib\zig.h(2183): warning C4244: 'function': conversion from 'uint16_t' to 'uint8_t', possible loss of data
...
D:\a\zig\zig\lib\zig.h(2572): warning C4244: 'function': conversion from 'uint16_t' to 'uint8_t', possible loss of data
D:\a\zig\zig\lib\zig.h(3366): warning C4391: 'zig_f80 __fmax(zig_f80,zig_f80,zig_f80)': incorrect return type for intrinsic function, expected 'double'
D:\a\zig\zig\lib\zig.h(3366): warning C4392: 'zig_f80 __fmax(zig_f80,zig_f80,zig_f80)': incorrect number of arguments for intrinsic function, expected '2' arguments
test-x86_64-windows-msvc.c(53496): warning C4133: 'function': incompatible types - from 'A__9138 *' to 'A__9134 *'
test-x86_64-windows-msvc.c(53498): warning C4133: 'function': incompatible types - from 'A__9139 *' to 'A__9134 *'
test-x86_64-windows-msvc.c(65411): warning C4047: '=': 'void (__cdecl *)(void)' differs in levels of indirection from 'uint8_t (*)[4]'
test-x86_64-windows-msvc.c(123935): error C2167: '__fmax': too many actual parameters for intrinsic function
test-x86_64-windows-msvc.c(124352): error C2167: '__fmax': too many actual parameters for intrinsic function
test-x86_64-windows-msvc.c(260451): warning C4090: '=': different 'const' qualifiers
compiler_rt-x86_64-windows-msvc.c
D:\a\zig\zig\lib\zig.h(2183): warning C4244: 'function': conversion from 'uint16_t' to 'uint8_t', possible loss of data
...
D:\a\zig\zig\lib\zig.h(2572): warning C4244: 'function': conversion from 'uint16_t' to 'uint8_t', possible loss of data
D:\a\zig\zig\lib\zig.h(3366): warning C4391: 'zig_f80 __fmax(zig_f80,zig_f80,zig_f80)': incorrect return type for intrinsic function, expected 'double'
D:\a\zig\zig\lib\zig.h(3366): warning C4392: 'zig_f80 __fmax(zig_f80,zig_f80,zig_f80)': incorrect number of arguments for intrinsic function, expected '2' arguments
compiler_rt-x86_64-windows-msvc.c(490): warning C4392: 'zig_f80 __fmax(zig_f80,zig_f80,zig_f80)': incorrect number of arguments for intrinsic function, expected '2' arguments
compiler_rt-x86_64-windows-msvc.c(19292): warning C4392: 'zig_f80 __fmax(const zig_f80,const zig_f80,const zig_f80)': incorrect number of arguments for intrinsic function, expected '2' arguments
compiler_rt-x86_64-windows-msvc.c(19292): error C2169: '__fmax': intrinsic function, cannot be defined

cc @kcbanner - I'm going to disable this CI check until this is resolved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    backend-cThe C backend (CBE) outputs C source code.bugObserved behavior contradicts documented or intended behavioros-windows

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions