C programmers commonly make errors regarding the precedence rules of C operators due to the unintuitive low-precedence levels of &
, |
, ^
, <<
, and >>
. Mistakes regarding precedence rules can be avoided by the suitable use of parentheses. Using parentheses defensively reduces errors and, if not taken to excess, makes the code more readable.
Section 6.5 of the C standard Standard [ISO/IEC 9899:2011] defines the precedence of operation by the order of the subclauses.
...
Tool | Version | Checker | Description | LDRA tool suite|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| LDRA
| LDRA
| 361 Sexprprns | Fully implemented | ||||||||
| exprprns361 S | Fully implemented | ||||||||||
PRQA QA-C |
| 3389 | Fully implemented |
...