X-Git-Url: http://nsz.repo.hu/git/?p=c-standard;a=blobdiff_plain;f=n1256.html;h=42134cacb74112ed814baa68426f7756a1940fd0;hp=3ae6a945d77947d874b4137abac53d84cfcb53c2;hb=6c55e01324160ad9e3d4453aead2dabbc85c90f2;hpb=9eae6a02493d1a41bd342896607a1a0891bd23ca;ds=sidebyside diff --git a/n1256.html b/n1256.html index 3ae6a94..42134ca 100644 --- a/n1256.html +++ b/n1256.html @@ -616,8 +616,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
argument
- actual argument
- actual parameter (deprecated)
+ actual argument
+ actual parameter (deprecated)
expression in the comma-separated list bounded by the parentheses in a function call
expression, or a sequence of preprocessing tokens in the comma-separated list bounded
by the parentheses in a function-like macro invocation
@@ -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.
Alphabetic escape sequences representing nongraphic characters in the execution character set are intended to produce actions on display devices as follows: - \a (alert) Produces an audible or visible alert without changing the active position. - \b (backspace) Moves the active position to the previous position on the current line. If -
+
- logical page.- \n (new line) Moves the active position to the initial position of the next line. - \r (carriage return) Moves the active position to the initial position of the current line. - \t (horizontal tab) Moves the active position to the next horizontal tabulation position -
+ device is unspecified. +
-
tabulation position. If the active position is at or past the last defined vertical - tabulation position, the behavior of the display device is unspecified.+ tabulation position, the behavior of the display device is unspecified. +
Each of these escape sequences shall produce a unique implementation-defined value which can be stored in a single char object. The external representations in a text file need not be identical to the internal representations, and are outside the scope of this @@ -1510,51 +1508,51 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (absolute value) to those shown, with the same sign.
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 @@ -1609,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- @@ -1651,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. @@ -1736,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 @@ -1758,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 @@ -1839,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 @@ -2299,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. @@ -2322,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 @@ -2337,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 @@ -3008,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 @@ -3031,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 @@ -3059,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 @@ -3110,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 @@ -3168,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 @@ -3337,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 @@ -3626,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. @@ -5964,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;@@ -3640,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. @@ -3693,7 +3692,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 postfix-expression: primary-expression postfix-expression [ expression ] - postfix-expression ( argument-expression-listopt ) + postfix-expression ( argument-expression-listopt ) postfix-expression . identifier postfix-expression -> identifier postfix-expression ++ @@ -4988,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 @@ -5170,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 @@ -5181,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, @@ -5367,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 @@ -5447,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 }@@ -5848,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 @@ -5872,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@@ -5907,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 @@ -5919,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.) @@ -6085,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 ''. @@ -6231,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 @@ -6385,8 +6384,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 { initializer-list } { initializer-list , } initializer-list: - designationopt initializer - initializer-list , designationopt initializer + designationopt initializer + initializer-list , designationopt initializer designation: designator-list = designator-list: @@ -6749,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 @@ -6765,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 @@ -6876,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. @@ -6915,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. @@ -6984,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. @@ -7012,10 +7011,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
/* ... */ goto first_time; for (;;) { -// determine next operation /* ... */ if (need to reinitialize) { @@ -7027,8 +7026,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 continue; } // handle other operations - /* ... */- } + /* ... */ + }
@@ -7058,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) @@ -7185,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@@ -7362,7 +7361,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
preprocessing-file: - groupopt + groupopt group: group-part group group-part @@ -7372,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 @@ -7490,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 @@ -7519,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. @@ -7546,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 @@ -7687,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 @@ -7996,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.
@@ -8015,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. @@ -8024,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 @@ -8070,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.
@@ -8545,7 +8540,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
166) See ''future library directions'' (7.26.1). -
167) The imaginary unit is a number i such that i 2 = -1. +
167) The imaginary unit is a number i such that i2 = -1.
168) A specification for imaginary types is in informative annex G. @@ -8604,9 +8599,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
(x + iy) x (u + iv) = (xu - yv) + i(yu + xv) - (x + iy) / (u + iv) = [(xu + yv) + i(yu - xv)]/(u2 + v 2 ) - | x + iy | = (sqrt) x 2 + y 2 - ???????????????+ (x + iy) / (u + iv) = [(xu + yv) + i(yu - xv)]/(u2 + v2) + | x + iy | = (sqrt)(x2 + y2) + where the programmer can determine they are safe. @@ -9354,9 +9349,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
FE_DFL_ENVrepresents the default floating-point environment -- the one installed at program startup -
Additional implementation-defined environments, with macro definitions beginning with @@ -10107,140 +10100,144 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 strings shall start and end in the initial shift state. The members with type char are nonnegative numbers, any of which can be CHAR_MAX to indicate that the value is not available in the current locale. The members include the following: - char *decimal_point -
- The decimal-point character used to format nonmonetary quantities.- char *thousands_sep -
+
+ character in formatted nonmonetary quantities. +
- The decimal-point used to format monetary quantities.- char *mon_thousands_sep -
+ formatted nonmonetary quantities. +
+ monetary quantities. +
+ formatted monetary quantities. +
- The string used to indicate a negative-valued formatted monetary quantity.- char *currency_symbol -
- The local currency symbol applicable to the current locale.- char frac_digits -
+ quantity. +
+ displayed in a locally formatted monetary quantity. +
+
+ succeeds the value for a negative locally formatted monetary quantity. +
+ quantity. +
+ quantity. +
+ nonnegative locally formatted monetary quantity. +
+ negative locally formatted monetary quantity. +
+ the international currency symbol from the monetary quantity. +
+ displayed in an internationally formatted monetary quantity. +
+ quantity. +
+
+ monetary quantity. +
+ quantity. +
-
+ nonnegative internationally formatted monetary quantity. +
The elements of grouping and mon_grouping are interpreted according to the following: - CHAR_MAX No further grouping is to be performed. - 0 The previous element is to be repeatedly used for the remainder of the -
- digits.- other The integer value is the number of digits that compose the current group. -
-
+
The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, and int_n_sep_by_space are interpreted according to the following: - 0 No space separates the currency symbol and value. - 1 If the currency symbol and sign string are adjacent, a space separates them from the -
- value; otherwise, a space separates the currency symbol from the value.- 2 If the currency symbol and sign string are adjacent, a space separates them; -
- otherwise, a space separates the sign string from the value.+
The values of p_sign_posn, n_sign_posn, int_p_sign_posn, and int_n_sign_posn are interpreted according to the following: - 0 Parentheses surround the quantity and currency symbol. - 1 The sign string precedes the quantity and currency symbol. - 2 The sign string succeeds the quantity and currency symbol. - 3 The sign string immediately precedes the currency symbol. - 4 The sign string immediately succeeds the currency symbol. +
The implementation shall behave as if no library function calls the localeconv @@ -10256,19 +10253,20 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 EXAMPLE 1 The following table illustrates rules which may well be used by four countries to format monetary quantities.
- Local format International format+ Local format International format - Country Positive Negative Positive Negative + Country Positive Negative Positive Negative Country1 1.234,56 mk -1.234,56 mk FIM 1.234,56 FIM -1.234,56 Country2 L.1.234 -L.1.234 ITL 1.234 -ITL 1.234 - Country3 fl. 1.234,56 fl. -1.234,56 NLG 1.234,56 NLG -1.234,56 + Country3 fl. 1.234,56 fl. -1.234,56 NLG 1.234,56 NLG -1.234,56 Country4 SFrs.1,234.56 SFrs.1,234.56C CHF 1,234.56 CHF 1,234.56C +
For these four countries, the respective values for the monetary members of the structure returned by localeconv could be:
- Country1 Country2 Country3 Country4+ Country1 Country2 Country3 Country4 mon_decimal_point "," "" "," "." mon_thousands_sep "." "." "." "," @@ -10291,30 +10289,28 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int_n_sep_by_space 2 1 2 1 int_p_sign_posn 1 1 1 1 int_n_sign_posn 4 1 4 2 +
EXAMPLE 2 The following table illustrates how the cs_precedes, sep_by_space, and sign_posn members affect the formatted value.
- p_sep_by_space- - p_cs_precedes p_sign_posn 0 1 2 - -
- 0 0 (1.25$) (1.25 $) (1.25$) - 1 +1.25$ +1.25 $ + 1.25$ - 2 1.25$+ 1.25 $+ 1.25$ + - 3 1.25+$ 1.25 +$ 1.25+ $ - 4 1.25$+ 1.25 $+ 1.25$ +- - -
- 1 0 ($1.25) ($ 1.25) ($1.25) - 1 +$1.25 +$ 1.25 + $1.25 - 2 $1.25+ $ 1.25+ $1.25 + - 3 +$1.25 +$ 1.25 + $1.25 - 4 $+1.25 $+ 1.25 $ +1.25+ p_sep_by_space + p_cs_precedes p_sign_posn 0 1 2 + + 0 0 (1.25$) (1.25 $) (1.25$) + 1 +1.25$ +1.25 $ + 1.25$ + 2 1.25$+ 1.25 $+ 1.25$ + + 3 1.25+$ 1.25 +$ 1.25+ $ + 4 1.25$+ 1.25 $+ 1.25$ + + 1 0 ($1.25) ($ 1.25) ($1.25) + 1 +$1.25 +$ 1.25 + $1.25 + 2 $1.25+ $ 1.25+ $1.25 + + 3 +$1.25 +$ 1.25 + $1.25 + 4 $+1.25 $+ 1.25 $ +1.25 + +
The header <math.h> declares two types and many mathematical functions and defines @@ -10878,7 +10874,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 magnitude of x is too large.
- The exp functions return ex . + The exp functions return ex.
- The exp2 functions return 2x . + The exp2 functions return 2x.
- The expm1 functions return ex - 1. + The expm1 functions return ex - 1.
208) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. @@ -10933,7 +10929,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
If value is not a floating-point number, the results are unspecified. Otherwise, the frexp functions return the value x, such that x has a magnitude in the interval [1/2, 1) or - zero, and value equals x x 2*exp . If value is zero, both parts of the result are zero. + zero, and value equals x 2*exp . If value is zero, both parts of the result are zero.
- The ldexp functions return x x 2exp . + The ldexp functions return x 2exp .
- 1 <= x x FLT_RADIX-logb(x) < FLT_RADIX+ 1 <= x FLT_RADIX-logb(x) < FLT_RADIX A domain error or range error may occur if the argument is zero.
@@ -11103,11 +11099,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 long double scalblnl(long double x, long int n);
- The scalbn and scalbln functions compute x x FLT_RADIXn efficiently, not - normally by computing FLT_RADIXn explicitly. A range error may occur. + The scalbn and scalbln functions compute x FLT_RADIXn efficiently, not + normally by computing FLT_RADIXn explicitly. A range error may occur.
- The scalbn and scalbln functions return x x FLT_RADIXn . + The scalbn and scalbln functions return x FLT_RADIXn .
- The cbrt functions return x1/3 . + The cbrt functions return x1/3.
- The hypot functions return (sqrt)x2 + y2 . -
- ??? - ???????????????+ The hypot functions return (sqrt)(x2 + y2).
- The pow functions return xy . + The pow functions return xy.
- The sqrt functions return (sqrt)x. -
- ??? - ???+ The sqrt functions return (sqrt)(x).
The erf functions compute the error function of x.
+ The erf functions return
- 2 x - (integral)- - The erf functions return erf x = e-t dt. -
- 2- - -
- (sqrt)pi - ??? - ??? 0- + 2 x + erf x = --- (integral) e-t2 dt . + (sqrt)(pi) 0
+ The erfc functions return
- 2 (inf) - (integral)- - The erfc functions return erfc x = 1 - erf x = e-t dt. -
- 2- + 2 (inf) + erfc x = 1 - erf x = --- (integral) e-t2 dt . + (sqrt)(pi) x -
- (sqrt)pi - ??? - ??? x-
@@ -11307,7 +11282,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
- The ceil functions return ???x???, expressed as a floating-point number. + The ceil functions return [^x^], expressed as a floating-point number.
- The floor functions return ???x???, expressed as a floating-point number. + The floor functions return [_x_], expressed as a floating-point number.
The remquo functions compute the same remainder as the remainder functions. In the object pointed to by quo they store a value whose sign is the sign of x/y and whose - magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where + magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.
@@ -11609,9 +11584,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The fdim functions determine the positive difference between their arguments:
- ???x - y if x > y - ??? - ???+0 if x <= y+ {x - y if x > y + { + {+0 if x <= y A range error may occur.
@@ -11673,12 +11648,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 long double z);
- The fma functions compute (x x y) + z, rounded as one ternary operation: they compute + The fma functions compute (x y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
- The fma functions return (x x y) + z, rounded as one ternary operation. + The fma functions return (x y) + z, rounded as one ternary operation. @@ -11845,7 +11820,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If the return is from a direct invocation, the setjmp macro returns the value zero. If the return is from a call to the longjmp function, the setjmp macro returns a nonzero value. - Environmental limits +
An invocation of the setjmp macro shall appear only in one of the following contexts:
@@ -12314,7 +12289,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 @@ -12478,33 +12453,42 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
+ INTN_MIN exactly -(2N-1)
+ INTN_MAX exactly 2N-1 - 1
+ UINTN_MAX exactly 2N - 1
+ INT_LEASTN_MIN -(2N-1 - 1)
+ INT_LEASTN_MAX 2N-1 - 1
+ UINT_LEASTN_MAX 2N - 1
+ INT_FASTN_MIN -(2N-1 - 1)
+ INT_FASTN_MAX 2N-1 - 1
+ UINT_FASTN_MAX 2N - 1
- INTPTR_MIN -(215 - 1)+ INTPTR_MIN -(215 - 1)
- INTPTR_MAX 215 - 1+ INTPTR_MAX 215 - 1
+ UINTPTR_MAX 216 - 1
+ INTMAX_MIN -(263 - 1)
+ INTMAX_MAX 263 - 1
+ UINTMAX_MAX 264 - 1
+ PTRDIFF_MIN -65535 + PTRDIFF_MAX +65535 +
+ SIG_ATOMIC_MIN see below + SIG_ATOMIC_MAX see below +
+ SIZE_MAX 65535 +
+ WCHAR_MIN see below + WCHAR_MAX see below +
+ WINT_MIN see below + WINT_MAX see below +
If sig_atomic_t (see 7.14) is defined as a signed integer type, the value of @@ -12794,7 +12790,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 value of this mbstate_t object as part of the value of the fpos_t object. A later successful call to fsetpos using the same stored fpos_t value restores the value of the associated mbstate_t object as well as the position within the controlled stream. - Environmental limits +
An implementation shall support text files with lines containing at least 254 characters, including the terminating new-line character. The value of the macro BUFSIZ shall be at @@ -12863,9 +12859,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
At program startup, three text streams are predefined and need not be opened explicitly -
The value of FOPEN_MAX shall be at least eight, including the three standard text streams. @@ -12981,7 +12975,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 @@ -13020,7 +13014,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 function may modify the same object). If the argument is not a null pointer, it is assumed to point to an array of at least L_tmpnam chars; the tmpnam function writes its result in that array and returns the argument as its value. - Environmental limits +
The value of the macro TMP_MAX shall be at least 25. @@ -13088,23 +13082,22 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The argument mode points to a string. If the string is one of the following, the file is open in the indicated mode. Otherwise, the behavior is undefined.237) - r open text file for reading - w truncate to zero length or create text file for writing - a append; open or create text file for writing at end-of-file - rb open binary file for reading - wb truncate to zero length or create binary file for writing - ab append; open or create binary file for writing at end-of-file - r+ open text file for update (reading and writing) - w+ truncate to zero length or create text file for update - a+ append; open or create text file for update, writing at end-of-file - - - +
Opening a file with read mode ('r' as the first character in the mode argument) fails if the file does not exist or cannot be read. @@ -13289,25 +13282,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 precision were omitted.
The flag characters and their meanings are: - - The result of the conversion is left-justified within the field. (It is right-justified if -
- this flag is not specified.)- + The result of a signed conversion always begins with a plus or minus sign. (It -
- begins with a sign only when a negative value is converted if this flag is not- - - +
- specified.)242)- space If the first character of a signed conversion is not a sign, or if a signed conversion -
+ specified.)242) +
+ both appear, the space flag is ignored. +
-
+ result. For other conversions, the behavior is undefined. +
The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
+
+ argument. +
+ int argument. +
following c conversion specifier applies to a wint_t argument; that a following s conversion specifier applies to a pointer to a wchar_t argument; or has no effect on a following a, A, e, E, f, F, g, or G conversion - specifier.- ll (ell-ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
+ specifier. +
+ argument. +
+ specifier applies to a pointer to an intmax_t argument. +
+ corresponding to size_t argument. +
- applies to a long double argument.- If a length modifier appears with any conversion specifier other than as specified above, + argument. +
The conversion specifiers and their meanings are: - d,i The int argument is converted to signed decimal in the style [-]dddd. The -
+
decimal (u), or unsigned hexadecimal notation (x or X) in the style dddd; the letters abcdef are used for x conversion and the letters ABCDEF for X conversion. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1. The result of converting a - zero value with a precision of zero is no characters.- f,F A double argument representing a floating-point number is converted to -
+ zero value with a precision of zero is no characters. +
+ respectively.243) +
+ of an f or F conversion specifier. +
fractional portion of the result and the decimal-point character is removed if there is no fractional portion remaining. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier.- a,A A double argument representing a floating-point number is converted in the -
+ of an f or F conversion specifier. +
+ of an f or F conversion specifier. +
- element of an array of character type.246) Characters from the array are- - + second a null wide character. +
written up to (but not including) the terminating null character. If the precision is specified, no more than that many bytes are written. If the precision is not specified or is greater than the size of the array, the array shall @@ -13485,21 +13453,19 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the - end of the array. In no case is a partial multibyte character written.247)- p The argument shall be a pointer to void. The value of the pointer is -
+ end of the array. In no case is a partial multibyte character written.247) +
+ manner. +
-
- conversion specification shall be %%.If a conversion specification is invalid, the behavior is undefined.248) If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined. @@ -13515,7 +13481,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 @@ -13534,7 +13500,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The fprintf function returns the number of characters transmitted, or a negative value if an output or encoding error occurred. - Environmental limits +
The number of characters that can be produced by any single conversion shall be at least 4095. @@ -13597,7 +13563,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
244) Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so that subsequent digits align to nibble (4-bit) boundaries. -
245) The precision p is sufficient to distinguish values of the source type if 16 p-1 > b n where b is +
245) The precision p is sufficient to distinguish values of the source type if 16p-1 > b n where b is FLT_RADIX and n is the number of base-b digits in the significand of the source type. A smaller p might suffice depending on the implementation's scheme for determining the digit to the left of the decimal-point character. @@ -13686,73 +13652,61 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 in the object, the behavior is undefined.
The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
- to an argument with type pointer to signed char or unsigned char.- h Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+
+ int. +
+ conversion specifier applies to an argument with type pointer to wchar_t. +
- to an argument with type pointer to intmax_t or uintmax_t.- z Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+ long long int. +
+ integer type. +
- applies to an argument with type pointer to long double.+ unsigned integer type. +
The conversion specifiers and their meanings are: - d Matches an optionally signed decimal integer, whose format is the same as -
+
for the subject sequence of the strtol function with the value 0 for the base argument. The corresponding argument shall be a pointer to signed - integer.- o Matches an optionally signed octal integer, whose format is the same as -
+ integer. +
+ unsigned integer. +
+ unsigned integer. +
+ unsigned integer. +
+ function. The corresponding argument shall be a pointer to floating. +
+ No null wide character is added. +
characters that begins in the initial shift state. Each multibyte character is converted to a wide character as if by a call to the mbrtowc function, with the conversion state described by an mbstate_t object initialized to zero before the first multibyte character is converted. The corresponding argument shall be a pointer to the initial element of an array of wchar_t large enough to accept the sequence and the terminating null wide character, which will be - added automatically.- [ Matches a nonempty sequence of characters from a set of expected characters -
- (the scanset).252) + added automatically. +
same as the set of sequences that may be produced by the %p conversion of the fprintf function. The corresponding argument shall be a pointer to a pointer to void. The input item is converted to a pointer value in an implementation-defined manner. If the input item is a value converted earlier during the same program execution, the pointer that results shall compare - equal to that value; otherwise the behavior of the %p conversion is undefined.- n No input is consumed. The corresponding argument shall be a pointer to -
+ equal to that value; otherwise the behavior of the %p conversion is undefined. +
-
- complete conversion specification shall be %%.If a conversion specification is invalid, the behavior is undefined.253)
The conversion specifiers A, E, F, G, and X are also valid and behave the same as, @@ -14136,7 +14083,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vfscanf function is equivalent to fscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vfscanf function does not invoke the - va_end macro.254) + va_end macro.254)
The vfscanf function returns the value of the macro EOF if an input failure occurs @@ -14157,7 +14104,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vprintf function is equivalent to printf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vprintf function does not invoke the - va_end macro.254) + va_end macro.254)
The vprintf function returns the number of characters transmitted, or a negative value @@ -14177,7 +14124,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vscanf function is equivalent to scanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vscanf function does not invoke the va_end - macro.254) + macro.254)
The vscanf function returns the value of the macro EOF if an input failure occurs @@ -14199,7 +14146,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vsnprintf function is equivalent to snprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vsnprintf function does not invoke the - va_end macro.254) If copying takes place between objects that overlap, the behavior is + va_end macro.254) If copying takes place between objects that overlap, the behavior is undefined.
@@ -14223,7 +14170,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vsprintf function is equivalent to sprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vsprintf function does not invoke the - va_end macro.254) If copying takes place between objects that overlap, the behavior is + va_end macro.254) If copying takes place between objects that overlap, the behavior is undefined.
@@ -14244,7 +14191,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vsscanf function is equivalent to sscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vsscanf function does not invoke the - va_end macro.254) + va_end macro.254)
The vsscanf function returns the value of the macro EOF if an input failure occurs @@ -14836,7 +14783,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
n-char-sequence: digit @@ -14859,7 +14806,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the subject sequence begins with a minus sign, the sequence is interpreted as negated.258) A character sequence INF or INFINITY is interpreted as an infinity, if representable in the return type, else like a floating constant that is too large for the range of the return - type. A character sequence NAN or NAN(n-char-sequenceopt), is interpreted as a quiet + type. A character sequence NAN or NAN(n-char-sequenceopt), is interpreted as a quiet NaN, if supported in the return type, else like a subject sequence part that does not have the expected form; the meaning of the n-char sequences is implementation-defined.259) A pointer to the final string is stored in the object pointed to by endptr, provided that @@ -14874,7 +14821,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 +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 @@ -15008,7 +14955,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Returns
The rand function returns a pseudo-random integer. - Environmental limits +
Environmental limits
The value of the RAND_MAX macro shall be at least 32767. @@ -15169,7 +15116,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The atexit function registers the function pointed to by func, to be called without arguments at normal program termination. - Environmental limits +
Environmental limits
The implementation shall support the registration of at least 32 functions.
Returns
@@ -15589,7 +15536,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If a wide character is encountered that does not correspond to a valid multibyte character, the wcstombs function returns (size_t)(-1). Otherwise, the wcstombs function returns the number of bytes modified, not including a terminating null character, if - any.267) + any.267)7.21 String handling
@@ -16106,6 +16053,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007<math.h> <complex.h> type-generic function function macro + acos cacos acos asin casin asin atan catan atan @@ -16165,7 +16113,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 functions invoked by use of type-generic macros are shown in the following table:- macro use invokes + macro use invokes + exp(n) exp(n), the function acosh(f) acoshf(f) sin(d) sin(d), the function @@ -16390,9 +16339,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Sun Sep 16 01:03:52 1973\n\0using the equivalent of the following algorithm. +char *asctime(const struct tm *timeptr) { -static const char wday_name[7][3] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; @@ -16407,8 +16356,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec, 1900 + timeptr->tm_year); - return result;+ return result; } +Returns
The asctime function returns a pointer to the string. @@ -16489,125 +16439,102 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 of the current locale and by the values of zero or more members of the broken-down time structure pointed to by timeptr, as specified in brackets in the description. If any of the specified values is outside the normal range, the characters stored are unspecified. - %a is replaced by the locale's abbreviated weekday name. [tm_wday] - %A is replaced by the locale's full weekday name. [tm_wday] - %b is replaced by the locale's abbreviated month name. [tm_mon] - %B is replaced by the locale's full month name. [tm_mon] - %c is replaced by the locale's appropriate date and time representation. [all specified -
- in 7.23.1]- %C is replaced by the year divided by 100 and truncated to an integer, as a decimal -- number (00-99). [tm_year]- %d is replaced by the day of the month as a decimal number (01-31). [tm_mday] - %D is equivalent to ''%m/%d/%y''. [tm_mon, tm_mday, tm_year] - %e is replaced by the day of the month as a decimal number (1-31); a single digit is -- preceded by a space. [tm_mday]- %F is equivalent to ''%Y-%m-%d'' (the ISO 8601 date format). [tm_year, tm_mon, -- tm_mday]- %g is replaced by the last 2 digits of the week-based year (see below) as a decimal -- number (00-99). [tm_year, tm_wday, tm_yday]- %G is replaced by the week-based year (see below) as a decimal number (e.g., 1997). -- [tm_year, tm_wday, tm_yday]- %h is equivalent to ''%b''. [tm_mon] - %H is replaced by the hour (24-hour clock) as a decimal number (00-23). [tm_hour] - %I is replaced by the hour (12-hour clock) as a decimal number (01-12). [tm_hour] - %j is replaced by the day of the year as a decimal number (001-366). [tm_yday] - %m is replaced by the month as a decimal number (01-12). [tm_mon] - %M is replaced by the minute as a decimal number (00-59). [tm_min] - %n is replaced by a new-line character. - %p is replaced by the locale's equivalent of the AM/PM designations associated with a -- 12-hour clock. [tm_hour]- %r is replaced by the locale's 12-hour clock time. [tm_hour, tm_min, tm_sec] - %R is equivalent to ''%H:%M''. [tm_hour, tm_min] - %S is replaced by the second as a decimal number (00-60). [tm_sec] - %t is replaced by a horizontal-tab character. - %T is equivalent to ''%H:%M:%S'' (the ISO 8601 time format). [tm_hour, tm_min, +
- tm_sec]- %u is replaced by the ISO 8601 weekday as a decimal number (1-7), where Monday -
- is 1. [tm_wday]- %U is replaced by the week number of the year (the first Sunday as the first day of week -
- 1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday]- %V is replaced by the ISO 8601 week number (see below) as a decimal number -
- (01-53). [tm_year, tm_wday, tm_yday]- %w is replaced by the weekday as a decimal number (0-6), where Sunday is 0. -
- [tm_wday]- %W is replaced by the week number of the year (the first Monday as the first day of -
- week 1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday]- %x is replaced by the locale's appropriate date representation. [all specified in 7.23.1] - %X is replaced by the locale's appropriate time representation. [all specified in 7.23.1] - %y is replaced by the last 2 digits of the year as a decimal number (00-99). -
- [tm_year]- %Y is replaced by the year as a decimal number (e.g., 1997). [tm_year] - %z is replaced by the offset from UTC in the ISO 8601 format ''-0430'' (meaning 4 -
+ tm_sec] +
- time zone is determinable. [tm_isdst]- %% is replaced by %. + zone is determinable. [tm_isdst] +
Some conversion specifiers can be modified by the inclusion of an E or O modifier character to indicate an alternative format or specification. If the alternative format or specification does not exist for the current locale, the modifier is ignored. - %Ec is replaced by the locale's alternative date and time representation. - %EC is replaced by the name of the base year (period) in the locale's alternative -
- representation.- %Ex is replaced by the locale's alternative date representation. - %EX is replaced by the locale's alternative time representation. - %Ey is replaced by the offset from %EC (year only) in the locale's alternative -
- representation.- %EY is replaced by the locale's full alternative year representation. - %Od is replaced by the day of the month, using the locale's alternative numeric symbols -
+
- (filled as needed with leading spaces).- %OH is replaced by the hour (24-hour clock), using the locale's alternative numeric + symbol for zero). +
- symbols.- %OI is replaced by the hour (12-hour clock), using the locale's alternative numeric -
- symbols.- %Om is replaced by the month, using the locale's alternative numeric symbols. - %OM is replaced by the minutes, using the locale's alternative numeric symbols. - %OS is replaced by the seconds, using the locale's alternative numeric symbols. - %Ou is replaced by the ISO 8601 weekday as a number in the locale's alternative -
- representation, where Monday is 1.- %OU is replaced by the week number, using the locale's alternative numeric symbols. - %OV is replaced by the ISO 8601 week number, using the locale's alternative numeric -
- symbols.- %Ow is replaced by the weekday as a number, using the locale's alternative numeric -
- symbols.- %OW is replaced by the week number of the year, using the locale's alternative numeric -
- symbols.- %Oy is replaced by the last 2 digits of the year, using the locale's alternative numeric + symbols. +
-
- symbols.%g, %G, and %V give values according to the ISO 8601 week-based year. In this system, weeks begin on a Monday and week 1 of the year is the week that includes January 4th, which is also the week that includes the first Thursday of the year, and is also the first @@ -16622,16 +16549,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
In the "C" locale, the E and O modifiers are ignored and the replacement strings for the following specifiers are: - %a the first three characters of %A. - %A one of ''Sunday'', ''Monday'', ... , ''Saturday''. - %b the first three characters of %B. - %B one of ''January'', ''February'', ... , ''December''. - %c equivalent to ''%a %b %e %T %Y''. - %p one of ''AM'' or ''PM''. - %r equivalent to ''%I:%M:%S %p''. - %x equivalent to ''%m/%d/%y''. - %X equivalent to %T. - %Z implementation-defined. +
@@ -16766,105 +16695,93 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 precision were omitted.
The flag wide characters and their meanings are: - - The result of the conversion is left-justified within the field. (It is right-justified if -
- this flag is not specified.)- + The result of a signed conversion always begins with a plus or minus sign. (It -
+
+ specified.)282) +
+ space and + flags both appear, the space flag is ignored. +
and G conversions, the result of converting a floating-point number always contains a decimal-point wide character, even if no digits follow it. (Normally, a decimal-point wide character appears in the result of these conversions only if a digit follows it.) For g and G conversions, trailing zeros are not removed from the - result. For other conversions, the behavior is undefined.- 0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros -
-
+ result. For other conversions, the behavior is undefined. +
The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
+
+ argument. +
+ int argument. +
+ specifier. +
an intmax_t or uintmax_t argument; or that a following n conversion - specifier applies to a pointer to an intmax_t argument.- z Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
+ specifier applies to a pointer to an intmax_t argument. +
+ corresponding to size_t argument. +
- applies to a long double argument.+ argument. +
The conversion specifiers and their meanings are: - d,i The int argument is converted to signed decimal in the style [-]dddd. The -
+
+ value with a precision of zero is no wide characters. +
decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point wide character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is zero and the # flag is @@ -16877,9 +16794,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 [-]nan or [-]nan(n-wchar-sequence) -- which style, and the meaning of any n-wchar-sequence, is implementation-defined. The F conversion specifier produces INF, INFINITY, or NAN instead of inf, infinity, or - nan, respectively.283)- e,E A double argument representing a floating-point number is converted in the -
+ nan, respectively.283) +
+ of an f or F conversion specifier. +
+ of an f or F conversion specifier. +
for an exact representation of the value; if the precision is missing and FLT_RADIX is not a power of 2, then the precision is sufficient to distinguish285) values of type double, except that trailing zeros may be @@ -16927,14 +16840,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 represent the decimal exponent of 2. If the value is zero, the exponent is zero. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier.- c If no l length modifier is present, the int argument is converted to a wide -
+ of an f or F conversion specifier. +
+ wchar_t and written. +
- converted to a sequence of printing wide characters, in an implementation-- + shall contain a null wide character. +
- defined manner.- n The argument shall be a pointer to signed integer into which is written the -
+ defined manner. +
-
- conversion specification shall be %%.If a conversion specification is invalid, the behavior is undefined.286) If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined. @@ -16977,7 +16884,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 @@ -16998,7 +16905,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 value if an output or encoding error occurred. - Environmental limits +
The number of wide characters that can be produced by any single conversion shall be at least 4095. @@ -17031,7 +16938,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
284) Binary implementations can choose the hexadecimal digit to the left of the decimal-point wide character so that subsequent digits align to nibble (4-bit) boundaries. -
285) The precision p is sufficient to distinguish values of the source type if 16 p-1 > b n where b is +
285) The precision p is sufficient to distinguish values of the source type if 16p-1 > b n where b is FLT_RADIX and n is the number of base-b digits in the significand of the source type. A smaller p might suffice depending on the implementation's scheme for determining the digit to the left of the decimal-point wide character. @@ -17118,73 +17025,61 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 represented in the object, the behavior is undefined.
The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
- to an argument with type pointer to signed char or unsigned char.- h Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+
+ int. +
+ conversion specifier applies to an argument with type pointer to wchar_t. +
- to an argument with type pointer to intmax_t or uintmax_t.- z Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+ long long int. +
+ integer type. +
- applies to an argument with type pointer to long double.+ unsigned integer type. +
The conversion specifiers and their meanings are: - d Matches an optionally signed decimal integer, whose format is the same as -
+
for the subject sequence of the wcstol function with the value 0 for the base argument. The corresponding argument shall be a pointer to signed - integer.- o Matches an optionally signed octal integer, whose format is the same as -
+ integer. +
+ unsigned integer. +
+ unsigned integer. +
+ unsigned integer. +
+ function. The corresponding argument shall be a pointer to floating. +
If no l length modifier is present, characters from the input field are converted as if by repeated calls to the wcrtomb function, with the conversion state described by an mbstate_t object initialized to zero @@ -17208,9 +17102,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If an l length modifier is present, the corresponding argument shall be a pointer to the initial element of an array of wchar_t large enough to accept the sequence and the terminating null wide character, which will be added - automatically.- [ Matches a nonempty sequence of wide characters from a set of expected -
+ automatically. +
+ last character, the behavior is implementation-defined. +
signed integer into which is to be written the number of wide characters read from the input stream so far by this call to the fwscanf function. Execution of a %n directive does not increment the assignment count returned at the completion of execution of the fwscanf function. No argument is converted, but one is consumed. If the conversion specification includes an assignment-suppressing wide character or a field width, the behavior is - undefined.- % Matches a single % wide character; no conversion or assignment occurs. The + undefined. +
-
- complete conversion specification shall be %%.If a conversion specification is invalid, the behavior is undefined.290)
The conversion specifiers A, E, F, G, and X are also valid and behave the same as, @@ -17418,7 +17309,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vfwscanf function is equivalent to fwscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vfwscanf function does not invoke the - va_end macro.291) + va_end macro.291)
The vfwscanf function returns the value of the macro EOF if an input failure occurs @@ -17441,7 +17332,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vswprintf function is equivalent to swprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vswprintf function does not invoke the - va_end macro.291) + va_end macro.291)
The vswprintf function returns the number of wide characters written in the array, not @@ -17463,7 +17354,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vswscanf function is equivalent to swscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vswscanf function does not invoke the - va_end macro.291) + va_end macro.291)
The vswscanf function returns the value of the macro EOF if an input failure occurs @@ -17484,7 +17375,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vwprintf function is equivalent to wprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vwprintf function does not invoke the - va_end macro.291) + va_end macro.291)
The vwprintf function returns the number of wide characters transmitted, or a negative @@ -17504,7 +17395,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vwscanf function is equivalent to wscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vwscanf function does not invoke the - va_end macro.291) + va_end macro.291)
The vwscanf function returns the value of the macro EOF if an input failure occurs @@ -17812,7 +17703,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 decimal-point wide character, then an optional binary exponent part as defined in 6.4.4.2;
n-wchar-sequence: @@ -17838,7 +17729,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 sign, the sequence is interpreted as negated.294) A wide character sequence INF or INFINITY is interpreted as an infinity, if representable in the return type, else like a floating constant that is too large for the range of the return type. A wide character - sequence NAN or NAN(n-wchar-sequenceopt) is interpreted as a quiet NaN, if supported + sequence NAN or NAN(n-wchar-sequenceopt) is interpreted as a quiet NaN, if supported in the return type, else like a subject sequence part that does not have the expected form; the meaning of the n-wchar sequences is implementation-defined.295) A pointer to the final wide string is stored in the object pointed to by endptr, provided that endptr is @@ -17853,7 +17744,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 +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 @@ -18596,23 +18487,20 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The mbrtowc function returns the first of the following that applies (given the current conversion state): - 0 if the next n or fewer bytes complete the multibyte character that -
- corresponds to the null wide character (which is the value stored).- between 1 and n inclusive if the next n or fewer bytes complete a valid multibyte -+
+ of bytes that complete the multibyte character. +
+ stored).300) +
(informative) - Implementation limits+
The long double type should match an IEC 60559 extended format. @@ -21081,7 +20969,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 @@ -21120,7 +21008,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The implementation should produce a diagnostic message for each translation-time @@ -21465,7 +21353,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