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
$
--- control.c 2003-08-26 05:24:16.000000000 +0200
+++ control.non-standard.c 2003-08-26 05:29:32.000000000 +0200
@@ -4,5 +4,5 @@
{
do {
printf("blob");
- } while(0)
+ } while(0);
}
Also applicable to 1:3.3.2-0pre1 (sid)
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux bateleur.arcanes 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro
Versions of packages gcc-3.3 depends on:
ii binutils 2.14.90.0.4-0.1 The GNU assembler, linker and bina
ii cpp-3.3 1:3.3.1-0pre0 The GNU C preprocessor
ii gcc-3.3-base 1:3.3.1-0pre0 The GNU Compiler Collection (base
ii libc6 2.3.1-16 GNU C Library: Shared libraries an
ii libgcc1 1:3.3.1-0pre0 GCC support library
-- no debconf information
--
pierre.thierry@moine-fou.org
OpenPGP 0xD9D50D8A
#include <stdio.h>
int main()
{
do {
printf("blob");
} while(0)
}
Attachment:
pgplWk5QWT0OO.pgp
Description: PGP signature