This is the mail archive of the gcc-patches@gcc.gnu.org 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] Warn for each missing printf argument


On Sat, Nov 13, 2010 at 6:58 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> 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.
                                                                 ^^^^^^^^^^^^^

This isn't a new test.


H.J.
--
>
> 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
>



-- 
H.J.


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