lkml.org 
[lkml]   [2021]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] linux/container_of.h: switch to static_assert
    On Fri, Oct 15, 2021 at 11:05 AM Rasmus Villemoes
    <linux@rasmusvillemoes.dk> wrote:
    >
    > _Static_assert() is evaluated already in the compiler's frontend, and
    > gives a somehat more to-the-point error, compared to the BUILD_BUG_ON
    > macro, which only fires after the optimizer has had a chance to
    > eliminate calls to functions marked with
    > __attribute__((error)). In theory, this might make builds a tiny bit
    > faster.

    Thanks for this! Very much in favor!

    Reviewed-by: Miguel Ojeda <ojeda@kernel.org>

    Perhaps Andrew may want to add a link to the related discussion
    thread: https://lore.kernel.org/lkml/20211014132331.GA4811@kernel.org/T/

    Cheers,
    Miguel

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