diff mbox

Let c-parser.c build with g++ -O3

Message ID orr5cbh7yc.fsf@livre.localdomain
State New
Headers show

Commit Message

Alexandre Oliva Jan. 17, 2011, 3:21 p.m. UTC
For some reason g++ complains about an uninitialized variable where gcc
doesn't.  This patch fixes it.  I'm checking it in as obvious unless
someone objects in the next few hours.
diff mbox

Patch

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* c-parser.c (c_parser_for_statement): Initialize
	collection_expression.

Index: gcc/c-parser.c
===================================================================
--- gcc/c-parser.c.orig	2011-01-13 08:36:59.862690502 -0200
+++ gcc/c-parser.c	2011-01-13 08:39:08.018939841 -0200
@@ -4763,7 +4763,9 @@  c_parser_for_statement (c_parser *parser
 {
   tree block, cond, incr, save_break, save_cont, body;
   /* The following are only used when parsing an ObjC foreach statement.  */
-  tree object_expression, collection_expression;
+  tree object_expression;
+  /* Silence the bogus uninitialized warning.  */
+  tree collection_expression = NULL;
   location_t loc = c_parser_peek_token (parser)->location;
   location_t for_loc = c_parser_peek_token (parser)->location;
   bool is_foreach_statement = false;