qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@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 18:18:09 +0200	[thread overview]
Message-ID: <50004A41.1090506@redhat.com> (raw)
In-Reply-To: <50004914.9010109@redhat.com>

Am 13.07.2012 18:13, schrieb Eric Blake:
> 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?

The practical difference for me is that the RHEL 6 gcc knows
ignored/warning/error (since gcc 4.2), but not push/pop (since gcc 4.6),
so my test machine still wouldn't have valgrind support and I could drop
the patch wholesale.

Kevin

  reply	other threads:[~2012-07-13 16:18 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
2012-07-13 16:18           ` Kevin Wolf [this message]
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=50004A41.1090506@redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@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).