* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / enum_base.C
blob8e23179e180be736eca35d71a802fbd140c512b2
1 // { dg-do compile { target c++11 } }
3 typedef unsigned volatile long long uvlonglong;
5 enum E1 : char { };
6 enum E2 : signed const short { };
7 enum E3 : uvlonglong { };
8 enum E4 : char { 
9   val = 500 // { dg-error "outside the range" }
12 enum class E5 {
13   val = (unsigned long long)-1 // { dg-error "outside the range" }
16 typedef float Float;
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");