[lkml]   [2021]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] compiler_types: mark __compiletime_assert failure as __noreturn
On Fri, Oct 15, 2021 at 10:11 AM Rasmus Villemoes
<> wrote:
> 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

Agreed, two should be enough.

> 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.

Yeah, I don't think it would compile as it is anyway.

Perhaps it is there for some kind of tooling? For a static analyzer or
something like sparse (if it didn't have its own define)...

But yeah, every use of it should have a comment explaining why it is
there, like crypto/jitterentropy.c does. There are a couple without


 \ /
  Last update: 2021-10-15 14:38    [W:0.869 / U:1.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site