osd@hou2d.UUCP (Orlando Sotomayor-Diaz) (05/13/86)
From: Orlando Sotomayor-Diaz (The Moderator) <cbosgd!std-c> mod.std.c Digest Tue, 13 May 86 Volume 16 : Issue 9 Today's Topics: Differences from April 1985 to February 1986 Draft Standard, Part 8 ---------------------------------------------------------------------- Date: Sun, 27 Apr 86 01:17:06 est From: <ihnp4!utcsri!lsuc!msb%utcsri> Subject: Differences from April 1985 to February 1986 Draft Standard, Part 8 To: cbosgd!std-c%utcsri # C.5.6 Initialization <--O A declarator may include an initializer that specifies an initial <--O value for the object whose identifier is being declared. <--O ... Any object may be initialized. N--> Any declaration that defines an object may include an initializer N--> that specifies its initial value. # C.5.6 Initialization N--> Initializers that are neither flat (no interior brackets) nor N--> fully bracketed are ambiguous. ***> The draft shall specify the N--> correct category for this situation. <*** Remark: In other words, they haven't decided. # C.6 STATEMENTS <--O Completion of the execution of a statement is a sequence point. <--O Forward references: compound statement, or block (#C.6.2), func- <--O tion definitions (#C.7.1). N--> A "full expression" is an expression that is not part of another N--> expression. Each of the following is a full expression: an ini- N--> tializer of an object that has automatic storage duration; the N--> expression in an expression statement; the controlling expression N--> of a selection statement (if or switch); the controlling expres- N--> sion of an iteration statement (while, do, or for). Completion N--> of the evaluation of a full expression is a sequence point. N--> Forward references: expression and null statements (#C.6.3), N--> selection statements (#C.6.4), iteration statements (#C.6.5). # C.6.2 Compound statement, or block * An object declared extern {--> inside a block} shall not be ini- * tialized in the declaration, as storage for it is {allocated --> defined} elsewhere. # C.6.4.1 The if statement * If the first substatement is reached via a {named -->} label, the second substatement is not executed. # C.6.4.2 The switch statement <--O The implementation must allow at least 255 case values in a <--O switch statement. N--> As discussed previously (#B.2.4), the implementation may limit N--> the number of case values in a switch statement. # C.6.6.3 The break statement N--> A break statement may appear only in a switch body or loop body. # C.6.6.4 The return statement N--> A return statement with an expression may not appear in a func- N--> tion declared as returning type void. # C.6.6.4 The return statement Reaching the } that terminates a function is equivalent to exe- * cuting a return {with no returned value --> statement without an expression}. # C.7.1 Function definitions <--O The following constraints apply only to a parameter identifier <--O list. Only the identifiers in the parameter list may be declared <--O in the declaration list. An identifier declared as a typedef <--O name must not be redeclared as a formal parameter. N--> Even if the type specifier is a typedef name that declares the N--> function as having no parameters, the parentheses that bound the N--> (empty) parameter identifier list may not be omitted from the de- N--> clarator. N--> The only storage-class specifier allowed in the declaration of a N--> formal parameter is register. N--> If the declarator is a function prototype declarator, no declara- N--> tion list may follow. If the declarator is an identifier list, N--> only the identifiers it names may be declared in the declaration N--> list; an identifier declared as a typedef name shall not be rede- N--> clared as a formal parameter. # C.7.1 Function definitions If a function prototype is in scope when the function is defined * {, --> but} a semantically equivalent prototype {must be --> is * not} in scope everywhere the function is called {-->, the * behavior is undefined}. {--> If a function that accepts a vari- able number of arguments is defined without the ellipsis notation in its prototype, the behavior is undefined.} If no function prototype is in scope when the function is de- * fined, the {following -->} default {--> argument} conversions are * {--> assumed to have been} applied {--> to each call}. ... # C.8 PREPROCESSING DIRECTIVES Remark: The subsections C.8.1 through C.8.3 have been reordered, and all the syntax rules have been collected at the beginning of section C.8. # C.8 PREPROCESSING DIRECTIVES Remark: Again, the notation [opt] below represents a subscript opt, which means optional. N--> preprocessing-file: N--> group N--> preprocessing-file group N--> group: N--> group-part N--> group group-part N--> group-part: N--> tokens[opt] new-line N--> if-section N--> control-line * {token-sequence --> tokens}: token * {token-sequence --> tokens} token N--> if-section: N--> if-group elif-groups[opt] else-group[opt] endif-line N--> if-group: N--> # if constant-expression new-line group[opt] N--> # ifdef identifier new-line group[opt] N--> # ifndef identifier new-line group[opt] N--> elif-groups: N--> elif-group N--> elif-groups elif-group N--> elif-group: N--> # elif constant-expression new-line group[opt] N--> else-group: N--> # else new-line group[opt] N--> endif-line: N--> # endif new-line * {--> control-line:} * # include {<s-char-sequence> --> <x-char-sequence>} new-line * # include {"s-char-sequence" --> "x-char-sequence"} new-line # include identifier new-line * # define identifier {token-sequence --> tokens}[opt] new-line # define identifier lparen identifier-list[opt] * {token-sequence --> tokens}[opt] ) new-line # undef identifier new-line # line digit-sequence string-literal[opt] new-line # pragma x-char-sequence new-line # new-line Remark: In the above syntax for "control-line", each entry begin- ning with # is supposed to be written on one line. The multiple lines in this document represent continuations rather than alter- natives. x-char-sequence: x-char x-char-sequence x-char x-char: any character in the source character set except the new-line character Remark: An "s-char-sequence", which was used in the old version, is defined in #C.1.4; it is whatever can be between the double- quotes of a string literal. N--> lparen: N--> the left-parenthesis character without preceding N--> white-space new-line: the new-line character <--O A preprocessing directive may appear anywhere. It is terminated <--O by the next new-line character, which is not considered to be <--O part of the directive. <--O There may be any number of space and horizontal-tab characters <--O between the # token and the identifier that constitutes the next <--O token, and before the new-line character that terminates the <--O directive. N--> In this phase of processing, tokens may be separated by any N--> number of space and horizontal-tab characters. ------------------------------ End of mod.std.c Digest - Tue, 13 May 86 09:09:25 EDT ****************************** USENET -> posting only through cbosgd!std-c. ARPA -> ... through cbosgd!std-c@BERKELEY.ARPA (NOT to INFO-C) In all cases, you may also reply to the author(s) above.