This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Warn for each missing printf argument
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 13 Nov 2010 15:58:44 +0100
- Subject: Re: [PATCH] Warn for each missing printf argument
- References: <1288299612-3412-1-git-send-email-bonzini@gnu.org> <AANLkTikTPPv58TR9QpBdJu3u=XkEdMssf+2PoZo=UQd=@mail.gmail.com>
On 11/13/2010 03:26 PM, H.J. Lu wrote:
> I think you missed one ObjC testcase:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46463
Yeah, it's new since I submitted the patch.
This fixes it.
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
* objc.dg/attributes/method-format-1.m: New test.
Index: testsuite/objc.dg/attributes/method-format-1.m
===================================================================
--- testsuite/objc.dg/attributes/method-format-1.m (revision 166700)
+++ testsuite/objc.dg/attributes/method-format-1.m (working copy)
@@ -27,17 +27,17 @@ void test (LogObject *object)
{
[object log: 2 message: "attribute only applies to variadic functions"];
[object log: 2 message: "attribute %s only applies to variadic functions", "'format'"];
- [object log: 2 message: "attribute %s only applies to variadic functions"]; /* { dg-warning "too few arguments for format" } */
+ [object log: 2 message: "attribute %s only applies to variadic functions"]; /* { dg-warning "expects a matching" } */
[object debug: "attribute only applies to variadic functions"];
[object debug: "attribute %s only applies to variadic functions", "'format'"];
- [object debug: "attribute %s only applies to variadic functions"]; /* { dg-warning "too few arguments for format" } */
+ [object debug: "attribute %s only applies to variadic functions"]; /* { dg-warning "expects a matching" } */
[LogObject log: 2 message: "attribute only applies to variadic functions"];
[LogObject log: 2 message: "attribute %s only applies to variadic functions", "'format'"];
- [LogObject log: 2 message: "attribute %s only applies to variadic functions"]; /* { dg-warning "too few arguments for format" } */
+ [LogObject log: 2 message: "attribute %s only applies to variadic functions"]; /* { dg-warning "expects a matching" } */
[LogObject debug: "attribute only applies to variadic functions"];
[LogObject debug: "attribute %s only applies to variadic functions", "'format'"];
- [LogObject debug: "attribute %s only applies to variadic functions"]; /* { dg-warning "too few arguments for format" } */
+ [LogObject debug: "attribute %s only applies to variadic functions"]; /* { dg-warning "expects a matching" } */
}
Paoo