This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C compile time
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: pkoning at equallogic dot com, coyote at coyotegulch dot com, dhazeghi at yahoo dot com, gcc at gcc dot gnu dot org
- Date: Mon, 30 Jun 2003 09:47:22 -0400 (EDT)
- Subject: Re: C compile time
- References: <20030630131009.34DBBF2A59@nile.gnat.com>
On Mon, 30 Jun 2003, Robert Dewar wrote:
> > Absolutely. The notion that you do debugging with -O0 and only final
> > build with -O2 is obsolete -- and actually never was a good one.
> >
> > If you want reliable software, you have to debug what you ship -- not
> > something totally different.
>
> Mind you, in practice we find that gdb is pretty weak debugging -O2 code,
> so this is a tricky requirement. It sometimes helps to use -O1 as a
> compromise, but I still would very much like to see -Od, meaning do all
> the optimization you can that does not intefere with debugging :-)
It would be better to improve GDB than to dumb down gcc's optimizations.
Also work on merging things like var-tracking and dwarf2 location list
support from the rtlopt-branch/cfg-branch for gcc, which helps immensely
with optimized debugging.