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: [PATCH] Document arithmetic overflow semantics


    I completely disagree, and so do GCC's patch reviewers.  The behaviour
    of a program with optimization should always be the same as its behaviour
    without optimization.

Another example of where that's false:

We've said many times that a program that contains an expression of
the form

	i = i++;

need not produce the same results in different optimization levels.

You seem to be trying to divide the set of things that make a program
undefined into two sets: those that we must preserve over optimization
and those that we need not.  What criteria do you propose to use to choose,
for each example of undefined behavior, which of those cases we apply?


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