From 5e8c35da1b93b64ec4892192aec3d61d73b3bbce Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 3 Jan 2021 20:27:13 +0100 Subject: [PATCH] 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). --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0ea3ef6b8..ec4c1be0e 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)