Evaluation of an expression may produce side effects. At specific points during execution called , known as sequence points, all side effects of previous evaluations have completed, and no side effects of subsequent evaluations have yet taken place.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
CERT C++ Secure Coding Standard: EXP30-CPP. Do not depend on order of evaluation between sequence points
Java The CERT Oracle Secure Coding Standard for Java: EXP09-J. Do not depend on operator precedence while using expressions containing side-effects
Bibliography
\[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] Section 5.1.2.3, "Program execution," Section 6.5, "Expressions," and Annex C, "Sequence points"
\[[ Wiki Markup
ISO/IEC PDTR 24772|AA. Bibliography#ISO/IEC PDTR 24772]\] TR 24772 "JCW Operator precedence/Order of Evaluation" and "SAM Side-effects and order of evaluation"
MISRA Rule 12.1
Bibliography
Wiki Markup |
---|
\[[MISRA 2004|AA. Bibliography#MISRA 04]\] Rule 12.1
\[[Summit 2005|AA. Bibliography#Summit 05]\] Questions 3.1, 3.2, 3.3, 3.3b, 3.7, 3.8, 3.9, 3.10a, 3.10b, and 3.11
\[[Saks 2007|AA. Bibliography#Saks 07]\] |
...