From: Alexey Dobriyan <adobriyan@gmail.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] static_assert: move before people start using it
Date: Mon, 11 Mar 2019 00:30:06 +0300 [thread overview]
Message-ID: <20190310213006.GA18349@avx2> (raw)
In-Reply-To: <1d957ac2-3423-2471-6b7f-f6f25dd0273d@rasmusvillemoes.dk>
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.
next prev parent reply other threads:[~2019-03-10 21:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 10:51 [PATCH] static_assert: move before people start using it Alexey Dobriyan
2019-03-10 21:19 ` Rasmus Villemoes
2019-03-10 21:30 ` Alexey Dobriyan [this message]
2019-03-10 22:09 ` Rasmus Villemoes
2019-03-22 9:08 ` [static_assert] d94e96122a: bpf_jit_disasm.c: undefined reference to `assert' kernel test robot
2019-03-22 9:08 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190310213006.GA18349@avx2 \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.