Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP30-CPP

medium

probable

medium

P8

L2

Automated Detection

Splint Version 3.1.1 can detect violations of this rule.

...

This rule appears in the Java Secure Coding Standard as EXP05-J. Do not write more than once to the same variable within an expression.

Bibliography

Wiki Markup\[[ISO/IEC 14882-2003|AA. Bibliography#ISO/IEC 14882-2003] \] Sections 1.9 Program execution, 5 Expressions, 12.6.2 Initializing bases and members. \
[[ISO/IEC 14882-2003|AA. Bibliography#ISO/IEC 14882-2003] \] Sections 1.9 Program execution, 5 Expressions, 12.6.2 Initializing bases and members. \[
[Summit 05|AA. Bibliography#Summit 05] \] Questions 3.1, 3.2, 3.3, 3.3b, 3.7, 3.8, 3.9, 3.10a, 3.10b, 3.11. \
[[Lockheed Martin 05|AA. Bibliography#Lockheed Martin 05]\] AV Rule 204.1 The value of an expression shall be the same under any order of evaluation that the standard permits. \[
[Saks 07|AA. Bibliography#Saks 07]\]

...

EXP17-CPP. Treat relational and equality operators as if they were nonassociative      03. Expressions (EXP)      EXP31-CPP. Avoid side effects in assertions