// RUN: %clang_cc1 -triple %itanium_abi_triple %s -fsyntax-only -verify -pedantic
;
; // ok.
;
;
// minll maxull
; // expected-warning {{ISO C restricts enumerator values to range of 'int'}}
int
enum gccForwardEnumExtension ve; // expected-warning{{ISO C forbids forward references to 'enum' types}} \
// expected-error{{tentative definition has type 'enum gccForwardEnumExtension' that is never completed}} \
// expected-note{{forward declaration of 'enum gccForwardEnumExtension'}}
int
// PR2020
; // expected-note {{previous use is here}}
; // expected-error {{use of 'u0' with tag type that does not match previous declaration}}
// rdar://6095136
extern enum some_undefined_enum ve2; // expected-warning {{ISO C forbids forward references to 'enum' types}}
void
// PR2416
; // expected-error {{use of empty enum}}
// <rdar://problem/6093889>
;
// PR3173
;
// PR2753
void
// <rdar://problem/6503878>
typedef enum ; // expected-warning{{typedef requires a name}}
;
/// PR3688
;
;
static enum e1
// Make sure we don't a.k.a. anonymous enums.
typedef enum an_enum;
char * s = an_enumerator; // expected-error {{incompatible integer to pointer conversion initializing 'char *' with an expression of type 'an_enum'}}
// PR4515
;
int CheckPR4515;
// PR7911
extern enum PR7911T PR7911V; // expected-warning{{ISO C forbids forward references to 'enum' types}}
void
char test5;
// PR8694
// rdar://8707031
void
void
typedef enum NegativeShortEnum;
int NegativeShortTest;
// PR24610
; // expected-note{{previous use is here}}
typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}}
// PR28903
// In C it is valid to define tags inside enums.
;
static int EnumRedecl; // expected-note 2 {{previous definition is here}}
;
;
;
;
struct GH42372_1 ;
// Because class is not a keyword in C, this looks like a forward declaration.
// expected-error@+4 {{expected ';' after top level declarator}}
// expected-error@+3 {{tentative definition has type 'enum class' that is never completed}}
// expected-warning@+2 {{ISO C forbids forward references to 'enum' types}}
// expected-note@+1 {{forward declaration of 'enum class'}}
;