This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28321] New: gcc 4 does not notice C syntax error


[forwarded from http://bugs.debian.org/354700]

  Matthias

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".


-- 
           Summary: gcc 4 does not notice C syntax error
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28321


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]