[Bug objc/46473] New: 'in' not allowed in 'for' loop
nicola at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Nov 14 11:02:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46473
Summary: 'in' not allowed in 'for' loop
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: nicola@gcc.gnu.org
The current implementation of Objective-C fast enumeration does not allow a
variable to be named 'in' if used inside a 'for' loop. For example (in c99):
int main (void)
{
for (int in = 0; in < 10; in++)
printf ("%d\n", in);
return 0;
}
Since Objective-C is (or should be) a superset of C (as much as possible), the
previous snippet of code, which is valid C, should also compile with the
Objective-C compiler.
Thanks
More information about the Gcc-bugs
mailing list