Article View: gnu.gcc.bug
Article #2742small nit in 1.34 and maybe in 1.35.
From: T. Andrew Crump
Date: Wed, 07 Jun 1989 12:17
Date: Wed, 07 Jun 1989 12:17
32 lines
1508 bytes
1508 bytes
Gcc should report that there are no "cases" in the switch statement as
some sort of warning or note so that programmers don't get caught with
compilable non-working code. The following program generates no
messages on compile and echos "No labels". I would have expected at
least a note from the compiler.
main(int argc, char **argv) {
int lab1, lab2;
switch(argc) {
lab1:
printf("lab1\n");
exit(1);
lab2:
printf("lab2\n");
exit(2);
}
printf("No labels\n");
exit(0);
}
--
Andy Crump BBBBBBBBB IIII IIII NNN NNNN TM
UUCP: ...!tektronix!biin!andyc BBBB BBBB iiii iiii NNNN NNNN
DOMAIN: andyc@inteloa.intel.com BBBBBBBBB IIII IIII NNNNNNNNN
BBBB BBBB IIII IIII NNNN NNNN
BiiN - An Information Systems Company BBBBBBBBB IIII IIII NNNN NNN
2111 NE 25th Ave
Hillsboro, Oregon 97124-5961
Technical Details
Message-ID:
<ANDYC.89Jun7081708@inteloa.intel.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!ames!versatc!mips!wyse!td2cad!mipos3!omepd!andycShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!ames!versatc!mips!wyse!td2cad!mipos3!omepd!andyc From: andyc@inteloa.intel.com (T. Andrew Crump) Newsgroups: gnu.gcc.bug Subject: small nit in 1.34 and maybe in 1.35. Message-ID: <ANDYC.89Jun7081708@inteloa.intel.com> Date: 7 Jun 89 12:17:08 GMT Sender: news@omepd.UUCP Distribution: gnu.gcc.bug Organization: BiiN Information Systems, Hillsboro, Oregon Lines: 32