[RFC]: allowing c99 for-loop scope in gnu89?
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Jun 19 22:52:00 GMT 2002
We allow using many c99 features in gnu89. How about for-loop scopes
and declaring a loop iteration variable in the initialization? E.g.:
> for (int i=0; i<4; i++)
> printf ("i=%d\n", i);
We seem to go out of our way to stop people from doing this in
check_for_loop_decls.
I suggest allowing it in gnu89 mode but if -pedantic issue a warning.
Thoughts?
--Kaveh
--
Kaveh R. Ghazi Director of Systems Architecture
ghazi@caip.rutgers.edu Qwest Solutions
More information about the Gcc
mailing list