From: Brian Norris <computersforpeace@gmail.com>
To: Ian Munsie <imunsie@au1.ibm.com>
Cc: Daniel Axtens <dja@axtens.net>, Arnd Bergmann <arnd@arndb.de>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Michael Neuling <mikey@neuling.org>,
Anton Blanchard <anton@au1.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Michal Marek <mmarek@suse.com>
Subject: Re: Build failure: -Wno-unused-const-variable DNE on old GCC
Date: Thu, 7 Jan 2016 18:07:43 -0800 [thread overview]
Message-ID: <20160108020743.GA118336@google.com> (raw)
In-Reply-To: <1452216163-sup-7558@delenn.ozlabs.ibm.com>
On Fri, Jan 08, 2016 at 12:31:54PM +1100, Ian Munsie wrote:
> Excerpts from Brian Norris's message of 2016-01-08 10:02:25 +1100:
> > > - It forces cxl developers to a higher standard. cxl has already had
> > > more than it's fair share of incredibly difficult to debug issues,
> > > so any way we can reduce the risk of errors going in makes our lives
> > > (and our end-users lives) better.
> >
> > One problem with this point: not all warnings are under the purview of
> > cxl developers. For instance, if I turn up warning verbosity (W=1), then
(BTW, I think most of these files are currently clean with W=1, but not
W=2)
> > the *header* files start producing plenty of warnings. Should this break
> > the build? Your code didn't change, and you can't fix those errors.
>
> That's a good point, but the specific warnings that we suppressed in the
> new compiler are in drivers/misc/cxl/cxl.h, which is an internal header
> that should only ever be included by the cxl driver. We do have some
> headers elsewhere which are included by other drivers, the generic ppc
> architecture code and userspace, but these are all warning free and
> won't be affected by the -Werror when included from elsewhere.
I was referring to when extra warnings are turned on, not just the
default. So this fails spectacularly:
$ export ARCH=powerpc
$ make ppc64_defconfig
$ make drivers/misc/cxl/api.o W=2
CC [M] drivers/misc/cxl/api.o
In file included from include/linux/bitops.h:36:0,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/pci.h:25,
from drivers/misc/cxl/api.c:10:
./arch/powerpc/include/asm/bitops.h:226:94: error: declaration of 'ffs' shadows a built-in function [-Werror=shadow]
In file included from include/linux/atomic.h:562:0,
from include/linux/mutex.h:18,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/pci.h:28,
from drivers/misc/cxl/api.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_read_acquire':
include/asm-generic/atomic-long.h:45:231: error: nested extern declaration of '__compiletime_assert_45' [-Werror=nested-externs]
In file included from include/linux/atomic.h:562:0,
from include/linux/mutex.h:18,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/pci.h:28,
from drivers/misc/cxl/api.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_set_release':
include/asm-generic/atomic-long.h:57:1: error: nested extern declaration of '__compiletime_assert_57' [-Werror=nested-externs]
In file included from include/linux/ktime.h:25:0,
from include/linux/rcupdate.h:47,
from include/linux/idr.h:18,
from include/linux/kernfs.h:14,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/pci.h:28,
from drivers/misc/cxl/api.c:10:
include/linux/jiffies.h: In function 'jiffies_to_timespec':
include/linux/jiffies.h:422:131: error: declaration of 'jiffies' shadows a global declaration [-Werror=shadow]
include/linux/jiffies.h:78:65: error: shadowed declaration is here [-Werror=shadow]
In file included from include/linux/kernfs.h:16:0,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/pci.h:28,
from drivers/misc/cxl/api.c:10:
[...many more failures...]
cc1: all warnings being treated as errors
make[1]: *** [drivers/misc/cxl/api.o] Error 1
make: *** [drivers/misc/cxl/api.o] Error 2
I doubt you plan to fix all those. So making -Werror configurable seems like
the only way forward, then. (Glad you agreed!)
Regards,
Brian
next prev parent reply other threads:[~2016-01-08 2:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 18:54 Build failure: -Wno-unused-const-variable DNE on old GCC Brian Norris
2016-01-07 19:37 ` Joe Perches
2016-01-07 19:44 ` Michal Marek
2016-01-07 19:57 ` Joe Perches
2016-01-07 20:18 ` Brian Norris
2016-01-07 20:38 ` [PATCH] misc: cxl: fix build for GCC 4.6.x Brian Norris
2016-01-08 2:12 ` Michael Ellerman
2016-01-30 14:20 ` Build failure: -Wno-unused-const-variable DNE on old GCC Maciej W. Rozycki
2016-01-30 17:37 ` Joe Perches
2016-01-07 20:25 ` Arnd Bergmann
2016-01-07 22:51 ` Daniel Axtens
2016-01-07 23:02 ` Brian Norris
2016-01-08 1:31 ` Ian Munsie
2016-01-08 2:07 ` Brian Norris [this message]
2016-01-08 2:16 ` Michael Ellerman
2016-01-08 10:14 ` David Laight
2016-01-08 10:14 ` David Laight
2016-01-08 1:33 ` Ian Munsie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160108020743.GA118336@google.com \
--to=computersforpeace@gmail.com \
--cc=anton@au1.ibm.com \
--cc=arnd@arndb.de \
--cc=dja@axtens.net \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mmarek@suse.com \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.