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: Richard B. Kreckel
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Fri, 29 Dec 2006 22:56:47 +0100 (CET)

On Fri, 29 Dec 2006, Daniel Berlin wrote:
[...]
> OTOH, people who rely on signed overflow being wraparound generally
> *know* they are relying on it.

Wrong. Many people have relied on that "feature" because they thought it
was leagal and haven't had the time to check every piece of code they
wrote for conformance with the holy standard. And they don't have the time
now to walk trough the work of their lifetime to see where they did wrong,
at least unless they get some guidance (read: warning message).

> Given this seems to be some  small number of people and some small
> amount of code (since nobody has produced any examples showing this
> problem is rampant, in which case i'm happy to be proven wrong), why
> don't they just compile *their* code with -fwrapv?

That's not so easy since nobody can tell for sure for sure where that code
is. If the compiler would tell us where it might break code, then we could
just scan inside Debian or similar.

Until then, waiting for bugs to surface over time is just, pardon me, a
very stupid idea.

[...]
> I believe what we have here is a very vocal minority.  I will continue
> to believe so until someone provides real world counter evidence that
> people do, and *need to*, rely on signed overflow being wraparound to
> a degree that we should disable the optimization.

This is a red herring: I don't think anybody expects people need wrapping
signed overflow. What they do need is correctness. Actually, all the users
of free software need and deserve that correctness.

Bottom line: without such a warning, -fwrapv should be the default and
should not be turned off by any -O option.

Regards
  -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>





reply via email to

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