https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65446

--- Comment #4 from Eric Blake <eblake at redhat dot com> ---
Arguably, "%u" with short should warn, while "%hu" with short should not.  On
the other hand, if I use "%hu" with int, it is unclear to me whether I should
get a warning (the fact that I'm using %h to intentionally truncate the value
before it is printed, even though %hu and %hd print different values, makes it
hard to discern whether I have a mismatch).  But this does mean that whatever
changes are made to -Wformat-signedness, it should take into account the use of
%h range-limiting vs. pre-integer-promotion types.

Reply via email to