aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/Wunused-var-19.C
blob: 75fd1e3276d8b673b941f4c1cd9da87be0cd14fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// PR c++/55643
// { dg-do compile { target c++11 } }
// { dg-options "-Wunused" }

enum class E { e = 123 };

int
foo ()
{
  E x = E::e;
  return (double) x;
}

int
bar ()
{
  E x = E::e;
  return (long double) x;
}

int
baz ()
{
  E x = E::e;
  return (float) x;
}