[<prev] [next>] [day] [month] [year] [list]
Message-ID: <87wmzezns4.fsf@intel.com>
Date: Wed, 05 Jul 2023 12:54:35 +0300
From: Jani Nikula <jani.nikula@...el.com>
To: linux-kernel@...r.kernel.org, workflows@...r.kernel.org,
linux-kbuild@...r.kernel.org, intel-gfx@...ts.freedesktop.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Masahiro Yamada <masahiroy@...nel.org>
Subject: __diag_ignore_all(), GCC < 8, extra warnings, and -Werror
For a long time now, i915 has enabled a bunch of W=1 style warnings
locally, and we try hard to keep i915 warning free.
One of the warnings is -Woverride-init from -Wextra. We need to bypass
that in a few cases, and used to do this for the relevant files:
CFLAGS_file.o = $(call cc-disable-warning, override-init)
Recently, we switched from the above to a more localized version in each
file.c:
__diag_push();
__diag_ignore_all("-Woverride-init", "Allow overriding inherited members");
...
__diag_pop();
We now got a report that this fails the build with CONFIG_WERROR=y or
W=e when using GCC version < 8. Indeed, __diag_ignore_all() requires GCC
version 8 or later.
Should we now revert back to disabling -Woverride-init on a file
granularity? Should we consider breaking the build for CONFIG_WERROR=y
or W=e on older compilers a regression?
I'll note that with the current usage of __diag_ignore_all() elsewhere
in kernel, CONFIG_WERROR=y or W=e with W=1 will never pass on older
compilers. But then again, it has never passed on any compiler, so it
can't be a regression.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
Powered by blists - more mailing lists