secure coding> size = sizeof (x ++);> The expression in () of the sizeof operation is not executed

Coding Practice Guide for Embedded Software Development [C Language Version] First Edition First Edition

The following is an example of "Example 2. Writing an expression that is not executed" on p129 of this book.

c code


size = sizeof(x++);

The explanation says, "The expression in () of the sizeof operation only asks for the size of the expression type, and does not execute the expression."

When I wrote the code in ideone (link), x ++ was certainly not running.

However, I can't think of the need to take sizeof while adding x called sizeof (x ++) as my own relevance.

Recommended Posts