From 81976f54aa6152b4f98718f8752f825bf0b3898d Mon Sep 17 00:00:00 2001 From: nicola Date: Mon, 6 Dec 2010 21:27:01 +0000 Subject: In gcc/: 2010-12-06 Nicola Pero * c-parser.c (c_parser_for_statement): Use c_fully_fold() instead of c_process_expr_stmt() for the iterating and collection expressions of an Objective-C fast enumeration loop. In gcc/objc/: 2010-12-06 Nicola Pero * objc-act.c (objc_finish_foreach_loop): Mark the object_expression as used. In gcc/testsuite/: 2010-12-06 Nicola Pero * objc.dg/foreach-8.m: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167518 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/c-parser.c') diff --git a/gcc/c-parser.c b/gcc/c-parser.c index f2d5e5b0af8..62eb1e70a8d 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -4812,8 +4812,7 @@ c_parser_for_statement (c_parser *parser) is_foreach_statement = true; if (! lvalue_p (init_expression)) c_parser_error (parser, "invalid iterating variable in fast enumeration"); - object_expression = c_process_expr_stmt (loc, init_expression); - + object_expression = c_fully_fold (init_expression, false, NULL); } else { @@ -4854,7 +4853,8 @@ c_parser_for_statement (c_parser *parser) else { if (is_foreach_statement) - collection_expression = c_process_expr_stmt (loc, c_parser_expression (parser).value); + collection_expression = c_fully_fold (c_parser_expression (parser).value, + false, NULL); else incr = c_process_expr_stmt (loc, c_parser_expression (parser).value); } -- cgit v1.2.1