Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / scoped_enum2.C
blobc4a869a6539e15cb6fdcced4f6761cdad15aea36
1 // { dg-do compile { target c++11 } }
3 enum class E { e = 10 };
4 enum E2 { e2 = 10 };
6 struct C {
7   int arr[E::e];    // { dg-error "could not convert" }
8 // { dg-error "14:size of array .arr. has non-integral" "" { target c++11 } .-1 }
9   int arr2[E2::e2]; // OK
10   int i: E::e;      // { dg-error "could not convert|non-integral type" }
11   int i2: E2::e2;   // OK