diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-01-08 20:32:32 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-01-08 20:32:32 +0000 |
commit | 5d19c1500460004ffadc7272393e1622116627ba (patch) | |
tree | 770f2af01b5691c14b3f8405af6033c060f3ab29 /gcc/objc/objc-act.c | |
parent | 046608a3e0569946f4a499c59e02f45b057d7251 (diff) | |
download | gcc-5d19c1500460004ffadc7272393e1622116627ba.zip gcc-5d19c1500460004ffadc7272393e1622116627ba.tar.gz gcc-5d19c1500460004ffadc7272393e1622116627ba.tar.bz2 |
objc-act.c (objc_finish_foreach_loop): Mark collection expression as read.
gcc/objc:
* objc-act.c (objc_finish_foreach_loop): Mark collection expression
as read.
gcc/testsuite:
* objc.dg/foreach-1.m: Add "-Wall" to flags.
From-SVN: r168602
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r-- | gcc/objc/objc-act.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 605705b..6e69070 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -13635,6 +13635,8 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll t = build2 (MODIFY_EXPR, void_type_node, objc_foreach_collection_decl, collection_expression); SET_EXPR_LOCATION (t, location); append_to_statement_list (t, &BIND_EXPR_BODY (bind)); + /* We have used 'collection_expression'. */ + mark_exp_read (collection_expression); /* __objc_foreach_enum_state.state = 0; */ t = build2 (MODIFY_EXPR, void_type_node, objc_build_component_ref (objc_foreach_enum_state_decl, |