Unverified Commit c670cdb9 authored by Jonathan Wakely's avatar Jonathan Wakely Committed by GitHub
Browse files

[sanitizers] Do not define __has_feature in sanitizer/common_interface_defs.h (#66628)

Public headers intended for user code should not define `__has_feature`,
because this can break preprocessor checks done later in user code, e.g.
if they test `#ifdef __has_feature` to check for real support in the
compiler.

Replace the only use in the public header with a check for it being
supported before trying to use it. Define the fallback definition in the
internal headers, so that other internal sanitizer headers can continue
to use it as preferred.

This resolves a bug reported to GCC as https://gcc.gnu.org/PR109882
parent 1d95a071
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment