This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
> 	-Wmissing-format-attribute.
> 	(digest_init): Call 'convert_for_assignment' before returning.
> 	* doc/invoke.texi (-Wmissing-format-attribute): Document new
> 	behavior.
> cp:
> 	* call.c (diagnostic_fn_t): New.
> 	(build_temp, convert_like_real): Use diagnostic_fn_t.
> testsuite:
> 	* 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      (personal mail) (CodeSourcery mail) (Bugzilla assignments and CCs)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]