[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New warnings (hopefully) in gcc 3.4

From: Fred Kiefer
Subject: Re: New warnings (hopefully) in gcc 3.4
Date: Wed, 03 Sep 2003 19:05:22 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

Alexander Malmberg wrote:
Fred Kiefer wrote:
Also it is sometimes confusing that GCC tries to filter out the possible
different method types, so that only one of each type is shown, which
most likely will not be the one that is actually meant.

I'm afraid I don't understand what you mean here. Could you give an

OK, here is one:

NSDocument.m: In function `-[NSDocument readFromFile:ofType:]':

NSDocument.m:422: warning: multiple methods named `-initWithPath:' found
/opt/GNUstep/System/Library/Headers/Foundation/NSBundle.h:158: warning: could be using `-(id)initWithPath:(NSString *)path' /opt/GNUstep/System/Library/Headers/Foundation/NSDistributedLock.h:38: warning: or `-(NSDistributedLock *)initWithPath:(NSString *)aPath'
NSDocument.m:422: warning: (Messages matching multiple method prototypes
NSDocument.m:422: warning: will be assumed to return `id' and accept
NSDocument.m:422: warning: `...' as arguments.)

Here the method initWithPath: is used on an NSFileWrapper, but what is shown in the warning are totally different classes. Of course GCC cannot tell which class would be the correct one (If so there would be no reason for the warning), so it just selects possible candidates, one for each different signature.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]