c-common.h: Remove RID_ID.
commit3a3589b4ba5e2d88874f8178f8808f784860fca5
authorZiemowit Laski <zlaski@gcc.gnu.org>
Mon, 25 Oct 2004 22:55:25 +0000 (25 22:55 +0000)
committerZiemowit Laski <zlaski@gcc.gnu.org>
Mon, 25 Oct 2004 22:55:25 +0000 (25 22:55 +0000)
treeac249a647a7d1f72cb019c1e551cbb2d1a3eeda9
parent5307127042d75e40e952bb986e6f15377dac75db
c-common.h: Remove RID_ID.

[gcc/ChangeLog]
2004-10-25  David Ayers  <d.ayers@inode.at>

* c-common.h: Remove RID_ID.
* c-parse.in: Remove OBJECTNAME and references to RID_ID.
(typespec_reserved_attr): Add rule for TYPENAME
non_empty_protocolrefs.
(yylexname): Remove special handling of RID_ID.

[gcc/objc/ChangeLog]
2004-10-25  Ziemowit Laski  <zlaski@apple.com>
    David Ayers  <d.ayers@inode.at>

* objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
'Class <Protocol> == id' and 'Class <Protocol> == Class'.
(objc_is_id): Add test for 'super'.
(objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
receivers; if class methods are not found in protocol lists, search
for instance methods therein and warn if one is found.  Look in
global hash tables for suitable method as a last resort when messaging
'id <Proto>', 'Class <Proto>' and invalid receiver types.
(objc_add_method): Insert instance methods listed in protocols into
the global class method hash table.
* objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
addition to 'id <Proto>'.

[gcc/testsuite/ChangeLog]
2004-10-25  David Ayers  <d.ayers@inode.at>
    Ziemowit Laski  <zlaski@apple.com>

* objc.dg/call-super-2.m: Add messages to 'Class <Proto>'; update
diagnostics when messaging 'id <Proto>'.
* objc.dg/class-protocol-1.m: New test.
* objc.dg/desig-init-1.m: Add message to an invalid receiver using
a non-existent method signature.
* objc.dg/method-5.m, objc.dg/method-6.m, objc.dg/proto-hier-1.m:
Update diagnostics when messaging with non-existent method signature.
* objc.dg/proto-hier-2.m: Adjust wording of diagnostic.
* objc.dg/proto-lossage-1.m, objc.dg/proto-lossage-4.m: Messages to
invalid receivers are now resolved as if messaging 'id'; remove
extraneous diagnostics.

From-SVN: r89562
16 files changed:
gcc/ChangeLog
gcc/c-common.h
gcc/c-parse.in
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/objc/objc-act.h
gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/call-super-2.m
gcc/testsuite/objc.dg/class-protocol-1.m [new file with mode: 0644]
gcc/testsuite/objc.dg/desig-init-1.m
gcc/testsuite/objc.dg/method-5.m
gcc/testsuite/objc.dg/method-6.m
gcc/testsuite/objc.dg/proto-hier-1.m
gcc/testsuite/objc.dg/proto-hier-2.m
gcc/testsuite/objc.dg/proto-lossage-1.m
gcc/testsuite/objc.dg/proto-lossage-4.m