Hello, I'm seeing a weird behavior in Xcode 3.2.4/GCC 4,2. The warning I'm getting is: missing sentinel in function call
This is how I have defined the methods: + (NSFSomeClass*)someClassWithObjects:(NSArray *)someObjects { return [[[self alloc]initWithObjects:someObjects]autorelease]; <<<<<<<<<<<< warning occurs here } - (id)initWithObjects:(NSArray *)someObjects { if (self = [self init]) { ... } return self; } However, if I change the class method to the following, the warning disappears: + (NSFSomeClass*)someClassWithObjects:(NSArray *)someObjects { return [[[self alloc]initWithObjects:someObjects, nil]autorelease]; } Any idea why this is happening? Why does it require a sentinel when I'm passing an array? Another observation: GCC 4.0 = no warning GCC 4.2 = warning LLVM GCC 4.2 = warning LLVM compiler 1.5 = no warning Is this a GCC 4.2/LLVM GCC4.2 bug? And while we're at it... since the library I'm writing works on both Mac OS X and iOS, which compiler is recommended? Thanks, -- Tito _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com