repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
tc1
/
dr128.C
blob
4dd78d57f5c3292b7c2ec5fc2868fd4746315c9d
1
// { dg-do run }
2
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3
// DR128: Casting between enum types
4
5
extern "C" void abort(void);
6
7
enum E1 { BLACK = 0, RED = 1 };
8
enum E2 { WHITE = 0, YELLOW = 1};
9
10
int main(void)
11
{
12
E1 e1 = RED;
13
E2 e2 = static_cast<E2>(e1);
14
if (e2 != YELLOW)
15
abort();
16
return 0;
17
}