[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1c957c4-a2df-935c-2992-3540f05fb110@rasmusvillemoes.dk>
Date: Fri, 15 Oct 2021 10:11:16 +0200
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Nick Desaulniers <ndesaulniers@...gle.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Kees Cook <keescook@...omium.org>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] compiler_types: mark __compiletime_assert failure as
__noreturn
On 14/10/2021 19.48, Nick Desaulniers wrote:
> On Thu, Oct 14, 2021 at 8:02 AM Peter Zijlstra <peterz@...radead.org> wrote:
>>
> I'm not sure how worthwhile that yakshave would be,
A yakshave that would be worthwhile is to kill off the macro
compiletime_assert() completely - three is a crowd. It sounds like it
would be implemented in terms of _Static_assert, but it's actually
__attribute__(error). We can fold the definition of compiletime_assert
into BUILD_BUG_ON_MSG.
The users in rwonce.h should just be changed to static_assert, and then
there are very few random users left, which can either be static_assert
or BUILD_BUG_ON_MSG.
Why do we even have a no-op version if !__OPTIMIZE__? AFAIK there's no
CONFIG_O0 option, and such a build wouldn't be interesting at all - it
can't be expected to boot, and it would likely throw warnings left and
right.
Rasmus
Powered by blists - more mailing lists