mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-25 06:02:08 +00:00
BUILD: makefile: re-enable strict aliasing
For a very long time we've used to build without strict aliasing due to very few places in the stick-tables code mostly, that initially we didn't know how to deal with. The problem of doing this is that it encourages to write possibly incorrect code such as the few SSL sample fetch functions that were recently fixed. All places causing aliasing errors on x86_64, i586, armv8, armv7 and mips were fixed so it's about time to re-enable the warning hoping to catch such errors early in the development cycle. As a bonus, this removed about 5kB of code.
This commit is contained in:
parent
1ac83af560
commit
d1c847abbc
5
Makefile
5
Makefile
@ -176,12 +176,11 @@ REG_TEST_FILES =
|
||||
REG_TEST_SCRIPT=./scripts/run-regtests.sh
|
||||
|
||||
#### Compiler-specific flags that may be used to disable some negative over-
|
||||
# optimization or to silence some warnings. -fno-strict-aliasing is needed with
|
||||
# gcc >= 4.4.
|
||||
# optimization or to silence some warnings.
|
||||
# We rely on signed integer wraparound on overflow, however clang think it
|
||||
# can do whatever it wants since it's an undefined behavior, so use -fwrapv
|
||||
# to be sure we get the intended behavior.
|
||||
SPEC_CFLAGS := -fno-strict-aliasing -Wdeclaration-after-statement
|
||||
SPEC_CFLAGS := -Wdeclaration-after-statement
|
||||
SPEC_CFLAGS += $(call cc-opt-alt,-fwrapv,$(call cc-opt,-fno-strict-overflow))
|
||||
SPEC_CFLAGS += $(call cc-nowarn,address-of-packed-member)
|
||||
SPEC_CFLAGS += $(call cc-nowarn,unused-label)
|
||||
|
Loading…
Reference in New Issue
Block a user