This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/43284] Explicit casting of double to long long causes value to overflow



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]