[lkml]   [2018]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes
Hi Joe,

On Sun, Aug 26, 2018 at 8:50 PM, Joe Perches <> wrote:
> On Sun, 2018-08-26 at 19:57 +0200, Miguel Ojeda wrote:
>> Instead of using version checks per-compiler to define (or not) each attribute,
>> use __has_attribute to test for them, following the cleanup started with
>> commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive").
> Very nice. Thank you Miguel.


> trivia:
> I believe the alphabetic sorting of the required attributes
> makes reading by use a bit difficult and I would prefer that
> various required attributes are sorted by logical use instead.
> ie: keep noinline and __always_inline together,
> keep __used and __always_unused together,
> etc...

Both ways are fine with me --- I sorted them as an attempt to avoid
the file evolving into a mess again in the upcoming years :-)

Half-joking: it may also be a good way to avoid people "guessing" what
the attributes do by name and, instead, consulting the docs (either
the compiler's, or a Doc/ file maybe).


 \ /
  Last update: 2018-08-27 14:35    [W:0.078 / U:2.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site