From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/2] coroutine-ucontext: Help valgrind understand coroutines
Date: Fri, 13 Jul 2012 10:13:08 -0600 [thread overview]
Message-ID: <50004914.9010109@redhat.com> (raw)
In-Reply-To: <5000479A.1060001@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
On 07/13/2012 10:06 AM, Kevin Wolf wrote:
> Am 13.07.2012 17:37, schrieb Peter Maydell:
>> On 13 July 2012 16:31, Kevin Wolf <kwolf@redhat.com> wrote:
>>> +#ifdef CONFIG_VALGRIND_H
>>> +/* Work around an unused variable in the valgrind.h macro... */
>>> +#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
>>> +static inline void valgrind_stack_deregister(CoroutineUContext *co)
>>> +{
>>> + VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id);
>>> +}
>>> +#pragma GCC diagnostic error "-Wunused-but-set-variable"
>>> +#endif
>>
>> '#pragma .. error' will defeat the configure code which makes warnings
>> not fatal in release builds.
>
> I know. What's your suggestion? Switch only to warning? Then it would be
> easy to miss warnings. Disabling the valgrind code for gcc < 4.6 is
> better, but still not really nice.
But you're already disabling the valgrind code for gcc too old to honor
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
so what's the difference in making your configure check for
CONFIG_VALGRIND_H _also_ check that gcc is new enough to honor push/pop
of diagnostic?
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
next prev parent reply other threads:[~2012-07-13 16:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 14:27 [Qemu-devel] [PATCH 0/2] qemu-iotests: valgrind support Kevin Wolf
2012-07-12 14:27 ` [Qemu-devel] [PATCH 1/2] coroutine-ucontext: Help valgrind understand coroutines Kevin Wolf
2012-07-12 17:07 ` Stefan Weil
2012-07-13 8:45 ` Kevin Wolf
2012-07-13 8:53 ` Kevin Wolf
2012-07-12 17:14 ` Peter Maydell
2012-07-13 8:36 ` Kevin Wolf
2012-07-13 15:31 ` [Qemu-devel] [PATCH v2 " Kevin Wolf
2012-07-13 15:37 ` Peter Maydell
2012-07-13 16:06 ` Kevin Wolf
2012-07-13 16:13 ` Eric Blake [this message]
2012-07-13 16:18 ` Kevin Wolf
2012-07-12 14:27 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: Valgrind support Kevin Wolf
2012-07-12 16:51 ` [Qemu-devel] [PATCH 0/2] qemu-iotests: valgrind support Paolo Bonzini
2012-07-12 17:14 ` 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=50004914.9010109@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).