aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-12-13 13:36:33 +0000
committerJonathan Wakely <jwakely@redhat.com>2021-12-14 14:23:55 +0000
commitb0e6a257f1862e217cdf19332ea0f7bad56dcddc (patch)
treeb2ae540e36ef1330dfe73d870ccf45aedf24b13e
parent561414cdf8ef0d3c1e2da80b3c8aae56de745b1e (diff)
downloadgcc-b0e6a257f1862e217cdf19332ea0f7bad56dcddc.zip
gcc-b0e6a257f1862e217cdf19332ea0f7bad56dcddc.tar.gz
gcc-b0e6a257f1862e217cdf19332ea0f7bad56dcddc.tar.bz2
libstdc++: Fix non-reserved name in <regex> header
libstdc++-v3/ChangeLog: * include/bits/regex_compiler.tcc (_Compiler::_M_match_token): Use reserved name for parameter. * testsuite/17_intro/names.cc: Check "token".
-rw-r--r--libstdc++-v3/include/bits/regex_compiler.tcc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/names.cc1
2 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/regex_compiler.tcc b/libstdc++-v3/include/bits/regex_compiler.tcc
index 956262a..0e2e132 100644
--- a/libstdc++-v3/include/bits/regex_compiler.tcc
+++ b/libstdc++-v3/include/bits/regex_compiler.tcc
@@ -580,9 +580,9 @@ namespace __detail
template<typename _TraitsT>
bool
_Compiler<_TraitsT>::
- _M_match_token(_TokenT token)
+ _M_match_token(_TokenT __token)
{
- if (token == _M_scanner._M_get_token())
+ if (__token == _M_scanner._M_get_token())
{
_M_value = _M_scanner._M_get_value();
_M_scanner._M_advance();
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index 2a908ea..1341bed 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -109,6 +109,7 @@
#define func (
#define tmp (
#define sz (
+#define token (
#if __cplusplus < 201103L
#define uses_allocator (