HomeFreeBSD

gcc: quiet Wattribute for no_sanitize("address")

Description

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

Details

Provenance
rlibbyAuthored on
Differential Revision
D22875: gcc: quiet Wattribute for no_sanitize("address")
Parents
rS355968: MFC r355828:
Branches
Unknown
Tags
Unknown