On Fri, 08 Oct 2010 11:03:27 -0700 Ian Lance Taylor <i...@google.com> wrote:
> Basile Starynkevitch <bas...@starynkevitch.net> writes: > > > 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. > > The problem that I think we've discovered over the years is that when > warnings depend on optimizations, the warnings are unstable. It means > that as optimizations change, the warnings appear and disappear. And > that means that as people move their code to new compiler releases, they > get unpredictable new warnings. Is this unstability of warnings related to the (perhaps stupid) folklore of avoiding -O3 (what I mean is that, for instance, most Linux distributions are built with -O2 at most; very few are using -O3; this brings a chicken & egg issue: since -O3 is much less used, it is probably more buggy & less usable!). But I also noticed (even on the runtime inside the MELT branch of GCC) that newer GCC releases give better & more warnings than older ones. (BTW, Ian, I am still hoping for your review & ok of my gengtype patches!). 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} ***