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