[Bug libstdc++/67015] "^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled
timshen at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 29 04:31:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67015
--- Comment #5 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Wed Jul 29 04:30:25 2015
New Revision: 226337
URL: https://gcc.gnu.org/viewcvs?rev=226337&root=gcc&view=rev
Log:
Backport from mainline
2015-07-29 Tim Shen <timshen@google.com>
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:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/bits/regex_compiler.h
branches/gcc-5-branch/libstdc++-v3/include/bits/regex_compiler.tcc
branches/gcc-5-branch/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc
More information about the Gcc-bugs
mailing list