Path: utzoo!utgpu!watmath!uunet!axion!ukc!warwick!geoff From: geoff@warwick.UUCP (Geoff Rimmer) Newsgroups: gnu.gcc.bug Subject: gcc 1.32 duplicate case bug Message-ID: <958@ubu.warwick.UUCP> Date: 25 Jan 89 21:55:01 GMT References: <8901201214.AA03028@moose.cita.utoronto.ca> Sender: news@warwick.UUCP Reply-To: geoff@emerald.UUCP (Geoff Rimmer) Organization: Computer Science, Warwick University, UK Lines: 48 main() { int z; char *str; z=atoi(gets(str=(char*)malloc(10))); switch(z) { case 1: printf("ONE\n"); break; case 2: printf("TWO\n"); break; case 1: printf("ONE AGAIN\n"); break; } } cc (Sun OS4.0) gives "case.c", line 18: duplicate case in switch, 1 lint (Sun OS4.0) gives case.c(18): duplicate case in switch, 1 but ... gcc version 1.32 DOESN'T COMPLAIN!!! Is there a later version of gcc that has this bug fixed? Geoff ------------------------------------------------------------ Geoff Rimmer, Computer Science, Warwick University, England. geoff@uk.ac.warwick.cs estnkcj@uk.ac.warwick.cu "I didn't ask to be made. No consulted me or considered my feelings in the matter, not that anyone considered that I might *have* feelings. After I was made, I was left in a dark room for six months, and me with this terrible pain in all the diodes down my left side. My one and only true friend was a small rat. One day it climbed into a cavity of my inner leg and died. I've a horrible feeling it's still there." - Marvin, The Hitch Hiker's Guide to the Galaxy. ------------------------------------------------------------