WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] introduce __must_be_array

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] introduce __must_be_array
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 20 May 2009 07:05:47 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 20 May 2009 07:06:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A14241E0200007800001CCD@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnZUFtraJho1khMSHuzMR4TKAfePQAA7c6S
Thread-topic: [Xen-devel] [PATCH] introduce __must_be_array
User-agent: Microsoft-Entourage/12.17.0.090302
On 20/05/2009 06:39, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>> Would simply removing the cast to void from BUILD_BUG_ON() lead to compiler
>> warnings?
> 
> While I didn't try it, I'm convinced it would.

I tried it (gcc 4.1.2) and it didn't. And I'm not sure what the theoretical
warning message would be: Throwing away a non-void value? We do that with
return values from functions very often.

I'll change BUILD_BUG_ON() and avoid BUILD_BUG_ON_ZERO(), but revert to your
approach if some gccs turn out to act differently.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel