C compile time
Robert Dewar
dewar@gnat.com
Mon Jun 30 14:25:00 GMT 2003
> 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 :-)
More information about the Gcc
mailing list