]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/ChangeLog
add ObjC* class, category and protocol attribute parsers
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Sep 2010 20:08:38 +0000 (20:08 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Sep 2010 20:08:38 +0000 (20:08 +0000)
commita336eb4b5042c9ebc2d044d29202649fd9fa2759
treee9f050f6c9de15c20adf243711859bc55a85c841
parente3d1ab2bdf7b9008475deb5432108db2f0c672be
add ObjC* class, category and protocol attribute parsers

gcc/c-family:

* c-common.h (objc_start_class_interface): Adjust prototype.
(objc_start_category_interface): Likewise.
(objc_start_protocol): Likewise.
* stub-objc.c (objc_start_protocol): Adjust for extra argument.
(objc_start_class_interface): Likewise.
(objc_start_category_interface): Likewise.

gcc/objc:

* objc-act.c (objc_start_class_interface): Handle and ignore attributes.
(objc_start_category_interface): Likewise.
(objc_start_protocol): Likewise.

gcc/cp:

* parser.c (cp_parser_objc_valid_prefix_attributes): New.
(cp_parser_declaration): Parse prefix attributes for ObjC++.
(cp_parser_objc_protocol_declaration): Handle attributes.
(cp_parser_objc_class_interface): Likewise.
(cp_parser_objc_declaration): Likewise.

gcc:

* c-parser.c (c_parser_objc_class_definition): Adjust prototype.
(c_parser_objc_protocol_definition): Likewise.
(c_parser_external_declaration): Provide dummy attribute arguments.
(c_parser_declaration_or_fndef): Parse prefix attributes for ObjC.
(c_parser_objc_class_definition): Handle attributes.
(c_parser_objc_protocol_definition): Likewise.

gcc/testsuite:

* objc.dg/attributes: New.
* objc.dg/attributes/attributes.exp: New.
* objc.dg/attributes/class-attribute-1.m: New.
* objc.dg/attributes/class-attribute-2.m: New
* objc.dg/attributes/categ-attribute-1.m: New
* objc.dg/attributes/categ-attribute-2.m: New
* objc.dg/attributes/proto-attribute-1.m: New

* obj-c++.dg/attributes: New.
* obj-c++.dg/attributes/attributes.exp: New
* obj-c++.dg/attributes/class-attribute-1.mm: New
* obj-c++.dg/attributes/class-attribute-2.mm: New
* obj-c++.dg/attributes/categ-attribute-1.mm: New
* obj-c++.dg/attributes/categ-attribute-2.mm: New
* obj-c++.dg/attributes/proto-attribute-1.mm: New

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164700 138bc75d-0d04-0410-961f-82ee72b054a4
22 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/stub-objc.c
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/attributes/attributes.exp [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/categ-attribute-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/proto-attribute-1.mm [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/attributes.exp [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/categ-attribute-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/categ-attribute-2.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/class-attribute-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/class-attribute-2.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/proto-attribute-1.m [new file with mode: 0644]