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: Robert Dewar
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sun, 31 Dec 2006 11:13:49 -0500
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Vincent Lefevre wrote:
On 2006-12-31 10:08:32 -0500, Richard Kenner wrote:
Well, that's not equivalent. For instance, MPFR has many conditions
that evaluate to TRUE or FALSE on some/many implementations (mainly
because the type sizes depend on the implementation), even without
the assumption that an overflow cannot occur.
Can you give an example of such a condition and show how an
optimization that assumed overflows were undefined could break that
code?

This won't break the code.

OK, so your answer to Richard is simply no, helping to confirm
his pragmatic assertion that the code in GCC that assumes wrapping
is in practice (if not in theory) safe from the optimization efforts
in this area.

But I'm saying that if the compiler assumes
wrapping, even in some particular cases (e.g. code that *looks like*
"overflow check"), it could miss some potential optimizations. That
is, it is not possible to avoid breaking overflow checks *and*
optimizing everything else.

Of course, but this has nothing to do with Richard's point






reply via email to

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