summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2019-10-04 16:18:22 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2019-10-04 16:18:22 +0000
commitb51a085b32f2dae08113e513b4fb1f24071009df (patch)
tree504b20b02a7bc2fb37b79a8e5362c519447ac562 /gcc
parent4e4791ffbae66bc5c4b96c014efb21dd7e7f2775 (diff)
downloadgcc-b51a085b32f2dae08113e513b4fb1f24071009df.tar.gz
cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable. From-SVN: r276590
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cgraph.h6
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,5 +1,9 @@
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+ * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.
+
+2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
* genmatch.c (commutate): Rename local var.
(lower_cond): Reuse local var.
(dt_node::gen, dt_node::gen_kids, dt_node::gen_kids_1,
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. */