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

2019-03-10 Thread Rasmus Villemoes
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

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

2019-03-10 Thread Alexey Dobriyan
On Sun, Mar 10, 2019 at 10:19:37PM +0100, Rasmus Villemoes wrote: > On 10/03/2019 11.51, Alexey Dobriyan wrote: > > Userspace places static_assert() macro at > > > > So? That seems a rather weak argument. We have lots of interfaces that > also exist in userspace which are not declared in similar

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

2019-03-10 Thread Rasmus Villemoes
On 10/03/2019 11.51, Alexey Dobriyan wrote: > Userspace places static_assert() macro at > So? That seems a rather weak argument. We have lots of interfaces that also exist in userspace which are not declared in similar-named headers (e.g. we have no stdio.h, which is where snprintf lives). Not t

[PATCH] static_assert: move before people start using it

2019-03-10 Thread Alexey Dobriyan
Userspace places static_assert() macro at Signed-off-by: Alexey Dobriyan --- include/assert.h | 19 +++ include/linux/build_bug.h | 19 --- include/linux/fs.h|2 +- lib/vsprintf.c|1 + 4 files changed, 21 insertions(+), 2