...
STR09-C-EX1: Consecutive values for characters like a~z
can be assumed on platforms where ASCII or Unicode is used. This recommendation is primarily concerned with platform portability, for example, if code is migrated from ASCII systems to non-ASCII systems.
Risk Assessment
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
STR09-C | Low | Unlikely | Low | P3 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||
Astrée |
|
Supported, but no explicit checker | |||||||||
LDRA tool suite |
| 329 S | Fully implemented | ||||||
Parasoft C/C++test |
|
|
| CODSTA-69 | Fully implemented | ||||||
PRQA QA-C |
| 2106 2107 |
Related Guidelines
SEI CERT C++ Coding Standard | VOID STR07-CPP. Don't assume numeric values for expressions with type plain character |
Bibliography
[Jones 2009] | Section 5.2.1, "Character Sets" |
...
...