summaryrefslogtreecommitdiff
path: root/lib/count-trailing-zeros.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-08-06 15:24:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-08-06 15:25:30 -0700
commit33b293b41b2cc64aa085bad9051507922434ceda (patch)
tree298002879802151ae9c9dd7dc82674185b591354 /lib/count-trailing-zeros.h
parent6cb6215cbe65a183e16adf9122280f8a0155ae10 (diff)
downloademacs-33b293b41b2cc64aa085bad9051507922434ceda.tar.gz
Update from Gnulib
This incorporates: 2020-08-06 libgmp: add <gmp/gmp.h> support 2020-08-06 Consider that clang defines __OPTIMIZE__ like GCC does 2020-08-06 Use __builtin_expect with clang everywhere 2020-08-05 Use __builtin_clz{,l,ll} with clang, also on Windows 2020-08-05 Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang 2020-07-31 _GL_CMP: Improve documentation 2020-07-30 alloca, largefile: sync with Autoconf master * lib/c++defs.h, lib/cdefs.h, lib/count-leading-zeros.h: * lib/count-trailing-zeros.h, m4/alloca.m4, m4/gnulib-common.m4: * m4/largefile.m4, m4/libgmp.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib/count-trailing-zeros.h')
-rw-r--r--lib/count-trailing-zeros.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h
index 1eb5fb919f4..727b21dcc56 100644
--- a/lib/count-trailing-zeros.h
+++ b/lib/count-trailing-zeros.h
@@ -38,7 +38,8 @@ extern "C" {
expand to code that computes the number of trailing zeros of the local
variable 'x' of type TYPE (an unsigned integer type) and return it
from the current function. */
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) \
+ || (__clang_major__ >= 4)
# define COUNT_TRAILING_ZEROS(BUILTIN, MSC_BUILTIN, TYPE) \
return x ? BUILTIN (x) : CHAR_BIT * sizeof x;
#elif _MSC_VER