http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #5 from Luchezar Belev <l_belev at yahoo dot com> 2012-03-12 21:08:07 UTC --- Ok, but at least the error message should be changed to tell about overflow. For example the following code gives error too, but it says "error: overflow in constant expression" which is more clear int foo(int x) { switch (x) { case 1: return 5; case (1<<31)-1: return 7; } }