p2pool/patches/msys2/gcc14_abseil.patch

14 lines
621 B
Diff
Raw Normal View History

2024-05-16 08:53:36 +00:00
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);