Re: Protocol-related compilation warnings
Re: Protocol-related compilation warnings
- Subject: Re: Protocol-related compilation warnings
- From: Hamish Allan <email@hidden>
- Date: Wed, 8 Jun 2005 01:18:32 +0100
Ondra,
Thank you very much for your advice. I have isolated the minimum case!
$ cat q.m
#import <Cocoa/Cocoa.h>
#import "p.h"
#import "q.h"
void f(void) {
Bar *bar;
[bar foo];
}
$ cat q.h
@interface Bar:NSObject<Foo> @end
$ cat p.h
@protocol Foo
-(void)foo;
@end
$ cc -Wall -c q.m
$ cat q.m
#import <Cocoa/Cocoa.h>
#import "q.h"
#import "p.h" // note swapped import order
void f(void) {
Bar *bar;
[bar foo];
}
h$ cc -Wall -c q.m
In file included from q.m:2:
q.h:1: error: cannot find protocol declaration for `Foo'
q.m: In function 'f':
q.m:7: warning: `Bar' may not respond to `-foo'
q.m:7: warning: (Messages without a matching method signature
q.m:7: warning: will be assumed to return `id' and accept
q.m:7: warning: `...' as arguments.)
$
This strikes me as a bug. What do you think?
Thanks,
Hamish
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden