[Bug c++/52567] constant expression not recognized as being constant

2012-03-12 Thread l_belev at yahoo dot com
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

[Bug c++/52567] constant expression not recognized as being constant

2012-03-12 Thread pinskia at gcc dot gnu.org
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.

[Bug c++/52567] constant expression not recognized as being constant

2012-03-12 Thread l_belev at yahoo dot com
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

[Bug c++/52567] constant expression not recognized as being constant

2012-03-12 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52567 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

[Bug c++/52567] constant expression not recognized as being constant

2012-03-12 Thread marc.glisse at normalesup dot org
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 ?