On Tue, Aug 26, 2003 at 06:00:31AM +0200, Pierre THIERRY wrote: > Package: gcc-3.3 > Version: 1:3.3.1-0pre0 > Severity: normal > Tags: upstream > > GCC, for C and C++, doesn't require any semi-colon after a while(){} > structure (and shouldn't, AFAIK), but require it after a do{}while(). > > Compiling the attached file triggers the following error, and the > compilation works great when applying the following patch: > > $ gcc -o control control.c > control.c: In function `main': > control.c:8: error: syntax error before '}' token > $ gcc -o control control.non-standard.c > $
Why do you believe that this is a bug in GCC? This is a standard element of C; braces which denote a block scope do not require a trailing semicolon but other statements do. Did other versions of GCC accept this? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer