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 ..."


Richard Kenner wrote:
The burden of proof ought to be on the guys proposing -O2
optimizations that break longstanding code, not on the skeptics.

There's also a burden of proof that proposed optimizations will actually "break longstanding code". So far, all of the examples of code shown that assumes wrapv semantics are such that it's nearly impossible to see any useful optimization that would break it!

That's far too ad hoc to me. We can't have a rule for writing gcc that says

  Be careful about overflow, since it is undefined, and the gcc
  optimizer takes advantage of this assumption, but it's OK to
  assume wrap around semantics in code where it is "nearly
  impossible to see any useful optimization that would break it".

I would think that it would be a common consensus position that
whatever the outcome of this debate, the result must be that
the language we are supposed to write in is well defined.


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