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" To: djgpp AT delorie DOT com In-reply-to: (message from Damian Yerrick on Tue, 20 Jun 2000 08:34:13 GMT) Subject: Re: preprpcessor for overiding gcc optimation switch References: <83zop3o170 DOT fsf AT mercury DOT bitbucket> <25c58271 DOT fc969396 AT usw-ex0104-033 DOT remarq 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 Precedence: bulk > From: Damian Yerrick > 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.