]> Savannah Git Hosting - gnulib.git/commit
Port better to GCC under macOS
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 23 Oct 2019 20:31:15 +0000 (13:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 23 Oct 2019 20:33:56 +0000 (13:33 -0700)
commitf5756b919addb9e8ce03f4e61a10e4fcff14874a
treec5c262a71acc3fd7d57917b7966e280a4018f139
parentfffc8765455be047f97e632db7f30e1883c566ad
Port better to GCC under macOS

Work around macOS header that has ‘#define __has_builtin(x) 0’
when compiled by GCC.  Apple really, really doesn’t want you to
use GCC, apparently.  Rroblem reported by Akim Demaille in:
https://lists.gnu.org/r/bug-bison/2019-10/msg00071.html
The fix is to not trust __has_builtin when being compiled by
recent-enough GCC.
* lib/intprops.h (__has_builtin)
(_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
* lib/verify.h (__has_builtin, _GL_HAS___builtin_unreachable)
(_GL_HAS___builtin_trap, _GL_TEMPDEF___has_builtin):
Remove.  All uses removed.
* lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Use __has_builtin
directly, if defined and if not newer GCC.
* lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
New macro, that use __has_builtin directly, if defined and if
not newer GCC.
(assume): Use them.
ChangeLog
lib/intprops.h
lib/verify.h