http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #5 from Luchezar Belev 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"
whic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #4 from Andrew Pinski 2012-03-12
20:59:39 UTC ---
An overflow in an integer expression is never an integer constant expression.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #3 from Luchezar Belev 2012-03-12
20:56:10 UTC ---
It overflows alright, but what this has to do with not being constant?
An overflow in a constant expression makes it variable? I fail to see the logic
here
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
Paolo Carlini changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567
--- Comment #1 from Marc Glisse 2012-03-12
18:10:16 UTC ---
1<<31 overflows and is thus not a constant. Try maybe 1LL<<31 ?