This is the mail archive of the gcc@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]

Re: Miscompilation of remainder expressions


On 2007-01-16 13:08:18 -0800, David Daney wrote:
> The difference is that your program didn't get killed by SIGFPE, it
> just gave incorrect results.

An incorrect result is worse, but being killed by SIGFPE is still very
bad.

But I was mainly answering the claim "hard to believe this case appears
in real code". IMHO, INT_MIN % -1 can appear just as 0 + LONG_MIN can
appear, just as LONG_MIN / 1 can appear.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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