 
                            ...
Although shifting a negative number of bits or shifting a number of bits greater than or equal to the width of the promoted left operand is undefined behavior in C, the risk is generally low because processors frequently reduce the shift amount modulo the width of the type.
| Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level | 
|---|---|---|---|---|---|---|
| INT34-C | Low | Unlikely | No | YesMedium | P2 | L3 | 
Automated Detection
| Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée | 
 | precision-shift-width | Fully checked | ||||||
| Axivion Bauhaus Suite | 
 | CertC-INT34 | Can detect shifts by a negative or an excessive number of bits and right shifts on negative values. | ||||||
| CodeSonar | 
 | LANG.ARITH.BIGSHIFT | Shift amount exceeds bit width | ||||||
| Compass/ROSE | Can detect violations of this rule. Unsigned operands are detected when checking for INT13-C. Use bitwise operators only on unsigned operands | ||||||||
| Coverity | 
 | BAD_SHIFT | Implemented | ||||||
| Cppcheck | 
 | shiftNegative, shiftTooManyBits | |||||||
| Cppcheck Premium | 
 | shiftNegative, shiftTooManyBits premium-cert-int34-c | |||||||
| ECLAIR | 
 | CC2.INT34 | Partially implemented | ||||||
| Helix QAC | 
 | C0499, C2790, C++2790, C++3003 DF2791, DF2792, DF2793 | |||||||
| Klocwork | 
 | MISRA.SHIFT.RANGE.2012 | |||||||
| LDRA tool suite | 
 | 51 S, 403 S, 479 S | Partially implemented | ||||||
| Parasoft C/C++test | 
 | CERT_C-INT34-a | Avoid incorrect shift operations | ||||||
| Polyspace Bug Finder | 
 | Checks for: 
 Rule partially covered. | |||||||
| PVS-Studio | 
 | V610 | |||||||
| RuleChecker | 
 | precision-shift-width-constant | Partially checked | ||||||
| TrustInSoft Analyzer | 
 | shift | Exhaustively verified (see one compliant and one non-compliant example). | 
...