Re: Stupid "warning: declaration of 'index' shadows a global declaration"
Re: Stupid "warning: declaration of 'index' shadows a global declaration"
- Subject: Re: Stupid "warning: declaration of 'index' shadows a global declaration"
- From: Steve Mills <email@hidden>
- Date: Mon, 16 Nov 2009 10:00:33 -0600
On Nov 15, 2009, at 14:07:19, Keary Suska wrote:
> I would add that what I think is "stupid" is the warning being flagged when a variable declaration masks a function declaration. If it were just variable shadowing I would heartily support it. Not only is the warning immediately misleading, but what coder in her right mind would make a function call without parentheses?
long calc(void)
{
return some math;
}
typedef long (*CalcCallback)(void);
void blah(void)
{
CalcCallback callback = calc;
long result = calc();
}
There ya go.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden