On Jan 27 2019, Steve Kargl wrote:
On Sun, Jan 27, 2019 at 01:19:08PM -0800, Andrew Pinski wrote:
On Sun, Jan 27, 2019 at 1:02 PM Thomas König <t...@tkoenig.net> wrote:
>
> > In fact, I would be in favor of removing -Wall, as it is misnamed,
> > in favor of -Wlevel=0,1,2,3... -Wlevel=0 default warnings.
> > -Wlevel=1 is equivalent to -Wall. -Wlevel=2 is -Wall -Wextra
> > (and maybe -Wsurprising).
>
> ... and -Wlevel=3 could then be -Wkitchen-sink, at least from the
> Fortran-only side. :-)
>
> I quite like that idea. I don't think -Wall will be deprecated soon,
> but -Wlevel sounds like a good thing to implement.
Maybe instead of -Wlevel= whyng names for levels seems helpful, but
numbers are more future-proof. not just -W0, -W1, -W2, -W3; -W would be
-W1 (because -W already exists)? Just like -O :).
That would work. With -Wlevel, I'm thinking that -Wlevel=-1 would be
the kitchen-sink. This means one can add new l>
evels for positive
levels if desired: -Wlevel=n+1 = -Wlevel=n -Wnew-opt1 -Wnew-opt2,
etc.
Both good, even excellent, ideas. I would prefer 'max' rather than '-1',
but it is essential that its specification (and comment around the code)
say that it is the supremum, to ng names for levels seems helpful, but
numbers are more future-proof.avoid a repetition of the Wall mistake.
It's rather like optimisation - using names for levels seems helpful, but
numbers are more future-proof.
Regards,
Nick Maclaren.