Versions Compared

Key

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

...

Code Block
(*pf[f1()]) (f2(), f3() + f4())

Wiki Markupthe functions {{f1()}}, {{f2()}}, {{f3()}}, and {{f4()}} may be called in any order. All side effects have to be completed before the function pointed to by {{pf\[f1()\]}} is called.

Consequently, the result of the following noncompliant code depends upon unspecified behavior:

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

EXP10-C

medium

probable

medium

P8

L2

Automated Detection

Tool

Version

Checker

Description

Section

Compass/ROSE

 

 

Section

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
Section

Coverity Prevent

Include Page
c:Coverity_Vc:
Coverity_V
Section

EVALUATION_ORDER

Section

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

Section

LDRA tool suite

Include Page
c:LDRA_Vc:
LDRA_V
Section

35 D
72 D
74 D
1 Q
134 S

Section

Fully Implemented

...