Skip to content

Commit

Permalink
Reject VS2022 compiler versions with the known bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Feb 1, 2023
1 parent 9417834 commit ee3176a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions win32/Makefile.sub
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions win32/setup.mak
Expand Up @@ -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

Expand Down

0 comments on commit ee3176a

Please sign in to comment.