X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=n1256.html;h=7be491653f717e55eefa72cc24a5e20fa5098936;hb=64ee437a499e51415f53367a1c0be1c371b298d1;hp=8a01d3335d5b749b85d65c222471b8003493b1fe;hpb=9a0e8db52bafd217550cd4c63eb973bfe61f923a;p=c-standard diff --git a/n1256.html b/n1256.html index 8a01d33..7be4916 100644 --- a/n1256.html +++ b/n1256.html @@ -811,18 +811,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
- ??? x???
+ [^ x ^]
ceiling of x: the least integer greater than or equal to x
- EXAMPLE ???2.4??? is 3, ???-2.4??? is -2. + EXAMPLE [^2.4^] is 3, [^-2.4^] is -2.
- ??? x???
+ [_ x _]
floor of x: the greatest integer less than or equal to x
- EXAMPLE ???2.4??? is 2, ???-2.4??? is -3. + EXAMPLE [_2.4_] is 2, [_-2.4_] is -3.
CHAR_BIT 8
SCHAR_MIN -127 // -(27 - 1)
SCHAR_MAX +127 // 27 - 1
UCHAR_MAX 255 // 28 - 1
CHAR_MIN see below
CHAR_MAX see below
MB_LEN_MAX 1
SHRT_MIN -32767 // -(215 - 1)
SHRT_MAX +32767 // 215 - 1
USHRT_MAX 65535 // 216 - 1
INT_MIN -32767 // -(215 - 1)
INT_MAX +32767 // 215 - 1
UINT_MAX 65535 // 216 - 1
LONG_MIN -2147483647 // -(231 - 1)
LONG_MAX +2147483647 // 231 - 1
ULONG_MAX 4294967295 // 232 - 1
LLONG_MIN -9223372036854775807 // -(263 - 1)
LLONG_MAX +9223372036854775807 // 263 - 1
ULLONG_MAX 18446744073709551615 // 264 - 1
If the value of an object of type char is treated as a signed integer when used in an expression, the value of CHAR_MIN shall be the same as that of SCHAR_MIN and the value of CHAR_MAX shall be the same as that of SCHAR_MAX. Otherwise, the value of CHAR_MIN shall be 0 and the value of CHAR_MAX shall be the same as that of - UCHAR_MAX.15) The value UCHAR_MAX shall equal 2CHAR_BIT - 1. + UCHAR_MAX.15) The value UCHAR_MAX shall equal 2CHAR_BIT - 1.
Forward references: representations of types (6.2.6), conditional inclusion (6.10.1).
p - x = sb e (Sum) f k b-k , - k=1 - emin <= e <= emax+ x = s be (Sum) fk b-k , emin <= e <= emax + k=1
- In addition to normalized floating-point numbers ( f 1 > 0 if x != 0), floating types may be + In addition to normalized floating-point numbers ( f1 > 0 if x != 0), floating types may be able to contain other kinds of floating-point numbers, such as subnormal floating-point - numbers (x != 0, e = emin , f 1 = 0) and unnormalized floating-point numbers (x != 0, - e > emin , f 1 = 0), and values that are not floating-point numbers, such as infinities and + numbers (x != 0, e = emin , f1 = 0) and unnormalized floating-point numbers (x != 0, + e > emin , f1 = 0), and values that are not floating-point numbers, such as infinities and NaNs. A NaN is an encoding signifying Not-a-Number. A quiet NaN propagates through almost every arithmetic operation without raising a floating-point exception; a signaling NaN generally raises a floating-point exception when occurring as an @@ -1607,8 +1606,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 All integer values in the <float.h> header, except FLT_ROUNDS, shall be constant expressions suitable for use in #if preprocessing directives; all floating values shall be constant expressions. All except DECIMAL_DIG, FLT_EVAL_METHOD, FLT_RADIX, - and FLT_ROUNDS have separate names for all three floating-point types. The floating- - point model representation is provided for all values except FLT_EVAL_METHOD and + and FLT_ROUNDS have separate names for all three floating-point types. The floating-point + model representation is provided for all values except FLT_EVAL_METHOD and FLT_ROUNDS.
The rounding mode for floating-point addition is characterized by the implementation- @@ -1649,19 +1648,19 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 those shown, with the same sign:
FLT_RADIX 2
FLT_MANT_DIG DBL_MANT_DIG - LDBL_MANT_DIG + LDBL_MANT_DIG
- ??? pmax log10 b if b is a power of 10 - ??? - ??? ???1 + pmax log10 b??? otherwise- DECIMAL_DIG 10 + { pmax log10 b if b is a power of 10 + { + { [^1 + pmax log10 b^] otherwise +
DECIMAL_DIG 10
- ??? p log10 b if b is a power of 10 - ??? - ??? ???( p - 1) log10 b??? otherwise- FLT_DIG 6 + { p log10 b if b is a power of 10 + { + { [_( p - 1) log10 b_] otherwise +
FLT_DIG 6 DBL_DIG 10 - LDBL_DIG 10 + LDBL_DIG 10
FLT_MIN_EXP DBL_MIN_EXP - LDBL_MIN_EXP + LDBL_MIN_EXP
- ??? ???- FLT_MIN_10_EXP -37 + normalized floating-point numbers, [^log10 bemin -1^] +
FLT_MIN_10_EXP -37 DBL_MIN_10_EXP -37 - LDBL_MIN_10_EXP -37 + LDBL_MIN_10_EXP -37
FLT_MAX_EXP DBL_MAX_EXP - LDBL_MAX_EXP + LDBL_MAX_EXP
FLT_MAX_10_EXP +37 DBL_MAX_10_EXP +37 - LDBL_MAX_10_EXP +37 + LDBL_MAX_10_EXP +37
The values given in the following list shall be replaced by constant expressions with implementation-defined values that are greater than or equal to those shown:
FLT_MAX 1E+37 DBL_MAX 1E+37 - LDBL_MAX 1E+37 + LDBL_MAX 1E+37
The values given in the following list shall be replaced by constant expressions with implementation-defined (positive) values that are less than or equal to those shown:
FLT_EPSILON 1E-5 DBL_EPSILON 1E-9 - LDBL_EPSILON 1E-9 -
FLT_MIN 1E-37 DBL_MIN 1E-37 - LDBL_MIN 1E-37 + LDBL_MIN 1E-37
Conversion from (at least) double to decimal with DECIMAL_DIG digits and back should be the identity function. @@ -1734,9 +1731,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 float:
6 - x = s16e (Sum) f k 16-k , - k=1 - -31 <= e <= +32+ x = s 16e (Sum) fk 16-k , -31 <= e <= +32 + k=1
FLT_RADIX 16 @@ -1756,15 +1752,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 <float.h> header for types float and double:24 - x f = s2e (Sum) f k 2-k , - k=1 - -125 <= e <= +128+ xf = s 2e (Sum) fk 2-k , -125 <= e <= +128 + k=1
53 - x d = s2e (Sum) f k 2-k , - k=1 - -1021 <= e <= +1024+ xd = s 2e (Sum) fk 2-k , -1021 <= e <= +1024 + k=1 +
FLT_RADIX 2 @@ -1837,7 +1832,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 definitions are listed on separate lines, except when prefaced by the words ''one of''. An optional symbol is indicated by the subscript ''opt'', so thatindicates an optional expression enclosed in braces.- { expressionopt }+ { expressionopt }
When syntactic categories are referred to in the main text, they are not italicized and @@ -2297,11 +2292,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 represented by successive bits are additive, begin with 1, and are multiplied by successive integral powers of 2, except perhaps the bit with the highest position. (Adapted from the American National Dictionary for Information Processing Systems.) A byte contains CHAR_BIT bits, and the values of - type unsigned char range from 0 to 2 - -
- CHAR_BIT - - 1.+ type unsigned char range from 0 to 2CHAR_BIT- 1.
41) Thus, an automatic variable can be initialized to a trap representation without causing undefined behavior, but the value of the variable cannot be used until a proper value is stored in it. @@ -2320,8 +2311,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 For unsigned integer types other than unsigned char, the bits of the object representation shall be divided into two groups: value bits and padding bits (there need not be any of the latter). If there are N value bits, each bit shall represent a different - power of 2 between 1 and 2 N -1 , so that objects of that type shall be capable of - representing values from 0 to 2 N - 1 using a pure binary representation; this shall be + power of 2 between 1 and 2N-1 , so that objects of that type shall be capable of + representing values from 0 to 2N - 1 using a pure binary representation; this shall be known as the value representation. The values of any padding bits are unspecified.44)
For signed integer types, the bits of the object representation shall be divided into three @@ -2335,8 +2326,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 modified in one of the following ways:
-
- First, if the corresponding real type of either operand is long double, the other +
As discussed in 5.2.4.1, an implementation may limit the number of significant initial characters in an identifier; the limit for an external name (an identifier that has external @@ -3006,9 +3000,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
integer-constant: - decimal-constant integer-suffixopt - octal-constant integer-suffixopt - hexadecimal-constant integer-suffixopt + decimal-constant integer-suffixopt + octal-constant integer-suffixopt + hexadecimal-constant integer-suffixopt decimal-constant: nonzero-digit decimal-constant digit @@ -3029,10 +3023,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 a b c d e f A B C D E F integer-suffix: - unsigned-suffix long-suffixopt + unsigned-suffix long-suffixopt unsigned-suffix long-long-suffix - long-suffix unsigned-suffixopt - long-long-suffix unsigned-suffixopt + long-suffix unsigned-suffixopt + long-long-suffix unsigned-suffixopt unsigned-suffix: one of u U long-suffix: one of @@ -3057,38 +3051,45 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The type of an integer constant is the first of the corresponding list in which its value can be represented. -- Octal or Hexadecimal- Suffix Decimal Constant Constant - - none int int -- long int unsigned int - long long int long int - unsigned long int - long long int - unsigned long long int- - u or U unsigned int unsigned int -- unsigned long int unsigned long int - unsigned long long int unsigned long long int- - l or L long int long int -- long long int unsigned long int - long long int - unsigned long long int- - Both u or U unsigned long int unsigned long int - and l or L unsigned long long int unsigned long long int - - ll or LL long long int long long int -- unsigned long long int- - Both u or U unsigned long long int unsigned long long int - and ll or LL +
Suffix | Decimal Constant | Octal or Hexadecimal Constant + |
---|---|---|
none + | int +long int +long long int+ | int +unsigned int +long int +unsigned long int +long long int +unsigned long long int+ |
u or U + | unsigned int +unsigned long int +unsigned long long int+ | unsigned int +unsigned long int +unsigned long long int+ |
l or L + | long int +long long int+ | long int +unsigned long int +long long int +unsigned long long int+ |
Both u or U and l or L + | unsigned long int +unsigned long long int+ | unsigned long int +unsigned long long int+ |
ll or LL + | long long int+ | long long int +unsigned long long int+ |
Both u or U and ll or LL + | unsigned long long int+ | unsigned long long int+ |
If an integer constant cannot be represented by any type in its list, it may have an extended integer type, if the extended integer type can represent its value. If all of the @@ -3108,31 +3109,31 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 decimal-floating-constant hexadecimal-floating-constant decimal-floating-constant: - fractional-constant exponent-partopt floating-suffixopt - digit-sequence exponent-part floating-suffixopt + fractional-constant exponent-partopt floating-suffixopt + digit-sequence exponent-part floating-suffixopt hexadecimal-floating-constant: hexadecimal-prefix hexadecimal-fractional-constant - binary-exponent-part floating-suffixopt + binary-exponent-part floating-suffixopt hexadecimal-prefix hexadecimal-digit-sequence - binary-exponent-part floating-suffixopt + binary-exponent-part floating-suffixopt fractional-constant: - digit-sequenceopt . digit-sequence + digit-sequenceopt . digit-sequence digit-sequence . exponent-part: - e signopt digit-sequence - E signopt digit-sequence + e signopt digit-sequence + E signopt digit-sequence sign: one of + - digit-sequence: digit digit-sequence digit hexadecimal-fractional-constant: - hexadecimal-digit-sequenceopt . + hexadecimal-digit-sequenceopt . hexadecimal-digit-sequence hexadecimal-digit-sequence . binary-exponent-part: - p signopt digit-sequence - P signopt digit-sequence + p signopt digit-sequence + P signopt digit-sequence hexadecimal-digit-sequence: hexadecimal-digit hexadecimal-digit-sequence hexadecimal-digit @@ -3166,7 +3167,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Floating constants are converted to internal format as if at translation-time. The conversion of a floating constant shall not raise an exceptional condition or a floating- point exception at execution time. - Recommended practice +
The implementation should produce a diagnostic message if a hexadecimal constant cannot be represented exactly in its evaluation format; the implementation should then @@ -3335,8 +3336,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
string-literal: - " s-char-sequenceopt " - L" s-char-sequenceopt " + " s-char-sequenceopt " + L" s-char-sequenceopt " s-char-sequence: s-char s-char-sequence s-char @@ -3624,8 +3625,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list T '', then the type specified for ident is ''derived-declarator-type-list type-qualifier-list pointer to T ''. For each type qualifier in the list, ident is a so-qualified pointer. @@ -5962,10 +5963,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007i = ++i + 1; - a[i++] = i; + a[i++] = i;while allowing +i = i + 1; a[i] = i;@@ -3638,9 +3640,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 parentheses () (6.5.1), subscripting brackets [] (6.5.2.1), function-call parentheses () (6.5.2.2), and the conditional operator ?: (6.5.15). -- Within each major subclause, the operators have the same precedence. Left- or right-associativity is - indicated in each subclause by the syntax for the expressions discussed therein.+ Within each major subclause, the operators have the same precedence. Left- or right-associativity is + indicated in each subclause by the syntax for the expressions discussed therein.75) Allocated objects have no declared type. @@ -4986,12 +4987,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
declaration: - declaration-specifiers init-declarator-listopt ; + declaration-specifiers init-declarator-listopt ; declaration-specifiers: - storage-class-specifier declaration-specifiersopt - type-specifier declaration-specifiersopt - type-qualifier declaration-specifiersopt - function-specifier declaration-specifiersopt + storage-class-specifier declaration-specifiersopt + type-specifier declaration-specifiersopt + type-qualifier declaration-specifiersopt + function-specifier declaration-specifiersopt init-declarator-list: init-declarator init-declarator-list , init-declarator @@ -5168,7 +5169,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
struct-or-union-specifier: - struct-or-union identifieropt { struct-declaration-list } + struct-or-union identifieropt { struct-declaration-list } struct-or-union identifier struct-or-union: struct @@ -5179,14 +5180,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 struct-declaration: specifier-qualifier-list struct-declarator-list ; specifier-qualifier-list: - type-specifier specifier-qualifier-listopt - type-qualifier specifier-qualifier-listopt + type-specifier specifier-qualifier-listopt + type-qualifier specifier-qualifier-listopt struct-declarator-list: struct-declarator struct-declarator-list , struct-declarator struct-declarator: declarator - declaratoropt : constant-expression+ declaratoropt : constant-expressionConstraints
A structure or union shall not contain a member with incomplete or function type (hence, @@ -5365,8 +5366,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
enum-specifier: - enum identifieropt { enumerator-list } - enum identifieropt { enumerator-list , } + enum identifieropt { enumerator-list } + enum identifieropt { enumerator-list , } enum identifier enumerator-list: enumerator @@ -5445,7 +5446,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007orA type specifier of the form
- struct-or-union identifieropt { struct-declaration-list }+ struct-or-union identifieropt { struct-declaration-list }enum identifier { enumerator-list }@@ -5846,19 +5847,19 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
declarator: - pointeropt direct-declarator + pointeropt direct-declarator direct-declarator: identifier ( declarator ) - direct-declarator [ type-qualifier-listopt assignment-expressionopt ] - direct-declarator [ static type-qualifier-listopt assignment-expression ] + direct-declarator [ type-qualifier-listopt assignment-expressionopt ] + direct-declarator [ static type-qualifier-listopt assignment-expression ] direct-declarator [ type-qualifier-list static assignment-expression ] - direct-declarator [ type-qualifier-listopt * ] + direct-declarator [ type-qualifier-listopt * ] direct-declarator ( parameter-type-list ) - direct-declarator ( identifier-listopt ) + direct-declarator ( identifier-listopt ) pointer: - * type-qualifier-listopt - * type-qualifier-listopt pointer + * type-qualifier-listopt + * type-qualifier-listopt pointer type-qualifier-list: type-qualifier type-qualifier-list type-qualifier @@ -5870,7 +5871,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 parameter-list , parameter-declaration parameter-declaration: declaration-specifiers declarator - declaration-specifiers abstract-declaratoropt + declaration-specifiers abstract-declaratoropt identifier-list: identifier identifier-list , identifier@@ -5905,7 +5906,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 then ident has the type specified by the declaration ''T D''. Thus, a declarator in parentheses is identical to the unparenthesized declarator, but the binding of complicated declarators may be altered by parentheses. - Implementation limits +Implementation limits
As discussed in 5.2.4.1, an implementation may limit the number of pointer, array, and function declarators that modify an arithmetic, structure, union, or incomplete type, either @@ -5917,7 +5918,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
If, in the declaration ''T D1'', D1 has the form
- * type-qualifier-listopt D+ * type-qualifier-listopt D
If, in the declaration ''T D1'', D1 has one of the forms:
- D[ type-qualifier-listopt assignment-expressionopt ] - D[ static type-qualifier-listopt assignment-expression ] + D[ type-qualifier-listopt assignment-expressionopt ] + D[ static type-qualifier-listopt assignment-expression ] D[ type-qualifier-list static assignment-expression ] - D[ type-qualifier-listopt * ]+ D[ type-qualifier-listopt * ] and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list T '', then the type specified for ident is ''derived-declarator-type-list array of T ''.123) (See 6.7.5.3 for the meaning of the optional type qualifiers and the keyword static.) @@ -6083,7 +6084,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 or
- D( identifier-listopt )+ D( identifier-listopt ) and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list T '', then the type specified for ident is ''derived-declarator-type-list function returning T ''. @@ -6229,20 +6230,20 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
type-name: - specifier-qualifier-list abstract-declaratoropt + specifier-qualifier-list abstract-declaratoropt abstract-declarator: pointer - pointeropt direct-abstract-declarator + pointeropt direct-abstract-declarator direct-abstract-declarator: ( abstract-declarator ) - direct-abstract-declaratoropt [ type-qualifier-listopt - assignment-expressionopt ] - direct-abstract-declaratoropt [ static type-qualifier-listopt + direct-abstract-declaratoropt [ type-qualifier-listopt + assignment-expressionopt ] + direct-abstract-declaratoropt [ static type-qualifier-listopt assignment-expression ] - direct-abstract-declaratoropt [ type-qualifier-list static + direct-abstract-declaratoropt [ type-qualifier-list static assignment-expression ] - direct-abstract-declaratoropt [ * ] - direct-abstract-declaratoropt ( parameter-type-listopt )+ direct-abstract-declaratoropt [ * ] + direct-abstract-declaratoropt ( parameter-type-listopt )
In several contexts, it is necessary to specify a type. This is accomplished using a type @@ -6384,7 +6385,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 { initializer-list , } initializer-list: designationopt initializer - initializer-list , designationopt initializer + initializer-list , designationopt initializer designation: designator-list = designator-list: @@ -6747,7 +6748,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
compound-statement: - { block-item-listopt } + { block-item-listopt } block-item-list: block-item block-item-list block-item @@ -6763,7 +6764,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
expression-statement: - expressionopt ;+ expressionopt ;
The expression in an expression statement is evaluated as a void expression for its side @@ -6874,7 +6875,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 a default label, control jumps to the labeled statement. If no converted case constant expression matches and there is no default label, no part of the switch body is executed. - Implementation limits +
As discussed in 5.2.4.1, the implementation may limit the number of case values in a switch statement. @@ -6913,8 +6914,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 iteration-statement: while ( expression ) statement do statement while ( expression ) ; - for ( expressionopt ; expressionopt ; expressionopt ) statement - for ( declaration expressionopt ; expressionopt ) statement + for ( expressionopt ; expressionopt ; expressionopt ) statement + for ( declaration expressionopt ; expressionopt ) statement
The controlling expression of an iteration statement shall have scalar type. @@ -6982,7 +6983,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 goto identifier ; continue ; break ; - return expressionopt ; + return expressionopt ;
A jump statement causes an unconditional jump to another place. @@ -7010,10 +7011,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
/* ... */ goto first_time; for (;;) { -// determine next operation /* ... */ if (need to reinitialize) { @@ -7025,8 +7026,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 continue; } // handle other operations - /* ... */- } + /* ... */ + }
@@ -7056,13 +7057,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 A continue statement causes a jump to the loop-continuation portion of the smallest enclosing iteration statement; that is, to the end of the loop body. More precisely, in each of the statements - while (/* ... */) { do { for (/* ... */) {
+ while (/* ... */) { do { for (/* ... */) { /* ... */ /* ... */ /* ... */ continue; continue; continue; - /* ... */ /* ... */ /* ... */+ /* ... */ /* ... */ /* ... */ contin: ; contin: ; contin: ; - } } while (/* ... */); } + } } while (/* ... */); } unless the continue statement shown is in an enclosed iteration statement (in which case it is interpreted within that statement), it is equivalent to goto contin;.138) @@ -7183,7 +7184,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
function-definition: - declaration-specifiers declarator declaration-listopt compound-statement + declaration-specifiers declarator declaration-listopt compound-statement declaration-list: declaration declaration-list declaration@@ -7360,7 +7361,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
preprocessing-file: - groupopt + groupopt group: group-part group group-part @@ -7370,41 +7371,41 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 text-line # non-directive if-section: - if-group elif-groupsopt else-groupopt endif-line + if-group elif-groupsopt else-groupopt endif-line if-group: - # if constant-expression new-line groupopt - # ifdef identifier new-line groupopt - # ifndef identifier new-line groupopt + # if constant-expression new-line groupopt + # ifdef identifier new-line groupopt + # ifndef identifier new-line groupopt elif-groups: elif-group elif-groups elif-group elif-group: - # elif constant-expression new-line groupopt + # elif constant-expression new-line groupopt else-group: - # else new-line groupopt + # else new-line groupopt endif-line: # endif new-line control-line: # include pp-tokens new-line # define identifier replacement-list new-line - # define identifier lparen identifier-listopt ) + # define identifier lparen identifier-listopt ) replacement-list new-line # define identifier lparen ... ) replacement-list new-line # define identifier lparen identifier-list , ... ) replacement-list new-line # undef identifier new-line # line pp-tokens new-line - # error pp-tokensopt new-line - # pragma pp-tokensopt new-line + # error pp-tokensopt new-line + # pragma pp-tokensopt new-line # new-line text-line: - pp-tokensopt new-line + pp-tokensopt new-line non-directive: pp-tokens new-line lparen: a ( character not immediately preceded by white-space replacement-list: - pp-tokensopt + pp-tokensopt pp-tokens: preprocessing-token pp-tokens preprocessing-token @@ -7488,8 +7489,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007check whether the controlling constant expression evaluates to nonzero.Preprocessing directives of the forms
- # if constant-expression new-line groupopt - # elif constant-expression new-line groupopt+ # if constant-expression new-line groupopt + # elif constant-expression new-line groupopt
Prior to evaluation, macro invocations in the list of preprocessing tokens that will become @@ -7517,8 +7518,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
- # ifdef identifier new-line groupopt - # ifndef identifier new-line groupopt+ # ifdef identifier new-line groupopt + # ifndef identifier new-line groupopt check whether the identifier is or is not currently defined as a macro name. Their conditions are equivalent to #if defined identifier and #if !defined identifier respectively. @@ -7544,8 +7545,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
146) Thus, the constant expression in the following #if directive and if statement is not guaranteed to
evaluate to the same value in these two contexts.
+
#if 'z' - 'a' == 25
- if ('z' - 'a' == 25)
+ if ('z' - 'a' == 25)
147) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive @@ -7685,7 +7687,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
A preprocessing directive of the form
- # define identifier lparen identifier-listopt ) replacement-list new-line + # define identifier lparen identifier-listopt ) replacement-list new-line # define identifier lparen ... ) replacement-list new-line # define identifier lparen identifier-list , ... ) replacement-list new-linedefines a function-like macro with parameters, whose use is similar syntactically to a @@ -7994,7 +7996,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
A preprocessing directive of the form
- # line digit-sequence "s-char-sequenceopt" new-line+ # line digit-sequence "s-char-sequenceopt" new-line sets the presumed line number similarly and changes the presumed name of the source file to be the contents of the character string literal.
@@ -8013,7 +8015,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
A preprocessing directive of the form
- # error pp-tokensopt new-line+ # error pp-tokensopt new-line causes the implementation to produce a diagnostic message that includes the specified sequence of preprocessing tokens. @@ -8022,7 +8024,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
A preprocessing directive of the form
- # pragma pp-tokensopt new-line+ # pragma pp-tokensopt new-line where the preprocessing token STDC does not immediately follow pragma in the directive (prior to any macro replacement)152) causes the implementation to behave in an implementation-defined manner. The behavior might cause translation to fail or cause the @@ -8068,54 +8070,49 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The following macro names154) shall be defined by the implementation: - __DATE__ The date of translation of the preprocessing translation unit: a character -
+
- source line (an integer constant).155)- __STDC__ The integer constant 1, intended to indicate a conforming implementation. - __STDC_HOSTED__ The integer constant 1 if the implementation is a hosted -
- implementation or the integer constant 0 if it is not.- __STDC_MB_MIGHT_NEQ_WC__ The integer constant 1, intended to indicate that, in -
+ shall be supplied. +
+ integer character constant. +
The following macro names are conditionally defined by the implementation: - __STDC_IEC_559__ The integer constant 1, intended to indicate conformance to the -
- specifications in annex F (IEC 60559 floating-point arithmetic).- __STDC_IEC_559_COMPLEX__ The integer constant 1, intended to indicate -
+
-
+ compatible complex arithmetic). +
The values of the predefined macros (except for __FILE__ and __LINE__) remain constant throughout the translation unit.
@@ -12312,7 +12309,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 static type t; then the expression &(t.member-designator) evaluates to an address constant. (If the specified member is a bit-field, the behavior is undefined.) - Recommended practice +
The types used for size_t and ptrdiff_t should not have an integer conversion rank greater than that of signed long int unless the implementation supports objects @@ -12979,7 +12976,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 existing file and that will automatically be removed when it is closed or at program termination. If the program terminates abnormally, whether an open temporary file is removed is implementation-defined. The file is opened for update with "wb+" mode. - Recommended practice +
It should be possible to open at least TMP_MAX temporary files during the lifetime of the program (this limit may be shared with tmpnam) and there should be no limit on the @@ -13513,7 +13510,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded to a hexadecimal floating number with the given precision. - Recommended practice +
For a and A conversions, if FLT_RADIX is not a power of 2 and the result is not exactly representable in the given precision, the result should be one of the two adjacent numbers @@ -14872,7 +14869,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a null pointer. - Recommended practice +
If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, and the result is not exactly representable, the result should be one of the two numbers in the @@ -16975,7 +16972,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded to a hexadecimal floating number with the given precision. - Recommended practice +
For a and A conversions, if FLT_RADIX is not a power of 2 and the result is not exactly representable in the given precision, the result should be one of the two adjacent numbers @@ -17851,7 +17848,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a null pointer. - Recommended practice +
If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, and the result is not exactly representable, the result should be one of the two numbers in the @@ -20813,7 +20810,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
(informative) - Implementation limits+
The long double type should match an IEC 60559 extended format. @@ -21079,7 +21076,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 A contracted expression treats infinities, NaNs, signed zeros, subnormals, and the rounding directions in a manner consistent with the basic arithmetic operations covered by IEC 60559. - Recommended practice +
A contracted expression should raise floating-point exceptions in a manner generally consistent with the basic arithmetic operations. A contracted expression should deliver @@ -21118,7 +21115,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The implementation should produce a diagnostic message for each translation-time @@ -21463,7 +21460,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 For families of functions, the specifications apply to all of the functions even though only the principal function is shown. Unless otherwise specified, where the symbol ''(+-)'' occurs in both an argument and the result, the result has the same sign as the argument. - Recommended practice +
If a function with one or more NaN arguments returns a NaN result, the result should be the same as one of the NaN arguments (after possible type conversion), except perhaps