http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #7 from Jakub Jelinek 2013-04-23
17:42:25 UTC ---
GCC bugzilla is a bug reporting mechanism, not a C++ discussion forum, so
better follow-up elsewhere. That said, yes, if qFuture isn't negative and is
smaller than INT_MAX conv
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #6 from Christopher Hite
2013-04-23 17:26:26 UTC ---
Good, I was a big worried I couldn't convert ints to floats unless the int was
safely mappable. It rounds which is what I'd expect.
I now think z5 is safe, since int32_t(f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #5 from Jakub Jelinek 2013-04-23
11:59:35 UTC ---
Guess you should read something about floating point.
0x7fff of course can't be represented exactly in IEEE 754 single precision
format, so when you convert 2147483647 to fl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #4 from Christopher Hite
2013-04-23 11:35:25 UTC ---
64-bit.
Thanks for pointing out I was converting to float and back. Both of the
following work:
int32_t z3=(qFuture >= double(MAX) ? MAX : double(qFuture) ); //works
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #2 from Andrew Pinski 2013-04-22
18:20:45 UTC ---
Is this on i686 (32bit)?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #1 from Christopher Hite
2013-04-22 17:36:52 UTC ---
Created attachment 29915
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29915
unit test of bug + build instructions in comment