summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-05-09 14:30:29 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-20 08:20:28 +0200
commita740b68fd1697eea082ee2b623a7cb17cbedb447 (patch)
tree821d52b64d937ab21d238f62ab7c97f91336b3ac /Makefile
parent8f6a84167e8618333d84ea4143812e3e74ced7da (diff)
downloadlinux-stable-a740b68fd1697eea082ee2b623a7cb17cbedb447.tar.gz
linux-stable-a740b68fd1697eea082ee2b623a7cb17cbedb447.tar.bz2
linux-stable-a740b68fd1697eea082ee2b623a7cb17cbedb447.zip
gcc-10: disable 'zero-length-bounds' warning for now
commit 5c45de21a2223fe46cf9488c99a7fbcf01527670 upstream. This is a fine warning, but we still have a number of zero-length arrays in the kernel that come from the traditional gcc extension. Yes, they are getting converted to flexible arrays, but in the meantime the gcc-10 warning about zero-length bounds is very verbose, and is hiding other issues. I missed one actual build failure because it was hidden among hundreds of lines of warning. Thankfully I caught it on the second go before pushing things out, but it convinced me that I really need to disable the new warnings for now. We'll hopefully be all done with our conversion to flexible arrays in the not too distant future, and we can then re-enable this warning. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2f423a010a87..d72ac9f94a9b 100644
--- a/Makefile
+++ b/Makefile
@@ -856,6 +856,9 @@ KBUILD_CFLAGS += -Wno-pointer-sign
# disable stringop warnings in gcc 8+
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
+# We'll want to enable this eventually, but it's not going away for 5.7 at least
+KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
+
# Enabled with W=2, disabled by default as noisy
KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)