Building this code with Microsoft Visual Studio 2008, 2010, and 2012 shows they all eliminate the left operand of the comma operator. This happens only if optimization is enabled. When this code is built using gcc 4.8.1, the left operand of the comma operator is not eliminated, even when full optimization is used.
The C99 specification states, "The left operand of a comma operator is evaluated as a void expression; there is a sequence point after its evaluation. Then the right operand is evaluated".
In my opinion, the Microsoft optimizer is incorrect to remove this code. This is because the language specification says both operands are evaluated. The only differences between the two operands of the comma operator are the order of their evaluation and which one provides the result for the comma operator. In this case the result is void.
Work-around: replace the comma with a semicolon.