Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/enum41.C

raw
1 // PR c++/98043
2 // { dg-do compile { target c++11 } }
3
4 enum class B { A };
5 struct C { B c : 8; };
6
7 bool
8 foo (C x)
9 {
10 switch (x.c)
11 {
12 case B::A:
13 return false;
14 default:
15 return true;
16 }
17 }
18
19 enum E { X };
20 struct D { E c : 7; };
21
22 bool
23 bar (D x)
24 {
25 switch (x.c)
26 {
27 case E::X:
28 return false;
29 default:
30 return true;
31 }
32 }