p2pool/patches/msys2/gcc14_abseil.patch
2024-05-16 12:37:17 +02:00

13 lines
621 B
Diff

diff --git a/absl/numeric/internal/bits.h b/absl/numeric/internal/bits.h
index bfef06bc..3091d1b4 100644
--- a/absl/numeric/internal/bits.h
+++ b/absl/numeric/internal/bits.h
@@ -303,7 +303,7 @@ CountTrailingZeroesNonzero64(uint64_t x) {
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CTZ inline int
CountTrailingZeroesNonzero16(uint16_t x) {
-#if ABSL_HAVE_BUILTIN(__builtin_ctzs)
+#if ABSL_HAVE_BUILTIN(__builtin_ctzs) && defined(__clang__)
static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int)
"__builtin_ctzs does not take 16-bit arg");
return __builtin_ctzs(x);