[algs] Build fix for clang and __builtin_mul_overflow

Fixes https://github.com/harfbuzz/harfbuzz/issues/4066
This commit is contained in:
Behdad Esfahbod 2023-01-23 14:05:28 -07:00
parent 1cf61f3053
commit fe94c760e1
1 changed files with 1 additions and 1 deletions

View File

@ -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;