]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdlib: add missing stdc_rotate_right_ull alias when builtin is available
authorUros Bizjak <ubizjak@gmail.com>
Wed, 6 May 2026 13:15:35 +0000 (15:15 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 6 May 2026 13:21:33 +0000 (15:21 +0200)
When __builtin_stdc_rotate_right is supported, glibc defines type-specific
aliases for several unsigned integer types (uc, us, ui, ul), but omits the
unsigned long long variant. This leads to an inconsistency between the
builtin-backed path and the generic fallback, where unsigned long long
is handled.

Add the missing stdc_rotate_right_ull macro mapping to
stdc_rotate_right(__x, __n) to complete the set of type-specific helpers
and ensure consistent API coverage across all supported unsigned integer
types.

No functional change for existing users; this only exposes the expected
alias for unsigned long long.

Fixes: 331c7a4cd0ee ("stdbit: Fix builtin name used in __glibc_has_builtin check for rotate_right")
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
include/stdbit.h

index 863b0f8383cdfba369751c70e6d3362f76a61629..d5aeada2b923b2c7ddfb34a33b9ce5e9182e7485 100644 (file)
@@ -11,6 +11,7 @@
 #   define stdc_rotate_right_us(__x, __n) (stdc_rotate_right (__x, __n))
 #   define stdc_rotate_right_ui(__x, __n) (stdc_rotate_right (__x, __n))
 #   define stdc_rotate_right_ul(__x, __n) (stdc_rotate_right (__x, __n))
+#   define stdc_rotate_right_ull(__x, __n) (stdc_rotate_right (__x, __n))
 #  else
 #   if __WORDSIZE == 64
 #    define __ROR_UL_GENERIC __ror64_inline