Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600651
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized |
| Date | 2017-03-14 17:20 +0100 |
| Message-ID | <tkXkZ-2CM-5@gated-at.bofh.it> (permalink) |
| References | <sZ7AK-8dm-21@gated-at.bofh.it> <sZch3-2CA-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Arnd,
2017-01-14 0:40 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> In commit a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning
> for "make W=1""), I reverted another change that happened to fix a problem
> with old compilers, and now we get this report again with old compilers
> (prior to gcc-4.8) and GCOV enabled:
>
> cc1: warnings being treated as errors
> drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page':
> drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function
> At top level:
>>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
>
> The problem is that we turn off the warning conditionally in a number
> of places as we should, but one of them does it unconditionally.
> Instead, change it to call cc-disable-warning as we do elsewhere.
>
> The original patch that caused it was merged into linux-4.7, then
> 4.8 removed the change and 4.9 brought it back, so we probably want
> a backport to 4.9 once this is merged.
>
> Cc: stable@vger.kernel.org
> Fixes: a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"")
> Fixes: e72e2dfe7c16 ("gcov: disable -Wmaybe-uninitialized warning")
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to linux-kbuild/fixes.
But, please let me ask one question.
When I was checking your commit a76bcf557ef4,
I noticed the following code:
KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
$(call cc-disable-warning,maybe-uninitialized,))
It was not clear to me where this comes from
because it is not the revert of Linus' commit.
My best guess is:
maybe-uninitialized was introduced by gcc 4.7,
but only reliable for gcc 4.9 or later.
So it should be disabled for gcc < 4.9
Is this correct?
Thanks!
--
Best Regards
Masahiro Yamada
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-14 17:20 +0100
Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2017-03-14 22:00 +0100
Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2017-03-16 15:30 +0100
[PATCH] kbuild: fix compile time regression Arnd Bergmann <arnd@arndb.de> - 2017-03-16 16:10 +0100
Re: [PATCH] kbuild: fix compile time regression Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-16 18:50 +0100
Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-16 18:40 +0100
Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-16 18:40 +0100
csiph-web