--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
I think the correct logic would be something like: if the argument is for 
a standard typedef, and the format doesn't correspond exactly to that 
typedef (or one differing only by sign, e.g. allow %ju for an intmax_t 
unless -Wformat-signedness), warn (with an option to disable it) even if 
they match (or match up to sign) on this particular system.  Likewise if 
the format is for a standard typedef but the argument isn't.  Hard to 
implement for various reasons (including <inttypes.h> format macros - 
glibc's definitions of those for intmax_t match the underlying type rather 
than using "j", for example), and would have false positives in various 
cases, but more warnings rather than less seems right here and would make 
warnings more consistent between targets.

The option to disable warnings for mismatched typedefs could then have 
different stringencies for whether it disables even int/long mismatches, 
or only cases that already wouldn't warn but for the use of standard 

Reply via email to