delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/30/10:13:52

Date: Sun, 30 Aug 1998 17:13:22 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Endlisnis <s257m AT unb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Am I retarded -or- Why is my exe size so big?!?
In-Reply-To: <35E84B15.F0355D8D@unb.ca>
Message-ID: <Pine.SUN.3.91.980830171300.20257T-100000@is>
MIME-Version: 1.0

On Sat, 29 Aug 1998, Endlisnis wrote:

> > Actually it states that -O2 is the best optimizations switch without a
> > speed/size tradeoff.
> 	But, -O1,2 or 3 sometimes make programs that don't do what you might
> expect/desire.  I have a few VERY LONG programs that do not do the same stuff
> when compiled with any optimizations on.  They are fully ANSI compilent
> programs not trying to do anything tricky.

It is a bug when a program behaves differently under different
optimization switches.  Usually, the bug is in the application code,
not in the compiler.  Unless these programs explore the fine details
of machine arithmetics, which AFAIK is the only case when
optimizations should NOT be used, you need to debug those programs,
I'd say.

- Raw text -


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