This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch fixes using the Objective-C 2.0 dot-syntax in cases such as object1.property = object2.property = x; A number of testcases are included showing this and related cases compiling and running fine :-) It also tidies up some details in the implementation of "object.property++" and similar that I submitted in my previous patch, and cleans up some related testcases. Ok to commit to trunk ? Thanks In gcc/objc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_build_setter_call): New. (objc_maybe_build_modify_expr): Rewritten to build a compound statement. (objc_build_incr_expr_for_property_ref): Updated calls to objc_maybe_build_modify_expr to call objc_build_setter_call instead. Use build_modify_expr () instead of build2 (MODIFY_EXPR, ...). Use convert () instead of build1 (NOP_EXPR, ...). Use TREE_NO_WARNING on the final compound statement to silence C++ warnings. In gcc/testsuite/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/property/dotsyntax-18.m: New. * objc.dg/property/dotsyntax-19.m: New. * objc.dg/property/dotsyntax-20.m: New. * obj-c++.dg/property/dotsyntax-18.mm: New. * obj-c++.dg/property/dotsyntax-19.mm: New. * obj-c++.dg/property/dotsyntax-20.mm: New. * objc.dg/property/dotsyntax-4.m: Removed some unused variables and code. * objc.dg/property/dotsyntax-6.m: Same change. * objc.dg/property/dotsyntax-16.m: Same change. * objc.dg/property/dotsyntax-17.m: Same change. * obj-c++.dg/property/dotsyntax-4.mm: Same change. * obj-c++.dg/property/dotsyntax-6.mm: Same change. * obj-c++.dg/property/dotsyntax-16.mm: Same change. * obj-c++.dg/property/dotsyntax-17.mm: Same change. * objc.dg/property/at-property-22.m: Added missing casts. * obj-c++.dg/property/at-property-22.mm: Same change.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |