Re: Suppressing variable hiding warning in Xcode
Re: Suppressing variable hiding warning in Xcode
- Subject: Re: Suppressing variable hiding warning in Xcode
- From: Graham Cox <email@hidden>
- Date: Mon, 6 Apr 2009 15:34:22 +1000
On 06/04/2009, at 11:06 AM, Bill Bumgarner wrote:
2. How do you get Xcode to not produce this warning?
Don't. You'll thank yourself for not doing so after spending a few
hours wondering why an iVar didn't get updated only to find that a
parameter hid the iVar.
Given that good advice however, Apple really should ensure that
legitimate code doesn't gratuitously throw this warning.
For example:
var = MIN( MAX( x, y ), z );
will emit this warning for variable '_a' because both macros MIN and
MAX use the same local var name internally.
--Graham
_______________________________________________
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