Where is the global pointer 'index' declared in Foundation?
Where is the global pointer 'index' declared in Foundation?
- Subject: Where is the global pointer 'index' declared in Foundation?
- From: Thomas Lachand-Robert <email@hidden>
- Date: Sat, 6 Dec 2003 12:32:24 +0100
I just discovered that there is a global variable named 'index' of
pointer type declared somewhere in Foundation; but I cant find it! If
you fire a new Foundation project with only that code:
#import <Foundation/Foundation.h>
int main()
{
return index;
}
the compiler will only warn you that the use of 'index' makes integer
from pointer without a cast. (Using a different name or commenting the
import yields an error, of course.)
I tried several ways to find the declared global variable 'index', with
no luck (it's not in the headers, apparently). The pointer is not of
type 'char*', 'const char*', 'int*', or 'long*' (I tried these), but I
don't even know how to find its type.
Anyway it seems dangerous to me to have a global variable with such a
common name in Foundation, what do you think guys? (I discovered that
because I used that name instead of the name of one of my parameters,
and I didn't notice the warning first => strange bug!)
Should I report a bug or what?
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.