* [PATCH] init: Kconfig (gcc13): disable -Warray-bounds on gcc-13 too
@ 2022-10-31 11:42 Jiri Slaby (SUSE)
0 siblings, 0 replies; only message in thread
From: Jiri Slaby (SUSE) @ 2022-10-31 11:42 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, Jiri Slaby (SUSE), Martin Liska
Nobody took the chance to fix (or at least localize) the warnings since
commit f0be87c42cbd (gcc-12: disable '-Warray-bounds' universally for
now). The new compiler (gcc-13) still reports issues like:
drivers/gpu/drm/amd/display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback':
drivers/gpu/drm/amd/display/dc/core/dc_stream.c:531:55: error: array subscript -1 is below array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
Note that 'j' can never be negative. So disable the warning on gcc-13
too until someone takes time to localize them.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Liska <mliska@suse.cz>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
init/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 8fe07ab401b5..51f0fe64022d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -900,14 +900,14 @@ config CC_IMPLICIT_FALLTHROUGH
default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
-# Currently, disable gcc-12 array-bounds globally.
+# Currently, disable gcc-12 & 13 array-bounds globally.
# We may want to target only particular configurations some day.
config GCC12_NO_ARRAY_BOUNDS
def_bool y
config CC_NO_ARRAY_BOUNDS
bool
- default y if CC_IS_GCC && GCC_VERSION >= 120000 && GCC_VERSION < 130000 && GCC12_NO_ARRAY_BOUNDS
+ default y if CC_IS_GCC && GCC_VERSION >= 120000 && GCC_VERSION < 140000 && GCC12_NO_ARRAY_BOUNDS
#
# For architectures that know their GCC __int128 support is sound
--
2.38.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-31 11:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 11:42 [PATCH] init: Kconfig (gcc13): disable -Warray-bounds on gcc-13 too Jiri Slaby (SUSE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®