C中的关系运算符是否有固定的评估顺序?

Does relational operator in C have fixed evaluation order?

这是问题所在:

With int a,b,c;, is a = a * b + a; equivalent to (c = a * b)!=(a = c + a); with respect to modification of a?

乍一看我认为它们是相同的,但是规范是否说明在 expr1 != expr2 中,expr1 总是在 expr2 之前求值?我认为情况并非如此,但我找不到这方面的权威来源。

此外,我对 http://en.cppreference.com/w/c/language/eval_order 中的发现感到困惑:

The side effect (modification of the left argument) of the direct assignment operator and of all compound assignment operators is sequenced after the value computation (but not the side effects) of both left and right arguments.

(since C11)

这是否意味着我可以将其解释为自 C11 以来,上述语句将具有固定的评估顺序(因为涉及赋值),但不是 pre-C11?

(c = a * b)!=(a = c + a); 调用未定义的行为。表达式 (c = a * b)(a = c + a) 的计算顺序未排序。

C11-6.5/2:

If a side effect on a scalar object is unsequenced relative to either a different side effect on the same scalar object or a value computation using the value of the same scalar object, the behavior is undefined.[...]

语录

The side effect (modification of the left argument) of the direct assignment operator and of all compound assignment operators is sequenced after the value computation (but not the side effects) of both left and right arguments.

表示对于像 a = b;a += b 这样的表达式,ba 的赋值在子表达式 ab 在两个语句中。这是由 C 标准保证的。但是,无法保证上述语句中 ab 的求值顺序。