This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix some Objective-C failures on *-*-darwin* (next runtime)
- From: Ziemowit Laski <zlaski at apple dot com>
- To: Nicola Pero <nicola at brainstorm dot co dot uk>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Jul 2003 12:11:54 -0700
- Subject: Re: [PATCH] Fix some Objective-C failures on *-*-darwin* (next runtime)
Actually, I have been informed by the runtime folks here at Apple (who
are separate
from the compiler team :-) ) that the correct way to fix these test
cases (which I
haven't yet committed to objc-improvements-branch, but stay tuned) is
simply to add
#ifdef __NEXT_RUNTIME__
+ initialize { return self; }
#endif
to the @implementation of the root class. If the root class does not
have a 'initialize',
the NeXT runtime will then attempt to invoke 'forward', which led to
the error messages
you guys were seeing.
--Zem
On Thursday, Jul 17, 2003, at 07:13 US/Pacific, Nicola Pero wrote:
Hi Andrew,
what about telling us a bit more why this patch is required ?
Having some root classes in the testsuite is good, as defining a new
root
class is one of the Objective-C features we want to test after all.
It's
not clear why you want everything to inherit from Object. As far as
I
know, if defining a new root class fails, that's a bug to fix - you
shouldn't be modifying the testcase, but fixing the bug in the
compiler!
I don't have the Apple Objective-C runtime (which is not free
software
btw) so I don't even know what problems you are trying to solve.
Could
you let us know what the errors are ?
The runtime error is "Test does not respond to forward::" so the "bug"
is that the
Next runtime requires forward:: to be a message for every base class.
Having the classes
inherit from Object makes the classes have the forward:: message which
fixes the error.
Thanks. That's useful.
I think the proper fix for the testcase then is to add forward::, that
is,
adding to the class definitions something like the following
#ifdef __NEXT_RUNTIME__
- (retval_t) forward: (SEL)aSel : (arglist_t)argFrame
{
return nil;
}
#endif
That would be Ok for me.
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477