[RFC] -Weverything
Steve Kargl
sgk@troutmask.apl.washington.edu
Sun Jan 27 21:28:00 GMT 2019
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 <tk@tkoenig.net> wrote:
> >
> > Am 27.01.19 um 21:52 schrieb Steve Kargl:
> >
> > > 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= why 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 levels for positive
levels if desired: -Wlevel=n+1 = -Wlevel=n -Wnew-opt1 -Wnew-opt2,
etc.
--
Steve
More information about the Gcc
mailing list