__builtin_align_down: Cast value to __uintptr_t in the fallback
This matches the behavior of the fallbacks for __builtin_align_up and __builtin_is_aligned. Reviewed by: arichardson, ngie, kib Differential Revision: https://reviews.freebsd.org/D55161
This commit is contained in:
+1
-1
@@ -649,7 +649,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#if !__has_builtin(__builtin_align_down)
|
#if !__has_builtin(__builtin_align_down)
|
||||||
#define __builtin_align_down(x, align) \
|
#define __builtin_align_down(x, align) \
|
||||||
((__typeof__(x))((x)&(~((align)-1))))
|
((__typeof__(x))((__uintptr_t)(x)&(~((align)-1))))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __align_up(x, y) __builtin_align_up(x, y)
|
#define __align_up(x, y) __builtin_align_up(x, y)
|
||||||
|
|||||||
Reference in New Issue
Block a user