This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


Paul Eggert wrote:

The question is not whether GCC should support wrapv
semantics; it already does, if you specify -fwrapv.
The question is merely whether wrapv should be the default
with optimization levels -O0 through -O2.

That over simplifies, because it presents things as though there are only two possibilities

1. Allow "undefined" optimizations without restriction

2. Forbid all such optimizations by specifying fwrapv

Quite a few of us (including certainly me, and I think
Richard) argue for a mid ground where

We don't insist on full fwrapv semantics (because we
think it will hurt code equality, particularly in the
loop invariant case).

We are judcious in applying the optimization in other
cases in a pragmatic attempt to keep "traditional"
C code working in practice.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]