In the C language, a sequence point is a place in code just after the termination of an expression, before any of the ||, &&, ?:, or , operators, or just before a function call, after all of its arguments have been evaluated.
At a sequence point, all variable updates and side-effects since the previous sequence point are guaranteed to have taken place.
From the ISO Standard:
Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored.
The first sentence is pretty obvious: you're not allowed to modify a variable twice between sequence points. (So a statement like
i = 5 * i++; is not allowed, because
i is both being assigned to, and updated as a side effect of the ++.)
The second sentence is slightly less obvious, and best explained with an example. The behavior of this code:
a[i] = i++;
is undefined. Why? because the 'prior value' of
i is being accessed to determine where in
a, instead of just to compute the value of
Thanks to the comp.lang.c FAQ and some various other web pages for the info, as well as all of my English teachers over the years, who have taught me how to read and comprehend, which assisted greatly in me discovering what sequence points are. Also, thanks to my parents, Ayn Rand and God, who raised me right.