Paul Eggert <[EMAIL PROTECTED]> writes:

>       * NEWS: AC_PROG_CC, AC_PROG_CXX, and AC_PROG_OBJC now take an
>       optional second argument specifying the default optimization
>       options for GCC.  These optimizations now default to "-O2 -fwrapv"
>       instead of to "-O2".  This partly attacks the problem reported by
>       Ralf Wildenhues in
>       <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>
>       and in <http://gcc.gnu.org/ml/gcc/2006-12/msg00459.html>.

I fully appreciate that there is a real problem here which needs to be
addressed, but this does not seem like the best solution to me.  A
great number of C programs are built using autoconf.  If we make this
change, then they will all be built with -fwrapv.  That will disable
useful loop optimizations, optimizations which are enabled by default
by gcc's competitors.  The result will be to make gcc look worse than
it is.

You will recall that the problem with the original code was not in the
loop optimizers; it was in VRP.  I think we would be better served by
changing VRP to not rely on undefined signed overflow.  Or, at least,
to not rely on it without some additional option.

If we make that change on the 4.2 branch and on mainline, then no
autoconf change is necessary, and the default gcc behaviour will be
less confusing.

Does anybody think that Paul's proposed patch to autoconf would be
better than changing VRP?

Ian

Reply via email to