diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2014-04-25 17:10:25 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2014-04-25 17:10:25 +0100 |
commit | 4ec21835cbed3f28c7939dcc72795c28dc6dc46a (patch) | |
tree | b3d111885b38dbdf08b39841fa441a00df20ef5b | |
parent | 0e4c913f530be89adfbc6dd491d407e866c82b6f (diff) | |
download | gcc-4ec21835cbed3f28c7939dcc72795c28dc6dc46a.zip gcc-4ec21835cbed3f28c7939dcc72795c28dc6dc46a.tar.gz gcc-4ec21835cbed3f28c7939dcc72795c28dc6dc46a.tar.bz2 |
re PR libstdc++/60958 (Initialization of arrays in tr1/regex ill-formed or with undefined behaviour)
PR libstdc++/60958
* include/tr1/regex (regex_traits::isctype): Comment out broken code.
* testsuite/util/testsuite_regex.h (regex_match_debug): Improve
comment.
From-SVN: r209807
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/regex | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/util/testsuite_regex.h | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 75853f8..eace534 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2014-04-25 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/60958 + * include/tr1/regex (regex_traits::isctype): Comment out broken code. + * testsuite/util/testsuite_regex.h (regex_match_debug): Improve + comment. + 2014-04-25 Marc Glisse <marc.glisse@inria.fr> * testsuite/util/testsuite_abi.cc (check_version): Update for diff --git a/libstdc++-v3/include/tr1/regex b/libstdc++-v3/include/tr1/regex index 3cff23a..0387472 100644 --- a/libstdc++-v3/include/tr1/regex +++ b/libstdc++-v3/include/tr1/regex @@ -678,7 +678,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__ctype.is(__c, __f)) return true; - +#if 0 // special case of underscore in [[:w:]] if (__c == __ctype.widen('_')) { @@ -698,7 +698,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__f | __bt) return true; } - +#endif return false; } diff --git a/libstdc++-v3/testsuite/util/testsuite_regex.h b/libstdc++-v3/testsuite/util/testsuite_regex.h index 9460ed6..c2031e9 100644 --- a/libstdc++-v3/testsuite/util/testsuite_regex.h +++ b/libstdc++-v3/testsuite/util/testsuite_regex.h @@ -131,7 +131,7 @@ namespace __gnu_test // regex_match_debug behaves like regex_match, but will run *two* executors // (if there's no back-reference) and check if their results agree. If not, - // an exception throws. One can use them just in the way of using regex_match. + // an exception is thrown. The arguments are the same as for regex_match. template<typename _Bi_iter, typename _Alloc, typename _Ch_type, typename _Rx_traits> bool @@ -153,7 +153,7 @@ namespace __gnu_test // __m is unspecified if return value is false. if (__res1 == __res2 && (!__res1 || __m == __mm)) return __res1; - throw(std::exception()); + throw std::exception(); } // No match_results version |