From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Martin Liska <mliska@suse.cz>
Subject: [PATCH] init: Kconfig (gcc13): disable -Warray-bounds on gcc-13 too
Date: Mon, 31 Oct 2022 12:42:12 +0100 [thread overview]
Message-ID: <20221031114212.10266-1-jirislaby@kernel.org> (raw)
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
reply other threads:[~2022-10-31 11:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221031114212.10266-1-jirislaby@kernel.org \
--to=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mliska@suse.cz \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®