From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEg97-0008Uj-Aa for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEg91-0005jS-3f for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:14:04 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:34629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEg90-0005gU-Vv for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:13:59 -0400 Received: by ghrr14 with SMTP id r14so1591546ghr.4 for ; Mon, 02 Apr 2012 05:13:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1333363816-1691-9-git-send-email-berrange@redhat.com> References: <1333363816-1691-1-git-send-email-berrange@redhat.com> <1333363816-1691-9-git-send-email-berrange@redhat.com> Date: Mon, 2 Apr 2012 13:13:56 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 8/9] Add more format string warning flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org On 2 April 2012 11:50, Daniel P. Berrange wrote: > +#if defined __GNUC__ > +# define GCC_WARNINGS_SAVE =C2=A0 =C2=A0 =C2=A0_Pragma("GCC diagnostic p= ush") > +# define GCC_WARNINGS_RESTORE =C2=A0 _Pragma("GCC diagnostic pop") > +# define DO_PRAGMA(x) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _Pragma(#x) > +# define GCC_WARNINGS_IGNORE(x) DO_PRAGMA(GCC diagnostic ignored x) > +#else > +# define GCC_WARNINGS_SAVE > +# define GCC_WARNINGS_RESTORE > +# define GCC_WARNINGS_IGNORE(x) > +#endif Do these pragmas work on all versions of gcc that we support? Google suggests that the push/pop ones are only gcc 4.6 or better, for example. -- PMM