Re: [PATCH] [v2] Kbuild: move to -std=gnu11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Feb 28, 2022 at 1:36 PM Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> wrote:
> >
> > One minor issue that remains is an added gcc warning for shifts of
> > negative integers when building with -Werror, which happens with the
> > 'make W=1' option, as well as for three drivers in the kernel that always
> > enable -Werror, but it was only observed with the i915 driver so far.
> > To be on the safe side, add -Wno-shift-negative-value to any -Wextra
> > in a Makefile.
> Do you mean always enable -Wall and/or -Wextra instead of -Werror?
> We do use -Werror for our CI and development too, but it's hidden behind
> a config option that depends on COMPILE_TEST=n to avoid any problems
> with allmodconfig/allyesconfig.

What I meant here is that I'm adding -Wno-shift-negative-value to all
four places in the kernel that already use -Wextra.

> For the future, makes me wonder if we couldn't have a way for drivers to
> locally enable -Wall/-Wextra in a way that incorporates the exceptions
> from kbuild instead of having to duplicate them.

I have an older patch series that does this, but it also does a few other
things that I couldn't quite get right in the end with all combinations of
compiler versions and warning levels, so I did not submit that.

What this allows is to have per-directory statements like


to force all the default warnings (-Wall etc) to be errors, while
making the W=1 type warnings (-Wextra etc) normal warnings.

> Anyway, for the i915 changes,
> Acked-by: Jani Nikula <jani.nikula@xxxxxxxxx>


greybus-dev mailing list -- greybus-dev@xxxxxxxxxxxxxxxx
To unsubscribe send an email to greybus-dev-leave@xxxxxxxxxxxxxxxx

[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux