diff options
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 800e340de95..af6cef41229 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -327,9 +327,7 @@ new_class_binding (tree name, tree value, tree type, cxx_scope *scope) /* Fixup the current bindings, as they might have moved. */ size_t i; - for (i = 0; - VEC_iterate (cp_class_binding, scope->class_shadowed, i, cb); - i++) + FOR_EACH_VEC_ELT (cp_class_binding, scope->class_shadowed, i, cb) { cxx_binding **b; b = &IDENTIFIER_BINDING (cb->identifier); @@ -1687,9 +1685,7 @@ print_binding_level (struct cp_binding_level* lvl) size_t i; cp_class_binding *b; fprintf (stderr, " class-shadowed:"); - for (i = 0; - VEC_iterate(cp_class_binding, lvl->class_shadowed, i, b); - ++i) + FOR_EACH_VEC_ELT (cp_class_binding, lvl->class_shadowed, i, b) fprintf (stderr, " %s ", IDENTIFIER_POINTER (b->identifier)); fprintf (stderr, "\n"); } @@ -2644,9 +2640,7 @@ poplevel_class (void) /* Remove the bindings for all of the class-level declarations. */ if (level->class_shadowed) { - for (i = 0; - VEC_iterate (cp_class_binding, level->class_shadowed, i, cb); - ++i) + FOR_EACH_VEC_ELT (cp_class_binding, level->class_shadowed, i, cb) IDENTIFIER_BINDING (cb->identifier) = cb->base.previous; ggc_free (level->class_shadowed); level->class_shadowed = NULL; @@ -4048,7 +4042,7 @@ tree_vec_contains (VEC(tree,gc)* vec, tree target) { unsigned int i; tree elt; - for (i = 0; VEC_iterate(tree,vec,i,elt); ++i) + FOR_EACH_VEC_ELT (tree,vec,i,elt) if (elt == target) return true; return false; @@ -5001,7 +4995,7 @@ arg_assoc_args_vec (struct arg_lookup *k, VEC(tree,gc) *args) unsigned int ix; tree arg; - for (ix = 0; VEC_iterate (tree, args, ix, arg); ++ix) + FOR_EACH_VEC_ELT (tree, args, ix, arg) if (arg_assoc (k, arg)) return true; return false; @@ -5484,7 +5478,7 @@ push_to_top_level (void) SET_IDENTIFIER_TYPE_VALUE (TREE_PURPOSE (t), TREE_VALUE (t)); } - for (i = 0; VEC_iterate (cxx_saved_binding, s->old_bindings, i, sb); ++i) + FOR_EACH_VEC_ELT (cxx_saved_binding, s->old_bindings, i, sb) IDENTIFIER_MARKED (sb->identifier) = 0; s->prev = scope_chain; @@ -5521,7 +5515,7 @@ pop_from_top_level (void) current_lang_base = 0; scope_chain = s->prev; - for (i = 0; VEC_iterate (cxx_saved_binding, s->old_bindings, i, saved); ++i) + FOR_EACH_VEC_ELT (cxx_saved_binding, s->old_bindings, i, saved) { tree id = saved->identifier; |