This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47504] some constexpr calculations erroneously overflow when using negative numbers
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Mar 2011 03:14:39 +0000
- Subject: [Bug c++/47504] some constexpr calculations erroneously overflow when using negative numbers
- Auto-submitted: auto-generated
- References: <bug-47504-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47504
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-17 03:14:22 UTC ---
True, the language standards seem to distinguish between this and the overflow
you get from saying INT_MAX+1. But GCC internals do not make this distinction;
in either case, we end up setting TREE_OVERFLOW in force_fit_type_double.
Given that, I would prefer to avoid this transformation.