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 ba33fe7886f2a78adaef4f678c4e43bc58243080..23cb58929a8fe5c1c00a7ec879e24556ef64c214 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 66a4dae76184433d749c9ebd7d5e75bed2fc31e1..73b2be6d26de5fe355e9f80f4ab64bc50faed700 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.  */