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
F168529443: D55161.id171415.diff
Fri, Aug 28, 9:03 PM
Unknown Object (File)
Sun, Aug 23, 4:13 AM
Unknown Object (File)
Tue, Aug 11, 9:53 AM
Unknown Object (File)
Tue, Aug 11, 1:18 AM
Unknown Object (File)
Tue, Aug 11, 12:04 AM
Unknown Object (File)
Mon, Aug 10, 11:06 PM
Unknown Object (File)
Mon, Aug 10, 11:42 AM
Unknown Object (File)
Sun, Aug 9, 7:40 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70497
Build 67380: arc lint + arc unit

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