Synopsis: | sizeof shall not be applied to an expression with side-effects. |
Language: | C |
Severity Level: | 3 |
Category: | EXPRESSIONS |
Description: |
The operand of sizeof is not evaluated so the side-effects that would normally occur from evaluating the expression do not take place. This may seem non-intuitive to the novice.
Example: x = sizeof(i++); /* WRONG - i not changed */ |