[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: Paolo Bonzini
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Thu, 21 Dec 2006 20:17:28 +0100
User-agent: Thunderbird (Macintosh/20061207)

Sorry, I don't understand the point of this reference.  Are
you saying that -fwrapv sometimes speeds things up?  Or that
-O2 without -fwrapv is often harmless in practice?  (The URL
suggests both things.)  If so, I agree.

That hunk was added in 1992 and it was not disabled by -fwrapv until 2003. Nobody noticed in the middle.

First, this proposed replacement code isn't portable either.
It assumes that there are no padding bits in signed

Pardon my ignorance. What is a commonly used host with padding bits? I have difficulties imagining a common host with other than 16- or 32- bit ints (except embedded hosts, but gnulib should not care about those).

But the code here
is not broken -- it merely assumes C99 + wrapping LIA-1,
which is a perfectly reasonable assumption

You said that when loops are involved, it's not.

For most GNU programs, I'd guess the performance changes for
-fwrapv (whether positive or negative) are unmeasurable, or
nearly so.  But -fwrapv's reliability advantages are
undeniably positive.  So the default seems like a easy call.

Not so much to me.


reply via email to

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