On Mon, 18 Dec 2006, Andrew Pinski wrote:
> On Tue, [EMAIL PROTECTED]:54 +0100, Ralf Wildenhues wrote:
> > > Wheeeoo!  That optimization is going to break a _lot_ of GNU
> > > software.  (Silently.  Oh my.)
>
> Just like say strict aliasing? :)

I find an analogy with -ffast-math much less far-fetched than one with
-fstrict-aliasing. Quoting from the GCC documentation:

     This option [-ffast-math] should never be turned on by any `-O'
     option since it can result in incorrect output for programs which
     depend on an exact implementation of IEEE or ISO rules/specifications
     for math functions.

C89 did not refer to IEEE 754 / IEC 60559. Yet, as far as I am aware,
-ffast-math or the implied optimizations have never been turned on by GCC
unless explicitly requested. That was a wise decision.

By the same token it would be wise to refrain from turning on any
optimization that breaks programs which depend on wrapping signed
integers. Silently breaking LIA-1 semantics is imprudent.

  -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>

Reply via email to