📄 c90标准(tc1).htm
字号:
<HTML><TITLE>Technical Corrigendum 1</TITLE><BODY><CENTER>Programming languages C</CENTER><CENTER>TECHNICAL CORRIGENDUM 1</CENTER><BR><CENTER><I>Langages de programmation C</I></CENTER><CENTER><I>RECTIFICATIF TECHNIQUE 1</I></CENTER><BR><BR>Technical corrigendum 1 to International Standard ISO/IEC 9899:1990 was prepared by Joint Technical Committee ISO/IEC JTC1, <I>Information Technology.</I><BR><CENTER>_________________</CENTER><BR><I>Page 6</I><BR><B>In subclause 5.1.1.3, lines 15-17, change:</B><BLOCKQUOTE>A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) for every translation unit that contains a violation of any syntax rule or constraint.</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) for every translation unit that contains a violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined.</BLOCKQUOTE><B>Add to subclause 5.1.1.3:</B><BR><B>Example</B><BLOCKQUOTE>An implementation shall issue a diagnostic for the translation unit:</BLOCKQUOTE><PRE> <B><TT>char i;<BR> int i;</TT></B><BR></PRE> <P>because in those cases where wording in this International Standard describes the behavior for a construct as being both a constraint error and resulting in undefined behavior, the constraint error shall be diagnosed.</P><I>Page 13</I><B>In subclause 5.2.4.1, lines 1-2, change:</B> <BLOCKQUOTE>15 nested levels of compound statements, iteration control structures, and selection control structures</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>15 nested levels of compound statements, iteration statements, and selection statements</BLOCKQUOTE><I>Page 18</I><BR><B>Add to subclause 6.1, (<TT>Semantics</TT>):</B> <BLOCKQUOTE>A header name preprocessing token is only recognized within a <TT><B>#include</B></TT> preprocessing directive, and within such a directive, a sequence of characters that could be either a header name or a string literal is recognized as the former.</BLOCKQUOTE><I>Page 20</I><BR><B>Add to subclause 6.1.2, (<TT>Semantics</TT>):</B><BLOCKQUOTE>When preprocessing tokens are converted to tokens during translation phase 7, if a preprocessing token could be converted to either a keyword or an identifier, it is converted to a keyword.</BLOCKQUOTE><I>Page 21</I><BR><B>In subclause 6.1.2.2, change:</B><BLOCKQUOTE>If the declaration of an identifier for an object or a function contains the storage-class specifier <TT><B>extern</B></TT>, the identifier has the same linkage as any visible declaration of the identifier with file scope. If there is no visible declaration with file scope, the identifier has external linkage.</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>For an identifier declared with the storage-class specifier <TT><B>extern</B></TT> in a scope in which a prior declaration of that identifier is visible<SUP>*</SUP>, if the prior declaration specifies internal or external linkage, the linkage of the identifier at the latter declaration becomes the linkage specified at the prior declaration. If no prior declaration is visible, or if the prior declaration specifies no linkage, then the identifier has external linkage. [Footnote *: As specified in 6.1.2.1, the latter declaration might hide the prior declaration.]</BLOCKQUOTE><I>Page 25</I><BR><B>In subclause 6.1.2.6, lines 19-20, change:</B><BLOCKQUOTE>For an identifier with external or internal linkage declared in the same scope as another declaration for that identifier, the type of the identifier becomes the composite type.</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>For an identifier with internal or external linkage declared in a scope in which a prior declaration of that identifier is visible<SUP>*</SUP>, if the prior declaration specifies internal or external linkage, the type of the identifier at the latter declaration becomes the composite type.<BR> [Footnote *: As specified in 6.1.2.1, the latter declaration might hide the prior declaration.]</BLOCKQUOTE><I>Page 32</I><BR><B>In subclause 6.1.7, lines 32-34, delete:</B><BR><B>Constraint</B><BLOCKQUOTE>Header name preprocessing tokens shall only appear within a <TT><B>#include</B></TT> preprocessing directive.</BLOCKQUOTE><B>Add to subclause 6.1.7, (<TT>Semantics</TT>):</B><BLOCKQUOTE>A header name preprocessing token is recognized only within a <TT><B>#include</B></TT> preprocessing directive.</BLOCKQUOTE><I>Page 38</I><BR><B>In subclause 6.3, lines 18-21, change:</B><BLOCKQUOTE>An object shall have its stored value accessed only by an lvalue expression that has one of the following types:<SUP>36</SUP></BLOCKQUOTE><BLOCKQUOTE> the declared type of the object,</BLOCKQUOTE><BLOCKQUOTE> a qualified version of the declared type of the object,</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>An object shall have its stored value accessed only by an lvalue expression that has one of the following types:<SUP>36</SUP></BLOCKQUOTE><BLOCKQUOTE> a type compatible with the declared type of the object,</BLOCKQUOTE><BLOCKQUOTE> a qualified version of a type compatible with the declared type of the object,</BLOCKQUOTE><I>Page 40</I><BR><B>In subclause 6.3.2.2, line 35, change:</B><BLOCKQUOTE>The value of the function call expression is specified in 6.6.6.4.</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>If the expression that denotes the called function has type pointer to function returning an object type, the function call expression has the same type as that object type, and has the value determined as specified in 6.6.6.4. Otherwise, the function call has type <TT><B>void</B></TT>.</BLOCKQUOTE><I>Page 54</I><BR><B>Add to subclause 6.3.16.1, another Example:</B><BR>In the fragment:<BR><BLOCKQUOTE><B><TT>char c;<BR> int i;<BR> long l;<BR><BR> l = ( c = i );</TT></B></BLOCKQUOTE><BLOCKQUOTE>the value of <TT><B>i</B></TT> is converted to the type of the assignment-expression <TT><B>c = i</B></TT>, that is, <TT><B>char</B></TT> type. The value of the expression enclosed in parenthesis is then converted to the type of the outer assignment-expression, that is, <TT><B>long</B></TT> type.</BLOCKQUOTE><I>Page 58</I><BR><B>Add to subclause 6.5.1, (<TT>Semantics</TT>):</B><BLOCKQUOTE>If an aggregate or union object is declared with a storage-class specifier other than <TT><B>typedef</B></TT>, the properties resulting from the storage-class specifier, except with respect to linkage, also apply to the members of the object, and so on recursively for any aggregate or union member objects.</BLOCKQUOTE><I>Page 62</I><BR><B>In subclause 6.5.2.3, line 27, change:</B><BLOCKQUOTE>occurs prior to the declaration that defines the content</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>occurs prior to the <TT><B>}</B></TT> following the <I>struct-declaration-list</I> that defines the content</BLOCKQUOTE><I>Page 63</I><BR><B>Add to subclause 6.5.2.3, another Example:</B><BLOCKQUOTE>An enumeration type is compatible with some integral type. An implementation may delay the choice of which integral type until all enumeration constants have been seen. Thus in:</BLOCKQUOTE><BLOCKQUOTE><TT><B>enum f { c = sizeof(enum f) };</B></TT></BLOCKQUOTE><BLOCKQUOTE>the behavior is undefined since the size of the respective enumeration type is not necessarily known when <TT><B>sizeof</B></TT> is encountered.</BLOCKQUOTE><I>Page 68</I><BR><B>In subclause 6.5.4.3, lines 2-4, replace:</B><BLOCKQUOTE>In a parameter declaration, a single typedef name in parentheses is taken to be an abstract declarator that specifies a function with a single parameter, not as redundant parentheses around the identifier for a declarator.</BLOCKQUOTE><B>with:</B><BLOCKQUOTE>If, in a parameter declaration, an identifier can be treated as a typedef name or as a parameter name, it shall be taken as a typedef name.</BLOCKQUOTE><B>In subclause 6.5.4.3, lines 22-25, change:</B><BLOCKQUOTE>(For each parameter declared with function or array type, its type for these comparisons is the one that results from conversion to a pointer type, as in 6.7.1. For each parameter declared with qualified type, its type for these comparisons is the unqualified version of its declared type.)</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>(In the determination of type compatibility and of a composite type, each parameter declared with function or array type is taken as having the type that results from conversion to a pointer type, as in 6.7.1, and each parameter declared with qualified type is taken as having the unqualified version of its declared type.)</BLOCKQUOTE><I>Page 71</I><BR><B>In subclause 6.5.7, line 39, change:</B><BLOCKQUOTE>All unnamed structure or union members are ignored during initialization.</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>Except where explicitly stated otherwise, for the purposes of this subclause unnamed members of objects of structure and union type do not participate in initialization. Unnamed members of structure objects have indeterminate value even after initialization. A union object containing only unnamed members has indeterminate value even after initialization.</BLOCKQUOTE><I>Pages 71 and 72</I><BR><B>In subclause 6.5.7, page 71, line 41 through page 72, line 2, change:</B><BLOCKQUOTE>If an object that has static storage duration is not initialized explicitly, it is initialized implicitly as if every member that has arithmetic type were assigned 0 and every member that has pointer type were assigned a null pointer constant.</BLOCKQUOTE><B>to:</B><BLOCKQUOTE>If an object that has static storage duration is not initialized explicitly, then:</BLOCKQUOTE><BLOCKQUOTE>- if it has pointer type, it is initialized to a null pointer;</BLOCKQUOTE><BLOCKQUOTE>- if it has arithmetic type, it is initialized to zero;</BLOCKQUOTE><BLOCKQUOTE>- if it is an aggregate, every member is initialized (recursively) according to these rules;</BLOCKQUOTE> <BLOCKQUOTE>- if it is a union, the first named member is initialized (recursively) according to these rules.</BLOCKQUOTE><I>Page 72</I><BR><B>In subclause 6.5.7, line 11, change:</B><BLOCKQUOTE>The initial value of the object is that of the expression.</BLOCKQUOTE><B>to:</B>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -