This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64140] match_results.prefix() returns an incorrect result if regex_iterator holds a zero-length match
- From: "timshen at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Dec 2014 11:32:53 +0000
- Subject: [Bug libstdc++/64140] match_results.prefix() returns an incorrect result if regex_iterator holds a zero-length match
- Auto-submitted: auto-generated
- References: <bug-64140-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64140
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Sat Dec 6 11:32:21 2014
New Revision: 218445
URL: https://gcc.gnu.org/viewcvs?rev=218445&root=gcc&view=rev
Log:
PR libstdc++/64140
Backport form mainline
2014-12-04 Tim Shen <timshen@google.com>
* include/bits/regex.tcc (regex_iterator<>::operator++): Update
prefix.matched after modifying prefix.first.
* testsuite/28_regex/iterators/regex_iterator/char/64140.cc: New
testcase.
Added:
branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/iterators/regex_iterator/char/64140.cc
Modified:
branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex.tcc