Page MenuHomeFreeBSD

__builtin_align_down: Cast value to __uintptr_t in the fallback
ClosedPublic

Authored by jhb on Feb 7 2026, 3:46 PM.
Tags
None
Referenced Files
F174418473: D55161.id171415.diff
Sat, Oct 3, 1:31 AM
Unknown Object (File)
Fri, Oct 2, 8:40 AM
Unknown Object (File)
Tue, Sep 29, 11:09 AM
Unknown Object (File)
Thu, Sep 24, 10:15 PM
Unknown Object (File)
Thu, Sep 24, 4:45 AM
Unknown Object (File)
Thu, Sep 24, 4:42 AM
Unknown Object (File)
Sun, Sep 20, 6:34 PM
Unknown Object (File)
Sat, Sep 19, 9:10 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I worry that this was intentionally left out to avoid breaking there use of rounddown() on integer types larger than uintptr_t? (E.g. vm_paddr_t on i386)

If that is really a worry, maybe we use _Generic (including the fallback for pre-C11) that maps pointer types to versions that use uintptr_t and otherwise doesn't use the cast?

This revision is now accepted and ready to land.Feb 17 2026, 9:10 PM

Almost certainly an accidental omission