From fe94c760e1cc9a5f3824c48accd4d1cfd86ebcb0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 23 Jan 2023 14:05:28 -0700 Subject: [PATCH] [algs] Build fix for clang and __builtin_mul_overflow Fixes https://github.com/harfbuzz/harfbuzz/issues/4066 --- src/hb-algs.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index d85a4afe1..e98645e3e 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -875,7 +875,7 @@ hb_in_ranges (T u, T lo1, T hi1, Ts... ds) static inline bool hb_unsigned_mul_overflows (unsigned int count, unsigned int size, unsigned *result = nullptr) { -#if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) +#if (defined(__GNUC__) && (__GNUC__ >= 4)) || (defined(__clang__) && (__clang_major__ >= 8)) unsigned stack_result; if (!result) result = &stack_result;