From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: preprpcessor for overiding gcc optimation switch Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <83zop3o170 DOT fsf AT mercury DOT bitbucket> <25c58271 DOT fc969396 AT usw-ex0104-033 DOT remarq DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 25 X-Trace: /Kw5eCjjuZDQrkcheW6NL7jg5aZKBKiC+qY2RL5UoFw1sxILTxuOiqftUIWxl5T4MiZk+FT6y8md!KgJcI9ZO2AfL1QE0nj+MKOdwOPMxD0qNQ+QmS5f022rdt1PtgTPuNAReAtmVf9dBBH6YjWXUCyH0!83N2 X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Tue, 20 Jun 2000 08:34:13 GMT Distribution: world Date: Tue, 20 Jun 2000 08:34:13 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sun, 18 Jun 2000 13:09:49 -0700, batchex wrote: >in one of my project, one (only one) of the source file, when >compiled with optimation, then try to debug a function contained >in that file in gdb, it will give errorneous results. 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. >It is solved if that particular source file is compiled without >optimation. Which is standard practice when using source debuggers such as GDB. Eli could probably point you to a FAQ list entry with more info. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/