Article View: gnu.gcc.bug
Article #566gcc don't report unreachable code
From: Steve Murphy
Date: Fri, 01 Sep 1989 17:57
Date: Fri, 01 Sep 1989 17:57
56 lines
1653 bytes
1653 bytes
A nit, I know, but heck, SUN does. This code, on a SUN3, sunos 3.5,
#include <stdio.h>
void fprintf();
int main(argc,argv)
char **argv;
int argc;
{
FILE *fp;
fp =0;
if( argc && **argv )
{
switch( argc )
{
case 0:
fprintf(fp,"Hi\n");
break;
fprintf(fp,"Hi\n");
case 1:
fprintf(fp,"Hi\n");
break;
default:
fprintf(fp,"Hi\n");
break;
}
}
return 0;
}
when compiled with
gcc -c -g -O -traditional -fwritable-strings -Wall ~/sdf31/t.c
using gcc1.35,
returns NOTHING. Look close at case 0.
murf
PS. Are you guys getting my reports? I've been sending in bug reports
for a while now, and getting absolutely no receipts. Either they are
making it, or they are not. I don't know if you guys got or not. If I
knew they weren't making it, I could attack the problem. But the way
it is now, with absolutely no feedback, I wonder if I'm wasting time
sending you anything. I'm asking for very little, just a little note,
perhaps even machine generated, letting me know it got there. I don't
care if you don't look at it, disagree with it, or are even willing or
not to fix it, all I need to know is it got to the right place.
murf
Technical Details
Message-ID:
<8909011757.AA16888@dingus.sun.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!oakhill!dingus!murfShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!oakhill!dingus!murf From: oakhill!dingus!murf@CS.UTEXAS.EDU (Steve Murphy) Newsgroups: gnu.gcc.bug Subject: gcc don't report unreachable code Message-ID: <8909011757.AA16888@dingus.sun.com> Date: 1 Sep 89 17:57:17 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 56