Re: Why can't I name a property `tag'?
Re: Why can't I name a property `tag'?
- Subject: Re: Why can't I name a property `tag'?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 10 Jul 2008 19:02:11 +0200
That's odd.
I did some test. It does not require any warning flags, but for an
undefined reason, gcc does not considere that int and float are
incompatibles.
if you have int and short, int and double, int and long long, int and
NSSize, int and ...., it logs a warning, but int and float is silently
ignored !
My previous test logs the warning because of the CALayer declaration.
Le 10 juil. 08 à 18:29, Graham Cox a écrit :
Well, that's the weird thing. I wasn't getting that warning. I was
including both headers, my own usage explicitly using #import, and
all of Cocoa implictly using the precompiled headers. I wonder if
that's how the compiler fails to notice the ambiguity - because of
one being in a precompiled header? I don't know enough about how
that works to be sure.
Does this warning have to be explicitly turned on, or is it on by
default? What's the flag?
G.
On 11 Jul 2008, at 2:21 am, Jean-Daniel Dupas wrote:
The compiler will not try to search any -position method in headers
you do not include in your file.
If you include more than one interface with different declaration
it will tell you like this:
warning: multiple methods named '-position' found
/System/Library/Frameworks/Foundation.framework/Headers/
NSScriptObjectSpecifiers.h:191: warning: using '-
(NSInsertionPosition)position'
AYPlayer.m:21: warning: also found '-(int)position'
AYPlayer.m:16: warning: also found '-(float)position'
/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:
139: warning: also found '-(CGPoint)position'
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden