From 2b3ae5d12a3f6cdb9008d77eb18fddb1344ce1bb Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 3 Sep 2014 13:20:43 +0000 Subject: [PATCH] re PR c/62294 (Missing "passing argument [...] from incompatible pointer type" warning.) PR c/62294 * gcc.dg/pr62294.c: New test. * gcc.dg/pr62294.h: New file. From-SVN: r214876 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/pr62294.c | 10 ++++++++++ gcc/testsuite/gcc.dg/pr62294.h | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr62294.c create mode 100644 gcc/testsuite/gcc.dg/pr62294.h diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9886c99968b..f313f2fe3cc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-09-03 Marek Polacek + + PR c/62294 + * gcc.dg/pr62294.c: New test. + * gcc.dg/pr62294.h: New file. + 2014-09-03 Kaz Kojima * 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 index 00000000000..c6ec5a75369 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr62294.c @@ -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 index 00000000000..9be45adeabd --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr62294.h @@ -0,0 +1,3 @@ +#pragma GCC system_header +#define foo bar +extern void foo (float *); -- 2.30.2