Article View: gnu.gcc.bug
Article #2325Missing semicolon causes rest of file to be ignored. Gcc 1.30
From: David Keppel
Date: Sat, 18 Feb 1989 20:45
Date: Sat, 18 Feb 1989 20:45
63 lines
2021 bytes
2021 bytes
SUMMARY: Missing ';' causes rest of file to be ignored.
GCC: 1.30
TARGET: VAX/ULTRIX
Built using standard shell script.
The following program has an (erroneous) declaration of `struct bug'.
There is no semicolon after the token `foo'. The file after the
following extern declaration is ignored.
I believe that this is an illegal construct, so gcc should print a
diagnostic rather than compiling the file. If the construct is legal,
then it should not be ignoring the rest of the file.
I haven't tried this with 1.33, so it might be fixed already.
gcc -g -W -Wimplicit -Wreturn-type -Wcomment -Wunused -v -c bug.c
gcc version 1.30
/uns/src/GNU/g++/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dvax -Dunix -Wcomment bug.c /tmp/cc016443.cpp
GNU CPP version 1.30
/uns/src/GNU/g++/lib/gcc-cc1 /tmp/cc016443.cpp -quiet -dumpbase bug.c -g -W -Wimplicit -Wreturn-type -Wcomment -Wunused -version -o /tmp/cc016443.s
GNU C version 1.30 (vax) compiled by GNU C version 1.30.
as /tmp/cc016443.s -o bug.o
Loading a.out ... Undefined:
_main
*** Error code 1
Stop.
bug.c:
typedef struct bug {
int y;
} foo
extern int exit();
int
buggy(x, y)
buggy(y, x)
int x, y;
{
if (x) return y;
return x;
}
int
main()
{
1 2 3 4, who\'s that knocking on my door?
buggy(1);
exit(0);
}
end of bug.c
;-D on ( A small matter of atoms ) Pardo
--
pardo@cs.washington.edu
{rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo
Technical Details
Message-ID:
<7314@june.cs.washington.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!uw-june!pardoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!uw-june!pardo From: pardo@june.cs.washington.edu (David Keppel) Newsgroups: gnu.gcc.bug Subject: Missing semicolon causes rest of file to be ignored. Gcc 1.30 Message-ID: <7314@june.cs.washington.edu> Date: 18 Feb 89 20:45:01 GMT Reply-To: pardo@cs.washington.edu (David Keppel) Organization: U of Washington, Computer Science, Seattle Lines: 63