It's well-known that the order of evaluation of a function's arguments in unspecified and can differ between different compilers.
What doesn't seem so clear is whether function calls can be interleaved, in the following sense:
f(g(h()), i(j()))
Let's assume the compiler chooses to evaluate f's first parameter first. Is the compiler free to call j
between calling h
and g
? I believe so, but I don't know where to find confirmation in the Standard.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…