Versions Compared

Key

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

Immutable objects should be const-qualified. Enforcing object immutability using const- qualification helps ensure the correctness and security of applications. ISO/IEC TR 24772, for example, recommends labeling parameters as constant to avoid the unintentional modification of function arguments [ISO/IEC TR 24772]. STR05-C. Use pointers to const when referring to string literals describes a specialized case of this recommendation.

...

Tool

Version

Checker

Description

Compass/ROSE

 

 

 

LDRA tool suite

Include Page
LDRA_V
LDRA_V

78 D
93 D
200 S

Fully implemented

PRQA QA-C
Include Page
PRQA_V
PRQA_V

3204
3227
3232
 

Partially implemented

Related Vulnerabilities

...

Section 6.7.3, "Type Qualifiers
[Dewhurst 2002]Gotcha #25, "#define Literals"[ISO/IEC 9899:2011]"
[Saks 2000]