diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-06 21:27:01 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-06 21:27:01 +0000 |
commit | 81976f54aa6152b4f98718f8752f825bf0b3898d (patch) | |
tree | 93b00dadc4940e81c3e6032ee733ef0eb44650e9 /gcc/c-parser.c | |
parent | d8452f7db3e62eab00a148d21c1f0c92920069f4 (diff) | |
download | gcc-81976f54aa6152b4f98718f8752f825bf0b3898d.tar.gz |
In gcc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* 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 <nicola.pero@meta-innovation.com>
* objc-act.c (objc_finish_foreach_loop): Mark the
object_expression as used.
In gcc/testsuite/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/foreach-8.m: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167518 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |