From b51a085b32f2dae08113e513b4fb1f24071009df Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 4 Oct 2019 16:18:22 +0000 Subject: [PATCH] cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable. 2019-10-04 Bernd Edlinger * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable. From-SVN: r276590 --- gcc/ChangeLog | 4 ++++ gcc/cgraph.h | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba33fe7886f..23cb58929a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Bernd Edlinger + + * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable. + 2019-10-04 Bernd Edlinger * genmatch.c (commutate): Rename local var. diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 66a4dae7618..73b2be6d26d 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -648,8 +648,10 @@ symtab_node::checking_verify_symtab_nodes (void) } /* Walk all aliases for NODE. */ -#define FOR_EACH_ALIAS(node, alias) \ - for (unsigned x_i = 0; node->iterate_direct_aliases (x_i, alias); x_i++) +#define FOR_EACH_ALIAS(NODE, ALIAS) \ + for (unsigned ALIAS##_iter_ = 0; \ + (NODE)->iterate_direct_aliases (ALIAS##_iter_, ALIAS); \ + ALIAS##_iter_++) /* This is the information that is put into the cgraph local structure to recover a function. */ -- 2.30.2