2007-10-11 08:18:28 +08:00
// RUN: clang %s -fsyntax-only -verify
2007-07-25 08:24:17 +08:00
2008-12-28 23:28:59 +08:00
// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic
typedef union < anonymous > __mbstate_t ; // expected-error {{declaration of anonymous union must be a definition}} expected-error {{declaration does not declare anything}}
2008-04-02 09:05:10 +08:00
// PR2017
void x ( ) ;
int a ( ) {
2008-11-24 09:28:17 +08:00
int r [ x ( ) ] ; // expected-error {{size of array has non-integer type 'void'}}
2008-04-02 09:05:10 +08:00
}
2008-12-28 23:28:59 +08:00
int ; // expected-error {{declaration does not declare anything}}
typedef int ; // expected-error {{declaration does not declare anything}}
const int ; // expected-error {{declaration does not declare anything}}
struct ; // expected-error {{declaration of anonymous struct must be a definition}} // expected-error {{declaration does not declare anything}}
typedef int I ;
I ; // expected-error {{declaration does not declare anything}}