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: Sun, 15 Nov 2009 11:00:19 -0600
On Nov 15, 2009, at 09:40:44, Clark Cox wrote:
> I have never encountered a situation where this warning is generated
> that doesn't also generate another error or warning. Any problems in
> your code that it shows are *already* shown to you by the other
> messages.
What other warning or error is going to show you that you've just redeclared i in this example?
void blah(void)
{
for(long i = 0; i < 10; i++) {
Now put a couple of pages of code between here...
...and here, making it difficult to know what i already exists.
for(long i = 0; i < 20; i++)
printf("%ld\n", i);
}
}
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