This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gnu objc bug?
- To: "Michael Scheibler" <michael dot scheibler at onevision dot de>
- Subject: Re: gnu objc bug?
- From: David Relson <relson at osagesoftware dot com>
- Date: Thu, 07 Jun 2001 09:06:28 -0400
- Cc: <gcc at gcc dot gnu dot org>, <discuss-gnustep at gnu dot org>
Michael,
The compiler is complaining because two methods with the same name return
different types. It wants to have a unique return type so that it can do
static type checking for the assignment. It's annoying but doesn't affect
program execution.
I classify this as a minor compiler deficiency - annoying, but I can live
with it.
David
At 05:26 AM 6/7/01, Michael Scheibler wrote:
>I have got a proxy class JavaL_Thread to enable the use of java.lang.Thread
>in GNU Objective-C/GNUstep.
>
>
>Code:
>
>+ (void)printThreadInfo {
> JavaL_Thread* currentThread = [JavaL_Thread currentThread];
> ...
>}
>
>The class with + printThreadInfo is derived from NSThread, which has a class
>method named currentThread, too.
>
>Now I get this:
>
>--> compiling MyThreadingClass.m
>MyThreadingClass.m: In function `+[MyThreadingClass printThreadInfo]':
>MyThreadingClass.m:29: warning: multiple declarations for method
>`currentThread'
>/usr/GNUstep/Headers/Foundation/NSThread.h:56: warning: using `+(NSThread
>*)currentThread'
>/usr/local/include/java/JavaL_Thread.h:133: warning: also found
>`+(JavaL_Thread *)currentThread'
>MyThreadingClass.m:29: warning: initialization from incompatible pointer
>type
>
>I heard that this caused no problems with NeXT's Objective-C runtime.
>
>Is this a bug?
>
>Michael
>
>
>_______________________________________________
>Discuss-gnustep mailing list
>Discuss-gnustep@gnu.org
>http://mail.gnu.org/mailman/listinfo/discuss-gnustep
--------------------------------------------------------
David Relson Osage Software Systems, Inc.
relson@osagesoftware.com Ann Arbor, MI 48103
www.osagesoftware.com tel: 734.821.8800