* objc/objc++: fix most testsuite failures on darwin8
@ 2011-06-07 20:21 Nicola Pero
2011-06-07 20:49 ` Nicola Pero
0 siblings, 1 reply; 3+ messages in thread
From: Nicola Pero @ 2011-06-07 20:21 UTC (permalink / raw)
To: gcc-patches
This patch (prepared by me and Iain) fixes almost all failures of the testsuite on Darwin 8
caused by the large testsuite changes I committed yesterday.
The patch fixes all the failures but 2. These two require a different small fix that is being
developed/tested and will be submitted separately.
Thanks Iain for the help! :-)
OK to commit ?
Thanks
Index: ChangeLog
===================================================================
--- ChangeLog (revision 174760)
+++ ChangeLog (working copy)
@@ -1,3 +1,10 @@
+2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
+ Iain Sandoe <iains@gcc.gnu.org>
+
+ * objc-obj-c++-shared/TestsuiteObject.h ([-free]): Return 'id'.
+ * objc-obj-c++-shared/TestsuiteObject.m ([-free]): Return 'id'.
+ Added cast.
+
2011-06-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
Index: objc-obj-c++-shared/TestsuiteObject.h
===================================================================
--- objc-obj-c++-shared/TestsuiteObject.h (revision 174760)
+++ objc-obj-c++-shared/TestsuiteObject.h (working copy)
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
+ (id) new;
+ (id) alloc;
- (id) init;
-- (void) free;
+- (id) free;
/* Auxiliary methods. */
+ (Class) class;
Index: objc-obj-c++-shared/TestsuiteObject.m
===================================================================
--- objc-obj-c++-shared/TestsuiteObject.m (revision 174760)
+++ objc-obj-c++-shared/TestsuiteObject.m (working copy)
@@ -41,9 +41,14 @@ along with GCC; see the file COPYING3. If not see
{
return self;
}
-- (void) free
+/* We return 'id' to have the same signature as [Object -free] in
+ older runtimes and avoid warnings about conflicting signatures. */
+- (id) free
{
- object_dispose (self);
+ /* Cast 'self' to 'id' because the NeXT runtime in darwin8 (Apple
+ Mac OS X 10.4) declares object_dispose to take an "Object *"
+ argument. */
+ return object_dispose ((id)self);
}
+ (Class) class
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: objc/objc++: fix most testsuite failures on darwin8
2011-06-07 20:21 objc/objc++: fix most testsuite failures on darwin8 Nicola Pero
@ 2011-06-07 20:49 ` Nicola Pero
2011-06-07 20:51 ` Mike Stump
0 siblings, 1 reply; 3+ messages in thread
From: Nicola Pero @ 2011-06-07 20:49 UTC (permalink / raw)
To: gcc-patches
This patch (written with Iain) fixes all the testsuite failiures on Darwin8. It includes the previous one.
OK to commit ?
Thanks
Index: ChangeLog
===================================================================
--- ChangeLog (revision 174760)
+++ ChangeLog (working copy)
@@ -1,3 +1,18 @@
+2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
+ Iain Sandoe <iains@gcc.gnu.org>
+
+ * objc-obj-c++-shared/runtime.h (protocol_getMethodDescription):
+ Added code to deal with the case when [Protocol
+ -descriptionForInstanceMethod:] or [Protocol
+ -descriptionForClassMethod:] returns NULL.
+
+2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
+ Iain Sandoe <iains@gcc.gnu.org>
+
+ * objc-obj-c++-shared/TestsuiteObject.h ([-free]): Return 'id'.
+ * objc-obj-c++-shared/TestsuiteObject.m ([-free]): Return 'id'.
+ Added cast.
+
2011-06-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
Index: objc-obj-c++-shared/TestsuiteObject.h
===================================================================
--- objc-obj-c++-shared/TestsuiteObject.h (revision 174761)
+++ objc-obj-c++-shared/TestsuiteObject.h (working copy)
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
+ (id) new;
+ (id) alloc;
- (id) init;
-- (void) free;
+- (id) free;
/* Auxiliary methods. */
+ (Class) class;
Index: objc-obj-c++-shared/runtime.h
===================================================================
--- objc-obj-c++-shared/runtime.h (revision 174761)
+++ objc-obj-c++-shared/runtime.h (working copy)
@@ -93,14 +93,16 @@ struct objc_method_description protocol_getMethodD
struct objc_method_description result;
if (instanceMethod)
- {
- tmp = [protocol descriptionForInstanceMethod: selector];
- result = *tmp;
- }
+ tmp = [protocol descriptionForInstanceMethod: selector];
else
+ tmp = [protocol descriptionForClassMethod: selector];
+
+ if (tmp)
+ result = *tmp;
+ else
{
- tmp = [protocol descriptionForClassMethod: selector];
- result = *tmp;
+ result.name = (SEL)0;
+ result.types = (char *)0;
}
return result;
Index: objc-obj-c++-shared/TestsuiteObject.m
===================================================================
--- objc-obj-c++-shared/TestsuiteObject.m (revision 174761)
+++ objc-obj-c++-shared/TestsuiteObject.m (working copy)
@@ -41,9 +41,14 @@ along with GCC; see the file COPYING3. If not see
{
return self;
}
-- (void) free
+/* We return 'id' to have the same signature as [Object -free] in
+ older runtimes and avoid warnings about conflicting signatures. */
+- (id) free
{
- object_dispose (self);
+ /* Cast 'self' to 'id' because the NeXT runtime in darwin8 (Apple
+ Mac OS X 10.4) declares object_dispose to take an "Object *"
+ argument. */
+ return object_dispose ((id)self);
}
+ (Class) class
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: objc/objc++: fix most testsuite failures on darwin8
2011-06-07 20:49 ` Nicola Pero
@ 2011-06-07 20:51 ` Mike Stump
0 siblings, 0 replies; 3+ messages in thread
From: Mike Stump @ 2011-06-07 20:51 UTC (permalink / raw)
To: Nicola Pero; +Cc: gcc-patches
On Jun 7, 2011, at 1:38 PM, Nicola Pero wrote:
> This patch (written with Iain) fixes all the testsuite failiures on Darwin8. It includes the previous one.
>
> OK to commit ?
Ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-07 20:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-07 20:21 objc/objc++: fix most testsuite failures on darwin8 Nicola Pero
2011-06-07 20:49 ` Nicola Pero
2011-06-07 20:51 ` Mike Stump
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).