From: Willy Tarreau Date: Sun, 3 Jan 2021 19:27:13 +0000 (+0100) Subject: BUILD: Makefile: disable -Warray-bounds until it's fixed in gcc 11 X-Git-Tag: v2.4-dev5~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e8c35da1b93b64ec4892192aec3d61d73b3bbce;p=thirdparty%2Fhaproxy.git BUILD: Makefile: disable -Warray-bounds until it's fixed in gcc 11 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). --- diff --git a/Makefile b/Makefile index 0ea3ef6b83..ec4c1be0e0 100644 --- 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)