From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>,
Jan-Benedict Glaw <jbglaw@lug-owl.de>,
gdb@sourceware.org
Subject: Re: Array out of bounds
Date: Mon, 6 Sep 2021 16:49:10 +0200 [thread overview]
Message-ID: <def0c62d-9752-da1c-f22f-f0e1a3992635@suse.de> (raw)
In-Reply-To: <8d535493-e77b-05da-d7b1-afb4379801f1@suse.de>
On 9/6/21 12:24 PM, Tom de Vries via Gdb wrote:
> On 9/6/21 3:48 AM, Simon Marchi via Gdb wrote:
>>
>>
>> On 2021-09-05 2:06 p.m., Jan-Benedict Glaw wrote:
>>> Hi!
>>>
>>> On Sun, 2021-09-05 08:40:35 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
>>>> Hi!
>>>>
>>>> As I started with automated building/testing the GNU Toolchain again,
>>>> I found this when building GDB (make all-gdb) with a fairly recent GCC
>>>> on a Linux system (PC) when GDB is configured for
>>>> --target=aarch64-linux:
>>>
>>> Just to add: Seems to be independent of a target. Produces the same
>>> warning/error for all tested targets using a current GCC.
>>>
>>> Thanks,
>>> Jan-Benedict
>>>
>>
>> I just built gcc at 66bba4dc263d ("Daily bump."), and I don't see it.
>>
>
> I've managed to reproduce, filed as PR gcc/102216 - "False positive
> warray-bounds with -O2" @
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102216 .
FWIW, I've done a -Wno-array-bounds build at -O2 using the same gcc, and
that build succeeded.
Thanks,
- Tom
$ git diff
diff --git a/gdb/configure b/gdb/configure
index f0b1af4a6ea..410e69d09a1 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -16903,6 +16903,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wstrict-null-sentinel \
+-Wno-array-bounds \
"
case "${host}" in
diff --git a/gdbserver/configure b/gdbserver/configure
index b227167e270..ca4b12adc76 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -9653,6 +9653,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wstrict-null-sentinel \
+-Wno-array-bounds \
"
case "${host}" in
diff --git a/gdbsupport/configure b/gdbsupport/configure
index a9dd02c5b72..f39d1a794a2 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -10138,6 +10138,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wstrict-null-sentinel \
+-Wno-array-bounds \
"
case "${host}" in
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index 46036fa461e..f68e9cf3778 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -53,6 +53,7 @@ build_warnings="-Wall -Wpointer-arith \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wstrict-null-sentinel \
+-Wno-array-bounds \
"
case "${host}" in
prev parent reply other threads:[~2021-09-06 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-05 6:40 Jan-Benedict Glaw
2021-09-05 18:06 ` Jan-Benedict Glaw
2021-09-06 1:48 ` Simon Marchi
2021-09-06 6:03 ` Jan-Benedict Glaw
2021-09-07 14:27 ` Simon Marchi
2021-09-06 10:24 ` Tom de Vries
2021-09-06 14:49 ` Tom de Vries [this message]
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=def0c62d-9752-da1c-f22f-f0e1a3992635@suse.de \
--to=tdevries@suse.de \
--cc=gdb@sourceware.org \
--cc=jbglaw@lug-owl.de \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).