• 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: Conflicting Namespaces on the Language Level
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conflicting Namespaces on the Language Level


  • Subject: Re: Conflicting Namespaces on the Language Level
  • From: Nicholas Riley <email@hidden>
  • Date: Sat, 14 Sep 2002 20:19:36 -0500
  • Mail-followup-to: email@hidden, Cocoa-Dev <email@hidden>

Looks like you've found a bug! This is not specific to instance
variables, NSDictionary or NSArray, however (my original thought was
that something broke with class clusters). It even happens with
NSObject. Here's the minimal bit of code I've found which will cause
the warning to be produced:

#import <Foundation/Foundation.h>

@interface ClassThatShouldCompile : NSObject
@end

@implementation ClassThatShouldCompile (Category)
- (void)sample
{
[super init];
[NSObject class];
}
@end

sample.m: In function `-[ClassThatShouldCompile(Category) sample]':
sample.m:10: warning: invalid receiver type `struct _objc_class *'
sample.m:10: warning: passing arg 1 of pointer to function from incompatible pointer type

If you simply exchange the order of lines in the method, the warning
goes away.

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Conflicting Namespaces on the Language Level (From: email@hidden)

  • Prev by Date: Re: Conflicting Namespaces on the Language Level
  • Next by Date: Re: Conflicting Namespaces on the Language Level
  • Previous by thread: Re: Conflicting Namespaces on the Language Level
  • Next by thread: Re: Conflicting Namespaces on the Language Level
  • Index(es):
    • Date
    • Thread