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: Might a -native-semantics switch, forcing native target optimization semantics, be reasonable?


> From: Robert Dewar <dewar@adacore.com>
> .. there is no requirement that optimization preserve the behavior of
> undefined programs ... It is fine to argue that defining the semantics
> is useful in a particular case, but arguing solely from the point of
> view of trying to preserve observed behaviort is a poor argument.
>
> Indeed the point is that optimization is not changing the behavior, the
> behavior is non-deterministic, and can change from one compilation to
> the next even if optimization does not change.

- observable program behavior is the only thing that's significant.

- yes, it's understood that a language's specification may consider
  multiple program implementations having differing observable behaviors
  as being logically equivalent when their observable differences are
  restricted to differing implementations of under/undefined language
  semantics; however this does not imply observable behavior modifying
  optimizations are generally innocuous and/or desirable, as in fact any
  optimization which may alter a programs observable behavior which was
  otherwise deemed desirable is clearly arguably counterproductive, as
  neither observable behavior is warranted to be portable or more correct.

- however as promised I'll abstain from further debate as the community
  seems satisfied with accepting the consequences of such optimizations.





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