From: Igor Mitsyanko <i.mitsyanko@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>, Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] configure: Disable (clang) initializer-overrides warnings
Date: Sun, 28 Oct 2012 00:32:00 +0400 [thread overview]
Message-ID: <508C44C0.8070301@gmail.com> (raw)
In-Reply-To: <CAAu8pHuukFYC3q-z9vDcs6G-9z8GMrXL+f9oD0K47JjjbgwaGA@mail.gmail.com>
On 10/27/2012 8:51 PM, Blue Swirl wrote:
> Thanks, applied.
>
> On Sun, Oct 14, 2012 at 8:00 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Disable clang's initializer-overrides warnings, as QEMU makes significant
>> use of the pattern of initializing an array with a range-based default
>> entry like
>> [0 ... 0x1ff] = { GPIO_NONE, 0 }
>> followed by specific entries which override that default, and clang
>> would otherwise warn "initializer overrides prior initialization of
>> this subobject" when it encountered the specific entry.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> This is basically a judgement that our coding style is legitimate
>> and the compiler is being overly alarmist. I don't think we would
>> benefit from trying to silence the warnings and I can't think of
>> a clean way of doing so...
>>
>> NB that gcc will happily ignore -Wno-wombat warnings that it doesn't
>> happen to recognize. (For compilers that don't accept-and-ignore the flag
>> configure will identify this and not use it.)
>>
I encountered strange behavior of latest mingw gcc, it ignores
unrecognized -Wno-wombat options only in case if no other warnings are
issued (configure gccflags test doesn't issue any), otherwise I get this:
cc1.exe: warning: unrecognized command line option
"-Wno-initializer-overrides" [enabled by default]
This is probably a bug in mingw GCC (or perhaps I'm using it wrong), but
anyway, this makes QEMU mingw build output very noisy.
>> Blue Swirl previously submitted a patch which enabled this flag
>> (among others):
>> http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg04203.html
>>
>> I haven't found the other two flags in that patch to be required.
>>
>> configure | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/configure b/configure
>> index 353d788..f78cfc5 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1187,6 +1187,7 @@ gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
>> gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
>> gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
>> gcc_flags="-fstack-protector-all -Wendif-labels $gcc_flags"
>> +gcc_flags="-Wno-initializer-overrides $gcc_flags"
>> # Note that we do not add -Werror to gcc_flags here, because that would
>> # enable it for all configure tests. If a configure test failed due
>> # to -Werror this would just silently disable some features,
>> --
>> 1.7.11.4
>>
>
>
next prev parent reply other threads:[~2012-10-27 20:32 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
2012-10-24 12:31 ` Peter Maydell
2012-10-27 16:51 ` Blue Swirl
2012-10-27 20:32 ` Igor Mitsyanko [this message]
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=508C44C0.8070301@gmail.com \
--to=i.mitsyanko@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=patches@linaro.org \
--cc=peter.maydell@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 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.