From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2161) id E03C43858290; Wed, 15 Jun 2022 00:38:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E03C43858290 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Mark Wielaard To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: Always suppress stringop-overread warning in debuginfod-support.c X-Act-Checkin: binutils-gdb X-Git-Author: Mark Wielaard X-Git-Refname: refs/heads/master X-Git-Oldrev: 55bb7f5bb6caf52d94d9716ef94ac4d02d71ad12 X-Git-Newrev: dac0515d825e788dec188fff4d5b9d4ac7383f33 Message-Id: <20220615003803.E03C43858290@sourceware.org> Date: Wed, 15 Jun 2022 00:38:03 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 00:38:04 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Ddac0515d825e= 788dec188fff4d5b9d4ac7383f33 commit dac0515d825e788dec188fff4d5b9d4ac7383f33 Author: Mark Wielaard Date: Tue May 31 11:00:06 2022 +0200 gdb: Always suppress stringop-overread warning in debuginfod-support.c =20 Just like on s390x with g++ 11.2.1 and ppc64le with g++ 11.3.1 g++ 11 on hppa produces a spurious warning for stringop-overread in debuginfod_is_enabled for url_view. Just always suppress it on all arches. =20 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29198 =20 gdb/ChangeLog: =20 * debuginfod-support.c (debuginfod_is_enabled): Always use DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD. Diff: --- gdb/debuginfod-support.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index 6dc08fc29b6..9dbe6b5d8b2 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -193,17 +193,14 @@ debuginfod_is_enabled () if (off =3D=3D gdb::string_view::npos) break; url_view =3D url_view.substr (off); -#if defined (__s390x__) || defined (__powerpc64__) - /* g++ 11.2.1 on s390x and g++ 11.3.1 on ppc64le seem convinced - url_view might be of SIZE_MAX length. And so complains - because the length of an array can only be PTRDIFF_MAX. */ + /* g++ 11.2.1 on s390x, g++ 11.3.1 on ppc64le and g++ 11 on + hppa seem convinced url_view might be of SIZE_MAX length. + And so complains because the length of an array can only + be PTRDIFF_MAX. */ DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD -#endif off =3D url_view.find_first_of (' '); -#if defined (__s390x__) || defined (__powerpc64__) DIAGNOSTIC_POP -#endif gdb_printf (_(" <%ps>\n"), styled_string (file_name_style.style (),