Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This recommendation is related to EXP30-C. Do not depend on order of evaluation between sequence pointsfor side-effects, but it focuses on behavior that is nonportable or potentially confusing.

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

EXP10-C

mediumMedium

probableProbable

mediumMedium

P8

L2

Automated Detection

Tool

Version

Checker

Description

Compass/ROSE

 

 

Could detect violations of this recommendation by searching for the following pattern:

    • Any expression that calls two functions between the same sequence points
    • Those two functions both modify the value of a static variable
    • That static variable's value is referenced by code following the expression

Coverity

Include Page
Coverity_V
Coverity_V

EVALUATION_ORDER

Can detect the specific instance where a statement contains multiple side effects on the same value with an undefined evaluation order because the statement may behave differently with different compiler flags or different compilers or platforms

LDRA tool suite

Include Page
LDRA_V
LDRA_V

35 D
72 D
74 D
1 Q
134 S

Fully implemented

PRQA QA-C
Include Page
PRQA_V
PRQA_V
3226Partially implemented

...