This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/67015] "^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled
- 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: Wed, 29 Jul 2015 03:46:08 +0000
- Subject: [Bug libstdc++/67015] "^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled
- Auto-submitted: auto-generated
- References: <bug-67015-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67015
--- Comment #4 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Wed Jul 29 03:45:35 2015
New Revision: 226336
URL: https://gcc.gnu.org/viewcvs?rev=226336&root=gcc&view=rev
Log:
PR libstdc++/67015
* include/bits/regex_compiler.h (_Compiler<>::_M_expression_term,
_BracketMatcher<>::_M_add_collating_element): Change signature
to make checking the and of bracket expression easier.
* include/bits/regex_compiler.tcc (_Compiler<>::_M_expression_term):
Treat '-' as a valid literal if it's at the end of bracket expression.
* testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
New testcases.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/regex_compiler.h
trunk/libstdc++-v3/include/bits/regex_compiler.tcc
trunk/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc