...
Operator | Context |
---|---|
if | Controlling expression |
while | Controlling expression |
do ... while | Controlling expression |
for | Second operand |
?: | First operand |
?: | Second or third operands, where the ternary expression is used in any of these contexts |
&& | Either operand |
|| | either operand |
, | Second operand, when the comma expression is used in any of these contexts |
Performing assignment statements in other contexts do not violate this rule. However, they may violate other rules, such as EXP30-C. Do not depend on the order of evaluation for side effects.
Noncompliant Code Example
...