Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: font

...

Failing to use plain char for characters in the basic character set can lead to excessive casts and less effective compiler diagnostics.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

STR04-C

Low

Unlikely

Low

P3

L3

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
 

Supported, but no explicit checker
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
LANG.TYPE.IAT
LANG.TYPE.ICA
LANG.TYPE.IOT
LANG.TYPE.MOT
Inappropriate assignment type
Inappropriate character arithmetic
Inappropriate operand type
Mismatched operand types
Compass/ROSE

 

 

 




ECLAIR
Include Page
ECLAIR_V
ECLAIR_V

CC2.STR04

Fully implemented

EDG
 

 

 




LDRA tool suite
Include Page
LDRA_V
LDRA_V
93 S, 101 S, 329 S, 432 S, 458 SPartially implemented
Parasoft C/C++test
Include Page
c:
Parasoft_V
c:
Parasoft_V
MISRA2004-6_1
Partially implemented
Implemented
PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v

0432 (C)

0674

0699

Partially implemented
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
 

Supported, but no explicit checker
SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
S810
 

Related Vulnerabilities

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

Related Guidelines

SEI CERT C++ Coding StandardVOID STR04-CPP. Use plain char for characters in the basic character set
MISRA C:2012

Rule 10.1 (required)
Rule 10.2 (required)
Rule 10.3 (required)
Rule 10.4 (required)

...


...