fsf-nsstring-format-1.m: Adjust format messages.

gcc/testsuite:

	* objc.dg/fsf-nsstring-format-1.m: Adjust format messages.
	* obj-c++.dg/fsf-nsstring-format-1.mm: Likewise.

From-SVN: r166713
This commit is contained in:
Iain Sandoe 2010-11-13 17:15:17 +00:00
parent 3df087348e
commit 989b59db15
3 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -45,7 +45,7 @@ NSString *s10 (int dum, NSString *fmt1, ... ) __attribute__((format_arg(2))) ; /
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'" } */
}

View File

@ -38,7 +38,7 @@ NSString *s10 (int dum, NSString *fmt1, ... ) __attribute__((format_arg(2))) ; /
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'" } */
}