在 2026-8-28 19:53, Martin Storsjö 写道:
Clang 23 added the -Wattribute-alias warning just like GCC has had since GCC 8.When the functions take pointers to different structs (even if they may have identical members), Clang 23 warns about this mismatch under -Wattribute-alias, while GCC doesn't. A different kind of case is __mingw_strtold, which is aliased to __strtod when long double and regular doubles have the same size. This codepath hasn't been regularly built with GCC, but Clang now warns about it. Signed-off-by: Martin Storsjö <[email protected]> --- mingw-w64-crt/gdtoa/strtodnrp.c | 5 +++++ mingw-w64-crt/misc/ftime32.c | 3 +++ mingw-w64-crt/misc/ftime64.c | 3 +++ mingw-w64-crt/misc/ftw32.c | 4 ++++ mingw-w64-crt/misc/ftw64i32.c | 4 ++++ mingw-w64-crt/stdio/_wfindfirst32.c | 3 +++ mingw-w64-crt/stdio/msvcr110plus_fstat32.c | 3 +++ mingw-w64-crt/stdio/msvcr110plus_fstat64i32.c | 3 +++ mingw-w64-crt/stdio/msvcr110plus_stat32.c | 3 +++ mingw-w64-crt/stdio/msvcr110plus_stat64i32.c | 3 +++ mingw-w64-crt/stdio/msvcr110plus_wstat32.c | 3 +++ mingw-w64-crt/stdio/msvcr110plus_wstat64i32.c | 3 +++ mingw-w64-crt/stdio/msvcr110pre_fstat32.c | 3 +++ mingw-w64-crt/stdio/msvcr110pre_fstat64i32.c | 3 +++ mingw-w64-crt/stdio/msvcr110pre_stat32.c | 3 +++ mingw-w64-crt/stdio/msvcr110pre_stat64i32.c | 3 +++ mingw-w64-crt/stdio/msvcr110pre_wstat32.c | 3 +++ mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c | 3 +++ 18 files changed, 58 insertions(+)
These look good to me, too. However...
diff --git a/mingw-w64-crt/stdio/_wfindfirst32.c b/mingw-w64-crt/stdio/_wfindfirst32.c index a22a97998..e6038ebd5 100644 --- a/mingw-w64-crt/stdio/_wfindfirst32.c +++ b/mingw-w64-crt/stdio/_wfindfirst32.c @@ -1,5 +1,6 @@ #include <io.h> #include <string.h> +#include "internal.h"intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename, struct _wfinddata32_t *_FindData){ @@ -20,6 +21,8 @@ intptr_t (__cdecl *__MINGW_IMP_SYMBOL(_wfindfirst32))(const wchar_t *, struct _w#ifndef _WIN64#undef _wfindfirst +PRAGMA_DIAGNOSTIC_IGNORED_ATTRIBUTE_ALIAS_BEGIN intptr_t __attribute__ ((alias ("_wfindfirst32"))) __cdecl _wfindfirst(const char *, struct _wfinddata32_t *); extern intptr_t __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(_wfindfirst32))))) (__cdecl *__MINGW_IMP_SYMBOL(_wfindfirst))(const char *, struct _wfinddata32_t *); +PRAGMA_DIAGNOSTIC_IGNORED_ATTRIBUTE_ALIAS_END
unrelated to these patches, I think these `const char*` should be `const wchar_t*`. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
