diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/format-va-1.c | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcc2190..b3edc99 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-08-18 Joseph S. Myers <jsm28@cam.ac.uk> + + * gcc.dg/format-va-1.c: New test. + 2000-08-18 Nathan Sidwell <nathan@codesourcery.com> * g++.old-deja/g++.other/typedef8.C: New test. diff --git a/gcc/testsuite/gcc.dg/format-va-1.c b/gcc/testsuite/gcc.dg/format-va-1.c new file mode 100644 index 0000000..9538e2b --- /dev/null +++ b/gcc/testsuite/gcc.dg/format-va-1.c @@ -0,0 +1,13 @@ +/* Test for strange warning in format checking. */ +/* Origin: Joseph Myers <jsm28@cam.ac.uk> */ +/* { dg-do compile } */ +/* { dg-options "-Wformat" } */ + +extern int printf (const char *, ...); + +void +foo (void *p) +{ + printf ("%d", p); /* { dg-bogus "va_list" "wrong type in format warning" } */ + /* { dg-warning "format" "format error" { target *-*-* } 11 } */ +} |