qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] configure: Disable (clang) initializer-overrides warnings
Date: Tue, 16 Oct 2012 22:19:04 +0100	[thread overview]
Message-ID: <CAFEAcA8LOpiX+yCPiaiPJBHtHsizuqm7DX2woRPpwa483DOq-g@mail.gmail.com> (raw)
In-Reply-To: <507DC189.4060107@weilnetz.de>

On 16 October 2012 21:20, Stefan Weil <sw@weilnetz.de> 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	other threads:[~2012-10-16 21:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 20:00 [Qemu-devel] [PATCH] configure: Disable (clang) initializer-overrides warnings Peter Maydell
2012-10-14 20:15 ` Blue Swirl
2012-10-14 20:24   ` Peter Maydell
2012-10-16 20:20     ` Stefan Weil
2012-10-16 21:19       ` Peter Maydell [this message]
2012-10-24 12:31     ` Peter Maydell
2012-10-27 16:51 ` Blue Swirl
2012-10-27 20:32   ` Igor Mitsyanko
2012-10-27 21:12     ` Peter Maydell
2012-10-27 21:24     ` Stefan Weil
2012-10-27 21:35       ` Peter Maydell
2012-10-27 21:46         ` Stefan Weil

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=CAFEAcA8LOpiX+yCPiaiPJBHtHsizuqm7DX2woRPpwa483DOq-g@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=blauwirbel@gmail.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).