• Paul Eggert's avatar
    Simplify by using attribute.h macros · 10693641
    Paul Eggert authored
    attribute.h is partly designed for C2X forward compatibility,
    since C2X will add some standard attributes.  Using its macros
    should help insulate Emacs from C2X teething problems.
    * src/conf_post.h: Include attribute.h.
    (HAS_ATTRIBUTE, HAS_FEATURE): Rename from __has_attribute and
    __has_feature, to avoid polluting the builtin namespace.
    All uses changed.
    (ATTRIBUTE_COLD, ATTRIBUTE_FORMAT, FALLTHROUGH, ATTRIBUTE_CONST)
    (ATTRIBUTE_PURE, ATTRIBUTE_UNUSED, ATTRIBUTE_MAY_ALIAS)
    (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
    (ATTRIBUTE_RETURNS_NONNULL): Remove, as attribute.h does this now.
    (NO_INLINE, EXTERNALLY_VISIBLE, ARG_NONNULL, ATTRIBUTE_UNUSED):
    Simplify by defining in terms of attribute.h macros.
    * src/systhread.h (ATTRIBUTE_WARN_UNUSED_RESULT): Remove.
    All uses replaced by attribute.h’s NODISCARD.
    10693641