...
Incorrect use of relational and equality operators can lead to incorrect control flow.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|
EXP13-C | Low | Unlikely | Medium | P2 | L3 |
Automated Detection
Tool | Version | Checker | Description |
---|
Astrée | | chained-comparison | Fully checked |
ECLAIR | | CC2.EXP13
| Fully implemented |
GCC | |
|
| Option -Wparentheses warns if a comparison like x<=y<=z appears; this warning is also enabled by -Wall |
Helix QAC | | C3392, C3401, C4111, C4112, C4113 |
|
LDRA tool suite | | 433 S | Fully implemented |
PC-lint Plus | Include Page |
---|
| PC-lint Plus_V |
---|
| PC-lint Plus_V |
---|
|
| 503, 731 | Fully supported |
Polyspace Bug Finder | Include Page |
---|
| Polyspace Bug Finder_V |
---|
| Polyspace Bug Finder |
---|
|
|
R2016a | Possibly unintended evaluation of expression because of operator precedence rules |
Operator precedence rules cause unexpected evaluation order in arithmetic expression | PRQA QA-CPRQA QACvPRQA QACv3392 3401 4111 4112 4113 | RuleChecker_V |
---|
| RuleChecker_V |
---|
|
| chained-comparison | Fully checked |
Fully implementedRelated Guidelines
Bibliography
...
...
Image Modified Image Modified Image Modified