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