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

Rusty Russell
2009-09-22T06:45:31Z

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.