...
Mistakes regarding precedence rules may cause an expression to be evaluated in an unintended way, which can lead to unexpected and abnormal program behavior.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|
EXP00-C | Low | Probable | Medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description |
---|
Axivion Bauhaus Suite | Include Page |
---|
| Axivion Bauhaus Suite_V |
---|
| Axivion Bauhaus Suite_V |
---|
|
| CertC-EXP00 | Fully implemented |
CodeSonar | | LANG.STRUCT.PARENS | Missing Parentheses |
ECLAIR | | CC2.EXP00
| Fully implemented |
Helix QAC | | C3389, C3390, C3391, C3392, C3393, C3394, C3395, C3396, C3397, C3398, C3399, C3400 |
|
Klocwork | |
MISRA.2012 9.5 | CODSTA-97 | | | CERT_C-EXP00-a | Use parenthesis to clarify expression order if operators with precedence lower than arithmetic are used |
PC-lint Plus | Include Page |
---|
| PC-lint Plus_V |
---|
| PC-lint Plus_V |
---|
|
| 9050 | Fully supported |
Polyspace Bug Finder | |
Fully implementedR2016a | Possibly unintended evaluation of expression because of operator precedence rules |
Operator precedence rules cause unexpected evaluation order in arithmetic expression | PRQA QA-CPRQA QACvPRQA QACv3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400
| Fully implemented | | Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
...