This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43284] Explicit casting of double to long long causes value to overflow
- From: "schwab at linux-m68k dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2010 22:07:37 -0000
- Subject: [Bug c++/43284] Explicit casting of double to long long causes value to overflow
- References: <bug-43284-18887@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from schwab at linux-m68k dot org 2010-03-07 22:07 -------
9223372036854775807 has more significant bits than what fits in a double, it is
rounded to 9223372036854775808.0, which then overflows when converted to long
long.
--
schwab at linux-m68k dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43284