summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/enum15.C
blob: d653216498ed4ae7b023825c7b417d1ea61bfdb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/44311
// { dg-options -std=c++0x }

enum class A { Val0, Val1 };

void foo (A a, int i)
{
  switch (a)
    {
    case A::Val0: break;
    case 1: break;		// { dg-error "" }
    }

  switch (i)
    {
    case A::Val0: break;	// { dg-error "" }
    case 1: break;
    case 2.0: break;
    }
}