]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
gcc: quiet Wattribute for no_sanitize("address")
authorrlibby <rlibby@FreeBSD.org>
Sat, 21 Dec 2019 02:43:20 +0000 (02:43 +0000)
committerrlibby <rlibby@FreeBSD.org>
Sat, 21 Dec 2019 02:43:20 +0000 (02:43 +0000)
commit94ef94e0a9ec6bf346569eb945d39a49d8140fb7
treefef72475e547bd94e4119452fe64886eaf8f0957
parentcd3b7e6b21e9a974845b83c22d1a469d2d5ef24d
gcc: quiet Wattribute for no_sanitize("address")

This is an unfortunate instance where the __has_attribute check does
not function usefully.  Gcc does have the attribute, but for gcc it only
applies to functions, not variables, and trying to apply it to a
variable generates Wattribute.  So far we only apply the attribute to
variables.  Only enable the attribute for clang, for now.

Reviewed by: Anton Rang <rang at acm.org>
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D22875
sys/sys/cdefs.h