This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Andrew Pinski <pinskia at physics dot uc dot edu dot integrable-solutions dot net>
- Cc: iant at google dot com (Ian Lance Taylor), eggert at CS dot UCLA dot EDU (Paul Eggert), autoconf-patches at gnu dot org, bug-gnulib at gnu dot org, gcc at gcc dot gnu dot org, dnovillo at redhat dot com
- Date: 29 Dec 2006 17:40:11 +0100
- Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- References: <200612291613.kBTGDGIg008659@localhost.localdomain>
Andrew Pinski <pinskia@physics.uc.edu.integrable-solutions.net> writes:
| >
| > Paul Eggert <eggert@CS.UCLA.EDU> 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>.
| >
| > Does anybody think that Paul's proposed patch to autoconf would be
| > better than changing VRP?
|
| I think both ways are incorrect way forward.
| What about coding the loops like:
|
| if (sizeof(time_t) == sizeof(unsigned int))
| {
| // do loop using unsigned int
| // convert to time_t and then see if an overflow happened
| }
| //etc. for the other type
Yuck.
If the above is the only without Autoconf change, I would highly
recommend Autoconf change if GCC optimizers highly value benchmarks
over running real world code.
-- Gaby