www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/07/07/01:09:40

Date: Tue, 06 Jul 93 22:12:10 PDT
From: Peter Crowley <pcrowley AT qdeck DOT com>
To: iclone!mjhostet AT cs DOT unm DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re[2]: How do you eliminate dead code?

>gcc -O does eliminate dead code, and has done so for a very long
>time.  I compiled this with gcc -O2 -m486 -S, with gcc ~2.3.3,
>although I haven't tried it with the latest gcc distributed with
>djgpp.
>
>int main (int argc, char *argv[])
>{
>  if (0)
>    fprintf (stderr, "This shouldn't exist.\n");
>  return 0;
>}
>
It was very lazy of me not to work up a test case.
I must have been having a bad day. I use 2.4.1 and
it does eliminate the dead code. I'll go back to the 
xmosaic code where I saw (or thought I saw) this.

Peter Crowley
Quarterdeck Offices Systems
pcrowley AT qdeck DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019