Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Parasoft C/C++test 10.4

...

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
evaluation-orderPartially checked
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, 1 Q, 134 S

Fully implemented

Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V
MISRA2004-12_2_a, MISRA2004-12_2_b, MISRA2004-12_2_c, MISRA2004-12_2_d

CERT_C-EXP10-a
CERT_C-EXP10-b
CERT_C-EXP10-c
CERT_C-EXP10-d

The value of an expression shall be the same under any order of evaluation that the standard permits
Don't write code that depends on the order of evaluation of function arguments
Don't write code that depends on the order of evaluation of function designator and function arguments
Don't write code that depends on the order of evaluation of expression that involves a function call

Fully implemented

PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v
3226,3326,0400, 0401, 0402,0403Partially implemented
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V521, V681
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
evaluation-orderPartially checked

...