[RFC/RFA] [ObjC] Class <protocol> support I

David Ayers d.ayers@inode.at
Tue Jun 29 16:12:00 GMT 2004


Hello,

This adds support for qualifying Objective-C 'Class' references with a
protocol list.  It also removes 'id' keyword and therefor invalidates
the gcc/testsuite/objc.dg/id-1.m test case.  I've also attached a new
test case which checks the most important aspects of the feature.

The only non-obvious semantics are that instance methods of protocols
declared by root classes are also considered when searching for class
method prototypes (as this reflects the runtime semantics).  It also
registers those prototypes in the global class method list.

Bootstrapped and tested on i686-pc-linux-gnu.  (Only failure is the
above mentioned id-1.m test case.  It would fail differently if an
#include <objc/objc.h> were added, but redefining types is already
tested in the C front end.  I would think that the test case could
simply be removed.)

Next up, (objc_)comptypes support.

Cheers,
David Ayers

PS: An adapted patch for the objc-improvements-branch (which will
include the previous renaming patches) is being bootstrapped and tested
now.  (2 bootstraps a 2.8 hours + 2 test runs  a 2.6 hours = 10.8 hours,
and those times are without objc++ so don't expect that until tomorrow
if everything goes well.)

PPS: May I also use this opportunity to ping:
http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00385.html

Oh, and here's the ChangeLog for the test suite:

2004-06-29  David Ayers  <d.ayers@inode.at>

        * objc.dg/class-protocol-1.m: New test.
        * objc.dg/id-1.m: Remove test.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: objc.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040629/16228f93/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objc.patch.gz
Type: application/x-gunzip
Size: 5630 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040629/16228f93/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: class-protocol-1.m
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040629/16228f93/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class-protocol-1.m.gz
Type: application/x-gunzip
Size: 1154 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040629/16228f93/attachment-0001.bin>


More information about the Gcc-patches mailing list