From ee3176a27afd943247fb6e82e95e2d1efafa4c50 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 29 Jan 2023 23:31:03 +0900 Subject: [PATCH] Reject VS2022 compiler versions with the known bugs --- win32/Makefile.sub | 2 -- win32/setup.mak | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index ff3a43774ec0ce..23662346f95d1a 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -728,9 +728,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define ALWAYS_INLINE(x) __forceinline x #define WARN_UNUSED_RESULT(x) x #define MAYBE_UNUSED(x) x -!if !defined(VS2022_FP_BUG) #define HAVE___ASSUME 1 -!endif #define FUNC_STDCALL(x) __stdcall x #define FUNC_CDECL(x) __cdecl x #define FUNC_FASTCALL(x) __fastcall x diff --git a/win32/setup.mak b/win32/setup.mak index 2ae4e1cfd53013..71796eae9ec778 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -163,9 +163,10 @@ main(void) } << @( \ - ($(CC) -O2 -DNO_ASSUME $@.c && .\$@ && $(CC) -O2 $@.c) && \ - (.\$@ || echo>>$(MAKEFILE) VS2022_FP_BUG=1) \ - ) & $(WIN32DIR:/=\)\rm.bat $@.* + $(CC) -O2 $@.c && .\$@ || \ + set bug=%ERRORLEVEL% \ + echo This compiler has an optimization bug \ + ) & $(WIN32DIR:/=\)\rm.bat $@.* & exit /b %bug% -version-: nul verconf.mk