• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Protocol-related compilation warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Protocol-related compilation warnings
      • From: Ondra Cada <email@hidden>
References: 
 >Protocol-related compilation warnings (From: Hamish Allan <email@hidden>)
 >Re: Protocol-related compilation warnings (From: Cameron Hayne <email@hidden>)
 >Re: Protocol-related compilation warnings (From: Hamish Allan <email@hidden>)
 >Re: Protocol-related compilation warnings (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Protocol-related compilation warnings
  • Next by Date: Re: Protocol-related compilation warnings
  • Previous by thread: Re: Protocol-related compilation warnings
  • Next by thread: Re: Protocol-related compilation warnings
  • Index(es):
    • Date
    • Thread