On Fri, 8 Oct 2010 09:54:07 -0700
Gary Funck <g...@intrepid.com> wrote:

> On 10/08/10 18:38:29, Basile Starynkevitch wrote:
> > I am not an expert on these optimizations, but why would you want that? 
> 
> I routinely compile/build with "-O0 -g3" because the code is easier to debug. 
>  I
> also admit that I compile/build with "-O0" because it is faster than
> "-O2" or "-O3" for example, and during development I am more interested
> in faster turn-around time on builds than faster execution time.

I understand that. Using "-O1 -g3" is a suitable compromise also.
> 
> Also, when I compile/build projects, I try to use the maximum level of 
> warnings
> and checking that the source code base will support.  I am willing to trade
> off some support/build time in favor of more thorough warnings.

You could build both a release version with "-O2" or "-O2 -g" and a
development version with "-O0 -g3".

Howeer, I see a logic in needing -O2 to get some warnings.
Optimizations are expensive, and they compute static properties of the
source code, which are usable (& necessary and used) for additional
warnings.

Cheers.


-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***

Reply via email to