[Bug c++/52567] constant expression not recognized as being constant
l_belev at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 12 21:08:00 GMT 2012
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;
}
}
More information about the Gcc-bugs
mailing list