]> Savannah Git Hosting - gnulib.git/commit
intprops: streamline and get ready for Clang 14
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Dec 2021 18:29:54 +0000 (10:29 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Dec 2021 18:30:25 +0000 (10:30 -0800)
commitebc4aef867bdac47d82f990b3ee0e6cd25424a42
tree8f5723f30e92f39f91d195677d4e81f332b0debc
parent1c86f7f3ffa2fd7584df3be376a5ab6a45dc96da
intprops: streamline and get ready for Clang 14

* lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW):
Rely on __has_builtin first, since GCC didn’t introduce it until
GCC 9 so we don’t need to special-case GCC first.
(_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
Look at __EDG__ rather than __ICC, since icc defines __EDG__ too.
(_GL_HAS_BUILTIN_MUL_OVERFLOW): Define to 1 in Clang 14 and later,
as a bug fix is scheduled for Clang 14.
(_GL_HAS_BUILTIN_OVERFLOW_P): Do not bother to special-case
__clang__, since __has_builtin should do the right thing anyway.
ChangeLog
lib/intprops.h