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++/102667] Inconsistent result of std::regex_match Date: Wed, 13 Oct 2021 19:42:25 +0000 [thread overview] Message-ID: <bug-102667-4-O82mLJ4Akw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102667-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102667 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:081f08b80db2ce8a10375b3af118db008308affc commit r9-9774-g081f08b80db2ce8a10375b3af118db008308affc Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Oct 11 09:07:15 2021 +0100 libstdc++: Fix std::match_results::end() for failed matches [PR102667] The end() function needs to consider whether the underlying vector is empty, not whether the match_results object is empty. That's because the underlying vector will always contain at least three elements for a match_results object that is "ready". It contains three extra elements which are stored in the vector but are not considered part of sequence, and so should not be part of the [begin(),end()) range. libstdc++-v3/ChangeLog: PR libstdc++/102667 * include/bits/regex.h (match_result::empty()): Optimize by calling the base function directly. (match_results::end()): Check _Base_type::empty() not empty(). * testsuite/28_regex/match_results/102667.C: New test. (cherry picked from commit 84088dc4bb6a546c896a068dc201463493babf43)
next prev parent reply other threads:[~2021-10-13 19:42 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-09 17:33 [Bug libstdc++/102667] New: " fchelnokov at gmail dot com 2021-10-09 18:41 ` [Bug libstdc++/102667] " redi at gcc dot gnu.org 2021-10-11 19:37 ` cvs-commit at gcc dot gnu.org 2021-10-12 10:58 ` cvs-commit at gcc dot gnu.org 2021-10-12 16:27 ` cvs-commit at gcc dot gnu.org 2021-10-13 19:42 ` cvs-commit at gcc dot gnu.org [this message] 2021-10-13 19:44 ` redi at gcc dot gnu.org
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-102667-4-O82mLJ4Akw@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: 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).