[gnu.gcc.bug] small nit in 1.34 and maybe in 1.35.

andyc@inteloa.intel.com (T. Andrew Crump) (06/07/89)

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