Re: [PATCH] static_assert: move before people start using it

From: Rasmus Villemoes
Date: Sun Mar 10 2019 - 18:09:41 EST


On 10/03/2019 22.30, Alexey Dobriyan wrote:
> and BUILD_BUG is bad). Once everything is converted to static_assert(),

That will never happen, because the two are not interchangeable
[ignoring the churn it would involve]. BUILD_BUG_ON can eat expressions
which static_assert won't (e.g. BUILD_BUG_ON(cnt - label1 != OFFSET1);,
where cnt and label1 are definitely not ICEs). Which is one of the
reasons the kernel cannot be built without optimizations.