An expression with two or more operators is a compound expression. In a compound expression, the way in which the operands are grouped to the operators may determine the result of the overall expression. If the operands group in one way, the result differs from what it would be if they grouped another way.
Precedence and associativity determine how the operands are grouped. That is, precedence and associativity determinewhich part of the expression is the operand for each of the operators in the expression. Programmers can override these rules by parenthesizing compound expressions to force a particular grouping.
Precedence specifies how the operands are grouped. It says nothing about the order in which the operands are eva luated. In most cases, operands may be eva luated in whatever order is convenient.
本节内容非常重要,但重要的不是记住各种操作符的优先级与结合性,而是要明白,子表达式求值顺序(order of eva luation)是由编译器自由决定的(除了第5.10.3 节列出的四个例外)。如果表达式有副作用,不同的求值顺序会造成不同的运行结果。