From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpiUZ-0000CW-7I for qemu-devel@nongnu.org; Fri, 13 Jul 2012 12:13:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpiUT-0003lH-BO for qemu-devel@nongnu.org; Fri, 13 Jul 2012 12:13:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpiUT-0003lC-1c for qemu-devel@nongnu.org; Fri, 13 Jul 2012 12:13:13 -0400 Message-ID: <50004914.9010109@redhat.com> Date: Fri, 13 Jul 2012 10:13:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1342103249-20888-2-git-send-email-kwolf@redhat.com> <1342193500-5708-1-git-send-email-kwolf@redhat.com> <5000479A.1060001@redhat.com> In-Reply-To: <5000479A.1060001@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig59DD6EB23830017C9A4D8800" Subject: Re: [Qemu-devel] [PATCH v2 1/2] coroutine-ucontext: Help valgrind understand coroutines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Peter Maydell , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig59DD6EB23830017C9A4D8800 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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. >=20 > I know. What's your suggestion? Switch only to warning? Then it would b= e > 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? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig59DD6EB23830017C9A4D8800 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQAEkVAAoJEKeha0olJ0NqKMgH/3j2+NnMCydLNLhvYA8vjEO+ mI9tKJjlu0CM+f0WF2F6Cu+OTjUvaECAy2k52gElpM89JeQbJFh51T7Yx9dULTsp NjC0Ek+2ccbqjd5xKoYfmWcSQr1DSwmQHNgwJCSM5WROiIwc7byGlhEFBqorJLq4 xoIDp5up3RdFFG3EqQzjI899xhRkI4h/2bHJPd0UMxQ2/sN6HCub/lvARe84God4 1llQS2pxO+Sr60TTxXIRU9qIxQ5jEBCidcYmZ3fnl+hFm6e6Lhw7OJzwuur2TTNL Wo00KwRah69Qt95440r2+SO+3gZrTcs2GVQNu/T/bkNSew75XinxvcUSyX5bmb4= =2v/Y -----END PGP SIGNATURE----- --------------enig59DD6EB23830017C9A4D8800--