public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Mark Wielaard <mark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: Workaround stringop-overread warning in debuginfod-support.c on powerpc64 Date: Thu, 12 May 2022 10:41:18 +0000 (GMT) [thread overview] Message-ID: <20220512104118.620CA385742D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=73a5cb257a21ad38c85932b7be4a903404d91899 commit 73a5cb257a21ad38c85932b7be4a903404d91899 Author: Mark Wielaard <mark@klomp.org> Date: Thu May 12 00:46:37 2022 +0200 gdb: Workaround stringop-overread warning in debuginfod-support.c on powerpc64 Just like on s390x with g++ 11.2.1, ppc64le with g++ 11.3.1 produces a spurious warning for stringop-overread in debuginfod_is_enabled for url_view. Also suppress it on powerpc64. gdb/ChangeLog: * debuginfod-support.c (debuginfod_is_enabled): Use DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD on powerpc64. Diff: --- gdb/debuginfod-support.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index f2a31ea1952..6dc08fc29b6 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -193,15 +193,15 @@ debuginfod_is_enabled () if (off == gdb::string_view::npos) break; url_view = url_view.substr (off); -#if defined (__s390x__) - /* g++ 11.2.1 on s390x seems convinced url_view might be of - SIZE_MAX length. And so complains because the length of - an array can only be PTRDIFF_MAX. */ +#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. */ DIAGNOSTIC_PUSH DIAGNOSTIC_IGNORE_STRINGOP_OVERREAD #endif off = url_view.find_first_of (' '); -#if defined (__s390x__) +#if defined (__s390x__) || defined (__powerpc64__) DIAGNOSTIC_POP #endif gdb_printf
reply other threads:[~2022-05-12 10:41 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=20220512104118.620CA385742D@sourceware.org \ --to=mark@sourceware.org \ --cc=gdb-cvs@sourceware.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: linkBe 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).