From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpElW-00071N-3B for qemu-devel@nongnu.org; Wed, 19 Jun 2013 05:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpElR-0002AO-01 for qemu-devel@nongnu.org; Wed, 19 Jun 2013 05:33:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpElQ-0002A8-ON for qemu-devel@nongnu.org; Wed, 19 Jun 2013 05:33:16 -0400 Message-ID: <51C17AD1.9060601@redhat.com> Date: Wed, 19 Jun 2013 11:33:05 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1370599329-16682-1-git-send-email-xiawenc@linux.vnet.ibm.com> <87ehcedsi7.fsf@blackfin.pond.sub.org> <51C032D2.80405@redhat.com> <51C14F3B.4090908@linux.vnet.ibm.com> In-Reply-To: <51C14F3B.4090908@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V2] build: remove compile warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, Markus Armbruster , qemu-devel@nongnu.org, alevy@redhat.com, stefanha@redhat.com, mlureau@redhat.com, Robert Relyea Il 19/06/2013 08:27, Wenchao Xia ha scritto: >>> gcc is too stupid to understand the control flow. The initialization >>> shuts it up. >> >> Looks like most people's GCC is not that stupid, or I would have broken >> build for everyone, right? > > my gcc version: > [xiawenc@RH63Wenchao ~]$ gcc -v > Using built-in specs. > Target: x86_64-redhat-linux > Configured with: ../configure --prefix=/usr --mandir=/usr/share/man > --infodir=/usr/share/info > --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap > --enable-shared --enable-threads=posix --enable-checking=release > --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions > --enable-gnu-unique-object > --enable-languages=c,c++,objc,obj-c++,java,fortran,ada > --enable-java-awt=gtk --disable-dssi > --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre > --enable-libgcj-multifile --enable-java-maintainer-mode > --with-ecj-jar=/usr/share/java/eclipse-ecj.jar > --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic > --with-arch_32=i686 --build=x86_64-redhat-linux > Thread model: posix > gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) > > > By default configure, it seems qemu didn't set -Werror to break build. It sets -Werror here: gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) So configure is doing the right thing for both old and new-enough compilers, I don't think there's a reason to change the code. Paolo