liveBook · Manning

Initializer-list expression

As explained in Modern C

An initializer-list expression is an expression in an array or structure initializer list that supplies an initialized element or member value.

An initializer-list expression is an expression in an array or structure initializer list that supplies an initialized element or member value. section 17.2

TAKEAWAY 17.5

  • Treat initializer-list expressions for array or structure types as indeterminately sequenced. section 17.2
  • Apply this rule when reasoning about the order in which expressions inside an initializer list are evaluated. section 17.2

How Modern C covers it

How deep it goes
States the sequencing rule but does not provide an initializer example or develop indeterminate sequencing further.
What you can do after
Evaluate initializer-list expressions using the rule that their evaluations are indeterminately sequenced.
How it connects
Connects array types, structure types, expression evaluation, function calls, and sequence points.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Modern C. The section links point to the parts of the book it draws on.