[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
From: |
Andrew Pinski |
Subject: |
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..." |
Date: |
Fri, 29 Dec 2006 11:13:16 -0500 (EST) |
>
> 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>.
>
> 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
This way you don't depend on either implemenetation defined behavior
of converting between integer with different sizes and undefined behavior
with signed type overflow.
Thanks,
Andrew Pinski
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", (continued)
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Ralf Wildenhues, 2006/12/20
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paolo Bonzini, 2006/12/20
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/21
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paolo Bonzini, 2006/12/21
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/21
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paolo Bonzini, 2006/12/21
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/21
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Russ Allbery, 2006/12/21
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Ian Lance Taylor, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...",
Andrew Pinski <=
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Andrew Pinski, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Thomas Neumann, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Andrew Pinski, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Florian Weimer, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Daniel Jacobowitz, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Richard Guenther, 2006/12/29
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/29