]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
regex_scanner.tcc (_Scanner<>::_M_eat_escape_posix): Let ordinary char escaping in...
authorTim Shen <timshen91@gmail.com>
Sat, 28 Sep 2013 13:41:09 +0000 (13:41 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Sat, 28 Sep 2013 13:41:09 +0000 (13:41 +0000)
2013-09-28  Tim Shen <timshen91@gmail.com>

* include/bits/regex_scanner.tcc (_Scanner<>::_M_eat_escape_posix):
Let ordinary char escaping in POSIX be valid.
* testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: Test this
change.

From-SVN: r203005

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex_scanner.tcc
libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc

index ead095e786a916c541c51279fc3bf8268516ac04..e240505e352ecf8b68e28a497b47537f9623c73c 100644 (file)
@@ -1,3 +1,10 @@
+2013-09-28  Tim Shen <timshen91@gmail.com>
+
+       * include/bits/regex_scanner.tcc (_Scanner<>::_M_eat_escape_posix):
+       Let ordinary char escaping in POSIX be valid.
+       * testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: Test this
+       change.
+
 2013-09-27  François Dumont  <fdumont@gcc.gnu.org>
 
        * include/bits/predefined_ops.h: New.
index e0dff9009c604107c56d000ddda9312e5bef0cf7..fc8273878ce5d4f01d06870e63fc4bbca4ce7e15 100644 (file)
@@ -457,7 +457,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          _M_value.assign(1, __c);
        }
       else
-       __throw_regex_error(regex_constants::error_escape);
+       {
+#ifdef __STRICT_ANSI__
+         __throw_regex_error(regex_constants::error_escape);
+#else
+         _M_token = _S_token_ord_char;
+         _M_value.assign(1, __c);
+#endif
+       }
       ++_M_current;
     }
 
index 68fd56af760249a77029090ae6b0200cb594f734..d005dc040eb88f0ecc20f2cf4433a4941071a070 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-options "-std=c++0x" }
-// { dg-do run { xfail *-*-* } }
+// { dg-options "-std=gnu++11" }
 
 // 2012-08-20  Benjamin Kosnik <bkoz@redhat.com>
 //