From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmY4-0007s6-1A for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:00:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBmXy-0003GW-0m for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:00:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmXx-0003EX-Os for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:00:01 -0400 Message-ID: <5050874B.4050505@redhat.com> Date: Wed, 12 Sep 2012 06:59:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <1347265586-17698-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1347265586-17698-3-git-send-email-xiawenc@linux.vnet.ibm.com> <504FC0B1.7080903@redhat.com> <504FFC05.5070601@linux.vnet.ibm.com> In-Reply-To: <504FFC05.5070601@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigAE73D83187A19AB1BE87195C" Subject: Re: [Qemu-devel] [PATCH V2 2/6] libqblock type and structure defines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, Blue Swirl , pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAE73D83187A19AB1BE87195C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/11/2012 09:05 PM, Wenchao Xia wrote: >> Seriously? We require a C99-compliant compiler, which is required to >> treat the more compact version identically (all undefined names evalua= te >> to 0 in the preprocessor), and HACKING doesn't mandate that we spell o= ut >> a defined-ness check first. Okay, so configure adds -Wundef to the se= t >> of CFLAGS, but I fail to see why we want -Wundef (that's an >> anachronistic warning, only there to help you if you are writing code >> portable to K&R). >> > So if the preprocessor replaced __GNUC__ to 0, is there difference > between these two kinds of macoros? > #if __GNUC__ >=3D 4 > #if defined(__GNUC__) && __GNUC__ >=3D4 The only difference is whether -Wundef will warn, and I'm trying to argue that qemu's current use of -Wundef is pointless, as that warning exists solely for K&R compatibility, not for modern standard-compliant code correctness. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigAE73D83187A19AB1BE87195C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQUIdMAAoJEKeha0olJ0NqhIwH/j3w+u80vrMuVeXUHL+BRv1x R26shsXTHhqJTtmBImjBRJ8g6/f5Ht3nWVf+UoEeawwE3t6vgah3Bghs/XCPG3a0 tYC10i2L/uN2hwEpNuo4dIVNpz8Z1elxH0QKA5q6PccEX64jGRjLiAFMqDB+nNSR dxVCcd2Al/mDB9LFPFFtDFizcLsd7i+2AX8ILdm6S9hl8SzAoaA4/V45sCYy6/2M Jmuo6Mkr5CCfSU6M6kfSp/JAasR+hFh7q1h/YN9BGps3z/XFvLJHdlUqQmhnkS5i fvgDt8pzwxX7Fa16gNqnbEkDlLKdLE4qjadNG2O3lJQqbK1RtxsXxMGidaAnhA4= =fk6U -----END PGP SIGNATURE----- --------------enigAE73D83187A19AB1BE87195C--