Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wunused-var-19.C

raw
1 // PR c++/55643
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wunused" }
4
5 enum class E { e = 123 };
6
7 int
8 foo ()
9 {
10 E x = E::e;
11 return (double) x;
12 }
13
14 int
15 bar ()
16 {
17 E x = E::e;
18 return (long double) x;
19 }
20
21 int
22 baz ()
23 {
24 E x = E::e;
25 return (float) x;
26 }