aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-08-18 17:14:32 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2000-08-18 17:14:32 +0100
commit0d60c2e752f76abe5dfd3442290dd38c2ecf7b23 (patch)
treea7cc3ec17a4759e60a963e904458d654150de717
parente825bf4aa7870d98c32f49ac69a502cc2f3276dd (diff)
downloadgcc-0d60c2e752f76abe5dfd3442290dd38c2ecf7b23.zip
gcc-0d60c2e752f76abe5dfd3442290dd38c2ecf7b23.tar.gz
gcc-0d60c2e752f76abe5dfd3442290dd38c2ecf7b23.tar.bz2
* gcc.dg/format-va-1.c: New test.
From-SVN: r35786
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/format-va-1.c13
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 } */
+}