public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "Maciej W. Rozycki via Libc-alpha" <libc-alpha@sourceware.org>
Cc: "Maciej W. Rozycki" <macro@wdc.com>
Subject: Re: [PATCH] string: Fix GCC 11 `-Werror=stringop-overread' error
Date: Mon, 31 Aug 2020 11:01:37 +0200	[thread overview]
Message-ID: <875z8znq8e.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2008302126320.24175@redsun52.ssa.fujisawa.hgst.com> (Maciej W. Rozycki via Libc-alpha's message of "Sun, 30 Aug 2020 21:41:31 +0100 (BST)")

* Maciej W. Rozycki via Libc-alpha:

> glibc-stringop-overread.diff
> Index: glibc/string/rawmemchr.c
> ===================================================================
> --- glibc.orig/string/rawmemchr.c
> +++ glibc/string/rawmemchr.c
> @@ -31,6 +31,8 @@ RAWMEMCHR (const void *s, int c)
>    /* GCC 8 warns about the size passed to memchr being larger than
>       PTRDIFF_MAX; the use of SIZE_MAX is deliberate here.  */
>    DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow=");
> +  /* Likewise GCC 11, with a different warning option.  */
> +  DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
>  #endif

I think this needs to be in its own __GNUC_PREREQ block because GCC 7
does not have -Wstringop-overread.

Thanks,
Florian


  reply	other threads:[~2020-08-31  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 20:41 Maciej W. Rozycki
2020-08-31  9:01 ` Florian Weimer [this message]
2020-08-31 13:29   ` Maciej W. Rozycki
2020-09-01 17:37     ` Joseph Myers

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=875z8znq8e.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=macro@wdc.com \
    /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).