regex_scanner.tcc (_Scanner<>::_M_eat_escape_posix): Let ordinary char escaping in POSIX be valid.

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
This commit is contained in:
Tim Shen 2013-09-28 13:41:09 +00:00 committed by Tim Shen
parent c328471880
commit 8d60fca50e
3 changed files with 16 additions and 3 deletions

View 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.

View 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;
}

View 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>
//