[lkml]   [2020]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] genksyms: Ignore module scoped _Static_assert()
On 01/12/2020 20.56, Nick Desaulniers wrote:
> On Tue, Dec 1, 2020 at 9:04 AM Marco Elver <> wrote:
>> On Tue, Dec 01, 2020 at 04:14PM +0000, Christoph Hellwig wrote:
>>> Why not use the kernels own BUILD_BUG_ON instead of this idiom?
> And to proactively address the inevitable: why do we have both? We
> looked into wholesale replacing BUILD_BUG_ON's implementation with
> _Static_assert, but found that they differ slightly in the handling of
> integer constant expressions; BUILD_BUG_ON was reliant on some
> compiler optimizations in expressions making use of
> __builtin_constant_p that cannot be evaluated when the compiler
> performs the _Static_assert check.

... and _Static_assert() is a declaration, so even many of the
BUILD_BUG_ON() that have a bona fide ICE cannot be converted because


 \ /
  Last update: 2020-12-01 22:06    [W:0.058 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site