Patchwork Warn for each missing printf argument

login
register
mail settings
Submitter IainS
Date Nov. 13, 2010, 5:16 p.m.
Message ID <318E09C5-F5C5-4829-ACAD-7861C9D83E4E@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/71059/
State New
Headers show

Comments

IainS - Nov. 13, 2010, 5:16 p.m.
On 13 Nov 2010, at 16:04, IainS wrote:

> On 13 Nov 2010, at 15:58, Nicola Pero wrote:
>
>> I committed (as obvious) the same adjustment for the identical  
>> Objective-C++ testcase
>> to stop the corresponding ObjC++ failure.
>
> I'll sort out the corresponding amendments to -fnext-runtime fails
> (I seem to recall volunteering...)

applied attached @166713
cheers
Iain

Patch

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 166712)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2010-11-13  Iain Sandoe  <iains@gcc.gnu.org>
+
+	* objc.dg/fsf-nsstring-format-1.m: Adjust format messages.
+	* obj-c++.dg/fsf-nsstring-format-1.mm: Likewise.
+
 2010-11-13  Paolo Bonzini  <bonzini@gnu.org>
 
 	PR c/46462
Index: gcc/testsuite/obj-c++.dg/fsf-nsstring-format-1.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/fsf-nsstring-format-1.mm	(revision 166712)
+++ gcc/testsuite/obj-c++.dg/fsf-nsstring-format-1.mm	(working copy)
@@ -45,7 +45,7 @@  NSString *s10 (int dum, NSString *fmt1, ... ) __at
 void foo (void)
 {
   s1 (@"this format not checked %d %s", 3, 4);
-  printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format .%s. expects type .char.., but argument 3 has type 'int'" } */
+  printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format '%s' expects argument of type 'char.', but argument 3 has type 'int'" } */
 			/* { dg-warning "too many arguments for format" "" { target *-*-* } 48 } */
-  printf(s9 (1, (char *)"and so is this %d %d %s" , 3, 4, "hm"), 5, 6, 12); /* { dg-warning "format .%s. expects type .char.., but argument 4 has type .int." } */
+  printf(s9 (1, (char *)"and so is this %d %d %s" , 3, 4, "hm"), 5, 6, 12); /* { dg-warning "format '%s' expects argument of type 'char.', but argument 4 has type 'int'" } */
 }
Index: gcc/testsuite/objc.dg/fsf-nsstring-format-1.m
===================================================================
--- gcc/testsuite/objc.dg/fsf-nsstring-format-1.m	(revision 166712)
+++ gcc/testsuite/objc.dg/fsf-nsstring-format-1.m	(working copy)
@@ -38,7 +38,7 @@  NSString *s10 (int dum, NSString *fmt1, ... ) __at
 void foo (void)
 {
   s1 (@"format not checked %d %s", 3, 4);
-  printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format .%s. expects type .char .., but argument 3 has type .int." } */
+  printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format '%s' expects argument of type 'char .', but argument 3 has type 'int'" } */
 			/* { dg-warning "too many arguments for format" "" { target *-*-* } 41 } */
-  printf(s9 (1, "and so is this %d %d %s", 3, 4), 5, 6, 12); /* { dg-warning "format .%s. expects type .char .., but argument 4 has type .int." } */
+  printf(s9 (1, "and so is this %d %d %s", 3, 4), 5, 6, 12); /* { dg-warning "format '%s' expects argument of type 'char .', but argument 4 has type 'int'" } */
 }