public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/101361] Bogus -Wstringop-overread warning with -O3
Date: Wed, 14 Jul 2021 15:00:06 +0000	[thread overview]
Message-ID: <bug-101361-4-SXt7Xt5Q93@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101361-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101361

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:96205c97294d5db94bd89cd731830058d9c49abd

commit r11-8741-g96205c97294d5db94bd89cd731830058d9c49abd
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jul 13 12:21:27 2021 +0100

    libstdc++: Simplify basic_string_view::ends_with [PR 101361]

    The use of npos triggers a diagnostic as described in PR c++/101361.
    This change replaces the use of npos with the exact length, which is
    already known. We can further simplify it by inlining the effects of
    compare and substr, avoiding the redundant range checks in the latter.

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR c++/101361
            * include/std/string_view (ends_with): Use traits_type::compare
            directly.

    (cherry picked from commit 4d3eaeb4f505b0838c673ee28e7dba8687fc8272)

  parent reply	other threads:[~2021-07-14 15:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  6:25 [Bug c++/101361] New: " boris at kolpackov dot net
2021-07-11  8:55 ` [Bug c++/101361] " Theodore.Papadopoulo at inria dot fr
2021-07-11  8:57 ` Theodore.Papadopoulo at inria dot fr
2021-07-12 22:56 ` [Bug libstdc++/101361] " msebor at gcc dot gnu.org
2021-07-13 11:08 ` redi at gcc dot gnu.org
2021-07-13 11:31 ` redi at gcc dot gnu.org
2021-07-13 12:17 ` redi at gcc dot gnu.org
2021-07-13 14:21 ` cvs-commit at gcc dot gnu.org
2021-07-13 14:41 ` msebor at gcc dot gnu.org
2021-07-14 15:00 ` cvs-commit at gcc dot gnu.org [this message]
2021-07-14 16:05 ` cvs-commit at gcc dot gnu.org
2021-07-14 16:07 ` [Bug c++/101361] " redi at gcc dot gnu.org
2023-03-20 12:58 ` mail+gnu at tzik dot jp
2023-03-20 13:08 ` mail+gnu at tzik dot jp

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=bug-101361-4-SXt7Xt5Q93@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).