Re: [PATCH 4/11] use ether_addr_equal_64bits
From: Julia Lawall
Date: Mon Jan 06 2014 - 04:05:01 EST
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.
> 22.214.171.124 The sizeof operator
> 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@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/