6.8 Statements and blocks

Previous Table of Contents "New C Standard" commentary

1707

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

1708 A statement specifies an action to be performed.

1709 Except as indicated, statements are executed in sequence.

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

1711 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.

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

1713 Each of the following is a full expression:

1714 an initializer;

1715 the expression in an expression statement;

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

1717 the controlling expression of a while or do statement;

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

1719 the (optional) expression in a return statement.

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

1721 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: 2008-01-30 02:39:44 The text from WG14/N1256 is copyright © ISO