From 3f6d4c520c14a9cf688ac59f8d8f8a48f61ef314 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 13 Oct 2010 05:21:52 +0000 Subject: [PATCH] * c-parser.c (c_parser_for_statement): Initialize incr. From-SVN: r165411 --- gcc/ChangeLog | 4 ++++ gcc/c-parser.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e11f72a664..fe28f76cc14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-10-13 Alexandre Oliva + + * c-parser.c (c_parser_for_statement): Initialize incr. + 2010-10-12 Xinliang David Li PR tree-optimization/45972 diff --git a/gcc/c-parser.c b/gcc/c-parser.c index eb7844853b7..3953cc6943b 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -4538,6 +4538,9 @@ c_parser_for_statement (c_parser *parser) /* Parse the initialization declaration or expression. */ cond = error_mark_node; object_expression = error_mark_node; + /* Initializing incr should not be necessary, but it avoids + bogus warnings of uninitialized uses. */ + incr = error_mark_node; if (c_parser_next_token_is (parser, CPP_SEMICOLON)) {