public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Marek Polacek <mpolacek@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r10-9695] c++: Use FOR_EACH_VEC_ELT instead of range-based for loop.
Date: Sun, 11 Apr 2021 22:58:00 +0000 (GMT)	[thread overview]
Message-ID: <20210411225800.61CD63858024@sourceware.org> (raw)

https://gcc.gnu.org/g:1004d3bb5e590a2cc3d22bc9fb11d3bf4978a982

commit r10-9695-g1004d3bb5e590a2cc3d22bc9fb11d3bf4978a982
Author: Marek Polacek <polacek@redhat.com>
Date:   Sun Apr 11 16:58:09 2021 -0400

    c++: Use FOR_EACH_VEC_ELT instead of range-based for loop.
    
    gcc/cp/ChangeLog:
    
            PR c++/97966
            * pt.c (instantiate_class_template_1): Use FOR_EACH_VEC_ELT instead
            of range-based for loop.

Diff:
---
 gcc/cp/pt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 145c0b8063f..c1752fd1894 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12134,7 +12134,9 @@ instantiate_class_template_1 (tree type)
 
   /* Now that we've gone through all the members, instantiate those
      marked with attribute used.  */
-  for (tree x : used)
+  unsigned int i;
+  tree x;
+  FOR_EACH_VEC_ELT (used, i, x)
     mark_used (x);
 
   return type;


                 reply	other threads:[~2021-04-11 22:58 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=20210411225800.61CD63858024@sourceware.org \
    --to=mpolacek@gcc.gnu.org \
    --cc=gcc-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).