1// RUN: %clang_cc1 %s -fsyntax-only -verify
2
3// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic
4typedef union <anonymous> __mbstate_t;  // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{declaration does not declare anything}}
5
6
7// PR2017
8void x();
9int 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
16int; // expected-warning {{declaration does not declare anything}}
17typedef int; // expected-warning {{declaration does not declare anything}}
18const int; // expected-warning {{declaration does not declare anything}}
19struct; // expected-error {{declaration of anonymous struct must be a definition}} // expected-warning {{declaration does not declare anything}}
20typedef int I;
21I; // expected-warning {{declaration does not declare anything}}
22
23
24
25// rdar://6880449
26register int test1;     // expected-error {{illegal storage class on file-scoped variable}}
27register int test2 __asm__("edi");  // expected-error {{global register variables are not supported}}
28
29