OSDN Git Service

* g++.dg/parse/repo1.C: Use cleanup-repo-files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / expr / cast3.C
1 // { dg-do compile }
2
3 enum MyState
4 {
5         QUIT = 0,
6         START,
7         STOP,
8         PAUSE
9 };
10
11 double GetDouble()
12 {
13         return 1.0;
14 }
15
16 int main()
17 {
18         MyState the_state;
19
20         the_state = (MyState)GetDouble(); // { dg-bogus "invalid cast" }
21         return 0;
22 }