// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++98 -verify -triple x86_64-apple-darwin %s
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++11 -verify -triple x86_64-apple-darwin %s
;
; // expected-warning{{redeclaration of already-defined enum 'E' is a GNU extension}}
int& ;
float& ;
void
// <rdar://problem/6502934>
typedef enum Foo Foo;
void
/// PR3688
;
;
static enum e1
; // expected-error{{ISO C++ forbids forward references to 'enum' types}}
// PR6061
// PR7466
; // expected-warning{{declaration does not declare anything}}
typedef enum ; // expected-warning{{typedef requires a name}}
// PR7921
;
void
// This is accepted as a GNU extension. In C++98, there was no provision for
// expressions with UB to be non-constant.
;
// expected-warning@-2 {{not an integral constant expression}}
// expected-note@-3 {{value 28958703552 is outside the range of representable values}}
// expected-warning@-5 {{overflow in expression; result is -1106067520 with type 'int'}}
// FIXME: This is not consistent with the above case.
;
// expected-error@-2 {{enumerator value is not a constant expression}}
// expected-note@-3 {{value 28958703552 is outside the range of representable values}}
// expected-warning@-5 {{overflow in expression; result is -1106067520 with type 'int'}}
// expected-warning@-6 {{extension}}
// PR28903
;