]> git.eshelyaron.com Git - emacs.git/commit
Simplify by using attribute.h macros
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 May 2020 22:06:58 +0000 (15:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 May 2020 22:10:07 +0000 (15:10 -0700)
commit106936415d2892fc373842b3aedd805096fc9e0e
tree5ca481999c2722c21eaa03711b5d65173735a619
parent6bd47f4477904a55fc08345394bfab9cd7eae2eb
Simplify by using attribute.h macros

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.
src/conf_post.h
src/systhread.h