summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/enum3.C
blob: 16e71ac67da6706d4736279bbec8f6c22139acd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do assemble  }

// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 28 Feb 2001 <nathan@codesourcery.com>

// Bug 338 and DR 128. Allow static cast to convert between enums.

enum E1 {e1};
enum E2 {e2};

E2 Foo (E1 e)
{
  return static_cast <E2> (e);
}