[PATCH] Document arithmetic overflow semantics
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Feb 13 15:35:00 GMT 2003
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?
More information about the Gcc
mailing list