On Fri, 7 Jan 2022, Daniil Stas via Gcc-patches wrote:

> > > @@ -4248,7 +4248,7 @@ check_format_types (const substring_loc
> > > &fmt_loc, && (!pedantic || i < 2)
> > >     && char_type_flag)
> > >   continue;
> > > -      if (types->scalar_identity_flag
> > > +      if ((types->scalar_identity_flag ||
> > > !warn_format_int_precision) && (TREE_CODE (cur_type) == TREE_CODE

This makes the option apply to all types, not just integer types.  Thus, 
it means a test such as

void f (void) { __builtin_printf ("%f", 0.0f64); }

is not diagnosed with -Wformat -Wno-format-int-precision.  Given the 
option name, I don't think it should affect diagnosing that test (and 
there should be such a test added to the testsuite to verify that it 
doesn't affect diagnostics for non-integer types).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to