public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r10-10558] libstdc++: Fix non-reserved name in <regex> header
Date: Tue, 26 Apr 2022 13:11:39 +0000 (GMT)	[thread overview]
Message-ID: <20220426131139.434793858C53@sourceware.org> (raw)

https://gcc.gnu.org/g:b072b2f85aaa3f6d27c706b80f521335c675f63e

commit r10-10558-gb072b2f85aaa3f6d27c706b80f521335c675f63e
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Dec 13 13:36:33 2021 +0000

    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".
    
    (cherry picked from commit b0e6a257f1862e217cdf19332ea0f7bad56dcddc)

Diff:
---
 libstdc++-v3/include/bits/regex_compiler.tcc | 4 ++--
 libstdc++-v3/testsuite/17_intro/names.cc     | 1 +
 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 2ae4af02c89..d29a0537283 100644
--- a/libstdc++-v3/include/bits/regex_compiler.tcc
+++ b/libstdc++-v3/include/bits/regex_compiler.tcc
@@ -586,9 +586,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 7d3960e3843..f60c70ef561 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -107,6 +107,7 @@
 
 #define tmp (
 #define sz (
+#define token (
 
 #if __cplusplus < 201103L
 #define uses_allocator  (


                 reply	other threads:[~2022-04-26 13:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220426131139.434793858C53@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).