From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdrmk-00083X-47 for qemu-devel@nongnu.org; Mon, 04 Jul 2011 18:38:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdrmi-00021V-Qt for qemu-devel@nongnu.org; Mon, 04 Jul 2011 18:38:33 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:46292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdrmi-00021N-Dm for qemu-devel@nongnu.org; Mon, 04 Jul 2011 18:38:32 -0400 Received: by pzk30 with SMTP id 30so1703100pzk.4 for ; Mon, 04 Jul 2011 15:38:30 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 4 Jul 2011 23:38:30 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 2/3] Add fno-strict-overflow List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Raghavendra D Prabhu Cc: Raghavendra D Prabhu , qemu-devel@nongnu.org, kvm@vger.kernel.org On 4 July 2011 23:00, Raghavendra D Prabhu wrote: > This is to avoid gcc optimizating out the comparison in assert, > due to assumption of signed overflow being undefined by default (-Werror=strict-overflow). >--- a/Makefile.hw >+++ b/Makefile.hw >@@ -9,7 +9,7 @@ include $(SRC_PATH)/rules.mak > > $(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw) > > -QEMU_CFLAGS+=-I.. -I$(SRC_PATH)/fpu > +QEMU_CFLAGS+=-I.. -I$(SRC_PATH)/fpu -fno-strict-overflow Can you give a more detailed description of the problem this is trying to solve? I think it would be nicer if we could remove the assumptions about signed overflows instead, if that's practical. (Also, if we do want to add this compiler flag then it ought to be done in configure I think, as we do for -fno-strict-aliasing.) -- PMM