From 717eb9512cbd98e965c1b842cbc9d84e218c37c2 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 16 Oct 2025 21:02:04 +0300 Subject: fix bucket calculation on 32bit --- include/conts/spvec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/conts/spvec.h b/include/conts/spvec.h index d557fa8..92105b3 100644 --- a/include/conts/spvec.h +++ b/include/conts/spvec.h @@ -40,9 +40,9 @@ static inline size_t conts_spvec_bucket(size_t i) if (i < 64) return 0; - /** @todo fallback for __builtin_clzll, C23 has std_count_leading_zeroes + /** @todo fallback for __builtin_clzll, C23 has stdc_leading_zeroes * but might want to go for a simple loop for maximum compatibility? */ - return (8 * sizeof(size_t)) - __builtin_clzll(i) - 6; + return (8 * sizeof(unsigned long long)) - __builtin_clzll(i) - 6; } static inline size_t conts_spvec_size(size_t b) -- cgit v1.2.3