From: Aron Griffis Subject: Re: question regarding gnu-isms Date: Thu, 27 Apr 2006 19:16:06 -0400 Message-ID: <20060427231606.GH3572@vino.zko.hp.com> References: <20060427223641.GG3572@vino.zko.hp.com> <44514DE1.3000201@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <44514DE1.3000201@us.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony Liguori Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi Anthony, Thanks for the explanation of the struct initialization. Regarding the second one, though... Anthony Liguori wrote: [Thu Apr 27 2006, 07:04:01PM EDT] > Aron Griffis wrote: > > #define xen_create_contiguous_region(vstart, order, address_bits) > > ({0;}) > > This is a really common one that lets you make statements into > expressions. ... > > #define min(a, b) ({int lhs = a; int rhs = b; (lhs < rhs) ? lhs : rhs;}) That makes sense for the example you gave, but how does it apply to the definition in question? Is there any difference between ({0;}) and (0) or even 0? > All of these are documented in the GCC Info page (see the section on > C Extensions). :-) I read that before posting, so I was familiar with the purpose of enclosing compound statements in expressions. But I'll reread in case there's something I missed regarding the interpretation of ({0;}) Regards, Aron