zig
zig copied to clipboard
`zig cc -target <arch>-windows-gnu` produces a large amount of warnings
Zig Version
0.10.0
Steps to Reproduce and Observed Behavior
Building for any <arch>-windows-gnu target, where <arch> is i386, x86_64, or aarch64 results in a large amount of warnings:
Log
$ zig cc main.c -target x86_64-windows-gnu
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_access_s.c:30:1: warning: '_access_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_access_s (const char *s, int m)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:188:27: note: previous declaration is here
_SECIMP errno_t __cdecl _access_s(const char *_Filename,int _AccessMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:188:3: note: previous attribute is here
_SECIMP errno_t __cdecl _access_s(const char *_Filename,int _AccessMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_cgets_s.c:30:1: warning: '_cgets_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_cgets_s (char *s, size_t l, size_t *r_len)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:25:27: note: previous declaration is here
_SECIMP errno_t __cdecl _cgets_s (char *_Buffer,size_t _Size,size_t *_SizeRead);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:25:3: note: previous attribute is here
_SECIMP errno_t __cdecl _cgets_s (char *_Buffer,size_t _Size,size_t *_SizeRead);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/wmemcpy_s.c:30:1: warning: 'wmemcpy_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
wmemcpy_s (wchar_t *d, size_t dn, const wchar_t *s, size_t n)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:353:27: note: previous declaration is here
_SECIMP errno_t __cdecl wmemcpy_s (wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:353:3: note: previous attribute is here
_SECIMP errno_t __cdecl wmemcpy_s (wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_cgetws_s.c
:30:1: warning: '_cgetws_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_cgetws_s (wchar_t *s, size_t l, size_t *r_len)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:37:27: note: previous declaration is here
_SECIMP errno_t __cdecl _cgetws_s (wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:37:3: note: previous attribute is here
_SECIMP errno_t __cdecl _cgetws_s (wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_chsize_s.c:30:1: warning: '_chsize_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_chsize_s (int fd, long long sz)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:191:27: note: previous declaration is here
_SECIMP errno_t __cdecl _chsize_s (int _FileHandle,__int64 _Size);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:191:3: note: previous attribute is here
_SECIMP errno_t __cdecl _chsize_s (int _FileHandle,__int64 _Size);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/wmemmove_s.c:30:1: warning: 'wmemmove_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
wmemmove_s (wchar_t *d, size_t dn, const wchar_t *s, size_t n)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:354:27: note: previous declaration is here
_SECIMP errno_t __cdecl wmemmove_s(wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:354:3: note: previous attribute is here
_SECIMP errno_t __cdecl wmemmove_s(wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/memmove_s.c:29:1: warning: 'memmove_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
memmove_s (void *d, size_t dn, const void *s, size_t n)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/string_s.h:50:27: note: previous declaration is here
_SECIMP errno_t __cdecl memmove_s(void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/string_s.h:50:3: note: previous attribute is here
_SECIMP errno_t __cdecl memmove_s(void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
Compile C Objects [11/61] memmove_s.c... 1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/sprintf_s.c:10:1: warning: 'sprintf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
sprintf_s (char *_DstBuf, size_t _Size, const char *_Format, ...)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:520:23: note: previous declaration is here
_SECIMP int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:520:3: note: previous attribute is here
_SECIMP int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/vsprintf_s.c:31:1: warning: 'vsprintf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
vsprintf_s (char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:518:23: note: previous declaration is here
_SECIMP int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:518:3: note: previous attribute is here
_SECIMP int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/strerror_s.c:29:1: warning: 'strerror_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
strerror_s (char *buffer, size_t numberOfElements, int errnum)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/string_s.h:26:27: note: previous declaration is here
_SECIMP errno_t __cdecl strerror_s(char *_Buf,size_t _SizeInBytes,int _ErrNum);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/string_s.h:26:3: note: previous attribute is here
_SECIMP errno_t __cdecl strerror_s(char *_Buf,size_t _SizeInBytes,int _ErrNum);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
Compile C Objects [21/61] _vswprintf_p.c... /home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vswprintf_p.c:3:13: warning: '_vswprintf_p' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
int __cdecl _vswprintf_p(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:835:23: note: previous declaration is here
_SECIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:835:3: note: previous attribute is here
_SECIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vscwprintf_p.c:3:13: warning: '_vscwprintf_p' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
int __cdecl _vscwprintf_p(const wchar_t *format, va_list arglist)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:837:23: note: previous declaration is here
_SECIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:837:3: note: previous attribute is here
_SECIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vscprintf_p.c:3:13: warning: '_vscprintf_p' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
int __cdecl _vscprintf_p(const char *format, va_list arglist)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:531:23: note: previous declaration is here
_SECIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:531:3: note: previous attribute is here
_SECIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/stdio_s.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_wstrtime_s.c:30:1: warning: '_wstrtime_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_wstrtime_s (wchar_t *d, size_t dn)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:198:27: note: previous declaration is here
_SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:198:3: note: previous attribute is here
_SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_wstrdate_s.c:30:1: warning: '_wstrdate_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_wstrdate_s (wchar_t *d, size_t dn)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:196:27: note: previous declaration is here
_SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:196:3: note: previous attribute is here
_SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/asctime_s.c:30:1: warning: 'asctime_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
asctime_s (char *d, size_t dn, const struct tm *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:140:27: note: previous declaration is here
_SECIMP errno_t __cdecl asctime_s (char *_Buf,size_t _SizeInWords,const struct tm *_Tm);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:140:3: note: previous attribute is here
_SECIMP errno_t __cdecl asctime_s (char *_Buf,size_t _SizeInWords,const struct tm *_Tm);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_wmktemp_s.c:30:1: warning: '_wmktemp_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_wmktemp_s (wchar_t *d, size_t dn)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:27:27: note: previous declaration is here
_SECIMP errno_t __cdecl _wmktemp_s (wchar_t *_TemplateName,size_t _SizeInWords);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:27:3: note: previous attribute is here
_SECIMP errno_t __cdecl _wmktemp_s (wchar_t *_TemplateName,size_t _SizeInWords);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
Compile C Objects [30/61] _strdate_s.c... /home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/memcpy_s.c:29:1: warning: 'memcpy_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
memcpy_s (void *d, size_t dn, const void *s, size_t n)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:51:27: note: previous declaration is here
_SECIMP errno_t __cdecl memcpy_s (void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:51:3: note: previous attribute is here
_SECIMP errno_t __cdecl memcpy_s (void *_dest,size_t _numberOfElements,const void *_src,size_t _count);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_wctime64_s.c:30:1: warning: '_wctime64_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_wctime64_s (wchar_t *d, size_t dn, const __time64_t *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:200:27: note: previous declaration is here
_SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:200:3: note: previous attribute is here
_SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_wctime32_s.c:30:1: warning: '_wctime32_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_wctime32_s (wchar_t *d, size_t dn, const __time32_t *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:192:27: note: previous declaration is here
_SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:192:3: note: previous attribute is here
_SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_wasctime_s.c:30:1: warning: '_wasctime_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_wasctime_s (wchar_t *d, size_t dn, const struct tm *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:190:27: note: previous declaration is here
_SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:190:3: note: previous attribute is here
_SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vcwprintf_s_l.c:30:1: warning: '_vcwprintf_s_l' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_vcwprintf_s_l (const wchar_t *s, _locale_t loc, va_list argp)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:38:23: note: previous declaration is here
_SECIMP int __cdecl _vcwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:38:3: note: previous attribute is here
_SECIMP int __cdecl _vcwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_waccess_s.c:30:1: warning: '_waccess_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_waccess_s (const wchar_t *s, int m)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:26:27: note: previous declaration is here
_SECIMP errno_t __cdecl _waccess_s (const wchar_t *_Filename,int _AccessMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:26:3: note: previous attribute is here
_SECIMP errno_t __cdecl _waccess_s (const wchar_t *_Filename,int _AccessMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_strdate_s.c:30:1: warning: '_strdate_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_strdate_s (char *d, size_t dn)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:152:27: note: previous declaration is here
_SECIMP errno_t __cdecl _strdate_s (char *_Buf,size_t _SizeInBytes);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:152:3: note: previous attribute is here
_SECIMP errno_t __cdecl _strdate_s (char *_Buf,size_t _SizeInBytes);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
Compile C Objects [35/61] _gmtime64_s.c... /home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vcprintf_s.c:30:1: warning: '_vcprintf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_vcprintf_s (const char *s, va_list argp)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:31:23: note: previous declaration is here
_SECIMP int __cdecl _vcprintf_s (const char *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_strtime_s.c31::303::1 : warning: note: previous attribute is here'_strtime_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_strtime_s (char *d, size_t dn)
^
_SECIMP int __cdecl _vcprintf_s (const char *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:154:27: note: previous declaration is here
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport) _SECIMP errno_t __cdecl _strtime_s (char *_Buf ,size_t _SizeInBytes);
^ ^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:154:3: note: previous attribute is here
_SECIMP errno_t __cdecl _strtime_s (char *_Buf ,size_t _SizeInBytes);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vcprintf_s_l.c:30:1: warning: '_vcprintf_s_l' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_vcprintf_s_l (const char *s, _locale_t loc, va_list argp)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:33:23: note: previous declaration is here
_SECIMP int __cdecl _vcprintf_s_l (const char *_Format,_locale_t _Locale,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:33:3: note: previous attribute is here
_SECIMP int __cdecl _vcprintf_s_l (const char *_Format,_locale_t _Locale,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_vcwprintf_s.c:30:1: warning: '_vcwprintf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_vcwprintf_s (const wchar_t *s, va_list argp)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:36:23: note: previous declaration is here
_SECIMP int __cdecl _vcwprintf_s (const wchar_t *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/wchar_s.h:36:3: note: previous attribute is here
_SECIMP int __cdecl _vcwprintf_s (const wchar_t *_Format,va_list _ArgList);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_umask_s.c:30:1: warning: '_umask_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_umask_s (int m, int *pold)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:226:27: note: previous declaration is here
_SECIMP errno_t __cdecl _umask_s (int _NewMode,int *_OldMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:226:3: note: previous attribute is here
_SECIMP errno_t __cdecl _umask_s (int _NewMode,int *_OldMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
Compile C Objects [43/61] _controlfp_s.c... /home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_sopen_s.c:39:17: warning: '_sopen_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
errno_t __cdecl _sopen_s(int* pfh, const char *filename, int oflag, int shflag, int pmode)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:289:27: note: previous declaration is here
_SECIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:289:3: note: previous attribute is here
_SECIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
Compile C Objects [46/61] _create_locale.c... /home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_gmtime64_s.c:30:1: warning: '_gmtime64_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_gmtime64_s (struct tm *ptm, const __time64_t *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:176:27: note: previous declaration is here
_SECIMP errno_t __cdecl _gmtime64_s (struct tm *_Tm,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:176:3: note: previous attribute is here
_SECIMP errno_t __cdecl _gmtime64_s (struct tm *_Tm,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_mktemp_s.c:30:1: warning: '_mktemp_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_mktemp_s (char *d, size_t dn)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:207:27: note: previous declaration is here
_SECIMP errno_t __cdecl _mktemp_s (char *_TemplateName,size_t _Size);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/io.h:207:3: note: previous attribute is here
_SECIMP errno_t __cdecl _mktemp_s (char *_TemplateName,size_t _Size);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_localtime32_s.c:30:1: warning: '_localtime32_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_localtime32_s (struct tm *ptm, const __time32_t *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:148:27: /home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_gmtime32_s.c:30:note: 1: previous declaration is here
warning: '_gmtime32_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_gmtime32_s (struct tm *ptm, const __time32_t *pt)
^
_SECIMP errno_t __cdecl _localtime32_s (struct tm *_Tm,const __time32_t *_Time);/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_localtime64_s.c::146 ^30:
:271:: note: warning: previous declaration is here/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h'_localtime64_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
:148
:3: note: previous attribute is here
_localtime64_s (struct tm *ptm, const __time64_t *pt) _SECIMP errno_t __cdecl _gmtime32_s (struct tm *_Tm,const __time32_t *_Time);
^ ^
_SECIMP errno_t __cdecl _localtime32_s (struct tm *_Tm,const __time32_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:146:3: /home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.hnote: :178previous attribute is here:27
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:: 16:28note: : previous declaration is here
note: expanded from macro '_SECIMP'
_SECIMP errno_t __cdecl _gmtime32_s (struct tm *_Tm,const __time32_t *_Time);
^
#define _SECIMP __declspec(dllimport)
^
_SECIMP errno_t __cdecl _localtime64_s (struct tm *_Tm,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28:/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h :178:note: 3:expanded from macro '_SECIMP'
note: previous attribute is here
#define _SECIMP __declspec(dllimport)
^
_SECIMP errno_t __cdecl _localtime64_s (struct tm *_Tm,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_ctime64_s.c:30:1: warning: '_ctime64_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_ctime64_s (char *d, size_t dn, const __time64_t *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:174:27: note: previous declaration is here
_SECIMP errno_t __cdecl _ctime64_s (char *_Buf,size_t _SizeInBytes,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:174:3: note: previous attribute is here
_SECIMP errno_t __cdecl _ctime64_s (char *_Buf,size_t _SizeInBytes,const __time64_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_cwprintf_s.c:11:1: warning: '_cwprintf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_cwprintf_s (const wchar_t *s, ...)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:40:23: note: previous declaration is here
_SECIMP int __cdecl _cwprintf_s (const wchar_t *_Format,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:40:3: note: previous attribute is here
_SECIMP int __cdecl _cwprintf_s (const wchar_t *_Format,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_ctime32_s.c:30:1#define _SECIMP __declspec(dllimport):
^
warning: '_ctime32_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_ctime32_s (char *d, size_t dn, const __time32_t *pt)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:142:27: note: previous declaration is here
_SECIMP errno_t __cdecl _ctime32_s (char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/time.h:142:3: note: previous attribute is here
_SECIMP errno_t __cdecl _ctime32_s (char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_controlfp_s.c:14:17: warning: '_controlfp_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
errno_t __cdecl _controlfp_s(
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/float.h:262:25: note: previous declaration is here
_SECIMP errno_t __cdecl _controlfp_s(unsigned int *_CurrentState, unsigned int _NewValue, unsigned int _Mask);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/float.h:262:1: note: previous attribute is here
_SECIMP errno_t __cdecl _controlfp_s(unsigned int *_CurrentState, unsigned int _NewValue, unsigned int _Mask);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/float.h:19:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
Compile C Objects [48/61] _create_locale.c... 1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_cprintf_s.c:11:1: warning: '_cprintf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_cprintf_s (const char *s, ...)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:28:23: note: previous declaration is here
_SECIMP int __cdecl _cprintf_s (const char *_Format,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:28:3: note: previous attribute is here
_SECIMP int __cdecl _cprintf_s (const char *_Format,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
11 warning warning generated generated.
.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_cwprintf_s_l.c:11:1: warning: '_cwprintf_s_l' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_cwprintf_s_l (const wchar_t *s, _locale_t loc, ...)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:44:23: note: previous declaration is here
_SECIMP int __cdecl _cwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:44:3: note: previous attribute is here
_SECIMP int __cdecl _cwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/secapi/_cprintf_s_l.c:11:1: warning: '_cprintf_s_l' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
_cprintf_s_l (const char *s, _locale_t loc, ...)
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:32:23: note: previous declaration is here
_SECIMP int __cdecl _cprintf_s_l (const char *_Format,_locale_t _Locale,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/sec_api/conio_s.h:32:3: note: previous attribute is here
_SECIMP int __cdecl _cprintf_s_l (const char *_Format,_locale_t _Locale,...);
^
/home/alexrp/sysroot/lib/zig/lib/libc/include/any-windows-any/string.h:16:28: note: expanded from macro '_SECIMP'
#define _SECIMP __declspec(dllimport)
^
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/misc/wcstoumax.c:36:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
wcstoumax(nptr, endptr, base)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/misc/wcstoimax.c:36:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
wcstoimax(nptr, endptr, base)
^
1 warning generated.
1 warning generated.
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/misc/strtoimax.c:34:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
strtoimax(nptr, endptr, base)
^
/home/alexrp/sysroot/lib/zig/lib/libc/mingw/misc/strtoumax.c:34:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
strtoumax(nptr, endptr, base)
^
1 warning generated.
1 warning generated.
These were not produced in 0.9.1.
Expected Behavior
No warnings.
what is the content of main.c ?
what is the content of
main.c?
Anything, e.g. int main() {}.
a comment on #12087 mistook the addition of the __LIBMSVCRT_OS__ guard as a replacement for the __LIBMSVCRT__ guard. 85f4e57 then introduced the bug.
__LIBMSVCRT_OS__ was added to distinguish between msvcrt and the other runtimes built by mingw:
But header file
msvcrt.hcontains inline function__mingw_get_msvcrt_handle()which should be used only from import library for runtimemsvcrt.dll(and not for any other runtimemsvcr*.dll) as code from that header file directly usesmsvcrt.dlllibrary.
as other msvcr*.dll runtimes are not built, i believe the fix is another one-line change to define both guards.
the set of four warnings at the bottom was addressed by mingw in November 2022. the cause is deprecated K&R-style function definitions in each file.
-Wdeprecated-non-prototype is noted in #13385, perhaps this issue should be closed once these -Winconsistent-dllimport warnings are resolved.
actually, that would be silly. that issue is tracking musl's issue, which looks more involved than mingw's. mingw has already been fixed upstream, too.