Re: [PATCH] fix BUILD_BUG_ON() and a couple of bogus uses of it

From: Rusty Russell
Date: Tue Sep 22 2009 - 02:45:44 EST


On Wed, 19 Aug 2009 01:29:25 am Jan Beulich wrote:
> Note that in the gfp.h, kmemcheck.h, and virtio_config.h cases
> MAYBE_BUILD_BUG_ON() really just serves documentation purposes - even
> if the expression is compile time constant (__builtin_constant_p()
> yields true), the array is still deemed of variable length by gcc, and
> hence the whole expression doesn't have the intended effect.

How annoying. A gcc build assert extension would be great here?

Thanks,
Rusty.
--
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/