[Bug 191674] Implementation for "%tu" printf(3) qualifier incorrect on several 32-bit architectures (arm/x86/mips, i.e. when sizeof(ptrdiff_t) != sizeof(*intmax_t))

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 7 05:23:08 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191674

Ngie Cooper <ngie at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|printf("%tu", (intmax_t)-1) |Implementation for "%tu"
                   |returns UINT64_MAX on i386, |printf(3) qualifier
                   |not UINT32_MAX              |incorrect on several 32-bit
                   |                            |architectures
                   |                            |(arm/x86/mips, i.e. when
                   |                            |sizeof(ptrdiff_t) !=
                   |                            |sizeof(*intmax_t))

--- Comment #1 from Ngie Cooper <ngie at FreeBSD.org> ---
arm/i386/mips are affected by this because it casts the value up to
[u]intmax_t, whereas the type itself can only represent [U]INT_MAX. I know
where the general problem exists, but I don't feel comfortable right now making
the change.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list