re PR c/62294 (Missing "passing argument [...] from incompatible pointer type" warning.)
authorMarek Polacek <polacek@redhat.com>
Wed, 3 Sep 2014 13:20:43 +0000 (13:20 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 3 Sep 2014 13:20:43 +0000 (13:20 +0000)
PR c/62294
* gcc.dg/pr62294.c: New test.
* gcc.dg/pr62294.h: New file.

From-SVN: r214876

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr62294.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr62294.h [new file with mode: 0644]

index 9886c99968ba0f23851c8ae2e17ee205b0f7ee7d..f313f2fe3ccf73f9719b30921d4b187e19069499 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-03  Marek Polacek  <polacek@redhat.com>
+
+       PR c/62294
+       * gcc.dg/pr62294.c: New test.
+       * gcc.dg/pr62294.h: New file.
+
 2014-09-03  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * gcc.c-torture/execute/pr39228.c: Use dg-add-options instead
diff --git a/gcc/testsuite/gcc.dg/pr62294.c b/gcc/testsuite/gcc.dg/pr62294.c
new file mode 100644 (file)
index 0000000..c6ec5a7
--- /dev/null
@@ -0,0 +1,10 @@
+/* PR c/62294 */
+/* { dg-do compile } */
+
+#include "pr62294.h"
+
+void
+fn (int *u)
+{
+  foo (u); /* { dg-error "passing argument 1 of .bar. from incompatible pointer type" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr62294.h b/gcc/testsuite/gcc.dg/pr62294.h
new file mode 100644 (file)
index 0000000..9be45ad
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+#define foo bar
+extern void foo (float *);