delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/20/14:25:34

Message-Id: <200006201825.VAA05063@mailgw1.netvision.net.il>
Date: Tue, 20 Jun 2000 21:26:43 +0200
X-Mailer: Emacs 20.6 (via feedmail 8.1.emacs20_6 I) and Blat ver 1.8.5b
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
To: djgpp AT delorie DOT com
In-reply-to: <suauks06rv8ivvhtus04su76sdtohqbtfj@4ax.com> (message from Damian
Yerrick on Tue, 20 Jun 2000 08:34:13 GMT)
Subject: Re: preprpcessor for overiding gcc optimation switch
References: <Pine DOT LNX DOT 4 DOT 21 DOT 0006030531400 DOT 1081-100000 AT roadrunner DOT grendel DOT net> <83zop3o170 DOT fsf AT mercury DOT bitbucket> <25c58271 DOT fc969396 AT usw-ex0104-033 DOT remarq DOT com> <suauks06rv8ivvhtus04su76sdtohqbtfj AT 4ax DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
> Newsgroups: comp.os.msdos.djgpp
> Date: Tue, 20 Jun 2000 08:34:13 GMT
> 
> There is generally one main reason to turn off optimization in GCC:
> when debugging your executable in GDB.  Optimization rearranges
> instructions to better fit in a Pentium's pipeline; this throws GDB
> off balance.

In addition to what Hans-Bernhard said to the contrary, I'd like to
point out that it is IMHO a Bad Idea to turn off optimizations just to
debug a program, then turn them on again for production: the code
generated by GCC in these two cases is so different that you in effect
debug a different program.

FWIW, I always debug optimized programs and I have yet to see a case
where I couldn't find my way through the code, rearranged as it may
be, even in the most complex programs such as Emacs.

- Raw text -


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