[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#177303: Accepts illegal declaration "int x[2, 3];" in C99 mode

Package: gcc-3.2
Version: 1:3.2.2-0pre5
Severity: normal

The declaration

int x[2, 3];

is not legal in C99, since "2, 3" is not an assignment-expression.
However gcc accepts it without even a warning:

falk@juist:/tmp% cat test.c                         
int f() {
    int x[2, 3];
falk@juist:/tmp% gcc-3.2 -c -std=c99 test.c 


-- System Information:
Debian Release: testing/unstable
Architecture: alpha
Kernel: Linux juist 2.5.59 #4 Sat Jan 18 12:46:41 CET 2003 alpha
Locale: LANG=C, LC_CTYPE=de_DE@euro

Versions of packages gcc-3.2 depends on:
ii  binutils         The GNU assembler, linker and bina
ii  cpp-3.2                   1:3.2.2-0pre5  The GNU C preprocessor
ii  gcc-3.2-base              1:3.2.2-0pre5  The GNU Compiler Collection (base 
ii  libc6.1                   2.3.1-5        GNU C Library: Shared libraries an
ii  libgcc1                   1:3.2.2-0pre5  GCC support library

-- no debconf information

Reply to: