]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
removed -ftrapv from tests/ debug flags
authorYann Collet <cyan@fb.com>
Fri, 1 Dec 2017 18:30:53 +0000 (10:30 -0800)
committerYann Collet <cyan@fb.com>
Fri, 1 Dec 2017 18:30:53 +0000 (10:30 -0800)
-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

index 8cc953ec84ad4c50284ba27bb4a4e15bb1fd5f42..f944fd5a8675d0a87e051483f9de5014d2a100fe 100644 (file)
@@ -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)