This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: PR c/22476 -Wmissing-format-attribute [take 2]
On Sat, 16 Jul 2005, Kaveh R. Ghazi wrote:
> PR c/22476
> * c-typeck.c (convert_for_assignment): Detect additional cases for
> (digest_init): Call 'convert_for_assignment' before returning.
> * doc/invoke.texi (-Wmissing-format-attribute): Document new
> * call.c (diagnostic_fn_t): New.
> (build_temp, convert_like_real): Use diagnostic_fn_t.
> * gcc.dg/format/miss-3.c, gcc.dg/format/miss-4.c,
> gcc.dg/format/miss-5.c, gcc.dg/format/miss-6.c: New.
The warning in c_common_post_options for -Wmissing-format-attribute
without -Wformat will need rewording, and "warning (0," in the patch
should use OPT_Wmissing_format_attribute instead of 0.
The digest_init change is OK for mainline (I think it will also help in
fixing other bugs to have such initializations pass through
convert_for_assignment). The C++ front end changes to add extra
attributes are probably OK but it's not for me to approve them. The
remaining changes to add the new feature (with the changes I mention
above) are OK for 4.2 but it's the RM's call for 4.1.
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
email@example.com (personal mail)
firstname.lastname@example.org (CodeSourcery mail)
email@example.com (Bugzilla assignments and CCs)