International Standard ISO/IEC 9899:201x Programming languages — C
Accessing a volatile object, modifying an object, modifying a file, or calling a function that does any of those operations are all side effects, which are changes in the state of the execution environment.
The presence of a sequence point between the evaluation of expressions A and B implies that every value computation and side effect associated with A is sequenced before every value computation and side effect associated with B.
Here is the complete list of sequence points from Annex C of the online 2011 pre-publication draft of the C language standard:
1 The following are the sequence points described in 184.108.40.206:
- Between the evaluations of the function designator and actual arguments in a function call and the actual call. (220.127.116.11).
- Between the evaluations of the first and second operands of the following operators: logical AND
&&(6.5.13); logical OR
- Between the evaluations of the first operand of the conditional
? :operator and whichever of the second and third operands is evaluated (6.5.15).
- The end of a full declarator: declarators (6.7.6);
- Between the evaluation of a full expression and the next full expression to be evaluated. The following are full expressions: an initializer that is not part of a compound literal (6.7.9); the expression in an expression statement (6.8.3); the controlling expression of a selection statement (
switch) (6.8.4); the controlling expression of a
dostatement (6.8.5); each of the (optional) expressions of a
forstatement (18.104.22.168); the (optional) expression in a
- Immediately before a library function returns (7.1.4).
- After the actions associated with each formatted input/output function conversion specifier (7.21.6, 7.29.2).
- Immediately before and immediately after each call to a comparison function, and also between any call to a comparison function and any movement of the objects passed as arguments to that call (7.22.5).