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

2010-03-08 Thread ullner at gmail dot com
--- Comment #4 from ullner at gmail dot com 2010-03-08 17:59 --- That still doesn't make sense. 1. Why does enabling -O3 (O1 and O2 does the same) remove this problem? 2. Why does storing the value in an intermediate variable make any change in what the result is? Consider witho

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

2010-03-07 Thread ullner at gmail dot com
--- Comment #2 from ullner at gmail dot com 2010-03-07 22:10 --- Hm? How does calling std::pow with different types behave differently? The value can be stored fine if one does "double dValue = std::pow(2.0, 64);long long llValue = dValue;" // OK -- http://gcc.gnu.or

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

2010-03-07 Thread ullner at gmail dot com
Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ullner at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43284