blob: 3e0380ea8786e621c45451132641913b1e4b7b9d [file] [log] [blame]
Chris Lattner99d724f2008-02-10 23:08:00 +00001// RUN: clang %s -fsyntax-only -verify -pedantic
Reid Spencer5f016e22007-07-11 17:01:13 +00002
3extern int a1[];
4
5void f0();
6void f1(int [*]);
7void f2(int [const *]);
8void f3(int [volatile const*]);
Chris Lattnerd658b562008-04-05 06:32:51 +00009int f4(*XX)(void); /* expected-error {{cannot return}} expected-warning {{type specifier missing, defaults to 'int'}} */
Reid Spencer5f016e22007-07-11 17:01:13 +000010
11char ((((*X))));
12
13void (*signal(int, void (*)(int)))(int);
14
15int a, ***C, * const D, b(int);
16
17int *A;
18
19struct str;
20
21int test2(int *P, int A) {
22 struct str;
23
24 // Hard case for array decl, not Array[*].
25 int Array[*(int*)P+A];
26}
27
Chris Lattneraaf9ddb2008-04-06 06:47:48 +000028typedef int atype;
29int test3(x,
30 atype /* expected-error {{unexpected type name 'atype': expected identifier}} */
31 ) int x, atype; {}
Reid Spencer5f016e22007-07-11 17:01:13 +000032
Chris Lattner3825c2e2008-04-06 06:50:56 +000033int test4(x, x) int x; {} /* expected-error {{redefinition of parameter 'x'}} */
34