Always apply -fwrapv on builds

This commit is contained in:
Gustaf Alhäll 2023-11-04 11:48:20 +01:00
parent 6d650728f6
commit 80475adabf
No known key found for this signature in database
GPG key ID: 6C1F67D690CDEDFD
4 changed files with 4 additions and 11 deletions

View file

@ -253,6 +253,7 @@ target_compile_options(SRB2SDL2 PRIVATE
-Winline
-Wformat-y2k
-Wformat-security
-fwrapv
$<$<VERSION_LESS:$<C_COMPILER_VERSION>,2.9.5>:
-Wno-div-by-zero
@ -260,10 +261,6 @@ target_compile_options(SRB2SDL2 PRIVATE
-Wdisabled-optimization
>
$<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,3.4.0>:
-fwrapv
>
$<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,4.0.0>:
-Wold-style-definition
-Wmissing-field-initializers
@ -326,6 +323,7 @@ target_compile_options(SRB2SDL2 PRIVATE
-Wno-error=non-literal-null-conversion
-Wno-error=constant-conversion
-Wno-error=unused-but-set-variable
-fwrapv
>
# C, MSVC

View file

@ -164,7 +164,7 @@ sources:=
makedir:=../make
# -DCOMPVERSION: flag to use comptime.h
opts:=-DCOMPVERSION -g
opts:=-DCOMPVERSION -g -fwrapv
libs:=
# This is a list of variables names, of which if defined,

View file

@ -65,8 +65,7 @@ gcc_versions:=\
75 74 73 72 71 70\
64 63 62 61 60\
55 54 53 52 51 50\
49 48 47 46 45 44 43 42 41 40\
34
49 48 47 46 45 44 43 42 41 40
latest_gcc_version:=13.2

View file

@ -160,10 +160,6 @@ opts+=-O0
endif
endif
ifdef GCC34
opts+=-fwrapv
endif
ifdef VALGRIND
ifdef GCC46
WFLAGS+=-Wno-error=unused-but-set-variable