]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: Makefile: disable -Warray-bounds until it's fixed in gcc 11
authorWilly Tarreau <w@1wt.eu>
Sun, 3 Jan 2021 19:27:13 +0000 (20:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Jan 2021 19:27:13 +0000 (20:27 +0100)
Ilya reported in issue #1010 that gcc 11 (still in development phase 3)
sees out-of-bounds accesses to tlskeys_reference. After a deep analysis
it turns out that the warning is erroneous and Tim could set up a
reproducer that was further simplified to file a gcc bug report (98503).
In order not to break builds on this version, let's temporarily disable
the warning, since no acceptable workaround could be defined. Once gcc
gets it right, the warning should be re-enabled as it is likely to catch
real errors (it's the first false positive here for us even though
roughly one hundred issues were reported around this one alone).

Makefile

index 0ea3ef6b83aeec6a8a12afa73d7c7dbbc8d6a193..ec4c1be0e0153bd7c1232de3293aebeafc04e432 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -195,6 +195,7 @@ SPEC_CFLAGS += $(call cc-nowarn,clobbered)
 SPEC_CFLAGS += $(call cc-nowarn,missing-field-initializers)
 SPEC_CFLAGS += $(call cc-nowarn,cast-function-type)
 SPEC_CFLAGS += $(call cc-nowarn,string-plus-int)
+SPEC_CFLAGS += $(call cc-nowarn,array-bounds)
 SPEC_CFLAGS += $(call cc-opt,-Wtype-limits)
 SPEC_CFLAGS += $(call cc-opt,-Wshift-negative-value)
 SPEC_CFLAGS += $(call cc-opt,-Wshift-overflow=2)