brintos

brintos / llvm-project-archived public Read only

0
0
Text · 451 B · a86c420 Raw
15 lines · plain
1// RUN: %clang_cc1 -verify -std=c++98 %s2// RUN: %clang_cc1 -verify=cxx11 -std=c++11 %s3 4#if __cplusplus < 201103L5// expected-no-diagnostics6#endif7 8// Objective-C allows C++11 enumerations in C++98 mode. We disambiguate in9// order to make this a backwards-compatible extension.10struct A {11  enum E : int{a}; // OK, enum definition12  enum E : int(a); // OK, bit-field declaration cxx11-error{{anonymous bit-field}}13};14_Static_assert(A::a == 0, "");15