re PR libstdc++/67015 ("^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled)
authorTim Shen <timshen@google.com>
Wed, 29 Jul 2015 03:45:35 +0000 (03:45 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Wed, 29 Jul 2015 03:45:35 +0000 (03:45 +0000)
commitf9ce3c163948ece546d642ac0c62fbc11d8481e4
tree05c7ab84f01d92671974be16b8eec22dd3353f57
parent3d61d8758577f5bf9ce4884544cbbc09af71ca28
re PR libstdc++/67015 ("^[a-z0-9][a-z0-9-]*$", std::regex::extended is miscompiled)

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.

From-SVN: r226336
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex_compiler.h
libstdc++-v3/include/bits/regex_compiler.tcc
libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc