Re: [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes

From: Joe Perches
Date: Sun Aug 26 2018 - 14:50:12 EST


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