lkml.org 
[lkml]   [2018]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/7] Compiler Attributes: use the no-underscores syntax
    From
    Date
    On 2018-08-31 19:05, Miguel Ojeda wrote:
    > The attribute syntax optionally allows to surround attribute names
    > with "__" in order to avoid collisions with macros of the same name
    > (see https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html).
    >
    > This homogenizes all attributes to use the syntax without underscores.

    At the risk of bikeshedding, why not the other way around, exactly
    because of what you write above? We have convenience macros anyway, so
    those verbose leading/trailing underscores would only be in compiler*.h,
    and some of the attribute names are common words that can appear as
    #defines. E.g. error is defined
    drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c ; if that used a
    BUILD_BUG_ON somewhere, the

    #define __compiletime_error(message) __attribute__((error(message)))

    would break.

    Rasmus

    \
     
     \ /
      Last update: 2018-08-31 23:52    [W:4.419 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site