Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: made minor editorial change

...

This requirement must be met for each allowable ordering of the subexpressions of a full expression; otherwise, the behavior is undefined. (see See undefined behavior 35.)

The following sequence points are defined in the C Standard, Annex C [ISO/IEC 9899:2011]:

...

Code Block
bgColor#FFcccc
langc
/* i is modified twice between sequence points */
i = ++i + 1;  

/* i is read other than to determine the value to be stored */
a[i++] = i;   

Note that not Not all instances of a comma in C code denote a usage of the comma operator. For example, the comma between arguments in a function call is not a sequence point. However, according to the C Standard, 6.5.2.2, paragraph 10 [ISO/IEC 9899:2011]

...