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

Bug#354700: gcc 4 does not notice C syntax error



Package: gcc
Version: 4.0.2-5

This is what happens if you accidentally put a stray semicolon in a
parameter-type-list:

  rjk@wyddfa:~$ cat > t.c
  int foo(int x;) { }
  rjk@wyddfa:~$ gcc-4.0 --version
  gcc-4.0 (GCC) 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
  Copyright (C) 2005 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There
  is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE.

  rjk@wyddfa:~$ gcc-4.0 -c t.c
  rjk@wyddfa:~$ echo $?
  0

Earlier versions of GCC noticed the syntax error, though produced the
somewhat delphic "parameter "x" has just a forward declaration".

ttfn/rjk



Reply to: