From 9240a6e9119ac60c27cc3ba10a31a80976d65daf Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 26 Oct 2021 19:11:02 +0200 Subject: [PATCH] build: Compile with -ftrapv. 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.real b/Makefile.real index 6e8084d5..9a6c7e76 100644 --- a/Makefile.real +++ b/Makefile.real @@ -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 -- 2.39.2