### Question 11.35

People keep saying that the behavior of `i = i++` is undefined, but I just tried it on an ANSI-conforming compiler, and got the results I expected.

A compiler may do anything it likes when faced with undefined behavior (and, within limits, with implementation-defined and unspecified behavior), including doing what you expect. It's unwise to depend on it, though. See also questions 11.32, 11.33, and 11.34.

Read sequentially: prev next up top

This page by Steve Summit // Copyright 1995 // mail feedback