Date: Fri, 24 Apr 2026 17:56:03 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d46ff9d8389b - stable/15 - __builtin_align_down: Cast value to __uintptr_t in the fallback Message-ID: <69ebaeb3.1a17a.1f117816@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d46ff9d8389b6d096dcc543fb330b53ea59ba910 commit d46ff9d8389b6d096dcc543fb330b53ea59ba910 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-02-24 20:24:17 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-04-24 15:42:57 +0000 __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 (cherry picked from commit 5faceb84142f3c9886f38a03dd5214785ac6961f) --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index ea6a92ad0056..132d4809b0ed 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -649,7 +649,7 @@ #endif #if !__has_builtin(__builtin_align_down) #define __builtin_align_down(x, align) \ - ((__typeof__(x))((x)&(~((align)-1)))) + ((__typeof__(x))((__uintptr_t)(x)&(~((align)-1)))) #endif #define __align_up(x, y) __builtin_align_up(x, y)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ebaeb3.1a17a.1f117816>
