1// RUN: %clang_cc1 -verify -std=c++98 %s 2// RUN: %clang_cc1 -verify=cxx11 -std=c++11 %s 3 4#if __cplusplus < 201103L 5// expected-no-diagnostics 6#endif 7 8// Objective-C allows C++11 enumerations in C++98 mode. We disambiguate in 9// order to make this a backwards-compatible extension. 10struct A { 11 enum E : int{a}; // OK, enum definition 12 enum E : int(a); // OK, bit-field declaration cxx11-error{{anonymous bit-field}} 13}; 14_Static_assert(A::a == 0, ""); 15