OSDN Git Service

In gcc/:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Dec 2010 09:38:52 +0000 (09:38 +0000)
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Dec 2010 09:38:52 +0000 (09:38 +0000)
commite16610d055313c83e07ed3c61128785bdfb870ce
tree1455b598d50eb7e482cbb74cb6884dc439905ab7
parent3ed6ea20edc4f93023f9b843ce7daa8ac8f6d197
In gcc/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

* c-parser.c (c_parser_objc_class_definition): Recognize
Objective-C 2.0 class extensions.

In gcc/cp/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

* parser.c (cp_parser_objc_superclass_or_category): Recognize
Objective-C 2.0 class extensions.  Added iface_p and
is_class_extension arguments.
(cp_parser_objc_class_interface): Updated call to
cp_parser_objc_superclass_or_category.
(cp_parser_objc_class_implementation): Same change.

In gcc/objc/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

* objc-act.c (objc_in_class_extension): New.
(objc_start_category_interface): If -fobjc-std=objc1
was specified, produce an error if a class extension is used.
(objc_finish_interface): Reset objc_in_class_extension to false.
(objc_add_property_declaration): Allow a class extension to extend
readonly properties in the main @interface to be readwrite.
(start_class): Added code to deal with class extensions.  In that
case, return the existing interface after adding any additional
protocols to it and setting objc_in_class_extension to true.
(continue_class): If in a class extension, do not generate the
instance variable template.

In gcc/testsuite/:
2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>

* objc.dg/class-extension-1.m: New.
* objc.dg/class-extension-2.m: New.
* objc.dg/class-extension-3.m: New.
* objc.dg/property/at-property-26.m: New.
* objc.dg/property/at-property-27.m: New.
* objc.dg/property/at-property-28.m: New.
* obj-c++.dg/class-extension-1.mm: New.
* obj-c++.dg/class-extension-2.mm: New.
* obj-c++.dg/class-extension-3.mm: New.
* obj-c++.dg/property/at-property-26.mm: New.
* obj-c++.dg/property/at-property-27.mm: New.
* obj-c++.dg/property/at-property-28.mm: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167680 138bc75d-0d04-0410-961f-82ee72b054a4
19 files changed:
gcc/ChangeLog
gcc/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/class-extension-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/class-extension-2.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/class-extension-3.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/property/at-property-26.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/property/at-property-27.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/property/at-property-28.mm [new file with mode: 0644]
gcc/testsuite/objc.dg/class-extension-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/class-extension-2.m [new file with mode: 0644]
gcc/testsuite/objc.dg/class-extension-3.m [new file with mode: 0644]
gcc/testsuite/objc.dg/property/at-property-26.m [new file with mode: 0644]
gcc/testsuite/objc.dg/property/at-property-27.m [new file with mode: 0644]
gcc/testsuite/objc.dg/property/at-property-28.m [new file with mode: 0644]