Synopsis: | The right operand of a shift operator in a constant expression must not be negative or imply too large a shift. |
Language: | C |
Severity Level: | 3 |
Category: | EXPRESSIONS |
Description: |
Such shifts lead to undefined behaviour. In general, only the constant case is statically detectable. Example: int array[ 32<<-3 ]; /* Undefined behaviour */ |