[Bug objc/47076] Protocol referenced in @interface declarations should be defined

nicola at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 29 01:17:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47076

--- Comment #2 from Nicola Pero <nicola at gcc dot gnu.org> 2010-12-29 01:16:59 UTC ---
Author: nicola
Date: Wed Dec 29 01:16:55 2010
New Revision: 168307

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168307
Log:
In gcc/objc/:
2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>

    PR objc/47076
    * objc-act.c (lookup_protocol): Added 'definition_required'
    argument.  If 'definition_required', and the protocol is not
    defined, emit a warning.
    (objc_declare_protocols): Updated call to lookup_protocol.
    (start_protocol): Same change.
    (check_protocol_recursively): Same change.
    (objc_build_protocol_expr): Same change.
    (lookup_and_install_protocols): Added definition_required argument.
    Pass it to lookup_protocol.
    (objc_get_protocol_qualified_type): Updated call to
    lookup_and_install_protocols.
    (start_class): Updated calls to lookup_and_install_protocols; pass
    true to 'definition_required' to get the warnings.
    (start_protocol): Updated calls to lookup_and_install_protocols.

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

    PR objc/47076
    * objc.dg/protocol-forward-1.m: New.
    * obj-c++.dg/protocol-forward-1.mm: New.
    * objc.dg/attributes/proto-attribute-2.m: Updated.
    * objc.dg/class-protocol-1.m: Updated.
    * obj-c++.dg/attributes/proto-attribute-2.mm: Updated.
    * obj-c++.dg/class-protocol-1.mm: Updated.

Added:
    trunk/gcc/testsuite/obj-c++.dg/protocol-forward-1.mm
    trunk/gcc/testsuite/objc.dg/protocol-forward-1.m
Modified:
    trunk/gcc/objc/ChangeLog
    trunk/gcc/objc/objc-act.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/obj-c++.dg/attributes/proto-attribute-2.mm
    trunk/gcc/testsuite/obj-c++.dg/class-protocol-1.mm
    trunk/gcc/testsuite/objc.dg/attributes/proto-attribute-2.m
    trunk/gcc/testsuite/objc.dg/class-protocol-1.m



More information about the Gcc-bugs mailing list