In gcc/c-family/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
commit2debdb4fcd1064967709bd839e4b751f480f7fbd
authorNicola Pero <nicola.pero@meta-innovation.com>
Mon, 1 Nov 2010 22:54:35 +0000 (1 22:54 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Mon, 1 Nov 2010 22:54:35 +0000 (1 22:54 +0000)
tree9e084aedbf6e31a6763dd3a170066bbe479e30e6
parentdb4e59bb2b2d8449f1eb836d5075cf0dd9875159
In gcc/c-family/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>

In gcc/c-family/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented format and noreturn attributes for Objective-C methods.
        * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
        attribute for Objective-C methods.

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

        Implemented format and noreturn attributes for Objective-C methods.
        * objc-act.c (objc_start_method_definition): If method attributes
        are specified emit a warning and ignore them.
        (build_objc_method_call): Moved deprecation warnings from here ...
        (objc_finish_message_expr): to here.  Do not emit deprecation
        warnings if the receiver is of type 'id'.
        (really_start_method): Install 'deprecation' and 'noreturn'
        attributes.
        (objc_decl_method_attributes): Carefully filter out the list of
        attributes, allowing only "noreturn", "format", "sentinel" and
        "deprecated".  In the case of "format", adjust the arguments.
        Always process the attributes in the same way no matter if
        "sentinel" is in the list or not.

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

        Implemented format and noreturn attributes for Objective-C methods.
        * objc.dg/attributes/method-attribute-2.m: Updated warnings.
        * objc.dg/attributes/method-deprecated-1.m: New.
        * objc.dg/attributes/method-deprecated-2.m: New.
        * objc.dg/attributes/method-deprecated-3.m: New.
        * objc.dg/attributes/method-noreturn-1.m: New.
        * objc.dg/attributes/method-sentinel-1.m: New.
        * objc.dg/attributes/method-format-1.m: New.
        * obj-c++.dg/attributes/method-attribute-2.mm: Updated warnings.
        * obj-c++.dg/attributes/method-deprecated-1.mm: New.
        * obj-c++.dg/attributes/method-deprecated-2.mm: New.
        * obj-c++.dg/attributes/method-deprecated-3.mm: New.
        * obj-c++.dg/attributes/method-noreturn-1.mm: New.
        * obj-c++.dg/attributes/method-sentinel-1.mm: New.
        * obj-c++.dg/attributes/method-format-1.mm: New.

From-SVN: r166153
19 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/attributes/method-attribute-2.mm
gcc/testsuite/obj-c++.dg/attributes/method-deprecated-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/method-deprecated-2.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/method-deprecated-3.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/method-format-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/method-noreturn-1.mm [new file with mode: 0644]
gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/method-attribute-2.m
gcc/testsuite/objc.dg/attributes/method-deprecated-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/method-deprecated-2.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/method-deprecated-3.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/method-format-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/method-noreturn-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/attributes/method-sentinel-1.m [new file with mode: 0644]