Commit 5d19c150 by Iain Sandoe

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
parent 046608a3
2011-01-08 Iain Sandoe <iains@gcc.gnu.org>
* objc-act.c (objc_finish_foreach_loop): Mark collection expression
as read.
2011-01-02 H.J. Lu <hongjiu.lu@intel.com>
* objc-act.c (check_that_protocol_is_defined): Fix a typo.
......
......@@ -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,
......
2011-01-08 Iain Sandoe <iains@gcc.gnu.org>
* objc.dg/foreach-1.m: Add "-Wall" to flags.
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47078
......
......@@ -4,6 +4,7 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */
/* { dg-options "-Wall" } */
#import "../objc-obj-c++-shared/Object1.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment