Closed
Description
I'll have a commit shortly that will add test coverage for this (among other things) but I couldn't enable it for -target x86_64-windows-gnu because it regressed:
/home/andy/dev/zig/build/zig test /home/andy/dev/zig/test/stage1/behavior.zig --library c --test-name-prefix behavior-windows-x86_64-Debug-c-multi --cache-dir /home/andy/dev/zig/zig-cache --name test -target x86_64-windows-gnu --test-cmd wine64 --test-cmd-bin --override-std-dir /home/andy/dev/zig/std
In file included from /home/andy/dev/zig/build/lib/zig/libc/mingw/crt/gs_support.c:16:
In file included from /home/andy/dev/zig/build/lib/zig/include/intrin.h:12:
In file included from /home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/intrin.h:41:
/home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/psdk_inc/intrin-impl.h:1944:18: error: function cannot return function type 'int (unsigned int)'
unsigned __int64 _xgetbv(unsigned int);
^
/home/andy/dev/zig/build/lib/zig/include/xsaveintrin.h:35:42: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
^
In file included from /home/andy/dev/zig/build/lib/zig/libc/mingw/crt/gs_support.c:16:
In file included from /home/andy/dev/zig/build/lib/zig/include/intrin.h:12:
In file included from /home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/intrin.h:41:
/home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/psdk_inc/intrin-impl.h:1947:18: error: function cannot return function type 'int (unsigned int)'
unsigned __int64 _xgetbv(unsigned int index)
^
/home/andy/dev/zig/build/lib/zig/include/xsaveintrin.h:35:42: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
^
In file included from /home/andy/dev/zig/build/lib/zig/libc/mingw/crt/gs_support.c:16:
In file included from /home/andy/dev/zig/build/lib/zig/include/intrin.h:12:
In file included from /home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/intrin.h:41:
/home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/psdk_inc/intrin-impl.h:1947:18: error: definition of builtin function '__builtin_ia32_xgetbv'
/home/andy/dev/zig/build/lib/zig/include/xsaveintrin.h:35:20: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
^
In file included from /home/andy/dev/zig/build/lib/zig/libc/mingw/crt/gs_support.c:16:
In file included from /home/andy/dev/zig/build/lib/zig/include/intrin.h:12:
In file included from /home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/intrin.h:41:
/home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any/psdk_inc/intrin-impl.h:1947:18: error: parameter name omitted
/home/andy/dev/zig/build/lib/zig/include/xsaveintrin.h:35:43: note: expanded from macro '_xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))
^
4 errors generated.
The following command failed:
/home/andy/dev/zig/build/zig cc -MD -MV -MF /home/andy/.local/share/zig/stage1/tmp/EVEG8z_6N-4f-gs_support.o.d -nostdinc -fno-spell-checking -isystem /home/andy/dev/zig/build/lib/zig/include -target x86_64-unknown-windows-gnu -Wno-pragma-pack -g -fno-omit-frame-pointer -D_DEBUG -fno-stack-protector -o /home/andy/.local/share/zig/stage1/tmp/EVEG8z_6N-4f-gs_support.o -c /home/andy/dev/zig/build/lib/zig/libc/mingw/crt/gs_support.c -DHAVE_CONFIG_H -D_SYSCRT=1 -DCRTDLL=1 -isystem /home/andy/dev/zig/build/lib/zig/libc/include/any-windows-any -isystem /home/andy/dev/zig/build/lib/zig/libc/mingw/include -std=gnu99 -D_CRTBLD -D_WIN32_WINNT=0x0f00 -D__MSVCRT_VERSION__=0x700 -g -O2