aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2013-09-26 21:48:04 +0000
committerTim Shen <timshen@gcc.gnu.org>2013-09-26 21:48:04 +0000
commitd4e12601014e71e24defe20e92996782c022ac11 (patch)
tree90c04ea427653461b774a51a03546d6ba1b04867 /libstdc++-v3/include
parent13b670acd32e02f0d749723a9631f2582bb2771d (diff)
downloadgcc-d4e12601014e71e24defe20e92996782c022ac11.zip
gcc-d4e12601014e71e24defe20e92996782c022ac11.tar.gz
gcc-d4e12601014e71e24defe20e92996782c022ac11.tar.bz2
regex_error.h: Remove _S_error_last to follow the standard.
2013-09-26 Tim Shen <timshen91@gmail.com> * regex_error.h: Remove _S_error_last to follow the standard. * regex_scanner.tcc: (_Scanner<_FwdIter>::_M_scan_in_brace): Change error_brace to error_badbrace. (_Scanner<>::_M_eat_escape_posix): Extended doesn't support back-reference. * testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc: Move here from ../../extended. * testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc: Likewise. From-SVN: r202958
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/regex_error.h1
-rw-r--r--libstdc++-v3/include/bits/regex_scanner.tcc8
2 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/include/bits/regex_error.h b/libstdc++-v3/include/bits/regex_error.h
index 7f06727..a39a8ea 100644
--- a/libstdc++-v3/include/bits/regex_error.h
+++ b/libstdc++-v3/include/bits/regex_error.h
@@ -61,7 +61,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_error_badrepeat,
_S_error_complexity,
_S_error_stack,
- _S_error_last
};
/** The expression contained an invalid collating element name. */
diff --git a/libstdc++-v3/include/bits/regex_scanner.tcc b/libstdc++-v3/include/bits/regex_scanner.tcc
index abdbcc6..e0dff90 100644
--- a/libstdc++-v3/include/bits/regex_scanner.tcc
+++ b/libstdc++-v3/include/bits/regex_scanner.tcc
@@ -345,7 +345,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
++_M_current;
}
else
- __throw_regex_error(regex_constants::error_brace);
+ __throw_regex_error(regex_constants::error_badbrace);
}
else if (__c == '}')
{
@@ -353,7 +353,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_token = _S_token_interval_end;
}
else
- __throw_regex_error(regex_constants::error_brace);
+ __throw_regex_error(regex_constants::error_badbrace);
}
template<typename _FwdIter>
@@ -428,6 +428,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
}
+ // Differences between styles:
+ // 1) Extended doesn't support backref, but basic does.
template<typename _FwdIter>
void
_Scanner<_FwdIter>::
@@ -449,7 +451,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_eat_escape_awk();
return;
}
- else if (_M_ctype.is(_CtypeT::digit, __c) && __c != '0')
+ else if (_M_is_basic() && _M_ctype.is(_CtypeT::digit, __c) && __c != '0')
{
_M_token = _S_token_backref;
_M_value.assign(1, __c);