1 // PR c++/61414
2 // { dg-do compile { target c++11 } }
3 
4 enum class E { E0 = -4, E1 = 3 };
5 enum F : unsigned { F0 = 0, F1 = 15 };
6 
7 struct S
8 {
9   E a : 2;	// { dg-warning "'S::a' is too small to hold all values of 'enum class E'" }
10   E b : 2;	// { dg-warning "'S::b' is too small to hold all values of 'enum class E'" }
11   E c : 3;	// { dg-bogus "'S::c' is too small to hold all values of 'enum class E'" }
12   F d : 3;	// { dg-warning "'S::d' is too small to hold all values of 'enum F'" }
13   F e : 3;	// { dg-warning "'S::e' is too small to hold all values of 'enum F'" }
14   F f : 4;	// { dg-bogus "'S::f' is too small to hold all values of 'enum F'" }
15 };
16