Received: from eggs.gnu.org ([208.118.235.92]:43980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US5d1-0001tb-Mj for qemu-devel@nongnu.org; Tue, 16 Apr 2013 09:08:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US5cy-0006XL-Vn for qemu-devel@nongnu.org; Tue, 16 Apr 2013 09:08:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US5cy-0006Wa-Nd for qemu-devel@nongnu.org; Tue, 16 Apr 2013 09:08:52 -0400 From: Markus Armbruster References: <1366113066-1340-1-git-send-email-armbru@redhat.com> <516D463C.8090307@redhat.com> Date: Tue, 16 Apr 2013 15:08:49 +0200 In-Reply-To: <516D463C.8090307@redhat.com> (Eric Blake's message of "Tue, 16 Apr 2013 06:38:20 -0600") Message-ID: <87haj6y65a.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] Fix warnings suppressors to honor --disable-werror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: aik@ozlabs.ru, pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org Eric Blake writes: > On 04/16/2013 05:51 AM, Markus Armbruster wrote: >> Replace >> >> #pragma GCC diagnostic ignored FOO >> [Troublesome code...] >> #pragma GCC diagnostic error FOO >> >> by >> >> #pragma GCC diagnostic push >> #pragma GCC diagnostic ignored FOO >> [Troublesome code...] >> #pragma GCC diagnostic pop > > Older gcc does not understand #pragma GCC diagnostic push. Are you sure > this solution works with all versions of gcc in common use for compiling > qemu? The first patch hunk should take care of the problem: diff --git a/configure b/configure index 0788e27..41097a2 100755 --- a/configure +++ b/configure @@ -3244,8 +3244,10 @@ fi pragma_disable_unused_but_set=no cat > $TMPC << EOF +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic pop int main(void) { return 0; If gcc chokes on push/pop, we simply refrain from suppressing warnings. You may have to --disable-werror then. I prefer that over breaking --disable-werror for everyone. Testing with a suitably antique gcc appreciated!