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

Rule:  6.5.3.4.aChecked automatically with code checker

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