--- In [email protected], "John Matthews" <jm5...@...> wrote: > > --- In [email protected], "John Matthews" <jm5678@> wrote: > > > > --- In [email protected], Thomas Hruska <thruska@> wrote: > > > > > > Why in the world would the optimization level have anything to do > with > > > the warning level? > > > > I guess it needs to do certain types of static anlysis for > > optimisation, and as a result of that analysis it spots things like > > uninitialised variables. That is, the warning is just a by-product of > > another process. > > > > But I'm only guessing. > > Just checked with our tools team, who did the gcc port for our processor: > > "There are 2 phases in which uninitialised variable warnings are > emitted and the second one will be executed only when you have > optimizations turned on."
Of course if you are serious about catching bugs before your code is run, you don't care too much about what the compiler reports because you use PC/Flexe-lint to spot them (and a whole lot more) :-) http://www.gimpel.com/
