From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEgCj-00010V-Gv for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:17:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEgCd-0006kb-2q for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:17:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEgCc-0006kT-Qv for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:17:42 -0400 Date: Mon, 2 Apr 2012 13:17:37 +0100 From: "Daniel P. Berrange" Message-ID: <20120402121736.GC19259@redhat.com> References: <1333363816-1691-1-git-send-email-berrange@redhat.com> <1333363816-1691-9-git-send-email-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 8/9] Add more format string warning flags Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Mon, Apr 02, 2012 at 01:13:56PM +0100, Peter Maydell wrote: > 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 diagnost= ic push") > > +# 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 >=20 > 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. Hmm, the gcc info pages didn't mention any version constraints, but I'll investigate this Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|