autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


From: Ian Lance Taylor
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: 29 Dec 2006 07:55:59 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Paul Eggert <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]