Is there a sequence point between these assignments?

前端 未结 6 1733

Is there a sequence point between the two assignments in the following code:

f(f(x=1,1),x=2);
6条回答
  •  不知归路
    2021-02-13 10:24

    There is a sequence point, but the order of evaluation (and their side effects) of the outer function's arguments is still undefined. The implementation is free to first evaluate the inner f(), with its side effect x=1, or the second argument with its side effect x=2.

提交回复
热议问题