On 2006-12-31 09:03:17 -0500, Richard Kenner wrote:
> > And I doubt that GCC (or any compiler) could reliably detect code
> > that checks for overflow.
> 
> It doesn't need to "detect" all such code: all it needs to do is
> ensure that it doesn't BREAK such code. And that's a far easier
> condition: you just have to avoid folding a condition into TRUE or
> FALSE based on assumptions about overflow.

Well, that's not equivalent. For instance, MPFR has many conditions
that evaluate to TRUE or FALSE on some/many implementations (mainly
because the type sizes depend on the implementation), even without
the assumption that an overflow cannot occur.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - 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)

Reply via email to