2018-10-23 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / expr / cast3.C
blob2ca56c2698ab61bda68e2bd80290bfed2cf0b18b
1 // { dg-do compile }
3 enum MyState
5         QUIT = 0,
6         START,
7         STOP,
8         PAUSE
9 };
11 double GetDouble()
13         return 1.0;
16 int main()
18         MyState the_state;
20         the_state = (MyState)GetDouble(); // { dg-bogus "invalid cast" }
21         return 0;
22 }