6.8 Statements and blocks

Previous Table of Contents

1696

statement:
                labeled-statement
                compound-statement
                expression-statement
                selection-statement
                iteration-statement
                jump-statement

1697 A statement specifies an action to be performed.

1698 Except as indicated, statements are executed in sequence.

1699 A block allows a set of declarations and statements to be grouped into one syntactic unit.

1700 The initializers of objects that have automatic storage duration, and the variable length array declarators of ordinary identifiers with block scope, are evaluated and the values are stored in the objects (including storing an indeterminate value in objects without an initializer) each time the declaration is reached in the order of execution, as if it were a statement, and within each declaration in the order that declarators appear.

1701 A full expression is an expression that is not part of another expression or of a declarator.

1702 Each of the following is a full expression:

1703 an initializer;

1704 the expression in an expression statement;

1705 the controlling expression of a selection statement (if or switch);

1706 the controlling expression of a while or do statement;

1707 each of the (optional) expressions of a for statement;

1708 the (optional) expression in a return statement.

1709 The end of a full expression is a sequence point.

1710 Forward references: expression and null statements (6.8.3), selection statements (6.8.4), iteration statements (6.8.5), the return statement (6.8.6.4).

Next

Created at: 2005-06-29 02:19:03 The text from WG14/N1124 is copyright © ISO