别写这种代码,深究也没有意义。
C/C++标准中没有规定运算符的两个操作数的计算顺序,因此编译器可以按照任意顺序来计算操作数,这就导致了你上面写的代码在不同编译器上得到的结果可能不一样。
https://en.cppreference.com/w/c/language/eval_order
Order of evaluation of the operands of any C operator, including the order of evaluation of function arguments in a function-call expression, and the order of evaluation of the subexpressions within any expression is unspecified (except where noted below). The compiler will evaluate them in any order, and may choose another order when the same expression is evaluated again.