cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 4 Oct 2019 16:18:22 +0000 (16:18 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Fri, 4 Oct 2019 16:18:22 +0000 (16:18 +0000)
2019-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.

From-SVN: r276590

gcc/ChangeLog
gcc/cgraph.h

index ba33fe7..23cb589 100644 (file)
@@ -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,
index 66a4dae..73b2be6 100644 (file)
@@ -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.  */