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

Vincent Lefevre wrote:

No, this isn't what I meant. The C standard doesn't assume wrapping,
so I don't either. If the compiler doesn't either, then it can do
some optimizations. Let's take a very simple example:

We perfectly understand that if the compiler does not assume
wrapping, but instead assumes that integer overflow is undefined,
then some possible optimization opportunities open up (how could
anyone reading this thread not understand this, far better examples
have been given than the one you give here). No one is contesting
that, or failing to understand that this is of course true. So we
don't need another simple-minded tutorial on that issue!

The issues are

a) are these optimizations valuable? (and if so, in all cases,
   or only in practice for loop invariants?).

b) are these optimiztions judicious? they are allowed by the
   standard, but then a lot of things are allowed by the
   standard that we do not take advantage of (such as fast
   math), but do they cause too many surprises given actual
   C coding practices.

And it is on these two points that people (rather strenuously)

reply via email to

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