Synopsis: | The right operand of a left shift operator for a signed type as left operand shall not be so large that the resulting value cannot be represented. |
Language: | C |
Severity Level: | 4 |
Category: | Expressions |
Description: |
Justification Such shifts lead to undefined behavior. In general, only the constant case is statically detectable, for example: Example int a = 3; int b; b = (a << 46); /* WRONG: int may be 32 bits */ |