compiler.h: for newer gcc attributes, we can use __has_attribute()
commit9b733a5845ee908a640594f2ca4f303121961e12
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 14 Oct 2016 22:01:06 +0000 (14 15:01 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 14 Oct 2016 22:01:06 +0000 (14 15:01 -0700)
treeac1b5d48efd945f25ad07b5b4cd98bf134de954a
parent9df6b4c8c268cc94a4de784464a1ec9481e5966c
compiler.h: for newer gcc attributes, we can use __has_attribute()

For newer gcc attributes, we can use __has_attribute() to test for
attribute presence.  This improves compatibility both with older gcc
and with clang, at least with -Werror enabled.

Reported-by: Daniel Lundqvist <daniel@malarhojden.nu>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
include/compiler.h