1 // { dg-do compile } 2 3 enum MyState 4 { 5 QUIT = 0, 6 START, 7 STOP, 8 PAUSE 9 }; 10 GetDouble()11 double GetDouble() 12 { 13 return 1.0; 14 } 15 main()16 int main() 17 { 18 MyState the_state; 19 20 the_state = (MyState)GetDouble(); // { dg-bogus "invalid cast" } 21 return 0; 22 } 23