qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] configure: Disable (clang) initializer-override


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] configure: Disable (clang) initializer-overrides warnings
Date: Tue, 16 Oct 2012 22:19:04 +0100

On 16 October 2012 21:20, Stefan Weil <address@hidden> wrote:
> Hi Peter, hi Blue,
>
> gcc uses a different flag -Wno-override-init to disable initializer override
> warnings.
>
> I tested the following patch which uses -Wextra with gcc-4.4 and gcc-4.7.
> It allows compilation of QEMU without warnings.
>
> A test with those flags and clang still has to be done.

For clang the options have to be ordered so that -Wextra comes before
the -Wno-* options that disable bits of -Wextra, as clang processes
the options in comandline order. (See this clang bug
http://llvm.org/bugs/show_bug.cgi?id=13077 pointing out the difference
between clang and gcc and closed as "expected behaviour" :-( )
Alternatively, rather than enabling 12 warnings with -Wextra
and then disabling 4 with -Wno-*, we could just enable the
8 warnings we want.

clang still needs -Wno-initializer-overrides in any case, so this
is distinct from my patch.

I also note that you've put your options in a different bit of
configure from the part my patch touched. I think it would
probably be clearer if all the warning options went in the "try
this and use if compiler accepts it" list, even for ones that
presumably have worked for every gcc ever. (ie move some of the
options currently in the 'always use this' list).

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]