aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-09-29 13:48:15 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-09-29 13:48:15 +0100
commit9ca4c42a3b756e54a92ff8e1ac6c396b680b7839 (patch)
tree4187c8480ee535d462759c7b7d1375e1c17c85fc /gcc
parentb701e1f8f6870c0f8cb4050674da489101dd05a5 (diff)
downloadgcc-9ca4c42a3b756e54a92ff8e1ac6c396b680b7839.zip
gcc-9ca4c42a3b756e54a92ff8e1ac6c396b680b7839.tar.gz
gcc-9ca4c42a3b756e54a92ff8e1ac6c396b680b7839.tar.bz2
libstdc++: Check for invalid syntax_option_type values in <regex>
The standard says that it is invalid for more than one grammar element to be set in a value of type regex_constants::syntax_option_type. This adds a check in the regex compiler andthrows an exception if an invalid value is used. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * include/bits/regex_compiler.h (_Compiler::_S_validate): New function. * include/bits/regex_compiler.tcc (_Compiler::_Compiler): Use _S_validate to check flags. * include/bits/regex_error.h (_S_grammar): New error code for internal use. * testsuite/28_regex/basic_regex/ctors/grammar.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions