public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-9695] c++: Use FOR_EACH_VEC_ELT instead of range-based for loop.
@ 2021-04-11 22:58 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2021-04-11 22:58 UTC (permalink / raw)
  To: gcc-cvs

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-11 22:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 22:58 [gcc r10-9695] c++: Use FOR_EACH_VEC_ELT instead of range-based for loop Marek Polacek

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