[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190310213006.GA18349@avx2>
Date: Mon, 11 Mar 2019 00:30:06 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] static_assert: move before people start using it
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 <assert.h>
> >
>
> 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 to mention
> that memcpy and friends are in <linux/string.h>, not a bare <string.h>.
Linux 0.01 had memcpy() in <string.h> in fact. :^)
I don't know what happened.
> Your assert.h would be the first and only header to live directly in
> include/.
>
> If you can somehow convince Andrew to take it you can add a Meh'ed-by me.
The whole BUILD_BUG() thing is a misnomer. Userspace has assert() forever
and it doesn't require double negating (which is why assert is good
and BUILD_BUG is bad). Once everything is converted to static_assert(),
it will live in build_bug.h, so might as well put it into right place
immediately.
Powered by blists - more mailing lists