comp.lang.c FAQ list
·
Question 11.35

Q:
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:
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.

Here is another way of looking at it,
due to Roger Miller:

``Somebody told me that in basketball
you can't hold the ball and run.
I got a basketball and tried it and it worked just fine.
He obviously didn't understand basketball.''