From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753884AbZI2J2i (ORCPT ); Tue, 29 Sep 2009 05:28:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753826AbZI2J2h (ORCPT ); Tue, 29 Sep 2009 05:28:37 -0400 Received: from vpn.id2.novell.com ([195.33.99.129]:6992 "EHLO vpn.id2.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753819AbZI2J2h convert rfc822-to-8bit (ORCPT ); Tue, 29 Sep 2009 05:28:37 -0400 Message-Id: <4AC1E15502000078000516B5@vpn.id2.novell.com> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 29 Sep 2009 10:28:36 +0100 From: "Jan Beulich" To: , Cc: , , , , Subject: Re: linux-next: tree build failure Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> Hollis Blanchard 09/29/09 2:00 AM >>> >First, I think there is a real bug here, and the code should read like >this (to match the comment): > /* type has to be known at build time for optimization */ >- BUILD_BUG_ON(__builtin_constant_p(type)); >+ BUILD_BUG_ON(!__builtin_constant_p(type)); > >However, I get the same build error *both* ways, i.e. >__builtin_constant_p(type) evaluates to both 0 and 1? Either that, or >the new BUILD_BUG_ON() macro isn't working... No, at this point of the compilation process it's neither zero nor one, it's simply considered non-constant by the compiler at that stage (this builtin is used for optimization, not during parsing, and the error gets generated when the body of the function gets parsed, not when code gets generated from it). Jan From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: linux-next: tree build failure Date: Tue, 29 Sep 2009 10:28:36 +0100 Message-ID: <4AC1E15502000078000516B5@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: sfr@canb.auug.org.au, hollisb@us.ibm.com Cc: akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org List-Id: linux-next.vger.kernel.org >>> Hollis Blanchard 09/29/09 2:00 AM >>> >First, I think there is a real bug here, and the code should read like >this (to match the comment): > /* type has to be known at build time for optimization */ >- BUILD_BUG_ON(__builtin_constant_p(type)); >+ BUILD_BUG_ON(!__builtin_constant_p(type)); > >However, I get the same build error *both* ways, i.e. >__builtin_constant_p(type) evaluates to both 0 and 1? Either that, or >the new BUILD_BUG_ON() macro isn't working... No, at this point of the compilation process it's neither zero nor one, it's simply considered non-constant by the compiler at that stage (this builtin is used for optimization, not during parsing, and the error gets generated when the body of the function gets parsed, not when code gets generated from it). Jan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vpn.id2.novell.com (vpn.id2.novell.com [195.33.99.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "emea1-mh.id2.novell.com", Issuer "APPS" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 12620B7C1B for ; Tue, 29 Sep 2009 19:48:50 +1000 (EST) Message-Id: <4AC1E15502000078000516B5@vpn.id2.novell.com> Date: Tue, 29 Sep 2009 10:28:36 +0100 From: "Jan Beulich" To: , Subject: Re: linux-next: tree build failure Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: akpm@linux-foundation.org, linux-next@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >>> Hollis Blanchard 09/29/09 2:00 AM >>> >First, I think there is a real bug here, and the code should read like >this (to match the comment): > /* type has to be known at build time for optimization */ >- BUILD_BUG_ON(__builtin_constant_p(type)); >+ BUILD_BUG_ON(!__builtin_constant_p(type)); > >However, I get the same build error *both* ways, i.e. >__builtin_constant_p(type) evaluates to both 0 and 1? Either that, or >the new BUILD_BUG_ON() macro isn't working... No, at this point of the compilation process it's neither zero nor one, it's simply considered non-constant by the compiler at that stage (this builtin is used for optimization, not during parsing, and the error gets generated when the body of the function gets parsed, not when code gets generated from it). Jan From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Date: Tue, 29 Sep 2009 09:28:36 +0000 Subject: Re: linux-next: tree build failure Message-Id: <4AC1E15502000078000516B5@vpn.id2.novell.com> List-Id: References: <20090924152102.8d7d40cf.sfr@canb.auug.org.au> In-Reply-To: <20090924152102.8d7d40cf.sfr@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: sfr@canb.auug.org.au, hollisb@us.ibm.com Cc: akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org >>> Hollis Blanchard 09/29/09 2:00 AM >>> >First, I think there is a real bug here, and the code should read like >this (to match the comment): > /* type has to be known at build time for optimization */ >- BUILD_BUG_ON(__builtin_constant_p(type)); >+ BUILD_BUG_ON(!__builtin_constant_p(type)); > >However, I get the same build error *both* ways, i.e. >__builtin_constant_p(type) evaluates to both 0 and 1? Either that, or >the new BUILD_BUG_ON() macro isn't working... No, at this point of the compilation process it's neither zero nor one, it's simply considered non-constant by the compiler at that stage (this builtin is used for optimization, not during parsing, and the error gets generated when the body of the function gets parsed, not when code gets generated from it). Jan