On Monday 27 May 2024 13:04:56 LIU Hao wrote: > 在 2024-05-26 20:39, Pali Rohár 写道: > > --- > > mingw-w64-crt/misc/mbrtowc.c | 3 +++ > > mingw-w64-crt/misc/wcrtomb.c | 5 ++++- > > 2 files changed, 7 insertions(+), 1 deletion(-) > > > > This patch seems harmless. However I am curious, would anyone attempt to > build the CRT with `-mrtd` (__stdcall by default), or the CRT for something > else such as a driver?
I'm playing with CRT compiled with -Os -flto -ffat-lto-objects flags and for some unknown reasons I'm getting following warning when compiling trivial wprintf hello world application with msvcrt.dll and with mingw wprintf function (-D__USE_MINGW_ANSI_STDIO=1). mingw-w64-headers/crt/wchar.h:1426:18: warning: type of ‘mbrtowc’ does not match original declaration [-Wlto-type-mismatch] size_t __cdecl mbrtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SizeInBytes,mbstate_t * __restrict__ _State); ^ misc/mbrtowc.c:96:1: note: ‘mbrtowc’ was previously declared here misc/mbrtowc.c:96:1: note: code may be misoptimized unless -fno-strict-aliasing is used I thought that adding missing __cdecl would fix it, but no. Warning is still there. So I sent at least the patch to align declaration. Do do you have any idea, why GCC is throwing that warning? Why the declaration for LTO does not match? Btw list mingw-w64-public@lists.sourceforge.net stopped working, it rejected all my emails from the last week with following error: Remote-MTA: dns; mx.sourceforge.net. (216.105.38.6, the server for the domain lists.sourceforge.net.) Diagnostic-Code: smtp; 451 Could not complete recipient verify callout Seems that your email was rejected too, it is not in archive at: https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public