Xref: utzoo comp.bugs.4bsd:792 comp.bugs.sys5:428 Path: utzoo!mnetor!uunet!husc6!think!ames!pasteur!ucbvax!ulysses!ekrell From: ekrell@ulysses.homer.nj.att.com (Eduardo Krell[arm]) Newsgroups: comp.bugs.4bsd,comp.bugs.sys5 Subject: bug in C compiler Message-ID: <10239@ulysses.homer.nj.att.com> Date: 18 Apr 88 14:39:38 GMT Organization: AT&T Bell Laboratories, Murray Hill Lines: 21 The following bug is present in both the 4.3 BSD and the System V compilers (and I would guess all other pcc-based compilers as well). If you forget the "goto" keyword in a goto statement, the compiler doesn't complain. Try the following: main(){ foo: foo; /* this was intended to be a "goto foo;" statement */ } I know labels and variables share the same name space, but this is not legal C code. I discovered this bug when I recompiled a program with the GNU C Compiler, which issued an undeclared variable error. -- Eduardo Krell AT&T Bell Laboratories, Murray Hill {ihnp4,ucbvax}!ulysses!ekrell ekrell@ulysses.att.com