* c-parser.c (c_parser_for_statement): Initialize incr.
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 13 Oct 2010 05:21:52 +0000 (05:21 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Wed, 13 Oct 2010 05:21:52 +0000 (05:21 +0000)
From-SVN: r165411

gcc/ChangeLog
gcc/c-parser.c

index 9e11f72a6647dca235d1616067143ff4fa514f08..fe28f76cc14f050db9391d56165be8135cbd2a08 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-13  Alexandre Oliva  <aoliva@redhat.com>
+
+       * c-parser.c (c_parser_for_statement): Initialize incr.
+
 2010-10-12  Xinliang David Li  <davidxl@google.com>
 
        PR tree-optimization/45972
index eb7844853b7ac2fcadf541bb19ac7b7ef9387de0..3953cc6943b6e6c590b1d0f8740ee83fe468d75f 100644 (file)
@@ -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))
        {