blob: fedf2c69f7c05309f6a8962c6711aee0c547f459 [file] [log] [blame]
Steve Naroffd3cd1e52008-01-18 00:39:39 +00001// RUN: clang -fsyntax-only -verify %s
2
3void b; // expected-error {{variable has incomplete type 'void'}}
4struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
5
6static void c; // expected-error {{variable has incomplete type 'void'}}
7static struct foo g; // expected-error {{variable has incomplete type 'struct foo'}}
8
9extern void d;
10extern struct foo e;
11
Steve Naroff9a75f8a2008-01-18 20:40:52 +000012int ary[];
13struct foo bary[]; // expected-error {{array has incomplete element type 'struct foo'}}
14
Steve Naroffd3cd1e52008-01-18 00:39:39 +000015void func() {
Steve Naroff9a75f8a2008-01-18 20:40:52 +000016 int ary[]; // expected-error{{variable has incomplete type 'int []'}}
Steve Naroffd3cd1e52008-01-18 00:39:39 +000017 void b; // expected-error {{variable has incomplete type 'void'}}
18 struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
19}
Chris Lattnere60cff12008-07-03 03:53:40 +000020
21int h[];
22int (*i)[] = &h+1; // expected-error {{arithmetic on pointer to incomplete type 'int (*)[]'}}
23