According to C++03 Standard 1.9/5
A conforming implementation executing a well-formed program shall produce the same observable behavior as one of the possible execution sequences of the corresponding instance of the abstract machine with the same program and the same input.
I don’t get the “as one of” part.
If I have a specific program and a specific input and my program doesn’t contain undefined behavior why would observable behavior vary? What is meant under “one of the possible execution sequences”?
Consider:
This allows two possible execution sequences:
The standard does not specify which of these must be performed; just that the program must behave as if one of these two were performed. If
f()andg()have side effects, then the program could have one of two different observable behaviours.