]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
build: Compile with -ftrapv.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 26 Oct 2021 17:11:02 +0000 (19:11 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 29 Jul 2022 17:22:09 +0000 (19:22 +0200)
This causes signed overflow to raise an exception. The option is
supported on the lowest gcc version we support, so we don't bother
to check by calling cc-option() in Makefile.real.

Makefile.real

index 6e8084d542b8888e2a838671b6a9be845ac2cae2..9a6c7e76fe1e9d95d4634e3298ce660b69366e9f 100644 (file)
@@ -119,6 +119,7 @@ CPPFLAGS += -I$(yy_build_dir)
 CPPFLAGS += $(lopsub_cppflags)
 
 STRICT_CFLAGS += -fno-strict-aliasing
+STRICT_CFLAGS += -ftrapv
 STRICT_CFLAGS += -g
 STRICT_CFLAGS += -Os
 STRICT_CFLAGS += -Wundef -W -Wuninitialized