TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

SR:  7.4.8#1Checked automatically with code checker

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 */