"Pietro Cerutti" <gahr_AT_gahr_DOT_ch_DO_NOT_SPAMwrote in message
news:ec***************************@news.hispeed.ch ...
Hi group,
is the below valid?
int main(void)
{
int i = 4;;;;;;;;
}
It compiles cleanly with GCC -Wall.
I don't see any reason for that, any clarification is welcome!
The null statement is allowed.
It means you can do things like
/* execute foo() until it return a zero */
while( foo() );
instead of having to write
while( foo() )
continue;
Obviously your example was pointless, but it would be harder to forbid it
than to allow it.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm