From 453fb5e830356559b8a54a5655219a874a39509e Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 1 Dec 2017 10:30:53 -0800 Subject: [PATCH] removed -ftrapv from tests/ debug flags -ftrapv is apparently buggy for gcc. versions >= 5 are supposed to work better, but even then, some complaints say it's still flaky when optimizations are enabled. I even saw a post saying it only works if one creates its own signal handler, which would make this flag no longer transparent. on clang, it seems to work correctly. But we would need to add a method to selectively add flags depending on compiler. That's too much troubles for the intended benefit (just catch integer overflows, which we can also do using ubsan). --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 8cc953ec..f944fd5a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -32,7 +32,7 @@ CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ -Wstrict-prototypes -Wundef -Wformat-security \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -ftrapv + -Wredundant-decls CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)