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: Steve Bird <email@hidden>
- Date: Thu, 10 Jul 2008 15:40:33 -0400
On Jul 10, 2008, at 3:29 PM, Michael Ash wrote:
On Thu, Jul 10, 2008 at 11:52 AM, Graham Cox
<email@hidden> wrote:
Actually it doesn't emit a warning.
If you recall my problem a few weeks ago with:
- (float) position;
vs.
- (int) position;
the compiler sailed blithely on without a mention, generating code
that
smashed the stack to pieces.
This is different from the situation that does emit a warning,
where the
method is completely unknown and is assumed to return type 'id'. I do
compile with many additional warnings, but I haven't found one that
picks up
this problem.
Some experimentation reveals that the compiler is "merely" extremely
inconsistent about when it warns. For example, int and void warns,
float and void warns, but float and int does not. Double and int
warns, double and float warns, but int and id does not.
If it was using sizeof(), and assuming that sizeof(void) == 0, then
that would cover the cases you mentioned.
sizeof(int) == sizeof(float)
sizeof(int) == sizeof(id)
other combinations have mismatched sizes.
FWIW.
----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com (toll free) 1-877-676-8175
_______________________________________________
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