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 middle-end/28473] [4.0/4.1/4.2 Regression] with -O, casting result of round(x) to uint64_t produces wrong values for x > INT_MAX



------- Comment #7 from roger at eyesopen dot com  2006-07-25 20:08 -------
Ahh, I've just found the Richard's patch submission posting at
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg01065.html
I agree with Andrew Pinski, I think my changes are the better fix.

We also need to investigate wether (unsigned int)round(x) is better
implemented as (unsigned int)llround(x).  For the time being, my
patch doesn't perform this transformation, and using lround is unsafe.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28473


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