brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 6b05292 Raw
25 lines · c
1// RUN: %clang_cc1 %s -fsyntax-only -verify2 3// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic4typedef union <anonymous> __mbstate_t;  // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{typedef requires a name}}5 6 7// PR20178void x(void); 9int a(void) {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 {{typedef requires a name}}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 23register int test1;     // expected-error {{illegal storage class on file-scoped variable}}24 25