1 // { dg-do compile { target c++11 } }
3 typedef unsigned volatile long long uvlonglong;
6 enum E2 : signed const short { };
7 enum E3 : uvlonglong { };
9 val = 500 // { dg-error "outside the range" }
13 val = (unsigned long long)-1 // { dg-error "outside the range" }
18 enum class E6 : Float { }; // { dg-error "must be an integral type" }
20 static_assert (sizeof(E1) == sizeof(char), "char-sized enum");
21 static_assert (sizeof(E2) == sizeof(signed short), "short-sized enum");
22 static_assert (sizeof(E3) == sizeof(unsigned long long),
23 "long long-sized enum");
24 static_assert (sizeof(E4) == sizeof(char), "char-sized enum");
25 static_assert (sizeof(E5) == sizeof(int), "scoped enum with int size");