On 4/12/2012 11:23 AM, Gabriel Dos Reis wrote:
less warnings to more warnings, what could be more
ordered than that!
What exactly do you put in -Wn to make it give *more* warning?
I can think of a reduced number of switch that would give you
more warning on a specific program without them being terribly
useful.
It's JUST like the optimization case, you use a higher number
to get more optimization. Yes, there may be cases where this
hurts (we have seen cases where -O3 is slower than -O2
due to cache effects)
For warnings you put a higher number to get more warnings. Yes,
you may find that you get too many warnings and they are not
useful. Remedy: reduce the number after -W :-)
-On means more optimizations for higher n, simple enough?
like the traditional -O2 vs. -O3?
Right, -O3 does more optimziations than -O2. Of course there
might be cases where this doesn't help. I bet if you look
hard enough you will find cases where -O1 code is slower
than -O0.
For -O, we do not guarantee that a higher number means faster code,
just that more optimizations are applied.
for -W, we do not guarantee that a higher number means a more
useful set of warnings, just more of them.