This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gnu objc bug?



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]