The increment must happen before the print, as there is a sequence point between the evaluation of the arguments and the call.
But there are no sequence points between the evaluations of the arguments.
Leading to undefined behavior of the case that "Between two sequence points, an object is modified more than once, or is modified and the prior value is read other than to determine the value to be stored."
Print 1 and then 2? Genuinely curious where is the undefined behaviour? :)
Ah, I see it now. There is no guarantee the increment will happen before the print. Only before the next sequence point!
The increment must happen before the print, as there is a sequence point between the evaluation of the arguments and the call.
But there are no sequence points between the evaluations of the arguments.
Leading to undefined behavior of the case that "Between two sequence points, an object is modified more than once, or is modified and the prior value is read other than to determine the value to be stored."
Thanks for clarifying! That makes more sense.