[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: Richard Guenther
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Mon, 1 Jan 2007 13:42:18 +0100

On 1/1/07, Richard Kenner <address@hidden> wrote:
> the seemingly prevalent attitude "but it is undefined; but it is not
> C" is the opinion of the majority of middle-end maintainers.

Does anybody DISAGREE with that "attitude"?  It isn't valid C to assume that
signed overflow wraps.  I've heard nobody argue that it is.  The question
is how far we go in supporting existing code that's broken in this way.

I don't disagree with that attitude, I even strongly agree.  We support broken
code by options like -fno-strict-aliasing and -fwrapv.  I see this discussion as
a way to prioritize work we need to do anyway: annotate operations with
their overflow behavior (like creating new tree codes WRAPPING_PLUS_EXPR),
clean up existing code to make it more obvious where rely on what semantics,
add more testcases for corner-cases and document existing
(standard-conformant) behavior more explicitly.

Note that we had/have a similar discussion like this (what's a valid/useful
optimization in the users perspective) on the IEEE math front - see the
hunge thread about -ffast-math, -funsafe-math-optimizations and the
proposal to split it into -fassociative-math and -freciprocal-math.  We also
have infrastructure work to do there, like laying grounds to implement
proper contraction support.


reply via email to

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