* [PATCH committed] avoid name lookup warning in tree.c
@ 2017-03-28 6:28 Markus Trippelsdorf
0 siblings, 0 replies; only message in thread
From: Markus Trippelsdorf @ 2017-03-28 6:28 UTC (permalink / raw)
To: gcc-patches
In stage1 with -std=gnu++98 I see:
/home/markus/gcc/gcc/tree.c: In function âvoid inchash::add_expr(const_tree, inchash::hash&, unsigned int)â:
/home/markus/gcc/gcc/tree.c:8013:11: warning: name lookup of âiâ changed
for (i = TREE_OPERAND_LENGTH (t) - 1; i >= 0; --i)
^
/home/markus/gcc/gcc/tree.c:7773:7: warning: matches this âiâ under ISO standard rules
int i;
^
/home/markus/gcc/gcc/tree.c:7869:16: warning: matches this âiâ under old rules
for (int i = 0; i < TREE_VEC_LENGTH (t); ++i)
^
Fix committed as obvious.
PR tree-optimization/880216
* tree.c (add_expr): Avoid name lookup warning.
diff --git a/gcc/tree.c b/gcc/tree.c
index 8f87e7cfacb2..c87b7695c82a 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -7866,7 +7866,7 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags)
return;
}
case TREE_VEC:
- for (int i = 0; i < TREE_VEC_LENGTH (t); ++i)
+ for (i = 0; i < TREE_VEC_LENGTH (t); ++i)
inchash::add_expr (TREE_VEC_ELT (t, i), hstate, flags);
return;
case FUNCTION_DECL:
--
Markus
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-28 5:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 6:28 [PATCH committed] avoid name lookup warning in tree.c Markus Trippelsdorf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).