[Pkg-xen-devel] Bug#812166: Bug#812166: xen: FTBFS with GCC 6: statement is indented as if...
Ian Campbell
ijc at debian.org
Fri Jan 22 12:51:03 UTC 2016
On Wed, 2016-01-20 at 20:16 -0800, Martin Michlmayr wrote:
> Package: xen
> Version: 4.6.0-1
> Severity: important
> User: debian-gcc at lists.debian.org
> Usertags: ftbfs-gcc-6 gcc-6-misleading-indentation
>
> This package fails to build with GCC 6. GCC 6 has not been released
> yet, but it's expected that GCC 6 will become the default compiler for
> stretch.
>
> Note that only the first error is reported; there might be more. You
> can find a snapshot of GCC 6 in experimental. To build with GCC 6,
> you can set CC=gcc-6 CXX=g++-6 explicitly.
>
> You may be able to find out more about this issue at
> https://gcc.gnu.org/gcc-6/changes.html
>
> > sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
> ...
> > gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -DNDEBUG -I/<>/debian/build/build-hypervisor_amd64_amd64/xen/include -I/<>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-generic -I/<>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /<>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/config.h -nostdinc -DCONFIG_SHADOW_PAGING -DHAS_ACPI -DHAS_GDBSX -DHAS_PASSTHROUGH -DHAS_MEM_ACCESS -DHAS_MEM_PAGING -DHAS_MEM_SHARING -DHAS_PCI -DHAS_IOPORT
> > S -DHAS_PDX -MMD -MF .non-fatal.o.d -c non-fatal.c -o non-fatal.o
> > non-fatal.c: In function 'init_nonfatal_mce_checker':
> > non-fatal.c:103:2: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
> > switch (c->x86_vendor) {
> > ^~~~~~
> >
> > non-fatal.c:97:5: note: ...this 'if' clause, but it is not
> > if ( __get_cpu_var(poll_bankmask) == NULL )
> > ^~
> >
> > cc1: all warnings being treated as errors
I have rebuilt the upstream xen source (both development version and 4.6)
with gcc-6 from experimental:
$ gcc-6 --version
gcc-6 (Debian 6-20160117-1) 6.0.0 20160117 (experimental) [trunk revision 232481]
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and did not come across any issues. However looking at non-fatal.c I can
see that the misleading-indentation it is complaining about is still
present.
Neither the upstream build system nor the Debian packaging are enabling
Wmisleading-indentation, so I suspect this has come from somewhere else,
perhaps via gcc or maybe via dh and some hardening thing?
I don't see the warning/error being enabled on the gcc command line in the
log snippet above, so perhaps this was an option enabled in an earlier gcc-
6 snapshot which isn't on now?
Regardless, I'm going to take a look at enabling this warning upstream and
fixing the fallout, since it seems like a good code cleanliness thing to
do.
Ian.
More information about the Pkg-xen-devel
mailing list