From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBdHa-0002z9-3w for qemu-devel@nongnu.org; Tue, 11 Sep 2012 23:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBdHY-00041T-SU for qemu-devel@nongnu.org; Tue, 11 Sep 2012 23:06:30 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:33649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBdHY-000419-AS for qemu-devel@nongnu.org; Tue, 11 Sep 2012 23:06:28 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2012 13:04:52 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q8C2v3CD25362482 for ; Wed, 12 Sep 2012 12:57:04 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q8C36JRG029217 for ; Wed, 12 Sep 2012 13:06:19 +1000 Message-ID: <504FFC05.5070601@linux.vnet.ibm.com> Date: Wed, 12 Sep 2012 11:05:41 +0800 From: Wenchao Xia 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> In-Reply-To: <504FC0B1.7080903@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Eric Blake Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, Blue Swirl , pbonzini@redhat.com 于 2012-9-12 6:52, Eric Blake 写道: > On 09/11/2012 02:31 PM, Blue Swirl wrote: >> On Mon, Sep 10, 2012 at 8:26 AM, Wenchao Xia wrote: >>> This patch contains type and defines used in APIs, one file for public usage >>> by user, one for libqblock internal usage. >>> > >>> + >>> +#if __GNUC__ >= 4 >> >> #if defined(__GNUC__) && __GNUC__ ... > > Seriously? We require a C99-compliant compiler, which is required to > treat the more compact version identically (all undefined names evaluate > to 0 in the preprocessor), and HACKING doesn't mandate that we spell out > a defined-ness check first. Okay, so configure adds -Wundef to the set > 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__ >= 4 #if defined(__GNUC__) && __GNUC__ >=4 I guess they are the same. -- Best Regards Wenchao Xia