Versions Compared

Key

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

...

Tool

Version

Checker

Description

Compass/ROSE

 

 

Could detect violations of this rule merely by looking for calls to assert(), and if it can evaluate the assertion (due to all values being known at compile time), then the code should use static-assert instead. This assumes ROSE can recognize macro invocation.

LDRA tool suite

Include Page
LDRA_V
LDRA_V

44 S

Fully implemented.

ECLAIR
Include Page
ECLAIR_V
ECLAIR_V
macrcallFully implemented.
PRQA QA-C
Include Page
PRQA_V
PRQA_V
2741 2742Partially implemented.

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...

[Becker 2008] 
[Eckel 2007] 
[ISO/IEC 9899:2011]Section 6.10.1, "Conditional Inclusion," section 67.10.3.3, "The ## Operator," and section 7.2.1, "Program Diagnostics, "Static Assertions"
[Jones 2010] 
[Klarer 2004] 
[Saks 2005] 
[Saks 2008] 

...