1 // RUN: %clang_cc1 %s -fsyntax-only -verify
2 
3 // See Sema::ParsedFreeStandingDeclSpec about the double diagnostic
4 typedef union <anonymous> __mbstate_t;  // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{typedef requires a name}}
5 
6 
7 // PR2017
8 void x();
9 int a() {
10   int r[x()];  // expected-error {{size of array has non-integer type 'void'}}
11 
12   static y ?; // expected-error{{unknown type name 'y'}} \
13                  expected-error{{expected identifier or '('}}
14 }
15 
16 int; // expected-warning {{declaration does not declare anything}}
17 typedef int; // expected-warning {{typedef requires a name}}
18 const int; // expected-warning {{declaration does not declare anything}}
19 struct; // expected-error {{declaration of anonymous struct must be a definition}} // expected-warning {{declaration does not declare anything}}
20 typedef int I;
21 I; // expected-warning {{declaration does not declare anything}}
22 
23 
24 
25 // rdar://6880449
26 register int test1;     // expected-error {{illegal storage class on file-scoped variable}}
27 register int test2 __asm__("edi");  // expected-error {{global register variables are not supported}}
28 
29