This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52119] numeric_limits::min() is not a constant expression
- From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Feb 2012 22:17:27 +0000
- Subject: [Bug c++/52119] numeric_limits::min() is not a constant expression
- Auto-submitted: auto-generated
- References: <bug-52119-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52119
--- Comment #8 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> 2012-02-13 22:17:27 UTC ---
Signed left shift which overflows the corresponding unsigned type is still
undefined, so g++ should reject this:
constexpr int n = 2 << 31;