Return-path: Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:7149 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751218AbaAFJEs (ORCPT ); Mon, 6 Jan 2014 04:04:48 -0500 Date: Mon, 6 Jan 2014 10:04:28 +0100 (CET) From: Julia Lawall To: Joe Perches cc: Julia Lawall , Johannes Berg , Henrique de Moraes Holschuh , kernel-janitors@vger.kernel.org, Emmanuel Grumbach , Intel Linux Wireless , "John W. Linville" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/11] use ether_addr_equal_64bits In-Reply-To: <1388998750.5808.43.camel@joe-AO722> Message-ID: (sfid-20140106_100527_728269_CA46B66A) References: <1388427307-8691-1-git-send-email-Julia.Lawall@lip6.fr> <1388427307-8691-5-git-send-email-Julia.Lawall@lip6.fr> <1388429761.4410.1.camel@jlt4.sipsolutions.net> <1388438724.4573.2.camel@jlt4.sipsolutions.net> <20131230215701.GA4938@khazad-dum.debian.net> <1388445188.18164.0.camel@jlt4.sipsolutions.net> <1388445422.26796.38.camel@joe-AO722> <1388998750.5808.43.camel@joe-AO722> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, 6 Jan 2014, Joe Perches wrote: > On Mon, 2014-01-06 at 09:48 +0100, Julia Lawall wrote: > > Is there any way to get sizeof evaluated at build time? > > I'm confused a bit by what you want to accomplish. To check that a field that is an argument od ether_addr_equal_64bits is a sufficient distance from the end of the structure. > Except for variable length arrays, isn't sizeof always > evaluated at build time? OK, the question was expressed badly. Is there any way to use the value to trigger an action at build time? The only way I kow to trigger an action is with #error, but #error is processed by cpp, which doesn't know about the size of types. julia > 6.5.3.4 The sizeof operator > Constraints > [] > 2 The sizeof operator yields the size (in bytes) of its operand, which may be an > expression or the parenthesized name of a type. The size is determined from the type of > the operand. The result is an integer. If the type of the operand is a variable length array > type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an > integer constant. > > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >