aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-02-12 07:36:38 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-02-12 07:36:38 +0000
commit3bb91036a0175ec8a83614db24f7b0a69e4f84f0 (patch)
tree2016cca38dc36c82e482ced61daf655e24b8ad2a /gcc
parent26e9664c30268e685859ef9c06b5e0179b88e9e4 (diff)
downloadgcc-3bb91036a0175ec8a83614db24f7b0a69e4f84f0.zip
gcc-3bb91036a0175ec8a83614db24f7b0a69e4f84f0.tar.gz
gcc-3bb91036a0175ec8a83614db24f7b0a69e4f84f0.tar.bz2
* gcc.dg/decl-1.c: New test.
From-SVN: r49702
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/decl-1.c15
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6e7c97d..6c9f84f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-12 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * gcc.dg/decl-1.c: New test.
+
2002-02-12 David Billinghurst <David.Billinghurst@riotinto.com>
* gcc.dg/c99-flex-array-2.c: Add -std=iso9899:1999
diff --git a/gcc/testsuite/gcc.dg/decl-1.c b/gcc/testsuite/gcc.dg/decl-1.c
new file mode 100644
index 0000000..e66b853
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/decl-1.c
@@ -0,0 +1,15 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+
+ Source: Neil Booth, 12 Feb 2002.
+
+ In the declaration of proc, x must be parsed as a typedef name
+ (6.7.5.3 p11). */
+
+typedef int x;
+int proc(int (x)); /* x is a typedef, param to proc is a function. */
+int proc2(int x); /* x is an identifier, param is an int. */
+
+int main ()
+{
+ return proc (proc2); /* { dg-bogus "integer from pointer" } */
+}