From 7580b254a0869cd01093b0b60f1ee65d573c4999 Mon Sep 17 00:00:00 2001 From: nsz Date: Thu, 21 Jul 2011 14:35:24 +0200 Subject: [PATCH] small footnotes --- ann2html.sh | 3 +- n1256.html | 1308 ++++++++++++++++++------------------- n1548.html | 1772 +++++++++++++++++++++++++-------------------------- 3 files changed, 1541 insertions(+), 1542 deletions(-) diff --git a/ann2html.sh b/ann2html.sh index 18e4414..6b27ecd 100755 --- a/ann2html.sh +++ b/ann2html.sh @@ -229,12 +229,11 @@ END { for (i = 1; i <= sid; i++) { print ss[i] -# if (slev[i] < 4) n = split(snote[i],a) if (n > 0) { s = "
footnotes
\n" for (j = 1; j <= n; j++) { - s = s "

" a[j] ")" note[a[j]+0] "\n" + s = s "

" a[j] ")" note[a[j]+0] "\n" } print s } diff --git a/n1256.html b/n1256.html index 7c91502..ffaafbb 100644 --- a/n1256.html +++ b/n1256.html @@ -548,9 +548,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

1) This International Standard is designed to promote the portability of C programs among a variety of +

1) This International Standard is designed to promote the portability of C programs among a variety of data-processing systems. It is intended for use by implementors and programmers. - +

2. Normative references

@@ -879,7 +879,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

2) A strictly conforming program can use conditional features (such as those in annex F) provided the +

2) A strictly conforming program can use conditional features (such as those in annex F) provided the use is guarded by a #ifdef directive with the appropriate macro. For example:

@@ -889,14 +889,14 @@ WG14/N1256                Committee Draft -- Septermber 7, 2007
             /* ... */
          #endif
- -

3) This implies that a conforming implementation reserves no identifiers other than those explicitly + +

3) This implies that a conforming implementation reserves no identifiers other than those explicitly reserved in this International Standard. - -

4) Strictly conforming programs are intended to be maximally portable among conforming + +

4) Strictly conforming programs are intended to be maximally portable among conforming implementations. Conforming programs may depend upon nonportable features of a conforming implementation. - +

5. Environment

@@ -979,18 +979,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

5) Implementations shall behave as if these separate phases occur, even though many are typically folded +

5) Implementations shall behave as if these separate phases occur, even though many are typically folded together in practice. Source files, translation units, and translated translation units need not necessarily be stored as files, nor need there be any one-to-one correspondence between these entities and any external representation. The description is conceptual only, and does not specify any particular implementation. - -

6) As described in 6.4, the process of dividing a source file's characters into preprocessing tokens is + +

6) As described in 6.4, the process of dividing a source file's characters into preprocessing tokens is context-dependent. For example, see the handling of < within a #include preprocessing directive. - -

7) An implementation need not convert all non-corresponding source characters to the same execution + +

7) An implementation need not convert all non-corresponding source characters to the same execution character. - +

5.1.1.3 Diagnostics

@@ -1009,10 +1009,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

8) The intent is that an implementation should identify the nature of, and where possible localize, each +

8) The intent is that an implementation should identify the nature of, and where possible localize, each violation. Of course, an implementation is free to produce any number of diagnostics as long as a valid program is still correctly translated. It may also successfully translate an invalid program. - +

5.1.2 Execution environments

@@ -1080,9 +1080,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

9) Thus, int can be replaced by a typedef name defined as int, or the type of argv can be written as +

9) Thus, int can be replaced by a typedef name defined as int, or the type of argv can be written as char ** argv, and so on. - +

5.1.2.2.2 Program execution

@@ -1103,9 +1103,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: definition of terms (7.1.1), the exit function (7.20.4.3).

footnotes
-

10) In accordance with 6.2.4, the lifetimes of objects with automatic storage duration declared in main +

10) In accordance with 6.2.4, the lifetimes of objects with automatic storage duration declared in main will have ended in the former case, even where they would not have in the latter. - +

5.1.2.3 Program execution

@@ -1264,13 +1264,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

11) The IEC 60559 standard for binary floating-point arithmetic requires certain user-accessible status +

11) The IEC 60559 standard for binary floating-point arithmetic requires certain user-accessible status flags and control modes. Floating-point operations implicitly set the status flags; modes affect result values of floating-point operations. Implementations that support such floating-point state are required to regard changes to it as side effects -- see annex F for details. The floating-point environment library <fenv.h> provides a programming facility for indicating when these side effects matter, freeing the implementations in other cases. - +

5.2 Environmental considerations

@@ -1355,9 +1355,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

12) The trigraph sequences enable the input of characters that are not defined in the Invariant Code Set as +

12) The trigraph sequences enable the input of characters that are not defined in the Invariant Code Set as described in ISO/IEC 646, which is a subset of the seven-bit US ASCII code set. - +

5.2.1.2 Multibyte characters

@@ -1485,10 +1485,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

13) Implementations should avoid imposing fixed translation limits whenever possible. - -

14) See ''future language directions'' (6.11.3). - +

13) Implementations should avoid imposing fixed translation limits whenever possible. + +

14) See ''future language directions'' (6.11.3). +

5.2.4.2 Numerical limits

@@ -1558,8 +1558,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: representations of types (6.2.6), conditional inclusion (6.10.1).

footnotes
-

15) See 6.2.5. - +

15) See 6.2.5. +

5.2.4.2.2 Characteristics of floating types

@@ -1810,24 +1810,24 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

16) The floating-point model is intended to clarify the description of each floating-point characteristic and +

16) The floating-point model is intended to clarify the description of each floating-point characteristic and does not require the floating-point arithmetic of the implementation to be identical. - -

17) IEC 60559:1989 specifies quiet and signaling NaNs. For implementations that do not support + +

17) IEC 60559:1989 specifies quiet and signaling NaNs. For implementations that do not support IEC 60559:1989, the terms quiet NaN and signaling NaN are intended to apply to encodings with similar behavior. - -

18) Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through + +

18) Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through the function fesetround in <fenv.h>. - -

19) The evaluation method determines evaluation formats of expressions involving all floating types, not + +

19) The evaluation method determines evaluation formats of expressions involving all floating types, not just real types. For example, if FLT_EVAL_METHOD is 1, then the product of two float _Complex operands is represented in the double _Complex format, and its parts are evaluated to double. - -

20) The floating-point model in that standard sums powers of b from zero, so the values of the exponent + +

20) The floating-point model in that standard sums powers of b from zero, so the values of the exponent limits are one less than shown here. - +

6. Language

@@ -1941,13 +1941,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 statements (6.8).
footnotes
-

21) There is no linkage between different identifiers. - -

22) A function declaration can contain the storage-class specifier static only if it is at file scope; see +

21) There is no linkage between different identifiers. + +

22) A function declaration can contain the storage-class specifier static only if it is at file scope; see 6.7.1. - -

23) As specified in 6.2.1, the later declaration might hide the prior declaration. - + +

23) As specified in 6.2.1, the later declaration might hide the prior declaration. +

6.2.3 Name spaces of identifiers

@@ -1974,8 +1974,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

24) There is only one name space for tags even though three are possible. - +

24) There is only one name space for tags even though three are possible. +

6.2.4 Storage durations of objects

@@ -2018,15 +2018,15 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

25) The term ''constant address'' means that two pointers to the object constructed at possibly different +

25) The term ''constant address'' means that two pointers to the object constructed at possibly different times will compare equal. The address may be different during two different executions of the same program. - -

26) In the case of a volatile object, the last store need not be explicit in the program. - -

27) Leaving the innermost block containing the declaration, or jumping to a point in that block or an + +

26) In the case of a volatile object, the last store need not be explicit in the program. + +

27) Leaving the innermost block containing the declaration, or jumping to a point in that block or an embedded block prior to the declaration, leaves the scope of the declaration. - +

6.2.5 Types

@@ -2209,41 +2209,41 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: compatible type and composite type (6.2.7), declarations (6.7).

footnotes
-

28) Implementation-defined keywords shall have the form of an identifier reserved for any use as +

28) Implementation-defined keywords shall have the form of an identifier reserved for any use as described in 7.1.3. - -

29) Therefore, any statement in this Standard about signed integer types also applies to the extended + +

29) Therefore, any statement in this Standard about signed integer types also applies to the extended signed integer types. - -

30) Therefore, any statement in this Standard about unsigned integer types also applies to the extended + +

30) Therefore, any statement in this Standard about unsigned integer types also applies to the extended unsigned integer types. - -

31) The same representation and alignment requirements are meant to imply interchangeability as + +

31) The same representation and alignment requirements are meant to imply interchangeability as arguments to functions, return values from functions, and members of unions. - -

32) See ''future language directions'' (6.11.1). - -

33) A specification for imaginary types is in informative annex G. - -

34) An implementation may define new keywords that provide alternative ways to designate a basic (or + +

32) See ''future language directions'' (6.11.1). + +

33) A specification for imaginary types is in informative annex G. + +

34) An implementation may define new keywords that provide alternative ways to designate a basic (or any other) type; this does not violate the requirement that all basic types be different. Implementation-defined keywords shall have the form of an identifier reserved for any use as described in 7.1.3. - -

35) CHAR_MIN, defined in <limits.h>, will have one of the values 0 or SCHAR_MIN, and this can be + +

35) CHAR_MIN, defined in <limits.h>, will have one of the values 0 or SCHAR_MIN, and this can be used to distinguish the two options. Irrespective of the choice made, char is a separate type from the other two and is not compatible with either. - -

36) Since object types do not include incomplete types, an array of incomplete type cannot be constructed. - -

37) Note that aggregate type does not include union type because an object with union type can only + +

36) Since object types do not include incomplete types, an array of incomplete type cannot be constructed. + +

37) Note that aggregate type does not include union type because an object with union type can only contain one member at a time. - -

38) See 6.7.3 regarding qualified array and function types. - -

39) The same representation and alignment requirements are meant to imply interchangeability as + +

38) See 6.7.3 regarding qualified array and function types. + +

39) The same representation and alignment requirements are meant to imply interchangeability as arguments to functions, return values from functions, and members of unions. - +

6.2.6 Representations of types

@@ -2295,7 +2295,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 designators (6.3.2.1).
footnotes
-

40) A positional representation for integers that uses the binary digits 0 and 1, in which the values +

40) A positional representation for integers that uses the binary digits 0 and 1, in which the values 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 @@ -2304,18 +2304,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

                                            CHAR_BIT
                                                      - 1.
- -

41) Thus, an automatic variable can be initialized to a trap representation without causing undefined + +

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

42) Thus, for example, structure assignment need not copy any padding bits. - -

43) It is possible for objects x and y with the same effective type T to have the same value when they are + +

42) Thus, for example, structure assignment need not copy any padding bits. + +

43) It is possible for objects x and y with the same effective type T to have the same value when they are accessed as objects of type T, but to have different values in other contexts. In particular, if == is defined for type T, then x == y does not imply that memcmp(&x, &y, sizeof (T)) == 0. Furthermore, x == y does not necessarily imply that x and y have the same value; other operations on values of type T may distinguish between them. - +

6.2.6.2 Integer types

@@ -2374,18 +2374,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for signed integer types the width is one greater than the precision.

footnotes
-

44) Some combinations of padding bits might generate trap representations, for example, if one padding +

44) Some combinations of padding bits might generate trap representations, for example, if one padding bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap representation other than as part of an exceptional condition such as an overflow, and this cannot occur with unsigned types. All other combinations of padding bits are alternative object representations of the value specified by the value bits. - -

45) Some combinations of padding bits might generate trap representations, for example, if one padding + +

45) Some combinations of padding bits might generate trap representations, for example, if one padding bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap representation other than as part of an exceptional condition such as an overflow. All other combinations of padding bits are alternative object representations of the value specified by the value bits. - +

6.2.7 Compatible type and composite type

@@ -2439,10 +2439,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int f(int (*)(char *), double (*)[3]);

footnotes
-

46) Two types need not be identical to be compatible. - -

47) As specified in 6.2.1, the later declaration might hide the prior declaration. - +

46) Two types need not be identical to be compatible. + +

47) As specified in 6.2.1, the later declaration might hide the prior declaration. +

6.3 Conversions

@@ -2502,10 +2502,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.7.2.1).

footnotes
-

48) The integer promotions are applied only: as part of the usual arithmetic conversions, to certain +

48) The integer promotions are applied only: as part of the usual arithmetic conversions, to certain argument expressions, to the operands of the unary +, -, and ~ operators, and to both operands of the shift operators, as specified by their respective subclauses. - +

6.3.1.2 Boolean type

@@ -2525,8 +2525,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 result is implementation-defined or an implementation-defined signal is raised.

footnotes
-

49) The rules describe arithmetic on the mathematical value, not the value of a given type of expression. - +

49) The rules describe arithmetic on the mathematical value, not the value of a given type of expression. +

6.3.1.4 Real floating and integer

@@ -2544,10 +2544,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 values that can be represented, the behavior is undefined.

footnotes
-

50) The remaindering operation performed when a value of integer type is converted to unsigned type +

50) The remaindering operation performed when a value of integer type is converted to unsigned type need not be performed when a value of real floating type is converted to unsigned type. Thus, the range of portable real floating values is (-1, Utype_MAX+1). - +

6.3.1.5 Real floating types

@@ -2626,12 +2626,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

51) For example, addition of a double _Complex and a float entails just the conversion of the +

51) For example, addition of a double _Complex and a float entails just the conversion of the float operand to double (and yields a double _Complex result). - -

52) The cast and assignment operators are still required to perform their specified conversions as + +

52) The cast and assignment operators are still required to perform their specified conversions as described in 6.3.1.4 and 6.3.1.5. - +

6.3.2 Other operands

@@ -2672,16 +2672,16 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

53) The name ''lvalue'' comes originally from the assignment expression E1 = E2, in which the left +

53) The name ''lvalue'' comes originally from the assignment expression E1 = E2, in which the left operand E1 is required to be a (modifiable) lvalue. It is perhaps better considered as representing an object ''locator value''. What is sometimes called ''rvalue'' is in this International Standard described as the ''value of an expression''. An obvious example of an lvalue is an identifier of an object. As a further example, if E is a unary expression that is a pointer to an object, *E is an lvalue that designates the object to which E points. - -

54) Because this conversion does not occur, the operand of the sizeof operator remains a function + +

54) Because this conversion does not occur, the operand of the sizeof operator remains a function designator and violates the constraint in 6.5.3.4. - +

6.3.2.2 void

@@ -2738,15 +2738,15 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

55) The macro NULL is defined in <stddef.h> (and other headers) as a null pointer constant; see 7.17. - -

56) The mapping functions for converting a pointer to an integer or an integer to a pointer are intended to +

55) The macro NULL is defined in <stddef.h> (and other headers) as a null pointer constant; see 7.17. + +

56) The mapping functions for converting a pointer to an integer or an integer to a pointer are intended to be consistent with the addressing structure of the execution environment. - -

57) In general, the concept ''correctly aligned'' is transitive: if a pointer to type A is correctly aligned for a + +

57) In general, the concept ''correctly aligned'' is transitive: if a pointer to type A is correctly aligned for a pointer to type B, which in turn is correctly aligned for a pointer to type C, then a pointer to type A is correctly aligned for a pointer to type C. - +

6.4 Lexical elements

Syntax
@@ -2816,9 +2816,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.4.5).
footnotes
-

58) An additional category, placemarkers, is used internally in translation phase 4 (see 6.10.3.3); it cannot +

58) An additional category, placemarkers, is used internally in translation phase 4 (see 6.10.3.3); it cannot occur in source files. - +

6.4.1 Keywords

Syntax
@@ -2846,8 +2846,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

59) One possible specification for imaginary types appears in annex G. - +

59) One possible specification for imaginary types appears in annex G. +

6.4.2 Identifiers

@@ -2903,11 +2903,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: universal character names (6.4.3), macro replacement (6.10.3).

footnotes
-

60) On systems in which linkers cannot accept extended characters, an encoding of the universal character +

60) On systems in which linkers cannot accept extended characters, an encoding of the universal character name may be used in forming valid external identifiers. For example, some otherwise unused character or sequence of characters may be used to encode the \u in a universal character name. Extended characters may produce a long external identifier. - +

6.4.2.2 Predefined identifiers
Semantics
@@ -2942,9 +2942,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

61) Since the name __func__ is reserved for any use by the implementation (7.1.3), if any other +

61) Since the name __func__ is reserved for any use by the implementation (7.1.3), if any other identifier is explicitly declared using the name __func__, the behavior is undefined. - +

6.4.3 Universal character names

Syntax
@@ -2978,12 +2978,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

62) The disallowed characters are the characters in the basic character set and the code positions reserved +

62) The disallowed characters are the characters in the basic character set and the code positions reserved by ISO/IEC 10646 for control characters, the character DELETE, and the S-zone (reserved for use by UTF-16). - -

63) Short identifiers for characters were first specified in ISO/IEC 10646-1/AMD9:1997. - + +

63) Short identifiers for characters were first specified in ISO/IEC 10646-1/AMD9:1997. +

6.4.4 Constants

Syntax
@@ -3185,9 +3185,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

64) The specification for the library functions recommends more accurate conversion than required for +

64) The specification for the library functions recommends more accurate conversion than required for floating constants (see 7.20.1.3). - +

6.4.4.3 Enumeration constants
Syntax
@@ -3328,9 +3328,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

65) The semantics of these characters were discussed in 5.2.2. If any other character follows a backslash, +

65) The semantics of these characters were discussed in 5.2.2. If any other character follows a backslash, the result is not a token and a diagnostic is required. See ''future language directions'' (6.11.4). - +

6.4.5 String literals

Syntax
@@ -3393,9 +3393,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 function (7.20.8.1).
footnotes
-

66) A character string literal need not be a string (see 7.1.1), because a null character may be embedded in +

66) A character string literal need not be a string (see 7.1.1), because a null character may be embedded in it by a \0 escape sequence. - +

6.4.6 Punctuators

Syntax
@@ -3429,11 +3429,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.10), statements (6.8).
footnotes
-

67) These tokens are sometimes called ''digraphs''. - -

68) Thus [ and <: behave differently when ''stringized'' (see 6.10.3.2), but can otherwise be freely +

67) These tokens are sometimes called ''digraphs''. + +

68) Thus [ and <: behave differently when ''stringized'' (see 6.10.3.2), but can otherwise be freely interchanged. - +

6.4.7 Header names

Syntax
@@ -3485,10 +3485,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: source file inclusion (6.10.2).

footnotes
-

69) Thus, sequences of characters that resemble escape sequences cause undefined behavior. - -

70) For an example of a header name preprocessing token used in a #pragma directive, see 6.10.9. - +

69) Thus, sequences of characters that resemble escape sequences cause undefined behavior. + +

70) For an example of a header name preprocessing token used in a #pragma directive, see 6.10.9. +

6.4.8 Preprocessing numbers

Syntax
@@ -3553,8 +3553,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

71) Thus, /* ... */ comments do not nest. - +

71) Thus, /* ... */ comments do not nest. +

6.5 Expressions

@@ -3620,9 +3620,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

72) A floating-point status flag is not an object and can be set more than once within an expression. - -

73) This paragraph renders undefined statement expressions such as +

72) A floating-point status flag is not an object and can be set more than once within an expression. + +

73) This paragraph renders undefined statement expressions such as

             i = ++i + 1;
@@ -3631,8 +3631,8 @@ WG14/N1256                Committee Draft -- Septermber 7, 2007
             i = i + 1;
             a[i] = i;
- -

74) The syntax specifies the precedence of operators in the evaluation of an expression, which is the same + +

74) The syntax specifies the precedence of operators in the evaluation of an expression, which is the same as the order of the major subclauses of this subclause, highest precedence first. Thus, for example, the expressions allowed as the operands of the binary + operator (6.5.6) are those expressions defined in 6.5.1 through 6.5.6. The exceptions are cast expressions (6.5.4) as operands of unary operators @@ -3643,18 +3643,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

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

76) The intent of this list is to specify those circumstances in which an object may or may not be aliased. - -

77) A contracted expression might also omit the raising of floating-point exceptions. - -

78) This license is specifically intended to allow implementations to exploit fast machine instructions that + +

75) Allocated objects have no declared type. + +

76) The intent of this list is to specify those circumstances in which an object may or may not be aliased. + +

77) A contracted expression might also omit the raising of floating-point exceptions. + +

78) This license is specifically intended to allow implementations to exploit fast machine instructions that combine multiple C operators. As contractions potentially undermine predictability, and can even decrease accuracy for containing expressions, their use needs to be well-defined and clearly documented. - +

6.5.1 Primary expressions

Syntax
@@ -3683,8 +3683,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: declarations (6.7).

footnotes
-

79) Thus, an undeclared identifier is a violation of the syntax. - +

79) Thus, an undeclared identifier is a violation of the syntax. +

6.5.2 Postfix operators

Syntax
@@ -3827,13 +3827,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 definitions (6.9.1), the return statement (6.8.6.4), simple assignment (6.5.16.1).
footnotes
-

80) Most often, this is the result of converting an identifier that is a function designator. - -

81) A function may change the values of its parameters, but these changes cannot affect the values of the +

80) Most often, this is the result of converting an identifier that is a function designator. + +

81) A function may change the values of its parameters, but these changes cannot affect the values of the arguments. On the other hand, it is possible to pass a pointer to an object, and the function may change the value of the object pointed to. A parameter declared to have array or function type is adjusted to have a pointer type as described in 6.9.1. - +

6.5.2.3 Structure and union members
Constraints
@@ -3936,14 +3936,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

82) If the member used to access the contents of a union object is not the same as the member last used to +

82) If the member used to access the contents of a union object is not the same as the member last used to store a value in the object, the appropriate part of the object representation of the value is reinterpreted as an object representation in the new type as described in 6.2.6 (a process sometimes called "type punning"). This might be a trap representation. - -

83) If &E is a valid pointer expression (where & is the ''address-of '' operator, which generates a pointer to + +

83) If &E is a valid pointer expression (where & is the ''address-of '' operator, which generates a pointer to its operand), the expression (&E)->MOS is the same as E.MOS. - +

6.5.2.4 Postfix increment and decrement operators
Constraints
@@ -4091,14 +4091,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

84) Note that this differs from a cast expression. For example, a cast specifies a conversion to scalar types +

84) Note that this differs from a cast expression. For example, a cast specifies a conversion to scalar types or void only, and the result of a cast expression is not an lvalue. - -

85) For example, subobjects without explicit initializers are initialized to zero. - -

86) This allows implementations to share storage for string literals and constant compound literals with + +

85) For example, subobjects without explicit initializers are initialized to zero. + +

86) This allows implementations to share storage for string literals and constant compound literals with the same or overlapping representations. - +

6.5.3 Unary operators

Syntax
@@ -4159,14 +4159,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.7.2.1).
footnotes
-

87) Thus, &*E is equivalent to E (even if E is a null pointer), and &(E1[E2]) to ((E1)+(E2)). It is +

87) Thus, &*E is equivalent to E (even if E is a null pointer), and &(E1[E2]) to ((E1)+(E2)). It is always true that if E is a function designator or an lvalue that is a valid operand of the unary & operator, *&E is a function designator or an lvalue equal to E. If *P is an lvalue and T is the name of an object pointer type, *(T)P is an lvalue that has a type compatible with that to which T points. Among the invalid values for dereferencing a pointer by the unary * operator are a null pointer, an address inappropriately aligned for the type of object pointed to, and the address of an object after the end of its lifetime. - +

6.5.3.3 Unary arithmetic operators
Constraints
@@ -4259,9 +4259,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 structure and union specifiers (6.7.2.1), type names (6.7.6), array declarators (6.7.5.2).
footnotes
-

88) When applied to a parameter declared to have array or function type, the sizeof operator yields the +

88) When applied to a parameter declared to have array or function type, the sizeof operator yields the size of the adjusted (pointer) type (see 6.9.1). - +

6.5.4 Cast operators

Syntax
@@ -4295,9 +4295,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

89) A cast does not yield an lvalue. Thus, a cast to a qualified type has the same effect as a cast to the +

89) A cast does not yield an lvalue. Thus, a cast to a qualified type has the same effect as a cast to the unqualified version of the type. - +

6.5.5 Multiplicative operators

Syntax
@@ -4327,8 +4327,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (a/b)*b + a%b shall equal a.
footnotes
-

90) This is often called ''truncation toward zero''. - +

90) This is often called ''truncation toward zero''. +

6.5.6 Additive operators

Syntax
@@ -4420,7 +4420,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (7.17).
footnotes
-

91) Another way to approach pointer arithmetic is first to convert the pointer(s) to character pointer(s): In +

91) Another way to approach pointer arithmetic is first to convert the pointer(s) to character pointer(s): In this scheme the integer expression added to or subtracted from the converted pointer is first multiplied by the size of the object originally pointed to, and the resulting pointer is converted back to the original type. For pointer subtraction, the result of the difference between the character pointers is @@ -4428,7 +4428,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 When viewed in this way, an implementation need only provide one extra byte (which may overlap another object in the program) just after the end of the object in order to satisfy the ''one past the last element'' requirements. - +

6.5.7 Bitwise shift operators

Syntax
@@ -4510,9 +4510,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The result has type int.
footnotes
-

92) The expression a<b<c is not interpreted as in ordinary mathematics. As the syntax indicates, it +

92) The expression a<b<c is not interpreted as in ordinary mathematics. As the syntax indicates, it means (a<b)<c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''. - +

6.5.9 Equality operators

Syntax
@@ -4565,14 +4565,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 type of the object as its element type.
footnotes
-

93) Because of the precedences, a<b == c<d is 1 whenever a<b and c<d have the same truth-value. - -

94) Two objects may be adjacent in memory because they are adjacent elements of a larger array or +

93) Because of the precedences, a<b == c<d is 1 whenever a<b and c<d have the same truth-value. + +

94) Two objects may be adjacent in memory because they are adjacent elements of a larger array or adjacent members of a structure with no padding between them, or because the implementation chose to place them so, even though they are unrelated. If prior invalid pointer operations (such as accesses outside array bounds) produced undefined behavior, subsequent comparisons also produce undefined behavior. - +

6.5.10 Bitwise AND operator

Syntax
@@ -4743,8 +4743,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

95) A conditional expression does not yield an lvalue. - +

95) A conditional expression does not yield an lvalue. +

6.5.16 Assignment operators

Syntax
@@ -4843,11 +4843,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

96) The asymmetric appearance of these constraints with respect to type qualifiers is due to the conversion +

96) The asymmetric appearance of these constraints with respect to type qualifiers is due to the conversion (specified in 6.3.2.1) that changes lvalues to ''the value of the expression'' and thus removes any type qualifiers that were applied to the type category of the expression (for example, it removes const but not volatile from the type int volatile * const). - +

6.5.16.2 Compound assignment
Constraints
@@ -4894,8 +4894,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

97) A comma operator does not yield an lvalue. - +

97) A comma operator does not yield an lvalue. +

6.6 Constant expressions

Syntax
@@ -4969,19 +4969,19 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

98) The operand of a sizeof operator is usually not evaluated (6.5.3.4). - -

99) An integer constant expression is used to specify the size of a bit-field member of a structure, the +

98) The operand of a sizeof operator is usually not evaluated (6.5.3.4). + +

99) An integer constant expression is used to specify the size of a bit-field member of a structure, the value of an enumeration constant, the size of an array, or the value of a case constant. Further constraints that apply to the integer constant expressions used in conditional-inclusion preprocessing directives are discussed in 6.10.1. - -

100) Thus, in the following initialization, + +

100) Thus, in the following initialization,

           static int i = 2 || 1 / 0;
the expression is a valid integer constant expression with value one. - +

6.7 Declarations

Syntax
@@ -5038,8 +5038,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.7.8).
footnotes
-

101) Function definitions have a different syntax, described in 6.9.1. - +

101) Function definitions have a different syntax, described in 6.9.1. +

6.7.1 Storage-class specifiers

Syntax
@@ -5079,15 +5079,15 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: type definitions (6.7.7).

footnotes
-

102) See ''future language directions'' (6.11.5). - -

103) The implementation may treat any register declaration simply as an auto declaration. However, +

102) See ''future language directions'' (6.11.5). + +

103) The implementation may treat any register declaration simply as an auto declaration. However, whether or not addressable storage is actually used, the address of any part of an object declared with storage-class specifier register cannot be computed, either explicitly (by use of the unary & operator as discussed in 6.5.3.2) or implicitly (by converting an array name to a pointer as discussed in 6.3.2.1). Thus, the only operator that can be applied to an array declared with storage-class specifier register is sizeof. - +

6.7.2 Type specifiers

Syntax
@@ -5162,8 +5162,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

104) Freestanding implementations are not required to provide complex types. * - +

104) Freestanding implementations are not required to provide complex types. * +

6.7.2.1 Structure and union specifiers
Syntax
@@ -5349,18 +5349,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

105) A structure or union can not contain a member with a variably modified type because member names +

105) A structure or union can not contain a member with a variably modified type because member names are not ordinary identifiers as defined in 6.2.3. - -

106) The unary & (address-of) operator cannot be applied to a bit-field object; thus, there are no pointers to + +

106) The unary & (address-of) operator cannot be applied to a bit-field object; thus, there are no pointers to or arrays of bit-field objects. - -

107) As specified in 6.7.2 above, if the actual type specifier used is int or a typedef-name defined as int, + +

107) As specified in 6.7.2 above, if the actual type specifier used is int or a typedef-name defined as int, then it is implementation-defined whether the bit-field is signed or unsigned. - -

108) An unnamed bit-field structure member is useful for padding to conform to externally imposed + +

108) An unnamed bit-field structure member is useful for padding to conform to externally imposed layouts. - +

6.7.2.2 Enumeration specifiers
Syntax
@@ -5416,12 +5416,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: tags (6.7.2.3).

footnotes
-

109) Thus, the identifiers of enumeration constants declared in the same scope shall all be distinct from +

109) Thus, the identifiers of enumeration constants declared in the same scope shall all be distinct from each other and from other identifiers declared in ordinary declarators. - -

110) An implementation may delay the choice of which integer type until all enumeration constants have + +

110) An implementation may delay the choice of which integer type until all enumeration constants have been seen. - +

6.7.2.3 Tags
Constraints
@@ -5529,18 +5529,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.7.7).
footnotes
-

111) An incomplete type may only by used when the size of an object of that type is not needed. It is not +

111) An incomplete type may only by used when the size of an object of that type is not needed. It is not needed, for example, when a typedef name is declared to be a specifier for a structure or union, or when a pointer to or a function returning a structure or union is being declared. (See incomplete types in 6.2.5.) The specification has to be complete before such a function is called or defined. - -

112) If there is no identifier, the type can, within the translation unit, only be referred to by the declaration + +

112) If there is no identifier, the type can, within the translation unit, only be referred to by the declaration of which it is a part. Of course, when the declaration is of a typedef name, subsequent declarations can make use of that typedef name to declare objects having the specified structure, union, or enumerated type. - -

113) A similar construction with enum does not exist. - + +

113) A similar construction with enum does not exist. +

6.7.3 Type qualifiers

Syntax
@@ -5625,24 +5625,24 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

114) The implementation may place a const object that is not volatile in a read-only region of +

114) The implementation may place a const object that is not volatile in a read-only region of storage. Moreover, the implementation need not allocate storage for such an object if its address is never used. - -

115) This applies to those objects that behave as if they were defined with qualified types, even if they are + +

115) This applies to those objects that behave as if they were defined with qualified types, even if they are never actually defined as objects in the program (such as an object at a memory-mapped input/output address). - -

116) A volatile declaration may be used to describe an object corresponding to a memory-mapped + +

116) A volatile declaration may be used to describe an object corresponding to a memory-mapped input/output port or an object accessed by an asynchronously interrupting function. Actions on objects so declared shall not be ''optimized out'' by an implementation or reordered except as permitted by the rules for evaluating expressions. - -

117) For example, a statement that assigns a value returned by malloc to a single pointer establishes this + +

117) For example, a statement that assigns a value returned by malloc to a single pointer establishes this association between the allocated object and the pointer. - -

118) Both of these can occur through the use of typedefs. - + +

118) Both of these can occur through the use of typedefs. +

6.7.3.1 Formal definition of restrict

@@ -5755,11 +5755,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

119) In other words, E depends on the value of P itself rather than on the value of an object referenced +

119) In other words, E depends on the value of P itself rather than on the value of an object referenced indirectly through P. For example, if identifier p has type (int **restrict), then the pointer expressions p and p+1 are based on the restricted pointer object designated by p, but the pointer expressions *p and p[1] are not. - +

6.7.4 Function specifiers

Syntax
@@ -5827,21 +5827,21 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

120) By using, for example, an alternative to the usual function call mechanism, such as ''inline +

120) By using, for example, an alternative to the usual function call mechanism, such as ''inline substitution''. Inline substitution is not textual substitution, nor does it create a new function. Therefore, for example, the expansion of a macro used within the body of the function uses the definition it had at the point the function body appears, and not where the function is called; and identifiers refer to the declarations in scope where the body occurs. Likewise, the function has a single address, regardless of the number of inline definitions that occur in addition to the external definition. - -

121) For example, an implementation might never perform inline substitution, or might only perform inline + +

121) For example, an implementation might never perform inline substitution, or might only perform inline substitutions to calls in the scope of an inline declaration. - -

122) Since an inline definition is distinct from the corresponding external definition and from any other + +

122) Since an inline definition is distinct from the corresponding external definition and from any other corresponding inline definitions in other translation units, all corresponding objects with static storage duration are also distinct in each of the definitions. - +

6.7.5 Declarators

Syntax
@@ -6059,10 +6059,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 initialization (6.7.8).
footnotes
-

123) When several ''array of'' specifications are adjacent, a multidimensional array is declared. - -

124) Thus, * can be used only in function declarations that are not definitions (see 6.7.5.3). - +

123) When several ''array of'' specifications are adjacent, a multidimensional array is declared. + +

124) Thus, * can be used only in function declarations that are not definitions (see 6.7.5.3). +

6.7.5.3 Function declarators (including prototypes)
Constraints
@@ -6218,13 +6218,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

125) The macros defined in the <stdarg.h> header (7.15) may be used to access arguments that +

125) The macros defined in the <stdarg.h> header (7.15) may be used to access arguments that correspond to the ellipsis. - -

126) See ''future language directions'' (6.11.6). - -

127) If both function types are ''old style'', parameter types are not compared. - + +

126) See ''future language directions'' (6.11.6). + +

127) If both function types are ''old style'', parameter types are not compared. +

6.7.6 Type names

Syntax
@@ -6274,9 +6274,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

128) As indicated by the syntax, empty parentheses in a type name are interpreted as ''function with no +

128) As indicated by the syntax, empty parentheses in a type name are interpreted as ''function with no parameter specification'', rather than redundant parentheses around the omitted identifier. - +

6.7.7 Type definitions

Syntax
@@ -6674,21 +6674,21 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

129) If the initializer list for a subaggregate or contained union does not begin with a left brace, its +

129) If the initializer list for a subaggregate or contained union does not begin with a left brace, its subobjects are initialized as usual, but the subaggregate or contained union does not become the current object: current objects are associated only with brace-enclosed initializer lists. - -

130) After a union member is initialized, the next object is not the next member of the union; instead, it is + +

130) After a union member is initialized, the next object is not the next member of the union; instead, it is the next subobject of an object containing the union. - -

131) Thus, a designator can only specify a strict subobject of the aggregate or union that is associated with + +

131) Thus, a designator can only specify a strict subobject of the aggregate or union that is associated with the surrounding brace pair. Note, too, that each separate designator list is independent. - -

132) Any initializer for the subobject which is overridden and so not used to initialize that subobject might + +

132) Any initializer for the subobject which is overridden and so not used to initialize that subobject might not be evaluated at all. - -

133) In particular, the evaluation order need not be the same as the order of subobject initialization. - + +

133) In particular, the evaluation order need not be the same as the order of subobject initialization. +

6.8 Statements and blocks

Syntax
@@ -6812,8 +6812,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: iteration statements (6.8.5).

footnotes
-

134) Such as assignments, and function calls which have side effects. - +

134) Such as assignments, and function calls which have side effects. +

6.8.4 Selection statements

Syntax
@@ -6904,9 +6904,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

135) That is, the declaration either precedes the switch statement, or it follows the last case or +

135) That is, the declaration either precedes the switch statement, or it follows the last case or default label associated with the switch that is in the block containing the declaration. - +

6.8.5 Iteration statements

Syntax
@@ -6939,9 +6939,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

136) Code jumped over is not executed. In particular, the controlling expression of a for or while +

136) Code jumped over is not executed. In particular, the controlling expression of a for or while statement is not evaluated before entering the loop body, nor is clause-1 of a for statement. - +

6.8.5.1 The while statement

@@ -6970,11 +6970,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 nonzero constant.

footnotes
-

137) Thus, clause-1 specifies initialization for the loop, possibly declaring one or more variables for use in +

137) Thus, clause-1 specifies initialization for the loop, possibly declaring one or more variables for use in the loop; the controlling expression, expression-2, specifies an evaluation made before each iteration, such that execution of the loop continues until the expression compares equal to 0; and expression-3 specifies an operation (such as incrementing) that is performed after each iteration. - +

6.8.6 Jump statements

Syntax
@@ -7069,8 +7069,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 case it is interpreted within that statement), it is equivalent to goto contin;.138)
footnotes
-

138) Following the contin: label is a null statement. - +

138) Following the contin: label is a null statement. +

6.8.6.3 The break statement
Constraints
@@ -7129,11 +7129,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

139) The return statement is not an assignment. The overlap restriction of subclause 6.5.16.1 does not +

139) The return statement is not an assignment. The overlap restriction of subclause 6.5.16.1 does not apply to the case of function return. The representation of floating-point values may have wider range or precision and is determined by FLT_EVAL_METHOD. A cast may be used to remove this extra range and precision. - +

6.9 External definitions

Syntax
@@ -7176,9 +7176,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

140) Thus, if an identifier declared with external linkage is not used in an expression, there need be no +

140) Thus, if an identifier declared with external linkage is not used in an expression, there need be no external definition for it. - +

6.9.1 Function definitions

Syntax
@@ -7294,7 +7294,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

141) The intent is that the type category in a function definition cannot be inherited from a typedef: +

141) The intent is that the type category in a function definition cannot be inherited from a typedef:

           typedef int F(void);                          //   type F is ''function with no parameters
@@ -7308,9 +7308,9 @@ WG14/N1256                Committee Draft -- Septermber 7, 2007
           F *((e))(void) { /* ... */ }                  //   same: parentheses irrelevant
           int (*fp)(void);                              //   fp points to a function that has type F
           F *Fp;                                        //   Fp points to a function that has type F
- -

142) See ''future language directions'' (6.11.7). - + +

142) See ''future language directions'' (6.11.7). +

6.9.2 External object definitions

Semantics
@@ -7457,10 +7457,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

143) Thus, preprocessing directives are commonly called ''lines''. These ''lines'' have no other syntactic +

143) Thus, preprocessing directives are commonly called ''lines''. These ''lines'' have no other syntactic significance, as all white space is equivalent except in certain situations during preprocessing (see the # character string literal creation operator in 6.10.3.2, for example). - +

6.10.1 Conditional inclusion

Constraints
@@ -7537,23 +7537,23 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 integer types (7.18.1.5).
footnotes
-

144) Because the controlling constant expression is evaluated during translation phase 4, all identifiers +

144) Because the controlling constant expression is evaluated during translation phase 4, all identifiers either are or are not macro names -- there simply are no keywords, enumeration constants, etc. - -

145) Thus, on an implementation where INT_MAX is 0x7FFF and UINT_MAX is 0xFFFF, the constant + +

145) Thus, on an implementation where INT_MAX is 0x7FFF and UINT_MAX is 0xFFFF, the constant 0x8000 is signed and positive within a #if expression even though it would be unsigned in translation phase 7. - -

146) Thus, the constant expression in the following #if directive and if statement is not guaranteed to + +

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) - -

147) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive + +

147) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive before the terminating new-line character. However, comments may appear anywhere in a source file, including within a preprocessing directive. - +

6.10.2 Source file inclusion

Constraints
@@ -7632,9 +7632,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: macro replacement (6.10.3).

footnotes
-

148) Note that adjacent string literals are not concatenated into a single string literal (see the translation +

148) Note that adjacent string literals are not concatenated into a single string literal (see the translation phases in 5.1.1.2); thus, an expansion that results in two string literals is an invalid directive. - +

6.10.3 Macro replacement

Constraints
@@ -7719,12 +7719,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 definition (excluding the ...).
footnotes
-

149) Since, by macro-replacement time, all character constants and string literals are preprocessing tokens, +

149) Since, by macro-replacement time, all character constants and string literals are preprocessing tokens, not sequences possibly containing identifier-like subsequences (see 5.1.1.2, translation phases), they are never scanned for macro names or parameters. - -

150) Despite the name, a non-directive is a preprocessing directive. - + +

150) Despite the name, a non-directive is a preprocessing directive. +

6.10.3.1 Argument substitution

@@ -7810,9 +7810,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

151) Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that +

151) Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that exist only within translation phase 4. - +

6.10.3.4 Rescanning and further replacement

@@ -8050,14 +8050,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

152) An implementation is not required to perform macro replacement in pragmas, but it is permitted +

152) An implementation is not required to perform macro replacement in pragmas, but it is permitted except for in standard pragmas (where STDC immediately follows pragma). If the result of macro replacement in a non-standard pragma has the same form as a standard pragma, the behavior is still implementation-defined; an implementation is permitted to behave as if it were the standard pragma, but is not required to. - -

153) See ''future language directions'' (6.11.8). - + +

153) See ''future language directions'' (6.11.8). +

6.10.7 Null directive

Semantics
@@ -8131,14 +8131,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: the asctime function (7.23.3.1), standard headers (7.1.2).

footnotes
-

154) See ''future language directions'' (6.11.9). - -

155) The presumed source file name and line number can be changed by the #line directive. - -

156) This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in +

154) See ''future language directions'' (6.11.9). + +

155) The presumed source file name and line number can be changed by the #line directive. + +

156) This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in ISO/IEC 9899/AMD1:1995. The intention is that this will remain an integer constant of type long int that is increased with each revision of this International Standard. - +

6.10.9 Pragma operator

Semantics
@@ -8255,14 +8255,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

157) The functions that make use of the decimal-point character are the numeric conversion functions +

157) The functions that make use of the decimal-point character are the numeric conversion functions (7.20.1, 7.24.4.1) and the formatted input/output functions (7.19.6, 7.24.2). - -

158) For state-dependent encodings, the values for MB_CUR_MAX and MB_LEN_MAX shall thus be large + +

158) For state-dependent encodings, the values for MB_CUR_MAX and MB_LEN_MAX shall thus be large enough to count all the bytes in any complete multibyte character plus at least one adjacent shift sequence of maximum length. Whether these counts provide for more than one shift sequence is the implementation's choice. - +

7.1.2 Standard headers

@@ -8311,9 +8311,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

159) A header is not necessarily a source file, nor are the < and > delimited sequences in header names +

159) A header is not necessarily a source file, nor are the < and > delimited sequences in header names necessarily valid source file names. - +

7.1.3 Reserved identifiers

@@ -8345,9 +8345,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 group listed above, the behavior is undefined.

footnotes
-

160) The list of reserved identifiers with external linkage includes errno, math_errhandling, +

160) The list of reserved identifiers with external linkage includes errno, math_errhandling, setjmp, and va_end. - +

7.1.4 Use of library functions

@@ -8423,12 +8423,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

161) This means that an implementation shall provide an actual function for each library function, even if it +

161) This means that an implementation shall provide an actual function for each library function, even if it also provides a macro for that function. - -

162) Such macros might not contain the sequence points that the corresponding function calls do. - -

163) Because external identifiers and some macro names beginning with an underscore are reserved, + +

162) Such macros might not contain the sequence points that the corresponding function calls do. + +

163) Because external identifiers and some macro names beginning with an underscore are reserved, implementations may provide special semantics for such names. For example, the identifier _BUILTIN_abs could be used to indicate generation of in-line code for the abs function. Thus, the appropriate header could specify @@ -8444,9 +8444,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 whether the implementation's header provides a macro implementation of abs or a built-in implementation. The prototype for the function, which precedes and is hidden by any macro definition, is thereby revealed also. - -

164) Thus, a signal handler cannot, in general, call standard library functions. - + +

164) Thus, a signal handler cannot, in general, call standard library functions. +

7.2 Diagnostics

@@ -8494,9 +8494,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

165) The message written might be of the form: +

165) The message written might be of the form: Assertion failed: expression, function abc, file xyz, line nnn. - +

7.3 Complex arithmetic

@@ -8543,12 +8543,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

166) See ''future library directions'' (7.26.1). - -

167) The imaginary unit is a number i such that i 2 = -1. - -

168) A specification for imaginary types is in informative annex G. - +

166) See ''future library directions'' (7.26.1). + +

167) The imaginary unit is a number i such that i 2 = -1. + +

168) A specification for imaginary types is in informative annex G. +

7.3.2 Conventions

@@ -8600,7 +8600,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 undefined. The default state for the pragma is ''off''.

footnotes
-

169) The purpose of the pragma is to allow the implementation to use the formulas: +

169) The purpose of the pragma is to allow the implementation to use the formulas:

      (x + iy) x (u + iv) = (xu - yv) + i(yu + xv)
@@ -8608,7 +8608,7 @@ WG14/N1256                Committee Draft -- Septermber 7, 2007
      | x + iy | = (sqrt) x 2 + y 2
                   ???????????????
where the programmer can determine they are safe. - +

7.3.5 Trigonometric functions

@@ -8940,8 +8940,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The cimag functions return the imaginary part value (as a real).
footnotes
-

170) For a variable z of complex type, z == creal(z) + cimag(z)*I. - +

170) For a variable z of complex type, z == creal(z) + cimag(z)*I. +

7.3.9.3 The conj functions
Synopsis
@@ -9005,8 +9005,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

171) For a variable z of complex type, z == creal(z) + cimag(z)*I. - +

171) For a variable z of complex type, z == creal(z) + cimag(z)*I. +

7.4 Character handling

@@ -9025,12 +9025,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: EOF (7.19.1), localization (7.11).

footnotes
-

172) See ''future library directions'' (7.26.2). - -

173) In an implementation that uses the seven-bit US ASCII character set, the printing characters are those +

172) See ''future library directions'' (7.26.2). + +

173) In an implementation that uses the seven-bit US ASCII character set, the printing characters are those whose values lie from 0x20 (space) through 0x7E (tilde); the control characters are those whose values lie from 0 (NUL) through 0x1F (US), and the character 0x7F (DEL). - +

7.4.1 Character classification functions

@@ -9065,9 +9065,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 isalpha returns true only for the characters for which isupper or islower is true.

footnotes
-

174) The functions islower and isupper test true or false separately for each of these additional +

174) The functions islower and isupper test true or false separately for each of these additional characters; all four combinations are possible. - +

7.4.1.3 The isblank function
Synopsis
@@ -9262,16 +9262,16 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

175) The macro errno need not be the identifier of an object. It might expand to a modifiable lvalue +

175) The macro errno need not be the identifier of an object. It might expand to a modifiable lvalue resulting from a function call (for example, *errno()). - -

176) Thus, a program that uses errno for error checking should set it to zero before a library function call, + +

176) Thus, a program that uses errno for error checking should set it to zero before a library function call, then inspect it before a subsequent library function call. Of course, a library function can save the value of errno on entry and then set it to zero, as long as the original value is restored if errno's value is still zero just before the return. - -

177) See ''future library directions'' (7.26.3). - + +

177) See ''future library directions'' (7.26.3). +

7.6 Floating-point environment

@@ -9364,25 +9364,25 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 also be specified by the implementation.

footnotes
-

178) This header is designed to support the floating-point exception status flags and directed-rounding +

178) This header is designed to support the floating-point exception status flags and directed-rounding control modes required by IEC 60559, and other similar floating-point state information. Also it is designed to facilitate code portability among all systems. - -

179) A floating-point status flag is not an object and can be set more than once within an expression. - -

180) With these conventions, a programmer can safely assume default floating-point control modes (or be + +

179) A floating-point status flag is not an object and can be set more than once within an expression. + +

180) With these conventions, a programmer can safely assume default floating-point control modes (or be unaware of them). The responsibilities associated with accessing the floating-point environment fall on the programmer or program that does so explicitly. - -

181) The implementation supports an exception if there are circumstances where a call to at least one of the + +

181) The implementation supports an exception if there are circumstances where a call to at least one of the functions in 7.6.2, using the macro as the appropriate argument, will succeed. It is not necessary for all the functions to succeed all the time. - -

182) The macros should be distinct powers of two. - -

183) Even though the rounding direction macros may expand to constants corresponding to the values of + +

182) The macros should be distinct powers of two. + +

183) Even though the rounding direction macros may expand to constants corresponding to the values of FLT_ROUNDS, they are not required to do so. - +

7.6.1 The FENV_ACCESS pragma

Synopsis
@@ -9436,15 +9436,15 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

184) The purpose of the FENV_ACCESS pragma is to allow certain optimizations that could subvert flag +

184) The purpose of the FENV_ACCESS pragma is to allow certain optimizations that could subvert flag tests and mode changes (e.g., global common subexpression elimination, code motion, and constant folding). In general, if the state of FENV_ACCESS is ''off'', the translator can assume that default modes are in effect and the flags are not tested. - -

185) The side effects impose a temporal ordering that requires two evaluations of x + 1. On the other + +

185) The side effects impose a temporal ordering that requires two evaluations of x + 1. On the other hand, without the #pragma STDC FENV_ACCESS ON pragma, and assuming the default state is ''off'', just one evaluation of x + 1 would suffice. - +

7.6.2 Floating-point exceptions

@@ -9455,12 +9455,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 functions is undefined.

footnotes
-

186) The functions fetestexcept, feraiseexcept, and feclearexcept support the basic +

186) The functions fetestexcept, feraiseexcept, and feclearexcept support the basic abstraction of flags that are either set or clear. An implementation may endow floating-point status flags with more information -- for example, the address of the code which first raised the floating- point exception; the functions fegetexceptflag and fesetexceptflag deal with the full content of flags. - +

7.6.2.1 The feclearexcept function
Synopsis
@@ -9521,10 +9521,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

187) The effect is intended to be similar to that of floating-point exceptions raised by arithmetic operations. +

187) The effect is intended to be similar to that of floating-point exceptions raised by arithmetic operations. Hence, enabled traps for floating-point exceptions raised by this function are taken. The specification in F.7.6 is in the same spirit. - +

7.6.2.4 The fesetexceptflag function
Synopsis
@@ -9586,8 +9586,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

188) This mechanism allows testing several floating-point exceptions with just one function call. - +

188) This mechanism allows testing several floating-point exceptions with just one function call. +

7.6.3 Rounding

@@ -9684,11 +9684,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 exception handling was successfully installed.

footnotes
-

189) IEC 60559 systems have a default non-stop mode, and typically at least one other mode for trap +

189) IEC 60559 systems have a default non-stop mode, and typically at least one other mode for trap handling or aborting; if the system provides only the non-stop mode then installing it is trivial. For such systems, the feholdexcept function can be used in conjunction with the feupdateenv function to write routines that hide spurious floating-point exceptions from their callers. - +

7.6.4.3 The fesetenv function
Synopsis
@@ -9776,8 +9776,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 functions (7.19.6), formatted wide character input/output functions (7.24.2).
footnotes
-

190) See ''future library directions'' (7.26.4). - +

190) See ''future library directions'' (7.26.4). +

7.8.1 Macros for format specifiers

@@ -9838,13 +9838,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

191) C++ implementations should define these macros only when __STDC_FORMAT_MACROS is defined +

191) C++ implementations should define these macros only when __STDC_FORMAT_MACROS is defined before <inttypes.h> is included. - -

192) Separate macros are given for use with fprintf and fscanf functions because, in the general case, + +

192) Separate macros are given for use with fprintf and fscanf functions because, in the general case, different format specifiers may be required for fprintf and fscanf, even when the type is the same. - +

7.8.2 Functions for greatest-width integer types

@@ -9867,8 +9867,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The imaxabs function returns the absolute value.
footnotes
-

193) The absolute value of the most negative number cannot be represented in two's complement. - +

193) The absolute value of the most negative number cannot be represented in two's complement. +

7.8.2.2 The imaxdiv function
Synopsis
@@ -10017,10 +10017,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 implementation.
footnotes
-

194) ISO/IEC 9945-2 specifies locale and charmap formats that may be used to specify locales for C. - -

195) See ''future library directions'' (7.26.5). - +

194) ISO/IEC 9945-2 specifies locale and charmap formats that may be used to specify locales for C. + +

195) See ''future library directions'' (7.26.5). +

7.11.1 Locale control

@@ -10078,12 +10078,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 strftime function (7.23.3.5), the strxfrm function (7.21.4.5).
footnotes
-

196) The only functions in 7.4 whose behavior is not affected by the current locale are isdigit and +

196) The only functions in 7.4 whose behavior is not affected by the current locale are isdigit and isxdigit. - -

197) The implementation shall arrange to encode in a string the various categories due to a heterogeneous + +

197) The implementation shall arrange to encode in a string the various categories due to a heterogeneous locale when category has the value LC_ALL. - +

7.11.2 Numeric formatting convention inquiry

@@ -10415,22 +10415,22 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 <fenv.h>.
footnotes
-

198) Particularly on systems with wide expression evaluation, a <math.h> function might pass arguments +

198) Particularly on systems with wide expression evaluation, a <math.h> function might pass arguments and return values in wider format than the synopsis prototype indicates. - -

199) The types float_t and double_t are intended to be the implementation's most efficient types at + +

199) The types float_t and double_t are intended to be the implementation's most efficient types at least as wide as float and double, respectively. For FLT_EVAL_METHOD equal 0, 1, or 2, the type float_t is the narrowest type used by the implementation to evaluate floating expressions. - -

200) HUGE_VAL, HUGE_VALF, and HUGE_VALL can be positive infinities in an implementation that + +

200) HUGE_VAL, HUGE_VALF, and HUGE_VALL can be positive infinities in an implementation that supports infinities. - -

201) In this case, using INFINITY will violate the constraint in 6.4.4 and thus require a diagnostic. - -

202) Typically, the FP_FAST_FMA macro is defined if and only if the fma function is implemented + +

201) In this case, using INFINITY will violate the constraint in 6.4.4 and thus require a diagnostic. + +

202) Typically, the FP_FAST_FMA macro is defined if and only if the fma function is implemented directly with a hardware multiply-add instruction. Software implementations are expected to be substantially slower. - +

7.12.1 Treatment of error conditions

@@ -10477,12 +10477,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 floating-point exception is raised is implementation-defined.

footnotes
-

203) In an implementation that supports infinities, this allows an infinity as an argument to be a domain +

203) In an implementation that supports infinities, this allows an infinity as an argument to be a domain error if the mathematical domain of the function does not include the infinity. - -

204) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and + +

204) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and also ''flush-to-zero'' underflow. - +

7.12.2 The FP_CONTRACT pragma

Synopsis
@@ -10541,10 +10541,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

205) Since an expression can be evaluated with more range and precision than its type has, it is important to +

205) Since an expression can be evaluated with more range and precision than its type has, it is important to know the type that classification is based on. For example, a normal long double value might become subnormal when converted to double, and zero when converted to float. - +

7.12.3.2 The isfinite macro
Synopsis
@@ -10600,9 +10600,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The isnan macro returns a nonzero value if and only if its argument has a NaN value.
footnotes
-

206) For the isnan macro, the type for determination does not matter unless the implementation supports +

206) For the isnan macro, the type for determination does not matter unless the implementation supports NaNs in the evaluation type but not in the semantic type. - +

7.12.3.5 The isnormal macro
Synopsis
@@ -10641,9 +10641,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 is negative.
footnotes
-

207) The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is +

207) The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is unsigned, it is treated as positive. - +

7.12.4 Trigonometric functions

@@ -10914,8 +10914,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The expm1 functions return ex - 1.
footnotes
-

208) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. - +

208) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. +

7.12.6.4 The frexp functions
Synopsis
@@ -11028,8 +11028,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The log1p functions return loge (1 + x).
footnotes
-

209) For small magnitude x, log1p(x) is expected to be more accurate than log(1 + x). - +

209) For small magnitude x, log1p(x) is expected to be more accurate than log(1 + x). +

7.12.6.10 The log2 functions
Synopsis
@@ -11478,11 +11478,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

210) ''When y != 0, the remainder r = x REM y is defined regardless of the rounding mode by the +

210) ''When y != 0, the remainder r = x REM y is defined regardless of the rounding mode by the mathematical relation r = x - ny, where n is the integer nearest the exact value of x/y; whenever | n - x/y | = 1/2, then n is even. Thus, the remainder is always exact. If r = 0, its sign shall be that of x.'' This definition is applicable for all implementations. - +

7.12.10.3 The remquo functions
Synopsis
@@ -11572,9 +11572,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

211) The argument values are converted to the type of the function, even by a macro implementation of the +

211) The argument values are converted to the type of the function, even by a macro implementation of the function. - +

7.12.11.4 The nexttoward functions
Synopsis
@@ -11591,9 +11591,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 type of the function if x equals y.212)
footnotes
-

212) The result of the nexttoward functions is determined in the type of the function, without loss of +

212) The result of the nexttoward functions is determined in the type of the function, without loss of range or precision in a floating second argument. - +

7.12.12 Maximum, minimum, and positive difference functions

@@ -11637,9 +11637,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fmax functions return the maximum numeric value of their arguments.
footnotes
-

213) NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the +

213) NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the fmax functions choose the numeric value. See F.9.9.2. - +

7.12.12.3 The fmin functions
Synopsis
@@ -11657,8 +11657,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fmin functions return the minimum numeric value of their arguments.
footnotes
-

214) The fmin functions are analogous to the fmax functions in their treatment of NaNs. - +

214) The fmin functions are analogous to the fmax functions in their treatment of NaNs. +

7.12.13 Floating multiply-add

@@ -11699,10 +11699,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 expression of real floating type.
footnotes
-

215) IEC 60559 requires that the built-in relational operators raise the ''invalid'' floating-point exception if +

215) IEC 60559 requires that the built-in relational operators raise the ''invalid'' floating-point exception if the operands compare unordered, as an error indicator for programs written without consideration of NaNs; the result in these cases is false. - +

7.12.14.1 The isgreater macro
Synopsis
@@ -11824,9 +11824,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 program defines an external identifier with the name setjmp, the behavior is undefined.
footnotes
-

216) These functions are useful for dealing with unusual conditions encountered in a low-level function of +

216) These functions are useful for dealing with unusual conditions encountered in a low-level function of a program. - +

7.13.1 Save calling environment

@@ -11925,11 +11925,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 }
footnotes
-

217) For example, by executing a return statement or because another longjmp call has caused a +

217) For example, by executing a return statement or because another longjmp call has caused a transfer to a setjmp invocation in a function earlier in the set of nested calls. - -

218) This includes, but is not limited to, the floating-point status flags and the state of open files. - + +

218) This includes, but is not limited to, the floating-point status flags and the state of open files. +

7.14 Signal handling

@@ -11974,10 +11974,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

219) See ''future library directions'' (7.26.9). The names of the signal numbers reflect the following terms +

219) See ''future library directions'' (7.26.9). The names of the signal numbers reflect the following terms (respectively): abort, floating-point exception, illegal instruction, interrupt, segmentation violation, and termination. - +

7.14.1 Specify signal handling

@@ -12041,8 +12041,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 _Exit function (7.20.4.4).
footnotes
-

220) If any signal is generated by an asynchronous signal handler, the behavior is undefined. - +

220) If any signal is generated by an asynchronous signal handler, the behavior is undefined. +

7.14.2 Send signal

@@ -12085,9 +12085,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 macro prior to any further reference to ap.221)
footnotes
-

221) It is permitted to create a pointer to a va_list and pass that pointer to another function, in which +

221) It is permitted to create a pointer to a va_list and pass that pointer to another function, in which case the original function may make further use of the original list after the other function returns. - +

7.15.1 Variable argument list access macros

@@ -12276,8 +12276,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

222) See ''future library directions'' (7.26.7). - +

222) See ''future library directions'' (7.26.7). +

7.17 Common definitions

@@ -12349,10 +12349,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (described as ''optional'').

footnotes
-

223) See ''future library directions'' (7.26.8). - -

224) Some of these types may denote implementation-defined extended integer types. - +

223) See ''future library directions'' (7.26.8). + +

224) Some of these types may denote implementation-defined extended integer types. +

7.18.1 Integer types

@@ -12423,10 +12423,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 All other types of this form are optional.

footnotes
-

225) The designated type is not guaranteed to be fastest for all purposes; if the implementation has no clear +

225) The designated type is not guaranteed to be fastest for all purposes; if the implementation has no clear grounds for choosing one type over another, it will simply pick some integer type satisfying the signedness and width requirements. - +

7.18.1.4 Integer types capable of holding object pointers

@@ -12470,9 +12470,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 except where stated to be exactly the given value.

footnotes
-

226) C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined +

226) C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before <stdint.h> is included. - +

7.18.2.1 Limits of exact-width integer types

@@ -12582,14 +12582,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 shall be 0 and the value of WINT_MAX shall be no less than 65535.

footnotes
-

227) C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined +

227) C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before <stdint.h> is included. - -

228) A freestanding implementation need not provide all of these types. - -

229) The values WCHAR_MIN and WCHAR_MAX do not necessarily correspond to members of the extended + +

228) A freestanding implementation need not provide all of these types. + +

229) The values WCHAR_MIN and WCHAR_MAX do not necessarily correspond to members of the extended character set. - +

7.18.4 Macros for integer constants

@@ -12612,9 +12612,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

230) C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is +

230) C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is defined before <stdint.h> is included. - +

7.18.4.1 Macros for minimum-width integer constants

@@ -12732,11 +12732,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 tmpnam function (7.19.4.4), <wchar.h> (7.24).

footnotes
-

231) If the implementation imposes no practical limit on the length of file name strings, the value of +

231) If the implementation imposes no practical limit on the length of file name strings, the value of FILENAME_MAX should instead be the recommended size of an array intended to hold a file name string. Of course, file name string contents are subject to other system-specific constraints; therefore all possible strings of length FILENAME_MAX cannot be expected to be opened successfully. - +

7.19.2 Streams

@@ -12809,12 +12809,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

232) An implementation need not distinguish between text streams and binary streams. In such an +

232) An implementation need not distinguish between text streams and binary streams. In such an implementation, there need be no new-line characters in a text stream nor any limit to the length of a line. - -

233) The three predefined streams stdin, stdout, and stderr are unoriented at program startup. - + +

233) The three predefined streams stdin, stdout, and stderr are unoriented at program startup. +

7.19.3 Files

@@ -12923,10 +12923,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (7.24.6.3.2), the wcrtomb function (7.24.6.3.3).

footnotes
-

234) Setting the file position indicator to end-of-file, as with fseek(file, 0, SEEK_END), has +

234) Setting the file position indicator to end-of-file, as with fseek(file, 0, SEEK_END), has undefined behavior for a binary stream (because of possible trailing null characters) or for any stream with state-dependent encoding that does not assuredly end in the initial shift state. - +

7.19.4 Operations on files

@@ -12965,9 +12965,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 which case if the file existed previously it is still known by its original name.
footnotes
-

235) Among the reasons the implementation may cause the rename function to fail are that the file is open +

235) Among the reasons the implementation may cause the rename function to fail are that the file is open or that it is necessary to copy its contents to effectuate its renaming. - +

7.19.4.3 The tmpfile function
Synopsis
@@ -13025,11 +13025,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The value of the macro TMP_MAX shall be at least 25.
footnotes
-

236) Files created using strings generated by the tmpnam function are temporary only in the sense that +

236) Files created using strings generated by the tmpnam function are temporary only in the sense that their names should not collide with those generated by conventional naming rules for the implementation. It is still necessary to use the remove function to remove such files when their use is ended, and before program termination. - +

7.19.5 File access functions

@@ -13134,10 +13134,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: file positioning functions (7.19.9).

footnotes
-

237) If the string begins with one of the above sequences, the implementation might choose to ignore the +

237) If the string begins with one of the above sequences, the implementation might choose to ignore the remaining characters, or it might use them to select different kinds of a file (some of which might not conform to the properties in 7.19.2). - +

7.19.5.4 The freopen function
Synopsis
@@ -13168,10 +13168,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 freopen returns the value of stream.
footnotes
-

238) The primary use of the freopen function is to change the file associated with a standard text stream +

238) The primary use of the freopen function is to change the file associated with a standard text stream (stderr, stdin, or stdout), as those identifiers need not be modifiable lvalues to which the value returned by the fopen function may be assigned. - +

7.19.5.5 The setbuf function
Synopsis
@@ -13221,9 +13221,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for mode or if the request cannot be honored.
footnotes
-

239) The buffer has to have a lifetime at least as great as the open stream, so the stream should be closed +

239) The buffer has to have a lifetime at least as great as the open stream, so the stream should be closed before a buffer that has automatic storage duration is deallocated upon block exit. - +

7.19.6 Formatted input/output functions

@@ -13231,8 +13231,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 actions associated with each specifier.240)

footnotes
-

240) The fprintf functions perform writes to memory for the %n specifier. - +

240) The fprintf functions perform writes to memory for the %n specifier. +

7.19.6.1 The fprintf function
Synopsis
@@ -13586,32 +13586,32 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: conversion state (7.24.6), the wcrtomb function (7.24.6.3.3).

footnotes
-

241) Note that 0 is taken as a flag, not as the beginning of a field width. - -

242) The results of all floating conversions of a negative zero, and of negative values that round to zero, +

241) Note that 0 is taken as a flag, not as the beginning of a field width. + +

242) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign. - -

243) When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning; + +

243) When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning; the # and 0 flag characters have no effect. - -

244) Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so + +

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 16 p-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. - -

246) No special provisions are made for multibyte characters. - -

247) Redundant shift sequences may result if multibyte characters have a state-dependent encoding. - -

248) See ''future library directions'' (7.26.9). - -

249) For binary-to-decimal conversion, the result format's values are the numbers representable with the + +

246) No special provisions are made for multibyte characters. + +

247) Redundant shift sequences may result if multibyte characters have a state-dependent encoding. + +

248) See ''future library directions'' (7.26.9). + +

249) For binary-to-decimal conversion, the result format's values are the numbers representable with the given format specifier. The number of significant digits is determined by the format specifier, and in the case of fixed-point conversion by the source value as well. - +

7.19.6.2 The fscanf function
Synopsis
@@ -13971,17 +13971,17 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

250) These white-space characters are not counted against a specified field width. - -

251) fscanf pushes back at most one input character onto the input stream. Therefore, some sequences +

250) These white-space characters are not counted against a specified field width. + +

251) fscanf pushes back at most one input character onto the input stream. Therefore, some sequences that are acceptable to strtod, strtol, etc., are unacceptable to fscanf. - -

252) No special provisions are made for multibyte characters in the matching rules used by the c, s, and [ + +

252) No special provisions are made for multibyte characters in the matching rules used by the c, s, and [ conversion specifiers -- the extent of the input field is determined on a byte-by-byte basis. The resulting field is nevertheless a sequence of multibyte characters that begins in the initial shift state. - -

253) See ''future library directions'' (7.26.9). - + +

253) See ''future library directions'' (7.26.9). +

7.19.6.3 The printf function
Synopsis
@@ -14118,9 +14118,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

254) As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and +

254) As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and vsscanf invoke the va_arg macro, the value of arg after the return is indeterminate. - +

7.19.6.9 The vfscanf function
Synopsis
@@ -14276,8 +14276,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 returns EOF.255)
footnotes
-

255) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. - +

255) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. +

7.19.7.2 The fgets function
Synopsis
@@ -14483,8 +14483,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

256) See ''future library directions'' (7.26.9). - +

256) See ''future library directions'' (7.26.9). +

7.19.8 Direct input/output functions

@@ -14756,8 +14756,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

257) See ''future library directions'' (7.26.10). - +

257) See ''future library directions'' (7.26.10). +

7.20.1 Numeric conversion functions

@@ -14904,17 +14904,17 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the value ERANGE is implementation-defined.

footnotes
-

258) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by +

258) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by negating the value resulting from converting the corresponding unsigned sequence (see F.5); the two methods may yield different results if rounding is toward positive or negative infinity. In either case, the functions honor the sign of zero if floating-point arithmetic supports signed zeros. - -

259) An implementation may use the n-char sequence to determine extra information to be represented in + +

259) An implementation may use the n-char sequence to determine extra information to be represented in the NaN's significand. - -

260) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round + +

260) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round to the same internal floating value, but if not will round to adjacent values. - +

7.20.1.4 The strtol, strtoll, strtoul, and strtoull functions
Synopsis
@@ -15075,9 +15075,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The calloc function returns either a null pointer or a pointer to the allocated space.
footnotes
-

261) Note that this need not be the same as the representation of floating-point zero or a null pointer +

261) Note that this need not be the same as the representation of floating-point zero or a null pointer constant. - +

7.20.3.2 The free function
Synopsis
@@ -15208,9 +15208,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The exit function cannot return to its caller.
footnotes
-

262) Each function is called as many times as it was registered, and in the correct order with respect to +

262) Each function is called as many times as it was registered, and in the correct order with respect to other registered functions. - +

7.20.4.4 The _Exit function
Synopsis
@@ -15304,13 +15304,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 movement of the objects passed as arguments to that call.
footnotes
-

263) That is, if the value passed is p, then the following expressions are always nonzero: +

263) That is, if the value passed is p, then the following expressions are always nonzero:

           ((char *)p - (char *)base) % size == 0
           (char *)p >= (char *)base
           (char *)p < (char *)base + nmemb * size
- +
7.20.5.1 The bsearch function
Synopsis
@@ -15342,8 +15342,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 matched is unspecified.
footnotes
-

264) In practice, the entire array is sorted according to the comparison function. - +

264) In practice, the entire array is sorted according to the comparison function. +

7.20.5.2 The qsort function
Synopsis
@@ -15392,8 +15392,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The abs, labs, and llabs, functions return the absolute value.
footnotes
-

265) The absolute value of the most negative number cannot be represented in two's complement. - +

265) The absolute value of the most negative number cannot be represented in two's complement. +

7.20.6.2 The div, ldiv, and lldiv functions
Synopsis
@@ -15432,9 +15432,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 functions to be indeterminate.
footnotes
-

266) If the locale employs special bytes to change the shift state, these bytes do not produce separate wide +

266) If the locale employs special bytes to change the shift state, these bytes do not produce separate wide character codes, but are grouped with an adjacent multibyte character. - +

7.20.7.1 The mblen function
Synopsis
@@ -15562,8 +15562,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

267) The array will not be null-terminated if the value returned is n. - +

267) The array will not be null-terminated if the value returned is n. +

7.20.8.2 The wcstombs function
Synopsis
@@ -15616,8 +15616,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 different value).
footnotes
-

268) See ''future library directions'' (7.26.11). - +

268) See ''future library directions'' (7.26.11). +

7.21.2 Copying functions

@@ -15699,9 +15699,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The strncpy function returns the value of s1.
footnotes
-

269) Thus, if there is no null character in the first n characters of the array pointed to by s2, the result will +

269) Thus, if there is no null character in the first n characters of the array pointed to by s2, the result will not be null-terminated. - +

7.21.3 Concatenation functions

@@ -15745,9 +15745,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: the strlen function (7.21.6.3).

footnotes
-

270) Thus, the maximum number of characters that can end up in the array pointed to by s1 is +

270) Thus, the maximum number of characters that can end up in the array pointed to by s1 is strlen(s1)+n+1. - +

7.21.4 Comparison functions

@@ -15773,10 +15773,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 pointed to by s2.

footnotes
-

271) The contents of ''holes'' used as padding for purposes of alignment within structure objects are +

271) The contents of ''holes'' used as padding for purposes of alignment within structure objects are indeterminate. Strings shorter than their allocated space and unions may also cause problems in comparison. - +

7.21.4.2 The strcmp function
Synopsis
@@ -16189,12 +16189,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 cproj(ldc) cprojl(ldc)
footnotes
-

272) Like other function-like macros in Standard libraries, each type-generic macro can be suppressed to +

272) Like other function-like macros in Standard libraries, each type-generic macro can be suppressed to make available the corresponding ordinary function. - -

273) If the type of the argument is not compatible with the type of the parameter for the selected function, + +

273) If the type of the argument is not compatible with the type of the parameter for the selected function, the behavior is undefined. - +

7.23 Date and time

@@ -16246,8 +16246,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Saving Time is not in effect, and negative if the information is not available.
footnotes
-

274) The range [0, 60] for tm_sec allows for a positive leap second. - +

274) The range [0, 60] for tm_sec allows for a positive leap second. +

7.23.2 Time manipulation functions

@@ -16270,9 +16270,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 returns the value (clock_t)(-1).275)
footnotes
-

275) In order to measure the time spent in a program, the clock function should be called at the start of +

275) In order to measure the time spent in a program, the clock function should be called at the start of the program and its return value subtracted from the value returned by subsequent calls. - +

7.23.2.2 The difftime function
Synopsis
@@ -16345,10 +16345,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

276) Thus, a positive or zero value for tm_isdst causes the mktime function to presume initially that +

276) Thus, a positive or zero value for tm_isdst causes the mktime function to presume initially that Daylight Saving Time, respectively, is or is not in effect for the specified time. A negative value causes it to attempt to determine whether Daylight Saving Time is in effect for the specified time. - +

7.23.2.4 The time function
Synopsis
@@ -16693,12 +16693,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 undefined.
footnotes
-

277) See ''future library directions'' (7.26.12). - -

278) wchar_t and wint_t can be the same integer type. - -

279) The value of the macro WEOF may differ from that of EOF and need not be negative. - +

277) See ''future library directions'' (7.26.12). + +

278) wchar_t and wint_t can be the same integer type. + +

279) The value of the macro WEOF may differ from that of EOF and need not be negative. +

7.24.2 Formatted wide character input/output functions

@@ -16706,8 +16706,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 point after the actions associated with each specifier.280)

footnotes
-

280) The fwprintf functions perform writes to memory for the %n specifier. - +

280) The fwprintf functions perform writes to memory for the %n specifier. +

7.24.2.1 The fwprintf function
Synopsis
@@ -17020,28 +17020,28 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (7.24.6.3.2).
footnotes
-

281) Note that 0 is taken as a flag, not as the beginning of a field width. - -

282) The results of all floating conversions of a negative zero, and of negative values that round to zero, +

281) Note that 0 is taken as a flag, not as the beginning of a field width. + +

282) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign. - -

283) When applied to infinite and NaN values, the -, +, and space flag wide characters have their usual + +

283) When applied to infinite and NaN values, the -, +, and space flag wide characters have their usual meaning; the # and 0 flag wide characters have no effect. - -

284) Binary implementations can choose the hexadecimal digit to the left of the decimal-point wide + +

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 16 p-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. - -

286) See ''future library directions'' (7.26.12). - -

287) For binary-to-decimal conversion, the result format's values are the numbers representable with the + +

286) See ''future library directions'' (7.26.12). + +

287) For binary-to-decimal conversion, the result format's values are the numbers representable with the given format specifier. The number of significant digits is determined by the format specifier, and in the case of fixed-point conversion by the source value as well. - +

7.24.2.2 The fwscanf function
Synopsis
@@ -17306,13 +17306,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 function (7.24.6.3.3).
footnotes
-

288) These white-space wide characters are not counted against a specified field width. - -

289) fwscanf pushes back at most one input wide character onto the input stream. Therefore, some +

288) These white-space wide characters are not counted against a specified field width. + +

289) fwscanf pushes back at most one input wide character onto the input stream. Therefore, some sequences that are acceptable to wcstod, wcstol, etc., are unacceptable to fwscanf. - -

290) See ''future library directions'' (7.26.12). - + +

290) See ''future library directions'' (7.26.12). +

7.24.2.3 The swprintf function
Synopsis
@@ -17399,9 +17399,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

291) As the functions vfwprintf, vswprintf, vfwscanf, vwprintf, vwscanf, and vswscanf +

291) As the functions vfwprintf, vswprintf, vfwscanf, vwprintf, vwscanf, and vswscanf invoke the va_arg macro, the value of arg after the return is indeterminate. - +

7.24.2.6 The vfwscanf function
Synopsis
@@ -17570,9 +17570,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the macro EILSEQ is stored in errno and the fgetwc function returns WEOF.292)
footnotes
-

292) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. +

292) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. Also, errno will be set to EILSEQ by input/output functions only if an encoding error occurs. - +

7.24.3.2 The fgetws function
Synopsis
@@ -17657,8 +17657,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 stream has no orientation.
footnotes
-

293) If the orientation of the stream has already been determined, fwide does not change it. - +

293) If the orientation of the stream has already been determined, fwide does not change it. +

7.24.3.6 The getwc function
Synopsis
@@ -17890,17 +17890,17 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

294) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by +

294) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by negating the value resulting from converting the corresponding unsigned sequence (see F.5); the two methods may yield different results if rounding is toward positive or negative infinity. In either case, the functions honor the sign of zero if floating-point arithmetic supports signed zeros. - -

295) An implementation may use the n-wchar sequence to determine extra information to be represented in + +

295) An implementation may use the n-wchar sequence to determine extra information to be represented in the NaN's significand. - -

296) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round + +

296) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round to the same internal floating value, but if not will round to adjacent values. - +

7.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions
Synopsis
@@ -18016,9 +18016,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcsncpy function returns the value of s1.
footnotes
-

297) Thus, if there is no null wide character in the first n wide characters of the array pointed to by s2, the +

297) Thus, if there is no null wide character in the first n wide characters of the array pointed to by s2, the result will not be null-terminated. - +

7.24.4.2.3 The wmemcpy function
Synopsis
@@ -18098,9 +18098,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcsncat function returns the value of s1.
footnotes
-

298) Thus, the maximum number of wide characters that can end up in the array pointed to by s1 is +

298) Thus, the maximum number of wide characters that can end up in the array pointed to by s1 is wcslen(s1)+n+1. - +

7.24.4.4 Wide string comparison functions

@@ -18474,10 +18474,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

299) Thus, a particular mbstate_t object can be used, for example, with both the mbrtowc and +

299) Thus, a particular mbstate_t object can be used, for example, with both the mbrtowc and mbsrtowcs functions as long as they are used to step sequentially through the same multibyte character string. - +

7.24.6.1 Single-byte/wide character conversion functions
@@ -18616,9 +18616,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

300) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a +

300) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a sequence of redundant shift sequences (for implementations with state-dependent encodings). - +

7.24.6.3.3 The wcrtomb function
Synopsis
@@ -18704,8 +18704,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

301) Thus, the value of len is ignored if dst is a null pointer. - +

301) Thus, the value of len is ignored if dst is a null pointer. +

7.24.6.4.2 The wcsrtombs function
Synopsis
@@ -18748,9 +18748,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

302) If conversion stops because a terminating null wide character has been reached, the bytes stored +

302) If conversion stops because a terminating null wide character has been reached, the bytes stored include those necessary to reach the initial shift state immediately before the null byte. - +

7.25 Wide character classification and mapping utilities

@@ -18794,8 +18794,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

303) See ''future library directions'' (7.26.13). - +

303) See ''future library directions'' (7.26.13). +

7.25.2 Wide character classification utilities

@@ -18820,11 +18820,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

Forward references: the wctob function (7.24.6.1.2).

footnotes
-

304) For example, if the expression isalpha(wctob(wc)) evaluates to true, then the call +

304) For example, if the expression isalpha(wctob(wc)) evaluates to true, then the call iswalpha(wc) also returns true. But, if the expression isgraph(wctob(wc)) evaluates to true (which cannot occur for wc == L' ' of course), then either iswgraph(wc) or iswprint(wc) && iswspace(wc) is true, but not both. - +

7.25.2.1.1 The iswalnum function
Synopsis
@@ -18853,9 +18853,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 is true.305)
footnotes
-

305) The functions iswlower and iswupper test true or false separately for each of these additional +

305) The functions iswlower and iswupper test true or false separately for each of these additional wide characters; all four combinations are possible. - +

7.25.2.1.3 The iswblank function
Synopsis
@@ -18909,10 +18909,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 iswspace is false.306)
footnotes
-

306) Note that the behavior of the iswgraph and iswpunct functions may differ from their +

306) Note that the behavior of the iswgraph and iswpunct functions may differ from their corresponding functions in 7.4.1 with respect to printing, white-space, single-byte execution characters other than ' '. - +

7.25.2.1.7 The iswlower function
Synopsis
@@ -20936,12 +20936,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

307) ''Extended'' is IEC 60559's double-extended data format. Extended refers to both the common 80-bit +

307) ''Extended'' is IEC 60559's double-extended data format. Extended refers to both the common 80-bit and quadruple 128-bit IEC 60559 formats. - -

308) A non-IEC 60559 long double type is required to provide infinity and NaNs, as its values include + +

308) A non-IEC 60559 long double type is required to provide infinity and NaNs, as its values include all double values. - +

F.2.1 Infinities, signed zeros, and NaNs

@@ -20950,9 +20950,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 functions in <math.h> provide designations for IEC 60559 NaNs and infinities.

footnotes
-

309) Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are +

309) Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are sufficient for closure of the arithmetic. - +

F.3 Operators and functions

@@ -21041,12 +21041,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 exception is unspecified.310)

footnotes
-

310) ANSI/IEEE 854, but not IEC 60559 (ANSI/IEEE 754), directly specifies that floating-to-integer +

310) ANSI/IEEE 854, but not IEC 60559 (ANSI/IEEE 754), directly specifies that floating-to-integer conversions raise the ''inexact'' floating-point exception for non-integer in-range values. In those cases where it matters, library functions can be used to effect such conversions with or without raising the ''inexact'' floating-point exception. See rint, lrint, llrint, and nearbyint in <math.h>. - +

F.5 Binary-decimal conversion

@@ -21070,11 +21070,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

311) If the minimum-width IEC 60559 extended format (64 bits of precision) is supported, +

311) If the minimum-width IEC 60559 extended format (64 bits of precision) is supported, DECIMAL_DIG shall be at least 21. If IEC 60559 double (53 bits of precision) is the widest IEC 60559 format supported, then DECIMAL_DIG shall be at least 17. (By contrast, LDBL_DIG and DBL_DIG are 18 and 15, respectively, for these formats.) - +

F.6 Contracted expressions

@@ -21095,8 +21095,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 implementation supports them.312)

footnotes
-

312) This specification does not require dynamic rounding precision nor trap enablement modes. - +

312) This specification does not require dynamic rounding precision nor trap enablement modes. +

F.7.1 Environment management

@@ -21107,10 +21107,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 which respect sequence points.313)

footnotes
-

313) If the state for the FENV_ACCESS pragma is ''off'', the implementation is free to assume the floating- +

313) If the state for the FENV_ACCESS pragma is ''off'', the implementation is free to assume the floating- point control modes will be the default ones and the floating-point status flags will not be tested, which allows certain optimizations (see F.8). - +

F.7.2 Translation

@@ -21132,11 +21132,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 proceed with the translation of the program.

footnotes
-

314) As floating constants are converted to appropriate internal representations at translation time, their +

314) As floating constants are converted to appropriate internal representations at translation time, their conversion is subject to default rounding modes and raises no execution-time floating-point exceptions (even where the state of the FENV_ACCESS pragma is ''on''). Library functions, for example strtod, provide execution-time conversion of numeric strings. - +

F.7.3 Execution

@@ -21180,14 +21180,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

315) Where the state for the FENV_ACCESS pragma is ''on'', results of inexact expressions like 1.0/3.0 +

315) Where the state for the FENV_ACCESS pragma is ''on'', results of inexact expressions like 1.0/3.0 are affected by rounding modes set at execution time, and expressions such as 0.0/0.0 and 1.0/0.0 generate execution-time floating-point exceptions. The programmer can achieve the efficiency of translation-time evaluation through static initialization, such as

           const static double one_third = 1.0/3.0;
- +

F.7.5 Initialization

@@ -21227,13 +21227,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

316) Use of float_t and double_t variables increases the likelihood of translation-time computation. +

316) Use of float_t and double_t variables increases the likelihood of translation-time computation. For example, the automatic initialization

            double_t x = 1.1e75;
could be done at translation time, regardless of the expression evaluation method. - +

F.7.6 Changing the environment

@@ -21333,10 +21333,10 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (unless rounding is downward).

footnotes
-

317) Strict support for signaling NaNs -- not required by this specification -- would invalidate these and +

317) Strict support for signaling NaNs -- not required by this specification -- would invalidate these and other transformations that remove arithmetic operators. - -

318) IEC 60559 prescribes a signed zero to preserve mathematical identities across certain discontinuities. + +

318) IEC 60559 prescribes a signed zero to preserve mathematical identities across certain discontinuities. Examples include:

@@ -21346,7 +21346,7 @@ WG14/N1256                Committee Draft -- Septermber 7, 2007
 
     conj(csqrt(z)) is csqrt(conj(z)),
for complex z. - +

F.8.3 Relational operators

@@ -21413,8 +21413,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 point exception when converted to the semantic type of the operation.

footnotes
-

319) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward. - +

319) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward. +

F.9 Mathematics

@@ -21472,12 +21472,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for the sign.

footnotes
-

320) IEC 60559 allows different definitions of underflow. They all result in the same values, but differ on +

320) IEC 60559 allows different definitions of underflow. They all result in the same values, but differ on when the floating-point exception is raised. - -

321) It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if + +

321) It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if avoiding them would be too costly. - +

F.9.1 Trigonometric functions

@@ -21526,9 +21526,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

322) atan2(0, 0) does not raise the ''invalid'' floating-point exception, nor does atan2( y , 0) raise +

322) atan2(0, 0) does not raise the ''invalid'' floating-point exception, nor does atan2( y , 0) raise the ''divide-by-zero'' floating-point exception. - +

F.9.1.5 The cos functions

@@ -22009,9 +22009,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 isnan(y)) ? x : y; }

footnotes
-

323) Ideally, fmax would be sensitive to the sign of zero, for example fmax(-0.0, +0.0) would +

323) Ideally, fmax would be sensitive to the sign of zero, for example fmax(-0.0, +0.0) would return +0; however, implementation in software might be impractical. - +

F.9.9.3 The fmin functions

@@ -22093,8 +22093,8 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 imaginary zero.

footnotes
-

324) See 6.3.1.2. - +

324) See 6.3.1.2. +

G.4.3 Imaginary and complex

@@ -22290,9 +22290,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007

footnotes
-

325) These properties are already implied for those cases covered in the tables, but are required for all cases +

325) These properties are already implied for those cases covered in the tables, but are required for all cases (at least where the state for CX_LIMITED_RANGE is ''off''). - +

G.5.2 Additive operators

Semantics
@@ -22381,9 +22381,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
footnotes
-

326) As noted in G.3, a complex value with at least one infinite part is regarded as an infinity even if its +

326) As noted in G.3, a complex value with at least one infinite part is regarded as an infinity even if its other part is a NaN. - +

G.6.1 Trigonometric functions

@@ -22602,9 +22602,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the parts of the result, and may raise spurious exceptions.327)
footnotes
-

327) This allows cpow( z , c ) to be implemented as cexp(c clog( z )) without precluding +

327) This allows cpow( z , c ) to be implemented as cexp(c clog( z )) without precluding implementations that treat special cases more carefully. - +

G.6.4.2 The csqrt functions

diff --git a/n1548.html b/n1548.html index e7e0a49..7459503 100644 --- a/n1548.html +++ b/n1548.html @@ -763,9 +763,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

1) This International Standard is designed to promote the portability of C programs among a variety of +

1) This International Standard is designed to promote the portability of C programs among a variety of data-processing systems. It is intended for use by implementors and programmers. - +

2. Normative references

@@ -1078,9 +1078,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

2) For example, ''Trapping or stopping (if supported) is disabled...'' (F.8.2). Note that fetching a trap +

2) For example, ''Trapping or stopping (if supported) is disabled...'' (F.8.2). Note that fetching a trap representation might perform a trap but is not required to (see 6.2.6.1). - +

3.20

@@ -1156,7 +1156,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

3) A strictly conforming program can use conditional features (see 6.10.8.3) provided the use is guarded +

3) A strictly conforming program can use conditional features (see 6.10.8.3) provided the use is guarded by an appropriate conditional inclusion preprocessing directive using the related macro. For example:

@@ -1166,14 +1166,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
             /* ... */
          #endif
- -

4) This implies that a conforming implementation reserves no identifiers other than those explicitly + +

4) This implies that a conforming implementation reserves no identifiers other than those explicitly reserved in this International Standard. - -

5) Strictly conforming programs are intended to be maximally portable among conforming + +

5) Strictly conforming programs are intended to be maximally portable among conforming implementations. Conforming programs may depend upon nonportable features of a conforming implementation. - +

5. Environment

@@ -1256,18 +1256,18 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

6) Implementations shall behave as if these separate phases occur, even though many are typically folded +

6) Implementations shall behave as if these separate phases occur, even though many are typically folded together in practice. Source files, translation units, and translated translation units need not necessarily be stored as files, nor need there be any one-to-one correspondence between these entities and any external representation. The description is conceptual only, and does not specify any particular implementation. - -

7) As described in 6.4, the process of dividing a source file's characters into preprocessing tokens is + +

7) As described in 6.4, the process of dividing a source file's characters into preprocessing tokens is context-dependent. For example, see the handling of < within a #include preprocessing directive. - -

8) An implementation need not convert all non-corresponding source characters to the same execution + +

8) An implementation need not convert all non-corresponding source characters to the same execution character. - +

5.1.1.3 Diagnostics

@@ -1286,10 +1286,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

9) The intent is that an implementation should identify the nature of, and where possible localize, each +

9) The intent is that an implementation should identify the nature of, and where possible localize, each violation. Of course, an implementation is free to produce any number of diagnostics as long as a valid program is still correctly translated. It may also successfully translate an invalid program. - +

5.1.2 Execution environments

@@ -1357,9 +1357,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

10) Thus, int can be replaced by a typedef name defined as int, or the type of argv can be written as +

10) Thus, int can be replaced by a typedef name defined as int, or the type of argv can be written as char ** argv, and so on. - +

5.1.2.2.2 Program execution

@@ -1381,9 +1381,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: definition of terms (7.1.1), the exit function (7.22.4.4).

footnotes
-

11) In accordance with 6.2.4, the lifetimes of objects with automatic storage duration declared in main +

11) In accordance with 6.2.4, the lifetimes of objects with automatic storage duration declared in main will have ended in the former case, even where they would not have in the latter. - +

5.1.2.3 Program execution

@@ -1551,16 +1551,16 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. signal function (7.14), files (7.21.3).

footnotes
-

12) The IEC 60559 standard for binary floating-point arithmetic requires certain user-accessible status +

12) The IEC 60559 standard for binary floating-point arithmetic requires certain user-accessible status flags and control modes. Floating-point operations implicitly set the status flags; modes affect result values of floating-point operations. Implementations that support such floating-point state are required to regard changes to it as side effects -- see annex F for details. The floating-point environment library <fenv.h> provides a programming facility for indicating when these side effects matter, freeing the implementations in other cases. - -

13) The executions of unsequenced evaluations can interleave. Indeterminately sequenced evaluations + +

13) The executions of unsequenced evaluations can interleave. Indeterminately sequenced evaluations cannot interleave, but can be executed in any order. - +

5.1.2.4 Multi-threaded executions and data races

@@ -1769,16 +1769,16 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

14) The execution can usually be viewed as an interleaving of all of the threads. However, some kinds of +

14) The execution can usually be viewed as an interleaving of all of the threads. However, some kinds of atomic operations, for example, allow executions inconsistent with a simple interleaving as described below. - -

15) The ''carries a dependency'' relation is a subset of the ''sequenced before'' relation, and is similarly + +

15) The ''carries a dependency'' relation is a subset of the ''sequenced before'' relation, and is similarly strictly intra-thread. - -

16) The ''dependency-ordered before'' relation is analogous to the ''synchronizes with'' relation, but uses + +

16) The ''dependency-ordered before'' relation is analogous to the ''synchronizes with'' relation, but uses release/consume in place of release/acquire. - +

5.2 Environmental considerations

@@ -1863,9 +1863,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

17) The trigraph sequences enable the input of characters that are not defined in the Invariant Code Set as +

17) The trigraph sequences enable the input of characters that are not defined in the Invariant Code Set as described in ISO/IEC 646, which is a subset of the seven-bit US ASCII code set. - +

5.2.1.2 Multibyte characters

@@ -1994,10 +1994,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

18) Implementations should avoid imposing fixed translation limits whenever possible. - -

19) See ''future language directions'' (6.11.3). - +

18) Implementations should avoid imposing fixed translation limits whenever possible. + +

19) See ''future language directions'' (6.11.3). +

5.2.4.2 Numerical limits

@@ -2067,8 +2067,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: representations of types (6.2.6), conditional inclusion (6.10.1).

footnotes
-

20) See 6.2.5. - +

20) See 6.2.5. +

5.2.4.2.2 Characteristics of floating types

@@ -2362,33 +2362,33 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

21) The floating-point model is intended to clarify the description of each floating-point characteristic and +

21) The floating-point model is intended to clarify the description of each floating-point characteristic and does not require the floating-point arithmetic of the implementation to be identical. - -

22) IEC 60559:1989 specifies quiet and signaling NaNs. For implementations that do not support + +

22) IEC 60559:1989 specifies quiet and signaling NaNs. For implementations that do not support IEC 60559:1989, the terms quiet NaN and signaling NaN are intended to apply to encodings with similar behavior. - -

23) Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through + +

23) Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through the function fesetround in <fenv.h>. - -

24) The evaluation method determines evaluation formats of expressions involving all floating types, not + +

24) The evaluation method determines evaluation formats of expressions involving all floating types, not just real types. For example, if FLT_EVAL_METHOD is 1, then the product of two float _Complex operands is represented in the double _Complex format, and its parts are evaluated to double. - -

25) Characterization as indeterminable is intended if floating-point operations do not consistently interpret + +

25) Characterization as indeterminable is intended if floating-point operations do not consistently interpret subnormal representations as zero, nor as nonzero. - -

26) Characterization as absent is intended if no floating-point operations produce subnormal results from + +

26) Characterization as absent is intended if no floating-point operations produce subnormal results from non-subnormal inputs, even if the type format includes representations of subnormal numbers. - -

27) If the presence or absence of subnormal numbers is indeterminable, then the value is intended to be a + +

27) If the presence or absence of subnormal numbers is indeterminable, then the value is intended to be a positive number no greater than the minimum normalized positive number for the type. - -

28) The floating-point model in that standard sums powers of b from zero, so the values of the exponent + +

28) The floating-point model in that standard sums powers of b from zero, so the values of the exponent limits are one less than shown here. - +

6. Language

@@ -2506,13 +2506,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. statements (6.8).
footnotes
-

29) There is no linkage between different identifiers. - -

30) A function declaration can contain the storage-class specifier static only if it is at file scope; see +

29) There is no linkage between different identifiers. + +

30) A function declaration can contain the storage-class specifier static only if it is at file scope; see 6.7.1. - -

31) As specified in 6.2.1, the later declaration might hide the prior declaration. - + +

31) As specified in 6.2.1, the later declaration might hide the prior declaration. +

6.2.3 Name spaces of identifiers

@@ -2536,8 +2536,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

32) There is only one name space for tags even though three are possible. - +

32) There is only one name space for tags even though three are possible. +

6.2.4 Storage durations of objects

@@ -2598,17 +2598,17 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.7.6), function calls (6.5.2.2), initialization (6.7.9), statements (6.8).

footnotes
-

33) The term ''constant address'' means that two pointers to the object constructed at possibly different +

33) The term ''constant address'' means that two pointers to the object constructed at possibly different times will compare equal. The address may be different during two different executions of the same program. - -

34) In the case of a volatile object, the last store need not be explicit in the program. - -

35) Leaving the innermost block containing the declaration, or jumping to a point in that block or an + +

34) In the case of a volatile object, the last store need not be explicit in the program. + +

35) Leaving the innermost block containing the declaration, or jumping to a point in that block or an embedded block prior to the declaration, leaves the scope of the declaration. - -

36) The address of such an object is taken implicitly when an array member is accessed. - + +

36) The address of such an object is taken implicitly when an array member is accessed. +

6.2.5 Types

@@ -2809,42 +2809,42 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: compatible type and composite type (6.2.7), declarations (6.7).

footnotes
-

37) A type may be incomplete or complete throughout an entire translation unit, or it may change states at +

37) A type may be incomplete or complete throughout an entire translation unit, or it may change states at different points within a translation unit. - -

38) Implementation-defined keywords shall have the form of an identifier reserved for any use as + +

38) Implementation-defined keywords shall have the form of an identifier reserved for any use as described in 7.1.3. - -

39) Therefore, any statement in this Standard about signed integer types also applies to the extended + +

39) Therefore, any statement in this Standard about signed integer types also applies to the extended signed integer types. - -

40) Therefore, any statement in this Standard about unsigned integer types also applies to the extended + +

40) Therefore, any statement in this Standard about unsigned integer types also applies to the extended unsigned integer types. - -

41) The same representation and alignment requirements are meant to imply interchangeability as + +

41) The same representation and alignment requirements are meant to imply interchangeability as arguments to functions, return values from functions, and members of unions. - -

42) See ''future language directions'' (6.11.1). - -

43) A specification for imaginary types is in annex G. - -

44) An implementation may define new keywords that provide alternative ways to designate a basic (or + +

42) See ''future language directions'' (6.11.1). + +

43) A specification for imaginary types is in annex G. + +

44) An implementation may define new keywords that provide alternative ways to designate a basic (or any other) type; this does not violate the requirement that all basic types be different. Implementation-defined keywords shall have the form of an identifier reserved for any use as described in 7.1.3. - -

45) CHAR_MIN, defined in <limits.h>, will have one of the values 0 or SCHAR_MIN, and this can be + +

45) CHAR_MIN, defined in <limits.h>, will have one of the values 0 or SCHAR_MIN, and this can be used to distinguish the two options. Irrespective of the choice made, char is a separate type from the other two and is not compatible with either. - -

46) Note that aggregate type does not include union type because an object with union type can only + +

46) Note that aggregate type does not include union type because an object with union type can only contain one member at a time. - -

47) See 6.7.3 regarding qualified array and function types. - -

48) The same representation and alignment requirements are meant to imply interchangeability as + +

47) See 6.7.3 regarding qualified array and function types. + +

48) The same representation and alignment requirements are meant to imply interchangeability as arguments to functions, return values from functions, and members of unions. - +

6.2.6 Representations of types

@@ -2900,7 +2900,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. designators (6.3.2.1), order and consistency (7.17.3).
footnotes
-

49) A positional representation for integers that uses the binary digits 0 and 1, in which the values +

49) A positional representation for integers that uses the binary digits 0 and 1, in which the values 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 @@ -2909,18 +2909,18 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

                                            CHAR_BIT
                                                      - 1.
- -

50) Thus, an automatic variable can be initialized to a trap representation without causing undefined + +

50) 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. - -

51) Thus, for example, structure assignment need not copy any padding bits. - -

52) It is possible for objects x and y with the same effective type T to have the same value when they are + +

51) Thus, for example, structure assignment need not copy any padding bits. + +

52) It is possible for objects x and y with the same effective type T to have the same value when they are accessed as objects of type T, but to have different values in other contexts. In particular, if == is defined for type T, then x == y does not imply that memcmp(&x, &y, sizeof (T)) == 0. Furthermore, x == y does not necessarily imply that x and y have the same value; other operations on values of type T may distinguish between them. - +

6.2.6.2 Integer types

@@ -2982,18 +2982,18 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

53) Some combinations of padding bits might generate trap representations, for example, if one padding +

53) Some combinations of padding bits might generate trap representations, for example, if one padding bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap representation other than as part of an exceptional condition such as an overflow, and this cannot occur with unsigned types. All other combinations of padding bits are alternative object representations of the value specified by the value bits. - -

54) Some combinations of padding bits might generate trap representations, for example, if one padding + +

54) Some combinations of padding bits might generate trap representations, for example, if one padding bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap representation other than as part of an exceptional condition such as an overflow. All other combinations of padding bits are alternative object representations of the value specified by the value bits. - +

6.2.7 Compatible type and composite type

@@ -3060,10 +3060,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

55) Two types need not be identical to be compatible. - -

56) As specified in 6.2.1, the later declaration might hide the prior declaration. - +

55) Two types need not be identical to be compatible. + +

56) As specified in 6.2.1, the later declaration might hide the prior declaration. +

6.2.8 Alignment of objects

@@ -3108,9 +3108,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

57) Every over-aligned type is, or contains, a structure or union type with a member to which an extended +

57) Every over-aligned type is, or contains, a structure or union type with a member to which an extended alignment has been applied. - +

6.3 Conversions

@@ -3172,10 +3172,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.7.2.1).

footnotes
-

58) The integer promotions are applied only: as part of the usual arithmetic conversions, to certain +

58) The integer promotions are applied only: as part of the usual arithmetic conversions, to certain argument expressions, to the operands of the unary +, -, and ~ operators, and to both operands of the shift operators, as specified by their respective subclauses. - +

6.3.1.2 Boolean type

@@ -3183,8 +3183,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. to 0; otherwise, the result is 1.59)

footnotes
-

59) NaNs do not compare equal to 0 and thus convert to 1. - +

59) NaNs do not compare equal to 0 and thus convert to 1. +

6.3.1.3 Signed and unsigned integers

@@ -3199,8 +3199,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. result is implementation-defined or an implementation-defined signal is raised.

footnotes
-

60) The rules describe arithmetic on the mathematical value, not the value of a given type of expression. - +

60) The rules describe arithmetic on the mathematical value, not the value of a given type of expression. +

6.3.1.4 Real floating and integer

@@ -3221,10 +3221,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. required by the new type.

footnotes
-

61) The remaindering operation performed when a value of integer type is converted to unsigned type +

61) The remaindering operation performed when a value of integer type is converted to unsigned type need not be performed when a value of real floating type is converted to unsigned type. Thus, the range of portable real floating values is (-1, Utype_MAX+1). - +

6.3.1.5 Real floating types

@@ -3299,11 +3299,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

62) For example, addition of a double _Complex and a float entails just the conversion of the +

62) For example, addition of a double _Complex and a float entails just the conversion of the float operand to double (and yields a double _Complex result). - -

63) The cast and assignment operators are still required to remove extra range and precision. - + +

63) The cast and assignment operators are still required to remove extra range and precision. +

6.3.2 Other operands

@@ -3350,16 +3350,16 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.5.3.1), the sizeof operator (6.5.3.4), structure and union members (6.5.2.3).
footnotes
-

64) The name ''lvalue'' comes originally from the assignment expression E1 = E2, in which the left +

64) The name ''lvalue'' comes originally from the assignment expression E1 = E2, in which the left operand E1 is required to be a (modifiable) lvalue. It is perhaps better considered as representing an object ''locator value''. What is sometimes called ''rvalue'' is in this International Standard described as the ''value of an expression''. An obvious example of an lvalue is an identifier of an object. As a further example, if E is a unary expression that is a pointer to an object, *E is an lvalue that designates the object to which E points. - -

65) Because this conversion does not occur, the operand of the sizeof operator remains a function + +

65) Because this conversion does not occur, the operand of the sizeof operator remains a function designator and violates the constraint in 6.5.3.4. - +

6.3.2.2 void

@@ -3421,15 +3421,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

66) The macro NULL is defined in <stddef.h> (and other headers) as a null pointer constant; see 7.19. - -

67) The mapping functions for converting a pointer to an integer or an integer to a pointer are intended to +

66) The macro NULL is defined in <stddef.h> (and other headers) as a null pointer constant; see 7.19. + +

67) The mapping functions for converting a pointer to an integer or an integer to a pointer are intended to be consistent with the addressing structure of the execution environment. - -

68) In general, the concept ''correctly aligned'' is transitive: if a pointer to type A is correctly aligned for a + +

68) In general, the concept ''correctly aligned'' is transitive: if a pointer to type A is correctly aligned for a pointer to type B, which in turn is correctly aligned for a pointer to type C, then a pointer to type A is correctly aligned for a pointer to type C. - +

6.4 Lexical elements

Syntax
@@ -3499,9 +3499,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.4.5).
footnotes
-

69) An additional category, placemarkers, is used internally in translation phase 4 (see 6.10.3.3); it cannot +

69) An additional category, placemarkers, is used internally in translation phase 4 (see 6.10.3.3); it cannot occur in source files. - +

6.4.1 Keywords

Syntax
@@ -3531,8 +3531,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. specifying imaginary types.70)
footnotes
-

70) One possible specification for imaginary types appears in annex G. - +

70) One possible specification for imaginary types appears in annex G. +

6.4.2 Identifiers

@@ -3589,11 +3589,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: universal character names (6.4.3), macro replacement (6.10.3).

footnotes
-

71) On systems in which linkers cannot accept extended characters, an encoding of the universal character +

71) On systems in which linkers cannot accept extended characters, an encoding of the universal character name may be used in forming valid external identifiers. For example, some otherwise unused character or sequence of characters may be used to encode the \u in a universal character name. Extended characters may produce a long external identifier. - +

6.4.2.2 Predefined identifiers
Semantics
@@ -3628,9 +3628,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

72) Since the name __func__ is reserved for any use by the implementation (7.1.3), if any other +

72) Since the name __func__ is reserved for any use by the implementation (7.1.3), if any other identifier is explicitly declared using the name __func__, the behavior is undefined. - +

6.4.3 Universal character names

Syntax
@@ -3664,13 +3664,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

73) The disallowed characters are the characters in the basic character set and the code positions reserved +

73) The disallowed characters are the characters in the basic character set and the code positions reserved by ISO/IEC 10646 for control characters, the character DELETE, and the S-zone (reserved for use by UTF-16). - -

74) Short identifiers for characters were first specified in ISO/IEC 10646-1/AMD9:1997. - + +

74) Short identifiers for characters were first specified in ISO/IEC 10646-1/AMD9:1997. +

6.4.4 Constants

Syntax
@@ -3870,12 +3870,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

75) 1.23, 1.230, 123e-2, 123e-02, and 1.23L are all different source forms and thus need not +

75) 1.23, 1.230, 123e-2, 123e-02, and 1.23L are all different source forms and thus need not convert to the same internal format and value. - -

76) The specification for the library functions recommends more accurate conversion than required for + +

76) The specification for the library functions recommends more accurate conversion than required for floating constants (see 7.22.1.3). - +

6.4.4.3 Enumeration constants
Syntax
@@ -4026,9 +4026,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.22.7.2), Unicode utilities <uchar.h> (7.27).
footnotes
-

77) The semantics of these characters were discussed in 5.2.2. If any other character follows a backslash, +

77) The semantics of these characters were discussed in 5.2.2. If any other character follows a backslash, the result is not a token and a diagnostic is required. See ''future language directions'' (6.11.4). - +

6.4.5 String literals

Syntax
@@ -4131,9 +4131,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. function (7.22.8.1), Unicode utilities <uchar.h> (7.27).
footnotes
-

78) A string literal need not be a string (see 7.1.1), because a null character may be embedded in it by a +

78) A string literal need not be a string (see 7.1.1), because a null character may be embedded in it by a \0 escape sequence. - +

6.4.6 Punctuators

Syntax
@@ -4167,11 +4167,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.10), statements (6.8).
footnotes
-

79) These tokens are sometimes called ''digraphs''. - -

80) Thus [ and <: behave differently when ''stringized'' (see 6.10.3.2), but can otherwise be freely +

79) These tokens are sometimes called ''digraphs''. + +

80) Thus [ and <: behave differently when ''stringized'' (see 6.10.3.2), but can otherwise be freely interchanged. - +

6.4.7 Header names

Syntax
@@ -4223,10 +4223,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: source file inclusion (6.10.2).

footnotes
-

81) Thus, sequences of characters that resemble escape sequences cause undefined behavior. - -

82) For an example of a header name preprocessing token used in a #pragma directive, see 6.10.9. - +

81) Thus, sequences of characters that resemble escape sequences cause undefined behavior. + +

82) For an example of a header name preprocessing token used in a #pragma directive, see 6.10.9. +

6.4.8 Preprocessing numbers

Syntax
@@ -4291,8 +4291,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

83) Thus, /* ... */ comments do not nest. - +

83) Thus, /* ... */ comments do not nest. +

6.5 Expressions

@@ -4359,7 +4359,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

84) This paragraph renders undefined statement expressions such as +

84) This paragraph renders undefined statement expressions such as

            i = ++i + 1;
@@ -4370,8 +4370,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
            i = i + 1;
            a[i] = i;
- -

85) The syntax specifies the precedence of operators in the evaluation of an expression, which is the same + +

85) The syntax specifies the precedence of operators in the evaluation of an expression, which is the same as the order of the major subclauses of this subclause, highest precedence first. Thus, for example, the expressions allowed as the operands of the binary + operator (6.5.6) are those expressions defined in 6.5.1 through 6.5.6. The exceptions are cast expressions (6.5.4) as operands of unary operators @@ -4380,24 +4380,24 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. - -

86) In an expression that is evaluated more than once during the execution of a program, unsequenced and + +

86) In an expression that is evaluated more than once during the execution of a program, unsequenced and indeterminately sequenced evaluations of its subexpressions need not be performed consistently in different evaluations. - -

87) Allocated objects have no declared type. - -

88) The intent of this list is to specify those circumstances in which an object may or may not be aliased. - -

89) The intermediate operations in the contracted expression are evaluated as if to infinite precision and + +

87) Allocated objects have no declared type. + +

88) The intent of this list is to specify those circumstances in which an object may or may not be aliased. + +

89) The intermediate operations in the contracted expression are evaluated as if to infinite precision and range, while the final operation is rounded to the format determined by the expression evaluation method. A contracted expression might also omit the raising of floating-point exceptions. - -

90) This license is specifically intended to allow implementations to exploit fast machine instructions that + +

90) This license is specifically intended to allow implementations to exploit fast machine instructions that combine multiple C operators. As contractions potentially undermine predictability, and can even decrease accuracy for containing expressions, their use needs to be well-defined and clearly documented. - +

6.5.1 Primary expressions

Syntax
@@ -4427,8 +4427,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: declarations (6.7).

footnotes
-

91) Thus, an undeclared identifier is a violation of the syntax. - +

91) Thus, an undeclared identifier is a violation of the syntax. +

6.5.1.1 Generic selection
Syntax
@@ -4612,15 +4612,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. definitions (6.9.1), the return statement (6.8.6.4), simple assignment (6.5.16.1).
footnotes
-

92) Most often, this is the result of converting an identifier that is a function designator. - -

93) A function may change the values of its parameters, but these changes cannot affect the values of the +

92) Most often, this is the result of converting an identifier that is a function designator. + +

93) A function may change the values of its parameters, but these changes cannot affect the values of the arguments. On the other hand, it is possible to pass a pointer to an object, and the function may change the value of the object pointed to. A parameter declared to have array or function type is adjusted to have a pointer type as described in 6.9.1. - -

94) In other words, function executions do not ''interleave'' with each other. - + +

94) In other words, function executions do not ''interleave'' with each other. +

6.5.2.3 Structure and union members
Constraints
@@ -4727,18 +4727,18 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

95) If the member used to read the contents of a union object is not the same as the member last used to +

95) If the member used to read the contents of a union object is not the same as the member last used to store a value in the object, the appropriate part of the object representation of the value is reinterpreted as an object representation in the new type as described in 6.2.6 (a process sometimes called ''type punning''). This might be a trap representation. - -

96) If &E is a valid pointer expression (where & is the ''address-of '' operator, which generates a pointer to + +

96) If &E is a valid pointer expression (where & is the ''address-of '' operator, which generates a pointer to its operand), the expression (&E)->MOS is the same as E.MOS. - -

97) For example, a data race would occur if access to the entire structure or union in one thread conflicts + +

97) For example, a data race would occur if access to the entire structure or union in one thread conflicts with access to a member from another thread, where at least one access is a modification. Members can be safely accessed using a non-atomic object which is assigned to or from the atomic object. - +

6.5.2.4 Postfix increment and decrement operators
Constraints
@@ -4763,7 +4763,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: additive operators (6.5.6), compound assignment (6.5.16.2).

footnotes
-

98) Where a pointer to an atomic object can be formed, this is equivalent to the following code sequence +

98) Where a pointer to an atomic object can be formed, this is equivalent to the following code sequence where T is the type of E:

@@ -4773,7 +4773,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                  tmp = result + 1;
           } while (!atomic_compare_exchange_strong(&E, &result, tmp));
with result being the result of the operation. - +
6.5.2.5 Compound literals
Constraints
@@ -4897,14 +4897,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

99) Note that this differs from a cast expression. For example, a cast specifies a conversion to scalar types +

99) Note that this differs from a cast expression. For example, a cast specifies a conversion to scalar types or void only, and the result of a cast expression is not an lvalue. - -

100) For example, subobjects without explicit initializers are initialized to zero. - -

101) This allows implementations to share storage for string literals and constant compound literals with + +

100) For example, subobjects without explicit initializers are initialized to zero. + +

101) This allows implementations to share storage for string literals and constant compound literals with the same or overlapping representations. - +

6.5.3 Unary operators

Syntax
@@ -4966,14 +4966,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.7.2.1).
footnotes
-

102) Thus, &*E is equivalent to E (even if E is a null pointer), and &(E1[E2]) to ((E1)+(E2)). It is +

102) Thus, &*E is equivalent to E (even if E is a null pointer), and &(E1[E2]) to ((E1)+(E2)). It is always true that if E is a function designator or an lvalue that is a valid operand of the unary & operator, *&E is a function designator or an lvalue equal to E. If *P is an lvalue and T is the name of an object pointer type, *(T)P is an lvalue that has a type compatible with that to which T points. Among the invalid values for dereferencing a pointer by the unary * operator are a null pointer, an address inappropriately aligned for the type of object pointed to, and the address of an object after the end of its lifetime. - +

6.5.3.3 Unary arithmetic operators
Constraints
@@ -5070,9 +5070,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. structure and union specifiers (6.7.2.1), type names (6.7.7), array declarators (6.7.6.2).
footnotes
-

103) When applied to a parameter declared to have array or function type, the sizeof operator yields the +

103) When applied to a parameter declared to have array or function type, the sizeof operator yields the size of the adjusted (pointer) type (see 6.9.1). - +

6.5.4 Cast operators

Syntax
@@ -5107,9 +5107,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

104) A cast does not yield an lvalue. Thus, a cast to a qualified type has the same effect as a cast to the +

104) A cast does not yield an lvalue. Thus, a cast to a qualified type has the same effect as a cast to the unqualified version of the type. - +

6.5.5 Multiplicative operators

Syntax
@@ -5140,8 +5140,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. undefined.
footnotes
-

105) This is often called ''truncation toward zero''. - +

105) This is often called ''truncation toward zero''. +

6.5.6 Additive operators

Syntax
@@ -5235,7 +5235,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.19).
footnotes
-

106) Another way to approach pointer arithmetic is first to convert the pointer(s) to character pointer(s): In +

106) Another way to approach pointer arithmetic is first to convert the pointer(s) to character pointer(s): In this scheme the integer expression added to or subtracted from the converted pointer is first multiplied by the size of the object originally pointed to, and the resulting pointer is converted back to the original type. For pointer subtraction, the result of the difference between the character pointers is @@ -5243,7 +5243,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. When viewed in this way, an implementation need only provide one extra byte (which may overlap another object in the program) just after the end of the object in order to satisfy the ''one past the last element'' requirements. - +

6.5.7 Bitwise shift operators

Syntax
@@ -5320,9 +5320,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. false.107) The result has type int.
footnotes
-

107) The expression a<b<c is not interpreted as in ordinary mathematics. As the syntax indicates, it +

107) The expression a<b<c is not interpreted as in ordinary mathematics. As the syntax indicates, it means (a<b)<c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''. - +

6.5.9 Equality operators

Syntax
@@ -5376,14 +5376,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. type of the object as its element type.
footnotes
-

108) Because of the precedences, a<b == c<d is 1 whenever a<b and c<d have the same truth-value. - -

109) Two objects may be adjacent in memory because they are adjacent elements of a larger array or +

108) Because of the precedences, a<b == c<d is 1 whenever a<b and c<d have the same truth-value. + +

109) Two objects may be adjacent in memory because they are adjacent elements of a larger array or adjacent members of a structure with no padding between them, or because the implementation chose to place them so, even though they are unrelated. If prior invalid pointer operations (such as accesses outside array bounds) produced undefined behavior, subsequent comparisons also produce undefined behavior. - +

6.5.10 Bitwise AND operator

Syntax
@@ -5555,8 +5555,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

110) A conditional expression does not yield an lvalue. - +

110) A conditional expression does not yield an lvalue. +

6.5.16 Assignment operators

Syntax
@@ -5585,9 +5585,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

111) The implementation is permitted to read the object to determine the value but is not required to, even +

111) The implementation is permitted to read the object to determine the value but is not required to, even when the object has volatile-qualified type. - +

6.5.16.1 Simple assignment
Constraints
@@ -5666,11 +5666,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

112) The asymmetric appearance of these constraints with respect to type qualifiers is due to the conversion +

112) The asymmetric appearance of these constraints with respect to type qualifiers is due to the conversion (specified in 6.3.2.1) that changes lvalues to ''the value of the expression'' and thus removes any type qualifiers that were applied to the type category of the expression (for example, it removes const but not volatile from the type int volatile * const). - +

6.5.16.2 Compound assignment
Constraints
@@ -5695,7 +5695,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. semantics.113)
footnotes
-

113) Where a pointer to an atomic object can be formed, this is equivalent to the following code sequence +

113) Where a pointer to an atomic object can be formed, this is equivalent to the following code sequence where T is the type of E1:

@@ -5705,7 +5705,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                 result = tmp op (E2);
           } while (!atomic_compare_exchange_strong(&E1, &tmp, result));
with result being the result of the operation. - +

6.5.17 Comma operator

Syntax
@@ -5736,8 +5736,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

114) A comma operator does not yield an lvalue. - +

114) A comma operator does not yield an lvalue. +

6.6 Constant expressions

Syntax
@@ -5811,22 +5811,22 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

115) The operand of a sizeof operator is usually not evaluated (6.5.3.4). - -

116) The use of evaluation formats as characterized by FLT_EVAL_METHOD also applies to evaluation in +

115) The operand of a sizeof operator is usually not evaluated (6.5.3.4). + +

116) The use of evaluation formats as characterized by FLT_EVAL_METHOD also applies to evaluation in the translation environment. - -

117) An integer constant expression is required in a number of contexts such as the size of a bit-field + +

117) An integer constant expression is required in a number of contexts such as the size of a bit-field member of a structure, the value of an enumeration constant, and the size of a non-variable length array. Further constraints that apply to the integer constant expressions used in conditional-inclusion preprocessing directives are discussed in 6.10.1. - -

118) Thus, in the following initialization, + +

118) Thus, in the following initialization,

            static int i = 2 || 1 / 0;
the expression is a valid integer constant expression with value one. - +

6.7 Declarations

Syntax
@@ -5889,8 +5889,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.7.9), type names (6.7.7), type qualifiers (6.7.3).
footnotes
-

119) Function definitions have a different syntax, described in 6.9.1. - +

119) Function definitions have a different syntax, described in 6.9.1. +

6.7.1 Storage-class specifiers

Syntax
@@ -5936,15 +5936,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: type definitions (6.7.8).

footnotes
-

120) See ''future language directions'' (6.11.5). - -

121) The implementation may treat any register declaration simply as an auto declaration. However, +

120) See ''future language directions'' (6.11.5). + +

121) The implementation may treat any register declaration simply as an auto declaration. However, whether or not addressable storage is actually used, the address of any part of an object declared with storage-class specifier register cannot be computed, either explicitly (by use of the unary & operator as discussed in 6.5.3.2) or implicitly (by converting an array name to a pointer as discussed in 6.3.2.1). Thus, the only operator that can be applied to an array declared with storage-class specifier register is sizeof. - +

6.7.2 Type specifiers

Syntax
@@ -6231,21 +6231,21 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

122) While the number of bits in a _Bool object is at least CHAR_BIT, the width (number of sign and +

122) While the number of bits in a _Bool object is at least CHAR_BIT, the width (number of sign and value bits) of a _Bool may be just 1 bit. - -

123) A structure or union cannot contain a member with a variably modified type because member names + +

123) A structure or union cannot contain a member with a variably modified type because member names are not ordinary identifiers as defined in 6.2.3. - -

124) The unary & (address-of) operator cannot be applied to a bit-field object; thus, there are no pointers to + +

124) The unary & (address-of) operator cannot be applied to a bit-field object; thus, there are no pointers to or arrays of bit-field objects. - -

125) As specified in 6.7.2 above, if the actual type specifier used is int or a typedef-name defined as int, + +

125) As specified in 6.7.2 above, if the actual type specifier used is int or a typedef-name defined as int, then it is implementation-defined whether the bit-field is signed or unsigned. - -

126) An unnamed bit-field structure member is useful for padding to conform to externally imposed + +

126) An unnamed bit-field structure member is useful for padding to conform to externally imposed layouts. - +

6.7.2.2 Enumeration specifiers
Syntax
@@ -6301,12 +6301,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: tags (6.7.2.3).

footnotes
-

127) Thus, the identifiers of enumeration constants declared in the same scope shall all be distinct from +

127) Thus, the identifiers of enumeration constants declared in the same scope shall all be distinct from each other and from other identifiers declared in ordinary declarators. - -

128) An implementation may delay the choice of which integer type until all enumeration constants have + +

128) An implementation may delay the choice of which integer type until all enumeration constants have been seen. - +

6.7.2.3 Tags
Constraints
@@ -6418,18 +6418,18 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: declarators (6.7.6), type definitions (6.7.8).

footnotes
-

129) An incomplete type may only by used when the size of an object of that type is not needed. It is not +

129) An incomplete type may only by used when the size of an object of that type is not needed. It is not needed, for example, when a typedef name is declared to be a specifier for a structure or union, or when a pointer to or a function returning a structure or union is being declared. (See incomplete types in 6.2.5.) The specification has to be complete before such a function is called or defined. - -

130) If there is no identifier, the type can, within the translation unit, only be referred to by the declaration + +

130) If there is no identifier, the type can, within the translation unit, only be referred to by the declaration of which it is a part. Of course, when the declaration is of a typedef name, subsequent declarations can make use of that typedef name to declare objects having the specified structure, union, or enumerated type. - -

131) A similar construction with enum does not exist. - + +

131) A similar construction with enum does not exist. +

6.7.2.4 Atomic type specifiers
Syntax
@@ -6544,24 +6544,24 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

132) The implementation may place a const object that is not volatile in a read-only region of +

132) The implementation may place a const object that is not volatile in a read-only region of storage. Moreover, the implementation need not allocate storage for such an object if its address is never used. - -

133) This applies to those objects that behave as if they were defined with qualified types, even if they are + +

133) This applies to those objects that behave as if they were defined with qualified types, even if they are never actually defined as objects in the program (such as an object at a memory-mapped input/output address). - -

134) A volatile declaration may be used to describe an object corresponding to a memory-mapped + +

134) A volatile declaration may be used to describe an object corresponding to a memory-mapped input/output port or an object accessed by an asynchronously interrupting function. Actions on objects so declared shall not be ''optimized out'' by an implementation or reordered except as permitted by the rules for evaluating expressions. - -

135) For example, a statement that assigns a value returned by malloc to a single pointer establishes this + +

135) For example, a statement that assigns a value returned by malloc to a single pointer establishes this association between the allocated object and the pointer. - -

136) Both of these can occur through the use of typedefs. - + +

136) Both of these can occur through the use of typedefs. +

6.7.3.1 Formal definition of restrict

@@ -6674,11 +6674,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

137) In other words, E depends on the value of P itself rather than on the value of an object referenced +

137) In other words, E depends on the value of P itself rather than on the value of an object referenced indirectly through P. For example, if identifier p has type (int **restrict), then the pointer expressions p and p+1 are based on the restricted pointer object designated by p, but the pointer expressions *p and p[1] are not. - +

6.7.4 Function specifiers

Syntax
@@ -6769,21 +6769,21 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: function definitions (6.9.1).

footnotes
-

138) By using, for example, an alternative to the usual function call mechanism, such as ''inline +

138) By using, for example, an alternative to the usual function call mechanism, such as ''inline substitution''. Inline substitution is not textual substitution, nor does it create a new function. Therefore, for example, the expansion of a macro used within the body of the function uses the definition it had at the point the function body appears, and not where the function is called; and identifiers refer to the declarations in scope where the body occurs. Likewise, the function has a single address, regardless of the number of inline definitions that occur in addition to the external definition. - -

139) For example, an implementation might never perform inline substitution, or might only perform inline + +

139) For example, an implementation might never perform inline substitution, or might only perform inline substitutions to calls in the scope of an inline declaration. - -

140) Since an inline definition is distinct from the corresponding external definition and from any other + +

140) Since an inline definition is distinct from the corresponding external definition and from any other corresponding inline definitions in other translation units, all corresponding objects with static storage duration are also distinct in each of the definitions. - +

6.7.5 Alignment specifier

Syntax
@@ -6825,9 +6825,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

141) An alignment specification of zero also does not affect other alignment specifications in the same +

141) An alignment specification of zero also does not affect other alignment specifications in the same declaration. - +

6.7.6 Declarators

Syntax
@@ -7048,10 +7048,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. initialization (6.7.9).
footnotes
-

142) When several ''array of'' specifications are adjacent, a multidimensional array is declared. - -

143) Thus, * can be used only in function declarations that are not definitions (see 6.7.6.3). - +

142) When several ''array of'' specifications are adjacent, a multidimensional array is declared. + +

143) Thus, * can be used only in function declarations that are not definitions (see 6.7.6.3). +

6.7.6.3 Function declarators (including prototypes)
Constraints
@@ -7211,13 +7211,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

144) The macros defined in the <stdarg.h> header (7.16) may be used to access arguments that +

144) The macros defined in the <stdarg.h> header (7.16) may be used to access arguments that correspond to the ellipsis. - -

145) See ''future language directions'' (6.11.6). - -

146) If both function types are ''old style'', parameter types are not compared. - + +

145) See ''future language directions'' (6.11.6). + +

146) If both function types are ''old style'', parameter types are not compared. +

6.7.7 Type names

Syntax
@@ -7267,9 +7267,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

147) As indicated by the syntax, empty parentheses in a type name are interpreted as ''function with no +

147) As indicated by the syntax, empty parentheses in a type name are interpreted as ''function with no parameter specification'', rather than redundant parentheses around the omitted identifier. - +

6.7.8 Type definitions

Syntax
@@ -7670,21 +7670,21 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

148) If the initializer list for a subaggregate or contained union does not begin with a left brace, its +

148) If the initializer list for a subaggregate or contained union does not begin with a left brace, its subobjects are initialized as usual, but the subaggregate or contained union does not become the current object: current objects are associated only with brace-enclosed initializer lists. - -

149) After a union member is initialized, the next object is not the next member of the union; instead, it is + +

149) After a union member is initialized, the next object is not the next member of the union; instead, it is the next subobject of an object containing the union. - -

150) Thus, a designator can only specify a strict subobject of the aggregate or union that is associated with + +

150) Thus, a designator can only specify a strict subobject of the aggregate or union that is associated with the surrounding brace pair. Note, too, that each separate designator list is independent. - -

151) Any initializer for the subobject which is overridden and so not used to initialize that subobject might + +

151) Any initializer for the subobject which is overridden and so not used to initialize that subobject might not be evaluated at all. - -

152) In particular, the evaluation order need not be the same as the order of subobject initialization. - + +

152) In particular, the evaluation order need not be the same as the order of subobject initialization. +

6.7.10 Static assertions

Syntax
@@ -7828,8 +7828,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: iteration statements (6.8.5).

footnotes
-

153) Such as assignments, and function calls which have side effects. - +

153) Such as assignments, and function calls which have side effects. +

6.8.4 Selection statements

Syntax
@@ -7920,9 +7920,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

154) That is, the declaration either precedes the switch statement, or it follows the last case or +

154) That is, the declaration either precedes the switch statement, or it follows the last case or default label associated with the switch that is in the block containing the declaration. - +

6.8.5 Iteration statements

Syntax
@@ -7958,14 +7958,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. terminate.157)
footnotes
-

155) Code jumped over is not executed. In particular, the controlling expression of a for or while +

155) Code jumped over is not executed. In particular, the controlling expression of a for or while statement is not evaluated before entering the loop body, nor is clause-1 of a for statement. - -

156) An omitted controlling expression is replaced by a nonzero constant, which is a constant expression. - -

157) This is intended to allow compiler transformations such as removal of empty loops even when + +

156) An omitted controlling expression is replaced by a nonzero constant, which is a constant expression. + +

157) This is intended to allow compiler transformations such as removal of empty loops even when termination cannot be proven. - +

6.8.5.1 The while statement

@@ -7994,11 +7994,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. nonzero constant.

footnotes
-

158) Thus, clause-1 specifies initialization for the loop, possibly declaring one or more variables for use in +

158) Thus, clause-1 specifies initialization for the loop, possibly declaring one or more variables for use in the loop; the controlling expression, expression-2, specifies an evaluation made before each iteration, such that execution of the loop continues until the expression compares equal to 0; and expression-3 specifies an operation (such as incrementing) that is performed after each iteration. - +

6.8.6 Jump statements

Syntax
@@ -8093,8 +8093,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. case it is interpreted within that statement), it is equivalent to goto contin;.159)
footnotes
-

159) Following the contin: label is a null statement. - +

159) Following the contin: label is a null statement. +

6.8.6.3 The break statement
Constraints
@@ -8153,10 +8153,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

160) The return statement is not an assignment. The overlap restriction of subclause 6.5.16.1 does not +

160) The return statement is not an assignment. The overlap restriction of subclause 6.5.16.1 does not apply to the case of function return. The representation of floating-point values may have wider range or precision than implied by the type; a cast may be used to remove this extra range and precision. - +

6.9 External definitions

Syntax
@@ -8199,9 +8199,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

161) Thus, if an identifier declared with external linkage is not used in an expression, there need be no +

161) Thus, if an identifier declared with external linkage is not used in an expression, there need be no external definition for it. - +

6.9.1 Function definitions

Syntax
@@ -8316,7 +8316,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

162) The intent is that the type category in a function definition cannot be inherited from a typedef: +

162) The intent is that the type category in a function definition cannot be inherited from a typedef:

           typedef int F(void);                          //   type F is ''function with no parameters
@@ -8330,11 +8330,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
           F *((e))(void) { /* ... */ }                  //   same: parentheses irrelevant
           int (*fp)(void);                              //   fp points to a function that has type F
           F *Fp;                                        //   Fp points to a function that has type F
- -

163) See ''future language directions'' (6.11.7). - -

164) A parameter identifier cannot be redeclared in the function body except in an enclosed block. - + +

163) See ''future language directions'' (6.11.7). + +

164) A parameter identifier cannot be redeclared in the function body except in an enclosed block. +

6.9.2 External object definitions

Semantics
@@ -8481,10 +8481,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

165) Thus, preprocessing directives are commonly called ''lines''. These ''lines'' have no other syntactic +

165) Thus, preprocessing directives are commonly called ''lines''. These ''lines'' have no other syntactic significance, as all white space is equivalent except in certain situations during preprocessing (see the # character string literal creation operator in 6.10.3.2, for example). - +

6.10.1 Conditional inclusion

Constraints
@@ -8559,22 +8559,22 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. integer types (7.20.1.5).
footnotes
-

166) Because the controlling constant expression is evaluated during translation phase 4, all identifiers +

166) Because the controlling constant expression is evaluated during translation phase 4, all identifiers either are or are not macro names -- there simply are no keywords, enumeration constants, etc. - -

167) Thus, on an implementation where INT_MAX is 0x7FFF and UINT_MAX is 0xFFFF, the constant + +

167) Thus, on an implementation where INT_MAX is 0x7FFF and UINT_MAX is 0xFFFF, the constant 0x8000 is signed and positive within a #if expression even though it would be unsigned in translation phase 7. - -

168) Thus, the constant expression in the following #if directive and if statement is not guaranteed to + +

168) 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) - -

169) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive + +

169) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive before the terminating new-line character. However, comments may appear anywhere in a source file, including within a preprocessing directive. - +

6.10.2 Source file inclusion

Constraints
@@ -8651,9 +8651,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: macro replacement (6.10.3).

footnotes
-

170) Note that adjacent string literals are not concatenated into a single string literal (see the translation +

170) Note that adjacent string literals are not concatenated into a single string literal (see the translation phases in 5.1.1.2); thus, an expansion that results in two string literals is an invalid directive. - +

6.10.3 Macro replacement

Constraints
@@ -8738,12 +8738,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. definition (excluding the ...).
footnotes
-

171) Since, by macro-replacement time, all character constants and string literals are preprocessing tokens, +

171) Since, by macro-replacement time, all character constants and string literals are preprocessing tokens, not sequences possibly containing identifier-like subsequences (see 5.1.1.2, translation phases), they are never scanned for macro names or parameters. - -

172) Despite the name, a non-directive is a preprocessing directive. - + +

172) Despite the name, a non-directive is a preprocessing directive. +

6.10.3.1 Argument substitution

@@ -8829,9 +8829,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

173) Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that +

173) Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that exist only within translation phase 4. - +

6.10.3.4 Rescanning and further replacement

@@ -9069,14 +9069,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

174) An implementation is not required to perform macro replacement in pragmas, but it is permitted +

174) An implementation is not required to perform macro replacement in pragmas, but it is permitted except for in standard pragmas (where STDC immediately follows pragma). If the result of macro replacement in a non-standard pragma has the same form as a standard pragma, the behavior is still implementation-defined; an implementation is permitted to behave as if it were the standard pragma, but is not required to. - -

175) See ''future language directions'' (6.11.8). - + +

175) See ''future language directions'' (6.11.8). +

6.10.7 Null directive

Semantics
@@ -9101,8 +9101,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: standard headers (7.1.2).

footnotes
-

176) See ''future language directions'' (6.11.9). - +

176) See ''future language directions'' (6.11.9). +

6.10.8.1 Mandatory macros

@@ -9136,13 +9136,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: the asctime function (7.26.3.1).

footnotes
-

177) The presumed source file name and line number can be changed by the #line directive. - -

178) This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in +

177) The presumed source file name and line number can be changed by the #line directive. + +

178) This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in ISO/IEC 9899/AMD1:1995 and as 199901L in ISO/IEC 9899:1999. The intention is that this will remain an integer constant of type long int that is increased with each revision of this International Standard. - +

6.10.8.2 Environment macros

@@ -9212,9 +9212,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. __STDC_IEC_559_COMPLEX__.

footnotes
-

179) The intention is that this will remain an integer constant of type long int that is increased with +

179) The intention is that this will remain an integer constant of type long int that is increased with each revision of this International Standard. - +

6.10.9 Pragma operator

Semantics
@@ -9332,14 +9332,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

180) The functions that make use of the decimal-point character are the numeric conversion functions +

180) The functions that make use of the decimal-point character are the numeric conversion functions (7.22.1, 7.28.4.1) and the formatted input/output functions (7.21.6, 7.28.2). - -

181) For state-dependent encodings, the values for MB_CUR_MAX and MB_LEN_MAX shall thus be large + +

181) For state-dependent encodings, the values for MB_CUR_MAX and MB_LEN_MAX shall thus be large enough to count all the bytes in any complete multibyte character plus at least one adjacent shift sequence of maximum length. Whether these counts provide for more than one shift sequence is the implementation's choice. - +

7.1.2 Standard headers

@@ -9389,12 +9389,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: diagnostics (7.2).

footnotes
-

182) A header is not necessarily a source file, nor are the < and > delimited sequences in header names +

182) A header is not necessarily a source file, nor are the < and > delimited sequences in header names necessarily valid source file names. - -

183) The headers <complex.h>, <stdatomic.h>, and <threads.h> are conditional features that + +

183) The headers <complex.h>, <stdatomic.h>, and <threads.h> are conditional features that implementations need not support; see 6.10.8.3. - +

7.1.3 Reserved identifiers

@@ -9431,9 +9431,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

184) The list of reserved identifiers with external linkage includes math_errhandling, setjmp, +

184) The list of reserved identifiers with external linkage includes math_errhandling, setjmp, va_copy, and va_end. - +

7.1.4 Use of library functions

@@ -9523,12 +9523,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

185) This means that an implementation shall provide an actual function for each library function, even if it +

185) This means that an implementation shall provide an actual function for each library function, even if it also provides a macro for that function. - -

186) Such macros might not contain the sequence points that the corresponding function calls do. - -

187) Because external identifiers and some macro names beginning with an underscore are reserved, + +

186) Such macros might not contain the sequence points that the corresponding function calls do. + +

187) Because external identifiers and some macro names beginning with an underscore are reserved, implementations may provide special semantics for such names. For example, the identifier _BUILTIN_abs could be used to indicate generation of in-line code for the abs function. Thus, the appropriate header could specify @@ -9544,15 +9544,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. whether the implementation's header provides a macro implementation of abs or a built-in implementation. The prototype for the function, which precedes and is hidden by any macro definition, is thereby revealed also. - -

188) Thus, a signal handler cannot, in general, call standard library functions. - -

189) This means, for example, that an implementation is not permitted to use a static object for internal + +

188) Thus, a signal handler cannot, in general, call standard library functions. + +

189) This means, for example, that an implementation is not permitted to use a static object for internal purposes without synchronization because it could cause a data race even in programs that do not explicitly share objects between threads. - -

190) This allows implementations to parallelize operations if there are no visible side effects. - + +

190) This allows implementations to parallelize operations if there are no visible side effects. +

7.2 Diagnostics

@@ -9606,9 +9606,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

191) The message written might be of the form: +

191) The message written might be of the form: Assertion failed: expression, function abc, file xyz, line nnn. - +

7.3 Complex arithmetic

@@ -9657,12 +9657,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: IEC 60559-compatible complex arithmetic (annex G).

footnotes
-

192) See ''future library directions'' (7.30.1). - -

193) The imaginary unit is a number i such that i 2 = -1. - -

194) A specification for imaginary types is in informative annex G. - +

192) See ''future library directions'' (7.30.1). + +

193) The imaginary unit is a number i such that i 2 = -1. + +

194) A specification for imaginary types is in informative annex G. +

7.3.2 Conventions

@@ -9713,7 +9713,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. undefined. The default state for the pragma is ''off''.

footnotes
-

195) The purpose of the pragma is to allow the implementation to use the formulas: +

195) The purpose of the pragma is to allow the implementation to use the formulas:

     (x + iy) x (u + iv) = (xu - yv) + i(yu + xv)
@@ -9721,7 +9721,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
     | x + iy | = (sqrt) x 2 + y 2
                  -----
where the programmer can determine they are safe. - +

7.3.5 Trigonometric functions

@@ -10054,8 +10054,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The cimag functions return the imaginary part value (as a real).
footnotes
-

196) For a variable z of complex type, z == creal(z) + cimag(z)*I. - +

196) For a variable z of complex type, z == creal(z) + cimag(z)*I. +

7.3.9.3 The CMPLX macros
Synopsis
@@ -10150,8 +10150,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

197) For a variable z of complex type, z == creal(z) + cimag(z)*I. - +

197) For a variable z of complex type, z == creal(z) + cimag(z)*I. +

7.4 Character handling

@@ -10170,12 +10170,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: EOF (7.21.1), localization (7.11).

footnotes
-

198) See ''future library directions'' (7.30.2). - -

199) In an implementation that uses the seven-bit US ASCII character set, the printing characters are those +

198) See ''future library directions'' (7.30.2). + +

199) In an implementation that uses the seven-bit US ASCII character set, the printing characters are those whose values lie from 0x20 (space) through 0x7E (tilde); the control characters are those whose values lie from 0 (NUL) through 0x1F (US), and the character 0x7F (DEL). - +

7.4.1 Character classification functions

@@ -10210,9 +10210,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. isalpha returns true only for the characters for which isupper or islower is true.

footnotes
-

200) The functions islower and isupper test true or false separately for each of these additional +

200) The functions islower and isupper test true or false separately for each of these additional characters; all four combinations are possible. - +

7.4.1.3 The isblank function
Synopsis
@@ -10407,16 +10407,16 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

201) The macro errno need not be the identifier of an object. It might expand to a modifiable lvalue +

201) The macro errno need not be the identifier of an object. It might expand to a modifiable lvalue resulting from a function call (for example, *errno()). - -

202) Thus, a program that uses errno for error checking should set it to zero before a library function call, + +

202) Thus, a program that uses errno for error checking should set it to zero before a library function call, then inspect it before a subsequent library function call. Of course, a library function can save the value of errno on entry and then set it to zero, as long as the original value is restored if errno's value is still zero just before the return. - -

203) See ''future library directions'' (7.30.3). - + +

203) See ''future library directions'' (7.30.3). +

7.6 Floating-point environment

@@ -10511,25 +10511,25 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. also be specified by the implementation.

footnotes
-

204) This header is designed to support the floating-point exception status flags and directed-rounding +

204) This header is designed to support the floating-point exception status flags and directed-rounding control modes required by IEC 60559, and other similar floating-point state information. It is also designed to facilitate code portability among all systems. - -

205) A floating-point status flag is not an object and can be set more than once within an expression. - -

206) With these conventions, a programmer can safely assume default floating-point control modes (or be + +

205) A floating-point status flag is not an object and can be set more than once within an expression. + +

206) With these conventions, a programmer can safely assume default floating-point control modes (or be unaware of them). The responsibilities associated with accessing the floating-point environment fall on the programmer or program that does so explicitly. - -

207) The implementation supports a floating-point exception if there are circumstances where a call to at + +

207) The implementation supports a floating-point exception if there are circumstances where a call to at least one of the functions in 7.6.2, using the macro as the appropriate argument, will succeed. It is not necessary for all the functions to succeed all the time. - -

208) The macros should be distinct powers of two. - -

209) Even though the rounding direction macros may expand to constants corresponding to the values of + +

208) The macros should be distinct powers of two. + +

209) Even though the rounding direction macros may expand to constants corresponding to the values of FLT_ROUNDS, they are not required to do so. - +

7.6.1 The FENV_ACCESS pragma

Synopsis
@@ -10583,15 +10583,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

210) The purpose of the FENV_ACCESS pragma is to allow certain optimizations that could subvert flag +

210) The purpose of the FENV_ACCESS pragma is to allow certain optimizations that could subvert flag tests and mode changes (e.g., global common subexpression elimination, code motion, and constant folding). In general, if the state of FENV_ACCESS is ''off'', the translator can assume that default modes are in effect and the flags are not tested. - -

211) The side effects impose a temporal ordering that requires two evaluations of x + 1. On the other + +

211) The side effects impose a temporal ordering that requires two evaluations of x + 1. On the other hand, without the #pragma STDC FENV_ACCESS ON pragma, and assuming the default state is ''off'', just one evaluation of x + 1 would suffice. - +

7.6.2 Floating-point exceptions

@@ -10602,12 +10602,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. functions is undefined.

footnotes
-

212) The functions fetestexcept, feraiseexcept, and feclearexcept support the basic +

212) The functions fetestexcept, feraiseexcept, and feclearexcept support the basic abstraction of flags that are either set or clear. An implementation may endow floating-point status flags with more information -- for example, the address of the code which first raised the floating- point exception; the functions fegetexceptflag and fesetexceptflag deal with the full content of flags. - +

7.6.2.1 The feclearexcept function
Synopsis
@@ -10668,10 +10668,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

213) The effect is intended to be similar to that of floating-point exceptions raised by arithmetic operations. +

213) The effect is intended to be similar to that of floating-point exceptions raised by arithmetic operations. Hence, enabled traps for floating-point exceptions raised by this function are taken. The specification in F.8.6 is in the same spirit. - +

7.6.2.4 The fesetexceptflag function
Synopsis
@@ -10733,8 +10733,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

214) This mechanism allows testing several floating-point exceptions with just one function call. - +

214) This mechanism allows testing several floating-point exceptions with just one function call. +

7.6.3 Rounding

@@ -10831,11 +10831,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. exception handling was successfully installed.

footnotes
-

215) IEC 60559 systems have a default non-stop mode, and typically at least one other mode for trap +

215) IEC 60559 systems have a default non-stop mode, and typically at least one other mode for trap handling or aborting; if the system provides only the non-stop mode then installing it is trivial. For such systems, the feholdexcept function can be used in conjunction with the feupdateenv function to write routines that hide spurious floating-point exceptions from their callers. - +

7.6.4.3 The fesetenv function
Synopsis
@@ -10923,8 +10923,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. functions (7.21.6), formatted wide character input/output functions (7.28.2).
footnotes
-

216) See ''future library directions'' (7.30.4). - +

216) See ''future library directions'' (7.30.4). +

7.8.1 Macros for format specifiers

@@ -10984,10 +10984,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

217) Separate macros are given for use with fprintf and fscanf functions because, in the general case, +

217) Separate macros are given for use with fprintf and fscanf functions because, in the general case, different format specifiers may be required for fprintf and fscanf, even when the type is the same. - +

7.8.2 Functions for greatest-width integer types

@@ -11011,8 +11011,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

218) The absolute value of the most negative number cannot be represented in two's complement. - +

218) The absolute value of the most negative number cannot be represented in two's complement. +

7.8.2.2 The imaxdiv function
Synopsis
@@ -11161,10 +11161,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. implementation.
footnotes
-

219) ISO/IEC 9945-2 specifies locale and charmap formats that may be used to specify locales for C. - -

220) See ''future library directions'' (7.30.5). - +

219) ISO/IEC 9945-2 specifies locale and charmap formats that may be used to specify locales for C. + +

220) See ''future library directions'' (7.30.5). +

7.11.1 Locale control

@@ -11224,12 +11224,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. strftime function (7.26.3.5), the strxfrm function (7.23.4.5).
footnotes
-

221) The only functions in 7.4 whose behavior is not affected by the current locale are isdigit and +

221) The only functions in 7.4 whose behavior is not affected by the current locale are isdigit and isxdigit. - -

222) The implementation shall arrange to encode in a string the various categories due to a heterogeneous + +

222) The implementation shall arrange to encode in a string the various categories due to a heterogeneous locale when category has the value LC_ALL. - +

7.11.2 Numeric formatting convention inquiry

@@ -11563,22 +11563,22 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. <fenv.h>.
footnotes
-

223) Particularly on systems with wide expression evaluation, a <math.h> function might pass arguments +

223) Particularly on systems with wide expression evaluation, a <math.h> function might pass arguments and return values in wider format than the synopsis prototype indicates. - -

224) The types float_t and double_t are intended to be the implementation's most efficient types at + +

224) The types float_t and double_t are intended to be the implementation's most efficient types at least as wide as float and double, respectively. For FLT_EVAL_METHOD equal 0, 1, or 2, the type float_t is the narrowest type used by the implementation to evaluate floating expressions. - -

225) HUGE_VAL, HUGE_VALF, and HUGE_VALL can be positive infinities in an implementation that + +

225) HUGE_VAL, HUGE_VALF, and HUGE_VALL can be positive infinities in an implementation that supports infinities. - -

226) In this case, using INFINITY will violate the constraint in 6.4.4 and thus require a diagnostic. - -

227) Typically, the FP_FAST_FMA macro is defined if and only if the fma function is implemented + +

226) In this case, using INFINITY will violate the constraint in 6.4.4 and thus require a diagnostic. + +

227) Typically, the FP_FAST_FMA macro is defined if and only if the fma function is implemented directly with a hardware multiply-add instruction. Software implementations are expected to be substantially slower. - +

7.12.1 Treatment of error conditions

@@ -11644,14 +11644,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

228) In an implementation that supports infinities, this allows an infinity as an argument to be a domain +

228) In an implementation that supports infinities, this allows an infinity as an argument to be a domain error if the mathematical domain of the function does not include the infinity. - -

229) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and + +

229) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and also ''flush-to-zero'' underflow. - -

230) Math errors are being indicated by the floating-point exception flags rather than by errno. - + +

230) Math errors are being indicated by the floating-point exception flags rather than by errno. +

7.12.2 The FP_CONTRACT pragma

Synopsis
@@ -11700,10 +11700,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

231) Since an expression can be evaluated with more range and precision than its type has, it is important to +

231) Since an expression can be evaluated with more range and precision than its type has, it is important to know the type that classification is based on. For example, a normal long double value might become subnormal when converted to double, and zero when converted to float. - +

7.12.3.2 The isfinite macro
Synopsis
@@ -11757,9 +11757,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The isnan macro returns a nonzero value if and only if its argument has a NaN value.
footnotes
-

232) For the isnan macro, the type for determination does not matter unless the implementation supports +

232) For the isnan macro, the type for determination does not matter unless the implementation supports NaNs in the evaluation type but not in the semantic type. - +

7.12.3.5 The isnormal macro
Synopsis
@@ -11798,9 +11798,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

233) The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is +

233) The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is unsigned, it is treated as positive. - +

7.12.4 Trigonometric functions

@@ -12066,8 +12066,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The expm1 functions return ex - 1.
footnotes
-

234) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. - +

234) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. +

7.12.6.4 The frexp functions
Synopsis
@@ -12186,8 +12186,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

235) For small magnitude x, log1p(x) is expected to be more accurate than log(1 + x). - +

235) For small magnitude x, log1p(x) is expected to be more accurate than log(1 + x). +

7.12.6.10 The log2 functions
Synopsis
@@ -12626,11 +12626,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. or the functions return zero is implementation defined.
footnotes
-

236) ''When y != 0, the remainder r = x REM y is defined regardless of the rounding mode by the +

236) ''When y != 0, the remainder r = x REM y is defined regardless of the rounding mode by the mathematical relation r = x - ny, where n is the integer nearest the exact value of x/y; whenever | n - x/y | = 1/2, then n is even. If r = 0, its sign shall be that of x.'' This definition is applicable for * all implementations. - +

7.12.10.3 The remquo functions
Synopsis
@@ -12720,9 +12720,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

237) The argument values are converted to the type of the function, even by a macro implementation of the +

237) The argument values are converted to the type of the function, even by a macro implementation of the function. - +

7.12.11.4 The nexttoward functions
Synopsis
@@ -12739,9 +12739,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. type of the function if x equals y.238)
footnotes
-

238) The result of the nexttoward functions is determined in the type of the function, without loss of +

238) The result of the nexttoward functions is determined in the type of the function, without loss of range or precision in a floating second argument. - +

7.12.12 Maximum, minimum, and positive difference functions

@@ -12785,9 +12785,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fmax functions return the maximum numeric value of their arguments.
footnotes
-

239) NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the +

239) NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the fmax functions choose the numeric value. See F.10.9.2. - +

7.12.12.3 The fmin functions
Synopsis
@@ -12805,8 +12805,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fmin functions return the minimum numeric value of their arguments.
footnotes
-

240) The fmin functions are analogous to the fmax functions in their treatment of NaNs. - +

240) The fmin functions are analogous to the fmax functions in their treatment of NaNs. +

7.12.13 Floating multiply-add

@@ -12847,16 +12847,16 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. expression of real floating type242) (both arguments need not have the same type).243)
footnotes
-

241) IEC 60559 requires that the built-in relational operators raise the ''invalid'' floating-point exception if +

241) IEC 60559 requires that the built-in relational operators raise the ''invalid'' floating-point exception if the operands compare unordered, as an error indicator for programs written without consideration of NaNs; the result in these cases is false. - -

242) If any argument is of integer type, or any other type that is not a real floating type, the behavior is + +

242) If any argument is of integer type, or any other type that is not a real floating type, the behavior is undefined. - -

243) Whether an argument represented in a format wider than its semantic type is converted to the semantic + +

243) Whether an argument represented in a format wider than its semantic type is converted to the semantic type is unspecified. - +

7.12.14.1 The isgreater macro
Synopsis
@@ -12979,9 +12979,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. program defines an external identifier with the name setjmp, the behavior is undefined.
footnotes
-

244) These functions are useful for dealing with unusual conditions encountered in a low-level function of +

244) These functions are useful for dealing with unusual conditions encountered in a low-level function of a program. - +

7.13.1 Save calling environment

@@ -13080,11 +13080,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. }
footnotes
-

245) For example, by executing a return statement or because another longjmp call has caused a +

245) For example, by executing a return statement or because another longjmp call has caused a transfer to a setjmp invocation in a function earlier in the set of nested calls. - -

246) This includes, but is not limited to, the floating-point status flags and the state of open files. - + +

246) This includes, but is not limited to, the floating-point status flags and the state of open files. +

7.14 Signal handling

@@ -13129,10 +13129,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

247) See ''future library directions'' (7.30.6). The names of the signal numbers reflect the following terms +

247) See ''future library directions'' (7.30.6). The names of the signal numbers reflect the following terms (respectively): abort, floating-point exception, illegal instruction, interrupt, segmentation violation, and termination. - +

7.14.1 Specify signal handling

@@ -13197,11 +13197,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. _Exit function (7.22.4.5), the quick_exit function (7.22.4.7).
footnotes
-

248) This includes functions called indirectly via standard library functions (e.g., a SIGABRT handler +

248) This includes functions called indirectly via standard library functions (e.g., a SIGABRT handler called via the abort function). - -

249) If any signal is generated by an asynchronous signal handler, the behavior is undefined. - + +

249) If any signal is generated by an asynchronous signal handler, the behavior is undefined. +

7.14.2 Send signal

@@ -13259,9 +13259,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. macro prior to any further reference to ap.250)
footnotes
-

250) It is permitted to create a pointer to a va_list and pass that pointer to another function, in which +

250) It is permitted to create a pointer to a va_list and pass that pointer to another function, in which case the original function may make further use of the original list after the other function returns. - +

7.16.1 Variable argument list access macros

@@ -13661,8 +13661,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. amount of time.

footnotes
-

251) Among other implications, atomic variables shall not decay. - +

251) Among other implications, atomic variables shall not decay. +

7.17.3.1 The kill_dependency macro
Synopsis
@@ -14078,8 +14078,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

252) See ''future library directions'' (7.30.7). - +

252) See ''future library directions'' (7.30.7). +

7.19 Common definitions

@@ -14156,10 +14156,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (described as ''optional'').

footnotes
-

253) See ''future library directions'' (7.30.8). - -

254) Some of these types may denote implementation-defined extended integer types. - +

253) See ''future library directions'' (7.30.8). + +

254) Some of these types may denote implementation-defined extended integer types. +

7.20.1 Integer types

@@ -14231,10 +14231,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. All other types of this form are optional.

footnotes
-

255) The designated type is not guaranteed to be fastest for all purposes; if the implementation has no clear +

255) The designated type is not guaranteed to be fastest for all purposes; if the implementation has no clear grounds for choosing one type over another, it will simply pick some integer type satisfying the signedness and width requirements. - +

7.20.1.4 Integer types capable of holding object pointers

@@ -14389,11 +14389,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. shall be 0 and the value of WINT_MAX shall be no less than 65535.

footnotes
-

256) A freestanding implementation need not provide all of these types. - -

257) The values WCHAR_MIN and WCHAR_MAX do not necessarily correspond to members of the extended +

256) A freestanding implementation need not provide all of these types. + +

257) The values WCHAR_MIN and WCHAR_MAX do not necessarily correspond to members of the extended character set. - +

7.20.4 Macros for integer constants

@@ -14530,11 +14530,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. tmpnam function (7.21.4.4), <wchar.h> (7.28).

footnotes
-

258) If the implementation imposes no practical limit on the length of file name strings, the value of +

258) If the implementation imposes no practical limit on the length of file name strings, the value of FILENAME_MAX should instead be the recommended size of an array intended to hold a file name string. Of course, file name string contents are subject to other system-specific constraints; therefore all possible strings of length FILENAME_MAX cannot be expected to be opened successfully. - +

7.21.2 Streams

@@ -14607,12 +14607,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

259) An implementation need not distinguish between text streams and binary streams. In such an +

259) An implementation need not distinguish between text streams and binary streams. In such an implementation, there need be no new-line characters in a text stream nor any limit to the length of a line. - -

260) The three predefined streams stdin, stdout, and stderr are unoriented at program startup. - + +

260) The three predefined streams stdin, stdout, and stderr are unoriented at program startup. +

7.21.3 Files

@@ -14721,10 +14721,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.28.6.3.2), the wcrtomb function (7.28.6.3.3).

footnotes
-

261) Setting the file position indicator to end-of-file, as with fseek(file, 0, SEEK_END), has +

261) Setting the file position indicator to end-of-file, as with fseek(file, 0, SEEK_END), has undefined behavior for a binary stream (because of possible trailing null characters) or for any stream with state-dependent encoding that does not assuredly end in the initial shift state. - +

7.21.4 Operations on files

@@ -14763,9 +14763,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which case if the file existed previously it is still known by its original name.
footnotes
-

262) Among the reasons the implementation may cause the rename function to fail are that the file is open +

262) Among the reasons the implementation may cause the rename function to fail are that the file is open or that it is necessary to copy its contents to effectuate its renaming. - +

7.21.4.3 The tmpfile function
Synopsis
@@ -14825,11 +14825,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The value of the macro TMP_MAX shall be at least 25.
footnotes
-

263) Files created using strings generated by the tmpnam function are temporary only in the sense that +

263) Files created using strings generated by the tmpnam function are temporary only in the sense that their names should not collide with those generated by conventional naming rules for the implementation. It is still necessary to use the remove function to remove such files when their use is ended, and before program termination. - +

7.21.5 File access functions

@@ -14942,10 +14942,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

264) If the string begins with one of the above sequences, the implementation might choose to ignore the +

264) If the string begins with one of the above sequences, the implementation might choose to ignore the remaining characters, or it might use them to select different kinds of a file (some of which might not conform to the properties in 7.21.2). - +

7.21.5.4 The freopen function
Synopsis
@@ -14975,10 +14975,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. freopen returns the value of stream.
footnotes
-

265) The primary use of the freopen function is to change the file associated with a standard text stream +

265) The primary use of the freopen function is to change the file associated with a standard text stream (stderr, stdin, or stdout), as those identifiers need not be modifiable lvalues to which the value returned by the fopen function may be assigned. - +

7.21.5.5 The setbuf function
Synopsis
@@ -15033,9 +15033,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

266) The buffer has to have a lifetime at least as great as the open stream, so the stream should be closed +

266) The buffer has to have a lifetime at least as great as the open stream, so the stream should be closed before a buffer that has automatic storage duration is deallocated upon block exit. - +

7.21.6 Formatted input/output functions

@@ -15043,8 +15043,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. actions associated with each specifier.267)

footnotes
-

267) The fprintf functions perform writes to memory for the %n specifier. - +

267) The fprintf functions perform writes to memory for the %n specifier. +

7.21.6.1 The fprintf function
Synopsis
@@ -15393,32 +15393,32 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

268) Note that 0 is taken as a flag, not as the beginning of a field width. - -

269) The results of all floating conversions of a negative zero, and of negative values that round to zero, +

268) Note that 0 is taken as a flag, not as the beginning of a field width. + +

269) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign. - -

270) When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning; + +

270) When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning; the # and 0 flag characters have no effect. - -

271) Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so + +

271) 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. - -

272) The precision p is sufficient to distinguish values of the source type if 16 p-1 > b n where b is + +

272) The precision p is sufficient to distinguish values of the source type if 16 p-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. - -

273) No special provisions are made for multibyte characters. - -

274) Redundant shift sequences may result if multibyte characters have a state-dependent encoding. - -

275) See ''future library directions'' (7.30.9). - -

276) For binary-to-decimal conversion, the result format's values are the numbers representable with the + +

273) No special provisions are made for multibyte characters. + +

274) Redundant shift sequences may result if multibyte characters have a state-dependent encoding. + +

275) See ''future library directions'' (7.30.9). + +

276) For binary-to-decimal conversion, the result format's values are the numbers representable with the given format specifier. The number of significant digits is determined by the format specifier, and in the case of fixed-point conversion by the source value as well. - +

7.21.6.2 The fscanf function
Synopsis
@@ -15777,17 +15777,17 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.28.6), the wcrtomb function (7.28.6.3.3).
footnotes
-

277) These white-space characters are not counted against a specified field width. - -

278) fscanf pushes back at most one input character onto the input stream. Therefore, some sequences +

277) These white-space characters are not counted against a specified field width. + +

278) fscanf pushes back at most one input character onto the input stream. Therefore, some sequences that are acceptable to strtod, strtol, etc., are unacceptable to fscanf. - -

279) No special provisions are made for multibyte characters in the matching rules used by the c, s, and [ + +

279) No special provisions are made for multibyte characters in the matching rules used by the c, s, and [ conversion specifiers -- the extent of the input field is determined on a byte-by-byte basis. The resulting field is nevertheless a sequence of multibyte characters that begins in the initial shift state. - -

280) See ''future library directions'' (7.30.9). - + +

280) See ''future library directions'' (7.30.9). +

7.21.6.3 The printf function
Synopsis
@@ -15925,9 +15925,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

281) As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and +

281) As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and vsscanf invoke the va_arg macro, the value of arg after the return is indeterminate. - +

7.21.6.9 The vfscanf function
Synopsis
@@ -16083,8 +16083,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns EOF.282)
footnotes
-

282) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. - +

282) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. +

7.21.7.2 The fgets function
Synopsis
@@ -16262,8 +16262,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: file positioning functions (7.21.9).

footnotes
-

283) See ''future library directions'' (7.30.9). - +

283) See ''future library directions'' (7.30.9). +

7.21.8 Direct input/output functions

@@ -16540,8 +16540,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

284) See ''future library directions'' (7.30.10). - +

284) See ''future library directions'' (7.30.10). +

7.22.1 Numeric conversion functions

@@ -16688,17 +16688,17 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. errno acquires the value ERANGE is implementation-defined.

footnotes
-

285) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by +

285) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by negating the value resulting from converting the corresponding unsigned sequence (see F.5); the two methods may yield different results if rounding is toward positive or negative infinity. In either case, the functions honor the sign of zero if floating-point arithmetic supports signed zeros. - -

286) An implementation may use the n-char sequence to determine extra information to be represented in + +

286) An implementation may use the n-char sequence to determine extra information to be represented in the NaN's significand. - -

287) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round + +

287) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round to the same internal floating value, but if not will round to adjacent values. - +

7.22.1.4 The strtol, strtoll, strtoul, and strtoull functions
Synopsis
@@ -16798,10 +16798,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The value of the RAND_MAX macro shall be at least 32767.
footnotes
-

288) There are no guarantees as to the quality of the random sequence produced and some implementations +

288) There are no guarantees as to the quality of the random sequence produced and some implementations are known to produce sequences with distressingly non-random low-order bits. Applications with particular requirements should use a generator that is known to be sufficient for their needs. - +

7.22.2.2 The srand function
Synopsis
@@ -16889,9 +16889,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The calloc function returns either a null pointer or a pointer to the allocated space.
footnotes
-

289) Note that this need not be the same as the representation of floating-point zero or a null pointer +

289) Note that this need not be the same as the representation of floating-point zero or a null pointer constant. - +

7.22.3.3 The free function
Synopsis
@@ -16995,9 +16995,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.22.4.4).
footnotes
-

290) The atexit function registrations are distinct from the at_quick_exit registrations, so +

290) The atexit function registrations are distinct from the at_quick_exit registrations, so applications may need to call both registration functions with the same argument. - +

7.22.4.3 The at_quick_exit function
Synopsis
@@ -17022,9 +17022,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

291) The at_quick_exit function registrations are distinct from the atexit registrations, so +

291) The at_quick_exit function registrations are distinct from the atexit registrations, so applications may need to call both registration functions with the same argument. - +

7.22.4.4 The exit function
Synopsis
@@ -17058,9 +17058,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The exit function cannot return to its caller.
footnotes
-

292) Each function is called as many times as it was registered, and in the correct order with respect to +

292) Each function is called as many times as it was registered, and in the correct order with respect to other registered functions. - +

7.22.4.5 The _Exit function
Synopsis
@@ -17107,8 +17107,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. be found, a null pointer is returned.
footnotes
-

293) Many implementations provide non-standard functions that modify the environment list. - +

293) Many implementations provide non-standard functions that modify the environment list. +

7.22.4.7 The quick_exit function
Synopsis
@@ -17139,9 +17139,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The quick_exit function cannot return to its caller.
footnotes
-

294) Each function is called as many times as it was registered, and in the correct order with respect to +

294) Each function is called as many times as it was registered, and in the correct order with respect to other registered functions. - +

7.22.4.8 The system function
Synopsis
@@ -17195,14 +17195,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. movement of the objects passed as arguments to that call.
footnotes
-

295) That is, if the value passed is p, then the following expressions are always nonzero: +

295) That is, if the value passed is p, then the following expressions are always nonzero:

           ((char *)p - (char *)base) % size == 0
           (char *)p >= (char *)base
           (char *)p < (char *)base + nmemb * size
- +
7.22.5.1 The bsearch function
Synopsis
@@ -17234,8 +17234,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. matched is unspecified.
footnotes
-

296) In practice, the entire array is sorted according to the comparison function. - +

296) In practice, the entire array is sorted according to the comparison function. +

7.22.5.2 The qsort function
Synopsis
@@ -17284,8 +17284,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

297) The absolute value of the most negative number cannot be represented in two's complement. - +

297) The absolute value of the most negative number cannot be represented in two's complement. +

7.22.6.2 The div, ldiv, and lldiv functions
Synopsis
@@ -17319,9 +17319,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. category causes the conversion state of these functions to be indeterminate.
footnotes
-

298) If the locale employs special bytes to change the shift state, these bytes do not produce separate wide +

298) If the locale employs special bytes to change the shift state, these bytes do not produce separate wide character codes, but are grouped with an adjacent multibyte character. - +

7.22.7.1 The mblen function
Synopsis
@@ -17445,8 +17445,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. elements modified, not including a terminating null wide character, if any.299)
footnotes
-

299) The array will not be null-terminated if the value returned is n. - +

299) The array will not be null-terminated if the value returned is n. +

7.22.8.2 The wcstombs function
Synopsis
@@ -17503,8 +17503,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. different value).
footnotes
-

300) See ''future library directions'' (7.30.11). - +

300) See ''future library directions'' (7.30.11). +

7.23.2 Copying functions

@@ -17586,9 +17586,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The strncpy function returns the value of s1.
footnotes
-

301) Thus, if there is no null character in the first n characters of the array pointed to by s2, the result will +

301) Thus, if there is no null character in the first n characters of the array pointed to by s2, the result will not be null-terminated. - +

7.23.3 Concatenation functions

@@ -17632,9 +17632,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: the strlen function (7.23.6.3).

footnotes
-

302) Thus, the maximum number of characters that can end up in the array pointed to by s1 is +

302) Thus, the maximum number of characters that can end up in the array pointed to by s1 is strlen(s1)+n+1. - +

7.23.4 Comparison functions

@@ -17660,10 +17660,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. pointed to by s2.

footnotes
-

303) The contents of ''holes'' used as padding for purposes of alignment within structure objects are +

303) The contents of ''holes'' used as padding for purposes of alignment within structure objects are indeterminate. Strings shorter than their allocated space and unions may also cause problems in comparison. - +

7.23.4.2 The strcmp function
Synopsis
@@ -18079,12 +18079,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. cproj(ldc) cprojl(ldc)
footnotes
-

304) Like other function-like macros in Standard libraries, each type-generic macro can be suppressed to +

304) Like other function-like macros in Standard libraries, each type-generic macro can be suppressed to make available the corresponding ordinary function. - -

305) If the type of the argument is not compatible with the type of the parameter for the selected function, + +

305) If the type of the argument is not compatible with the type of the parameter for the selected function, the behavior is undefined. - +

7.25 Threads

@@ -18632,9 +18632,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

306) Although an xtime object describes times with nanosecond resolution, the actual resolution in an +

306) Although an xtime object describes times with nanosecond resolution, the actual resolution in an xtime object is system dependent. - +

7.26 Date and time

@@ -18686,8 +18686,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Saving Time is not in effect, and negative if the information is not available.
footnotes
-

307) The range [0, 60] for tm_sec allows for a positive leap second. - +

307) The range [0, 60] for tm_sec allows for a positive leap second. +

7.26.2 Time manipulation functions

@@ -18710,9 +18710,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the value (clock_t)(-1).308)
footnotes
-

308) In order to measure the time spent in a program, the clock function should be called at the start of +

308) In order to measure the time spent in a program, the clock function should be called at the start of the program and its return value subtracted from the value returned by subsequent calls. - +

7.26.2.2 The difftime function
Synopsis
@@ -18785,10 +18785,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

309) Thus, a positive or zero value for tm_isdst causes the mktime function to presume initially that +

309) Thus, a positive or zero value for tm_isdst causes the mktime function to presume initially that Daylight Saving Time, respectively, is or is not in effect for the specified time. A negative value causes it to attempt to determine whether Daylight Saving Time is in effect for the specified time. - +

7.26.2.4 The time function
Synopsis
@@ -18859,8 +18859,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The asctime function returns a pointer to the string.
footnotes
-

310) See 7.26.1. - +

310) See 7.26.1. +

7.26.3.2 The ctime function
Synopsis
@@ -19169,9 +19169,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. and the conversion state is unspecified.
footnotes
-

311) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a +

311) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a sequence of redundant shift sequences (for implementations with state-dependent encodings). - +

7.27.1.2 The c16rtomb function
Synopsis
@@ -19253,9 +19253,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. and the conversion state is unspecified.
footnotes
-

312) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a +

312) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a sequence of redundant shift sequences (for implementations with state-dependent encodings). - +

7.27.1.4 The c32rtomb function
Synopsis
@@ -19341,12 +19341,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. undefined.
footnotes
-

313) See ''future library directions'' (7.30.12). - -

314) wchar_t and wint_t can be the same integer type. - -

315) The value of the macro WEOF may differ from that of EOF and need not be negative. - +

313) See ''future library directions'' (7.30.12). + +

314) wchar_t and wint_t can be the same integer type. + +

315) The value of the macro WEOF may differ from that of EOF and need not be negative. +

7.28.2 Formatted wide character input/output functions

@@ -19354,8 +19354,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. point after the actions associated with each specifier.316)

footnotes
-

316) The fwprintf functions perform writes to memory for the %n specifier. - +

316) The fwprintf functions perform writes to memory for the %n specifier. +

7.28.2.1 The fwprintf function
Synopsis
@@ -19669,28 +19669,28 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.28.6.3.2).
footnotes
-

317) Note that 0 is taken as a flag, not as the beginning of a field width. - -

318) The results of all floating conversions of a negative zero, and of negative values that round to zero, +

317) Note that 0 is taken as a flag, not as the beginning of a field width. + +

318) The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign. - -

319) When applied to infinite and NaN values, the -, +, and space flag wide characters have their usual + +

319) When applied to infinite and NaN values, the -, +, and space flag wide characters have their usual meaning; the # and 0 flag wide characters have no effect. - -

320) Binary implementations can choose the hexadecimal digit to the left of the decimal-point wide + +

320) 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. - -

321) The precision p is sufficient to distinguish values of the source type if 16 p-1 > b n where b is + +

321) The precision p is sufficient to distinguish values of the source type if 16 p-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. - -

322) See ''future library directions'' (7.30.12). - -

323) For binary-to-decimal conversion, the result format's values are the numbers representable with the + +

322) See ''future library directions'' (7.30.12). + +

323) For binary-to-decimal conversion, the result format's values are the numbers representable with the given format specifier. The number of significant digits is determined by the format specifier, and in the case of fixed-point conversion by the source value as well. - +

7.28.2.2 The fwscanf function
Synopsis
@@ -19955,13 +19955,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. function (7.28.6.3.3).
footnotes
-

324) These white-space wide characters are not counted against a specified field width. - -

325) fwscanf pushes back at most one input wide character onto the input stream. Therefore, some +

324) These white-space wide characters are not counted against a specified field width. + +

325) fwscanf pushes back at most one input wide character onto the input stream. Therefore, some sequences that are acceptable to wcstod, wcstol, etc., are unacceptable to fwscanf. - -

326) See ''future library directions'' (7.30.12). - + +

326) See ''future library directions'' (7.30.12). +

7.28.2.3 The swprintf function
Synopsis
@@ -20048,9 +20048,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

327) As the functions vfwprintf, vswprintf, vfwscanf, vwprintf, vwscanf, and vswscanf +

327) As the functions vfwprintf, vswprintf, vfwscanf, vwprintf, vwscanf, and vswscanf invoke the va_arg macro, the value of arg after the return is indeterminate. - +

7.28.2.6 The vfwscanf function
Synopsis
@@ -20219,9 +20219,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the macro EILSEQ is stored in errno and the fgetwc function returns WEOF.328)
footnotes
-

328) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. +

328) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. Also, errno will be set to EILSEQ by input/output functions only if an encoding error occurs. - +

7.28.3.2 The fgetws function
Synopsis
@@ -20306,8 +20306,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. stream has no orientation.
footnotes
-

329) If the orientation of the stream has already been determined, fwide does not change it. - +

329) If the orientation of the stream has already been determined, fwide does not change it. +

7.28.3.6 The getwc function
Synopsis
@@ -20539,17 +20539,17 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

330) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by +

330) It is unspecified whether a minus-signed sequence is converted to a negative number directly or by negating the value resulting from converting the corresponding unsigned sequence (see F.5); the two methods may yield different results if rounding is toward positive or negative infinity. In either case, the functions honor the sign of zero if floating-point arithmetic supports signed zeros. - -

331) An implementation may use the n-wchar sequence to determine extra information to be represented in + +

331) An implementation may use the n-wchar sequence to determine extra information to be represented in the NaN's significand. - -

332) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round + +

332) DECIMAL_DIG, defined in <float.h>, should be sufficiently large that L and U will usually round to the same internal floating value, but if not will round to adjacent values. - +

7.28.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions
Synopsis
@@ -20665,9 +20665,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wcsncpy function returns the value of s1.
footnotes
-

333) Thus, if there is no null wide character in the first n wide characters of the array pointed to by s2, the +

333) Thus, if there is no null wide character in the first n wide characters of the array pointed to by s2, the result will not be null-terminated. - +

7.28.4.2.3 The wmemcpy function
Synopsis
@@ -20747,9 +20747,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wcsncat function returns the value of s1.
footnotes
-

334) Thus, the maximum number of wide characters that can end up in the array pointed to by s1 is +

334) Thus, the maximum number of wide characters that can end up in the array pointed to by s1 is wcslen(s1)+n+1. - +

7.28.4.4 Wide string comparison functions

@@ -21123,10 +21123,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

335) Thus, a particular mbstate_t object can be used, for example, with both the mbrtowc and +

335) Thus, a particular mbstate_t object can be used, for example, with both the mbrtowc and mbsrtowcs functions as long as they are used to step sequentially through the same multibyte character string. - +

7.28.6.1 Single-byte/wide character conversion functions
@@ -21264,9 +21264,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

336) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a +

336) When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a sequence of redundant shift sequences (for implementations with state-dependent encodings). - +

7.28.6.3.3 The wcrtomb function
Synopsis
@@ -21353,8 +21353,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

337) Thus, the value of len is ignored if dst is a null pointer. - +

337) Thus, the value of len is ignored if dst is a null pointer. +

7.28.6.4.2 The wcsrtombs function
Synopsis
@@ -21397,9 +21397,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

338) If conversion stops because a terminating null wide character has been reached, the bytes stored +

338) If conversion stops because a terminating null wide character has been reached, the bytes stored include those necessary to reach the initial shift state immediately before the null byte. - +

7.29 Wide character classification and mapping utilities

@@ -21444,8 +21444,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

339) See ''future library directions'' (7.30.13). - +

339) See ''future library directions'' (7.30.13). +

7.29.2 Wide character classification utilities

@@ -21470,11 +21470,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: the wctob function (7.28.6.1.2).

footnotes
-

340) For example, if the expression isalpha(wctob(wc)) evaluates to true, then the call +

340) For example, if the expression isalpha(wctob(wc)) evaluates to true, then the call iswalpha(wc) also returns true. But, if the expression isgraph(wctob(wc)) evaluates to true (which cannot occur for wc == L' ' of course), then either iswgraph(wc) or iswprint(wc) && iswspace(wc) is true, but not both. - +

7.29.2.1.1 The iswalnum function
Synopsis
@@ -21503,9 +21503,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. is true.341)
footnotes
-

341) The functions iswlower and iswupper test true or false separately for each of these additional +

341) The functions iswlower and iswupper test true or false separately for each of these additional wide characters; all four combinations are possible. - +

7.29.2.1.3 The iswblank function
Synopsis
@@ -21559,10 +21559,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. iswspace is false.342)
footnotes
-

342) Note that the behavior of the iswgraph and iswpunct functions may differ from their +

342) Note that the behavior of the iswgraph and iswpunct functions may differ from their corresponding functions in 7.4.1 with respect to printing, white-space, single-byte execution characters other than ' '. - +

7.29.2.1.7 The iswlower function
Synopsis
@@ -23906,9 +23906,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. within the range of representable values.
footnotes
-

343) Implementations that do not define __STDC_IEC_559__ are not required to conform to these +

343) Implementations that do not define __STDC_IEC_559__ are not required to conform to these specifications. - +

F.2 Types

@@ -23931,12 +23931,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The long double type should match an IEC 60559 extended format.

footnotes
-

344) ''Extended'' is IEC 60559's double-extended data format. Extended refers to both the common 80-bit +

344) ''Extended'' is IEC 60559's double-extended data format. Extended refers to both the common 80-bit and quadruple 128-bit IEC 60559 formats. - -

345) A non-IEC 60559 long double type is required to provide infinity and NaNs, as its values include + +

345) A non-IEC 60559 long double type is required to provide infinity and NaNs, as its values include all double values. - +

F.2.1 Infinities, signed zeros, and NaNs

@@ -23945,9 +23945,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. functions in <math.h> provide designations for IEC 60559 NaNs and infinities.

footnotes
-

346) Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are +

346) Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are sufficient for closure of the arithmetic. - +

F.3 Operators and functions

@@ -24042,12 +24042,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. unspecified.347)

footnotes
-

347) ANSI/IEEE 854, but not IEC 60559 (ANSI/IEEE 754), directly specifies that floating-to-integer +

347) ANSI/IEEE 854, but not IEC 60559 (ANSI/IEEE 754), directly specifies that floating-to-integer conversions raise the ''inexact'' floating-point exception for non-integer in-range values. In those cases where it matters, library functions can be used to effect such conversions with or without raising the ''inexact'' floating-point exception. See rint, lrint, llrint, and nearbyint in <math.h>. - +

F.5 Binary-decimal conversion

@@ -24070,11 +24070,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. unsigned sequence.

footnotes
-

348) If the minimum-width IEC 60559 extended format (64 bits of precision) is supported, +

348) If the minimum-width IEC 60559 extended format (64 bits of precision) is supported, DECIMAL_DIG shall be at least 21. If IEC 60559 double (53 bits of precision) is the widest IEC 60559 format supported, then DECIMAL_DIG shall be at least 17. (By contrast, LDBL_DIG and DBL_DIG are 18 and 15, respectively, for these formats.) - +

F.6 The return statement

If the return expression is evaluated in a floating-point format different from the return @@ -24082,8 +24082,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. and the resulting value is returned to the caller.
footnotes
-

349) Assignment removes any extra range and precision. - +

349) Assignment removes any extra range and precision. +

F.7 Contracted expressions

@@ -24103,8 +24103,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. implementation supports them.350)

footnotes
-

350) This specification does not require dynamic rounding precision nor trap enablement modes. - +

350) This specification does not require dynamic rounding precision nor trap enablement modes. +

F.8.1 Environment management

@@ -24120,10 +24120,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

351) If the state for the FENV_ACCESS pragma is ''off'', the implementation is free to assume the floating- +

351) If the state for the FENV_ACCESS pragma is ''off'', the implementation is free to assume the floating- point control modes will be the default ones and the floating-point status flags will not be tested, which allows certain optimizations (see F.9). - +

F.8.2 Translation

@@ -24140,11 +24140,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. proceed with the translation of the program.

footnotes
-

352) As floating constants are converted to appropriate internal representations at translation time, their +

352) As floating constants are converted to appropriate internal representations at translation time, their conversion is subject to default rounding modes and raises no execution-time floating-point exceptions (even where the state of the FENV_ACCESS pragma is ''on''). Library functions, for example strtod, provide execution-time conversion of numeric strings. - +

F.8.3 Execution

@@ -24189,14 +24189,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

353) Where the state for the FENV_ACCESS pragma is ''on'', results of inexact expressions like 1.0/3.0 +

353) Where the state for the FENV_ACCESS pragma is ''on'', results of inexact expressions like 1.0/3.0 are affected by rounding modes set at execution time, and expressions such as 0.0/0.0 and 1.0/0.0 generate execution-time floating-point exceptions. The programmer can achieve the efficiency of translation-time evaluation through static initialization, such as

           const static double one_third = 1.0/3.0;
- +

F.8.5 Initialization

@@ -24236,13 +24236,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

354) Use of float_t and double_t variables increases the likelihood of translation-time computation. +

354) Use of float_t and double_t variables increases the likelihood of translation-time computation. For example, the automatic initialization

           double_t x = 1.1e75;
could be done at translation time, regardless of the expression evaluation method. - +

F.8.6 Changing the environment

@@ -24335,10 +24335,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

355) Strict support for signaling NaNs -- not required by this specification -- would invalidate these and +

355) Strict support for signaling NaNs -- not required by this specification -- would invalidate these and other transformations that remove arithmetic operators. - -

356) IEC 60559 prescribes a signed zero to preserve mathematical identities across certain discontinuities. + +

356) IEC 60559 prescribes a signed zero to preserve mathematical identities across certain discontinuities. Examples include:

@@ -24348,7 +24348,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
 
     conj(csqrt(z)) is csqrt(conj(z)),
for complex z. - +

F.9.3 Relational operators

@@ -24414,8 +24414,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. point exception when converted to the semantic type of the operation.

footnotes
-

357) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward. - +

357) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward. +

F.10 Mathematics

@@ -24473,12 +24473,12 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. for the sign.

footnotes
-

358) IEC 60559 allows different definitions of underflow. They all result in the same values, but differ on +

358) IEC 60559 allows different definitions of underflow. They all result in the same values, but differ on when the floating-point exception is raised. - -

359) It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if + +

359) It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if avoiding them would be too costly. - +

F.10.1 Trigonometric functions

@@ -24527,9 +24527,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

360) atan2(0, 0) does not raise the ''invalid'' floating-point exception, nor does atan2( y , 0) raise +

360) atan2(0, 0) does not raise the ''invalid'' floating-point exception, nor does atan2( y , 0) raise the ''divide-by-zero'' floating-point exception. - +

F.10.1.5 The cos functions

@@ -25066,9 +25066,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. isnan(y)) ? x : y; }

footnotes
-

361) Ideally, fmax would be sensitive to the sign of zero, for example fmax(-0.0, +0.0) would +

361) Ideally, fmax would be sensitive to the sign of zero, for example fmax(-0.0, +0.0) would return +0; however, implementation in software might be impractical. - +

F.10.9.3 The fmin functions

@@ -25118,9 +25118,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. __STDC_IEC_559_COMPLEX__ shall conform to the specifications in this annex.362)

footnotes
-

362) Implementations that do not define __STDC_IEC_559_COMPLEX__ are not required to conform +

362) Implementations that do not define __STDC_IEC_559_COMPLEX__ are not required to conform to these specifications. - +

G.2 Types

@@ -25169,8 +25169,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. imaginary zero.

footnotes
-

363) See 6.3.1.2. - +

363) See 6.3.1.2. +

G.4.3 Imaginary and complex

@@ -25366,9 +25366,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

364) These properties are already implied for those cases covered in the tables, but are required for all cases +

364) These properties are already implied for those cases covered in the tables, but are required for all cases (at least where the state for CX_LIMITED_RANGE is ''off''). - +

G.5.2 Additive operators

Semantics
@@ -25457,9 +25457,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

365) As noted in G.3, a complex value with at least one infinite part is regarded as an infinity even if its +

365) As noted in G.3, a complex value with at least one infinite part is regarded as an infinity even if its other part is a NaN. - +

G.6.1 Trigonometric functions

@@ -25678,9 +25678,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the parts of the result, and may also raise spurious floating-point exceptions.366)
footnotes
-

366) This allows cpow( z , c ) to be implemented as cexp(c clog( z )) without precluding +

366) This allows cpow( z , c ) to be implemented as cexp(c clog( z )) without precluding implementations that treat special cases more carefully. - +

G.6.4.2 The csqrt functions

@@ -27096,9 +27096,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. subclauses of clause 7.

footnotes
-

367) Implementations that do not define __STDC_LIB_EXT1__ are not required to conform to these +

367) Implementations that do not define __STDC_LIB_EXT1__ are not required to conform to these specifications. - +

K.3 Library

@@ -27130,15 +27130,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

368) Future revisions of this International Standard may define meanings for other values of +

368) Future revisions of this International Standard may define meanings for other values of __STDC_WANT_LIB_EXT1__. - -

369) Subclause 7.1.3 reserves certain names and patterns of names that an implementation may use in + +

369) Subclause 7.1.3 reserves certain names and patterns of names that an implementation may use in headers. All other names are not reserved, and a conforming implementation is not permitted to use them. While some of the names defined in K.3 and its subclauses are reserved, others are not. If an unreserved name is defined in a header when __STDC_WANT_LIB_EXT1__ is defined as 0, the implementation is not conforming. - +

K.3.1.2 Reserved identifiers

@@ -27187,11 +27187,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

footnotes
-

370) Although runtime-constraints replace many cases of undefined behavior, undefined behavior still +

370) Although runtime-constraints replace many cases of undefined behavior, undefined behavior still exists in this annex. Implementations are free to detect any case of undefined behavior and treat it as a runtime-constraint violation by calling the runtime-constraint handler. This license comes directly from the definition of undefined behavior. - +

K.3.2 Errors

@@ -27203,10 +27203,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which is type int.371)

footnotes
-

371) As a matter of programming style, errno_t may be used as the type of something that deals only +

371) As a matter of programming style, errno_t may be used as the type of something that deals only with the values that might be found in errno. For example, a function which returns the value of errno might be declared as having the return type errno_t. - +

K.3.3 Common definitions

@@ -27218,8 +27218,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which is the type size_t.372)

footnotes
-

372) See the description of the RSIZE_MAX macro in <stdint.h>. - +

372) See the description of the RSIZE_MAX macro in <stdint.h>. +

K.3.4 Integer types

@@ -27249,8 +27249,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. is no object size that is considered a runtime-constraint violation.

footnotes
-

373) The macro RSIZE_MAX need not expand to a constant expression. - +

373) The macro RSIZE_MAX need not expand to a constant expression. +

K.3.5 Input/output

@@ -27363,17 +27363,17 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The value of the macro TMP_MAX_S shall be at least 25.

footnotes
-

374) Files created using strings generated by the tmpnam_s function are temporary only in the sense that +

374) Files created using strings generated by the tmpnam_s function are temporary only in the sense that their names should not collide with those generated by conventional naming rules for the implementation. It is still necessary to use the remove function to remove such files when their use is ended, and before program termination. Implementations should take care in choosing the patterns used for names returned by tmpnam_s. For example, making a thread id part of the names avoids the race condition and possible conflict when multiple programs run simultaneously by the same user generate the same temporary file names. - -

375) An implementation may have tmpnam call tmpnam_s (perhaps so there is only one naming + +

375) An implementation may have tmpnam call tmpnam_s (perhaps so there is only one naming convention for temporary files), but this is not required. - +

K.3.5.2 File access functions
@@ -27457,8 +27457,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. there was a runtime-constraint violation, fopen_s returns a nonzero value.
footnotes
-

376) These are the same permissions that the file would have been created with by fopen. - +

376) These are the same permissions that the file would have been created with by fopen. +

K.3.5.2.2 The freopen_s function
Synopsis
@@ -27541,14 +27541,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

377) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

377) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - -

378) Because an implementation may treat any undefined behavior as a runtime-constraint violation, an + +

378) Because an implementation may treat any undefined behavior as a runtime-constraint violation, an implementation may treat any unsupported specifiers in the string pointed to by format as a runtime- constraint violation. - +

K.3.5.3.2 The fscanf_s function
Synopsis
@@ -27616,11 +27616,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

379) Because an implementation may treat any undefined behavior as a runtime-constraint violation, an +

379) Because an implementation may treat any undefined behavior as a runtime-constraint violation, an implementation may treat any unsupported specifiers in the string pointed to by format as a runtime- constraint violation. - -

380) If the format is known at translation time, an implementation may issue a diagnostic for any argument + +

380) If the format is known at translation time, an implementation may issue a diagnostic for any argument used to store the result from a c, s, or [ conversion specifier if that argument is not followed by an argument of a type compatible with rsize_t. A limited amount of checking may be done if even if the format is not known at translation time. For example, an implementation may issue a diagnostic @@ -27630,7 +27630,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. using the hh length modifier, a length argument must follow the pointer argument. Another useful diagnostic could flag any non-pointer argument following format that did not have a type compatible with rsize_t. - +

K.3.5.3.3 The printf_s function
Synopsis
@@ -27661,10 +27661,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. value if an output error, encoding error, or runtime-constraint violation occurred.
footnotes
-

381) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

381) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.4 The scanf_s function
Synopsis
@@ -27728,10 +27728,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. less than n.
footnotes
-

382) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

382) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.6 The sprintf_s function
Synopsis
@@ -27772,10 +27772,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. constraint violation occurred, sprintf_s returns zero.
footnotes
-

383) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

383) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.7 The sscanf_s function
Synopsis
@@ -27837,10 +27837,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. value if an output error, encoding error, or runtime-constraint violation occurred.
footnotes
-

384) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

384) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.9 The vfscanf_s function
Synopsis
@@ -27879,10 +27879,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. than provided for, or even zero, in the event of an early matching failure.
footnotes
-

385) As the functions vfprintf_s, vfscanf_s, vprintf_s, vscanf_s, vsnprintf_s, +

385) As the functions vfprintf_s, vfscanf_s, vprintf_s, vscanf_s, vsnprintf_s, vsprintf_s, and vsscanf_s invoke the va_arg macro, the value of arg after the return is indeterminate. - +

K.3.5.3.10 The vprintf_s function
Synopsis
@@ -27914,10 +27914,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. value if an output error, encoding error, or runtime-constraint violation occurred.
footnotes
-

386) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

386) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.11 The vscanf_s function
Synopsis
@@ -27955,10 +27955,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

387) As the functions vfprintf_s, vfscanf_s, vprintf_s, vscanf_s, vsnprintf_s, +

387) As the functions vfprintf_s, vfscanf_s, vprintf_s, vscanf_s, vsnprintf_s, vsprintf_s, and vsscanf_s invoke the va_arg macro, the value of arg after the return is indeterminate. - +

K.3.5.3.12 The vsnprintf_s function
Synopsis
@@ -28002,10 +28002,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

388) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

388) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.13 The vsprintf_s function
Synopsis
@@ -28049,10 +28049,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

389) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed +

389) It is not a runtime-constraint violation for the characters %n to appear in sequence in the string pointed at by format when those characters are not a interpreted as a %n specifier. For example, if the entire format string was %%n. - +

K.3.5.3.14 The vsscanf_s function
Synopsis
@@ -28086,10 +28086,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. provided for, or even zero, in the event of an early matching failure.
footnotes
-

390) As the functions vfprintf_s, vfscanf_s, vprintf_s, vscanf_s, vsnprintf_s, +

390) As the functions vfprintf_s, vfscanf_s, vprintf_s, vscanf_s, vsnprintf_s, vsprintf_s, and vsscanf_s invoke the va_arg macro, the value of arg after the return is indeterminate. - +

K.3.5.4 Character input/output functions
@@ -28144,11 +28144,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

391) The gets_s function, unlike the historical gets function, makes it a runtime-constraint violation for +

391) The gets_s function, unlike the historical gets function, makes it a runtime-constraint violation for a line of input to overflow the buffer to store it. Unlike the fgets function, gets_s maintains a one-to-one relationship between input lines and successful calls to gets_s. Programs that use gets expect such a relationship. - +

K.3.6 General utilities

@@ -28210,9 +28210,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. registered handler.392)

footnotes
-

392) If the previous handler was registered by calling set_constraint_handler_s with a null +

392) If the previous handler was registered by calling set_constraint_handler_s with a null pointer argument, a pointer to the implementation default handler is returned (not NULL). - +

K.3.6.1.2 The abort_handler_s function
Synopsis
@@ -28242,8 +28242,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

393) Many implementations invoke a debugger when the abort function is called. - +

393) Many implementations invoke a debugger when the abort function is called. +

K.3.6.1.3 The ignore_handler_s function
Synopsis
@@ -28266,11 +28266,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The ignore_handler_s function returns no value.
footnotes
-

394) If the runtime-constraint handler is set to the ignore_handler_s function, any library function in +

394) If the runtime-constraint handler is set to the ignore_handler_s function, any library function in which a runtime-constraint violation occurs will return to its caller. The caller can determine whether a runtime-constraint violation occurred based on the library function's specification (usually, the library function returns a nonzero errno_t). - +

K.3.6.2 Communication with the environment
@@ -28347,13 +28347,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. movement of the objects passed as arguments to that call.
footnotes
-

395) That is, if the value passed is p, then the following expressions are always valid and nonzero: +

395) That is, if the value passed is p, then the following expressions are always valid and nonzero:

           ((char *)p - (char *)base) % size == 0
           (char *)p >= (char *)base
           (char *)p < (char *)base + nmemb * size
- +
K.3.6.3.1 The bsearch_s function
Synopsis
@@ -28400,11 +28400,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. compare as equal, which element is matched is unspecified.
footnotes
-

396) In practice, this means that the entire array has been sorted according to the comparison function. - -

397) The context argument is for the use of the comparison function in performing its duties. For +

396) In practice, this means that the entire array has been sorted according to the comparison function. + +

397) The context argument is for the use of the comparison function in performing its duties. For example, it might specify a collating sequence used by the comparison function. - +

K.3.6.3.2 The qsort_s function
Synopsis
@@ -28448,9 +28448,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

398) The context argument is for the use of the comparison function in performing its duties. For +

398) The context argument is for the use of the comparison function in performing its duties. For example, it might specify a collating sequence used by the comparison function. - +

K.3.6.4 Multibyte/wide character conversion functions

@@ -28464,9 +28464,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. category causes the conversion state of these functions to be indeterminate.

footnotes
-

399) If the locale employs special bytes to change the shift state, these bytes do not produce separate wide +

399) If the locale employs special bytes to change the shift state, these bytes do not produce separate wide character codes, but are grouped with an adjacent multibyte character. - +

K.3.6.4.1 The wctomb_s function
Synopsis
@@ -28576,11 +28576,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. encoding error occurred. Otherwise, a nonzero value is returned.
footnotes
-

400) Thus, the value of len is ignored if dst is a null pointer. - -

401) This allows an implementation to attempt converting the multibyte string before discovering a +

400) Thus, the value of len is ignored if dst is a null pointer. + +

401) This allows an implementation to attempt converting the multibyte string before discovering a terminating null character did not occur where required. - +

K.3.6.5.2 The wcstombs_s function
Synopsis
@@ -28650,14 +28650,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. encoding error occurred. Otherwise, a nonzero value is returned.
footnotes
-

402) If conversion stops because a terminating null wide character has been reached, the bytes stored +

402) If conversion stops because a terminating null wide character has been reached, the bytes stored include those necessary to reach the initial shift state immediately before the null byte. However, if the conversion stops before a terminating null wide character has been reached, the result will be null terminated, but might not end in the initial shift state. - -

403) When len is not less than dstmax, the implementation might fill the array before discovering a + +

403) When len is not less than dstmax, the implementation might fill the array before discovering a runtime-constraint violation. - +

K.3.7 String handling

@@ -28761,13 +28761,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Otherwise, a nonzero value is returned.

footnotes
-

404) This allows an implementation to copy characters from s2 to s1 while simultaneously checking if +

404) This allows an implementation to copy characters from s2 to s1 while simultaneously checking if any of those characters are null. Such an approach might write a character to every element of s1 before discovering that the first element should be set to the null character. - -

405) A zero return value implies that all of the requested characters from the string pointed to by s2 fit + +

405) A zero return value implies that all of the requested characters from the string pointed to by s2 fit within the array pointed to by s1 and that the result in s1 is null terminated. - +

K.3.7.1.4 The strncpy_s function
Synopsis
@@ -28826,13 +28826,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

406) This allows an implementation to copy characters from s2 to s1 while simultaneously checking if +

406) This allows an implementation to copy characters from s2 to s1 while simultaneously checking if any of those characters are null. Such an approach might write a character to every element of s1 before discovering that the first element should be set to the null character. - -

407) A zero return value implies that all of the requested characters from the string pointed to by s2 fit + +

407) A zero return value implies that all of the requested characters from the string pointed to by s2 fit within the array pointed to by s1 and that the result in s1 is null terminated. - +

K.3.7.2 Concatenation functions
@@ -28877,15 +28877,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Otherwise, a nonzero value is returned.
footnotes
-

408) Zero means that s1 was not null terminated upon entry to strcat_s. - -

409) This allows an implementation to append characters from s2 to s1 while simultaneously checking if +

408) Zero means that s1 was not null terminated upon entry to strcat_s. + +

409) This allows an implementation to append characters from s2 to s1 while simultaneously checking if any of those characters are null. Such an approach might write a character to every element of s1 before discovering that the first element should be set to the null character. - -

410) A zero return value implies that all of the requested characters from the string pointed to by s2 were + +

410) A zero return value implies that all of the requested characters from the string pointed to by s2 were appended to the string pointed to by s1 and that the result in s1 is null terminated. - +

K.3.7.2.2 The strncat_s function
Synopsis
@@ -28956,15 +28956,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

411) Zero means that s1 was not null terminated upon entry to strncat_s. - -

412) This allows an implementation to append characters from s2 to s1 while simultaneously checking if +

411) Zero means that s1 was not null terminated upon entry to strncat_s. + +

412) This allows an implementation to append characters from s2 to s1 while simultaneously checking if any of those characters are null. Such an approach might write a character to every element of s1 before discovering that the first element should be set to the null character. - -

413) A zero return value implies that all of the requested characters from the string pointed to by s2 were + +

413) A zero return value implies that all of the requested characters from the string pointed to by s2 were appended to the string pointed to by s1 and that the result in s1 is null terminated. - +

K.3.7.3 Search functions
@@ -29149,10 +29149,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

414) Note that the strnlen_s function has no runtime-constraints. This lack of runtime-constraints +

414) Note that the strnlen_s function has no runtime-constraints. This lack of runtime-constraints along with the values returned for a null pointer or an unterminated string argument make strnlen_s useful in algorithms that gracefully handle such exceptional data. - +

K.3.8 Date and time

@@ -29172,8 +29172,8 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. their normal rages.415)

footnotes
-

415) The normal ranges are defined in 7.26.1. - +

415) The normal ranges are defined in 7.26.1. +

K.3.8.2 Time conversion functions

@@ -29369,10 +29369,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. negative value if an output error, encoding error, or runtime-constraint violation occurred.

footnotes
-

416) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

416) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.2 The fwscanf_s function
Synopsis
@@ -29414,7 +29414,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. than provided for, or even zero, in the event of an early matching failure.
footnotes
-

417) If the format is known at translation time, an implementation may issue a diagnostic for any argument +

417) If the format is known at translation time, an implementation may issue a diagnostic for any argument used to store the result from a c, s, or [ conversion specifier if that argument is not followed by an argument of a type compatible with rsize_t. A limited amount of checking may be done if even if the format is not known at translation time. For example, an implementation may issue a diagnostic @@ -29424,7 +29424,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. using the hh length modifier, a length argument must follow the pointer argument. Another useful diagnostic could flag any non-pointer argument following format that did not have a type compatible with rsize_t. - +

K.3.9.1.3 The snwprintf_s function
Synopsis
@@ -29464,10 +29464,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. nonnegative and less than n.
footnotes
-

418) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

418) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.4 The swprintf_s function
Synopsis
@@ -29508,10 +29508,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. violation occurred, swprintf_s returns zero.
footnotes
-

419) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

419) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.5 The swscanf_s function
Synopsis
@@ -29574,10 +29574,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. negative value if an output error, encoding error, or runtime-constraint violation occurred.
footnotes
-

420) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

420) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.7 The vfwscanf_s function
Synopsis
@@ -29615,9 +29615,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. than provided for, or even zero, in the event of an early matching failure.
footnotes
-

421) As the functions vfwscanf_s, vwscanf_s, and vswscanf_s invoke the va_arg macro, the +

421) As the functions vfwscanf_s, vwscanf_s, and vswscanf_s invoke the va_arg macro, the value of arg after the return is indeterminate. - +

K.3.9.1.8 The vsnwprintf_s function
Synopsis
@@ -29659,10 +29659,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. less than n.
footnotes
-

422) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

422) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.9 The vswprintf_s function
Synopsis
@@ -29705,10 +29705,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. violation occurred, vswprintf_s returns zero.
footnotes
-

423) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

423) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.10 The vswscanf_s function
Synopsis
@@ -29747,9 +29747,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. than provided for, or even zero, in the event of an early matching failure.
footnotes
-

424) As the functions vfwscanf_s, vwscanf_s, and vswscanf_s invoke the va_arg macro, the +

424) As the functions vfwscanf_s, vwscanf_s, and vswscanf_s invoke the va_arg macro, the value of arg after the return is indeterminate. - +

K.3.9.1.11 The vwprintf_s function
Synopsis
@@ -29784,10 +29784,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

425) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

425) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.12 The vwscanf_s function
Synopsis
@@ -29820,9 +29820,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. than provided for, or even zero, in the event of an early matching failure.
footnotes
-

426) As the functions vfwscanf_s, vwscanf_s, and vswscanf_s invoke the va_arg macro, the +

426) As the functions vfwscanf_s, vwscanf_s, and vswscanf_s invoke the va_arg macro, the value of arg after the return is indeterminate. - +

K.3.9.1.13 The wprintf_s function
Synopsis
@@ -29852,10 +29852,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. negative value if an output error, encoding error, or runtime-constraint violation occurred.
footnotes
-

427) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide +

427) It is not a runtime-constraint violation for the wide characters %n to appear in sequence in the wide string pointed at by format when those wide characters are not a interpreted as a %n specifier. For example, if the entire format string was L"%%n". - +

K.3.9.1.14 The wscanf_s function
Synopsis
@@ -29925,13 +29925,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

428) This allows an implementation to copy wide characters from s2 to s1 while simultaneously checking +

428) This allows an implementation to copy wide characters from s2 to s1 while simultaneously checking if any of those wide characters are null. Such an approach might write a wide character to every element of s1 before discovering that the first element should be set to the null wide character. - -

429) A zero return value implies that all of the requested wide characters from the string pointed to by s2 + +

429) A zero return value implies that all of the requested wide characters from the string pointed to by s2 fit within the array pointed to by s1 and that the result in s1 is null terminated. - +

K.3.9.2.1.2 The wcsncpy_s function
Synopsis
@@ -29993,13 +29993,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

430) This allows an implementation to copy wide characters from s2 to s1 while simultaneously checking +

430) This allows an implementation to copy wide characters from s2 to s1 while simultaneously checking if any of those wide characters are null. Such an approach might write a wide character to every element of s1 before discovering that the first element should be set to the null wide character. - -

431) A zero return value implies that all of the requested wide characters from the string pointed to by s2 + +

431) A zero return value implies that all of the requested wide characters from the string pointed to by s2 fit within the array pointed to by s1 and that the result in s1 is null terminated. - +

K.3.9.2.1.3 The wmemcpy_s function
Synopsis
@@ -30097,15 +30097,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Otherwise, a nonzero value is returned.
footnotes
-

432) Zero means that s1 was not null terminated upon entry to wcscat_s. - -

433) This allows an implementation to append wide characters from s2 to s1 while simultaneously +

432) Zero means that s1 was not null terminated upon entry to wcscat_s. + +

433) This allows an implementation to append wide characters from s2 to s1 while simultaneously checking if any of those wide characters are null. Such an approach might write a wide character to every element of s1 before discovering that the first element should be set to the null wide character. - -

434) A zero return value implies that all of the requested wide characters from the wide string pointed to by + +

434) A zero return value implies that all of the requested wide characters from the wide string pointed to by s2 were appended to the wide string pointed to by s1 and that the result in s1 is null terminated. - +

K.3.9.2.2.2 The wcsncat_s function
Synopsis
@@ -30177,15 +30177,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

435) Zero means that s1 was not null terminated upon entry to wcsncat_s. - -

436) This allows an implementation to append wide characters from s2 to s1 while simultaneously +

435) Zero means that s1 was not null terminated upon entry to wcsncat_s. + +

436) This allows an implementation to append wide characters from s2 to s1 while simultaneously checking if any of those wide characters are null. Such an approach might write a wide character to every element of s1 before discovering that the first element should be set to the null wide character. - -

437) A zero return value implies that all of the requested wide characters from the wide string pointed to by + +

437) A zero return value implies that all of the requested wide characters from the wide string pointed to by s2 were appended to the wide string pointed to by s1 and that the result in s1 is null terminated. - +

K.3.9.2.3 Wide string search functions
@@ -30287,10 +30287,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. maxsize wide characters of s shall be accessed by wcsnlen_s.
footnotes
-

438) Note that the wcsnlen_s function has no runtime-constraints. This lack of runtime-constraints +

438) Note that the wcsnlen_s function has no runtime-constraints. This lack of runtime-constraints along with the values returned for a null pointer or an unterminated wide string argument make wcsnlen_s useful in algorithms that gracefully handle such exceptional data. - +

K.3.9.3 Extended multibyte/wide character conversion utilities
@@ -30413,11 +30413,11 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. encoding error occurred. Otherwise, a nonzero value is returned.
footnotes
-

439) Thus, the value of len is ignored if dst is a null pointer. - -

440) This allows an implementation to attempt converting the multibyte string before discovering a +

439) Thus, the value of len is ignored if dst is a null pointer. + +

440) This allows an implementation to attempt converting the multibyte string before discovering a terminating null character did not occur where required. - +

K.3.9.3.2.2 The wcsrtombs_s function
Synopsis
@@ -30500,14 +30500,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
footnotes
-

441) If conversion stops because a terminating null wide character has been reached, the bytes stored +

441) If conversion stops because a terminating null wide character has been reached, the bytes stored include those necessary to reach the initial shift state immediately before the null byte. However, if the conversion stops before a terminating null wide character has been reached, the result will be null terminated, but might not end in the initial shift state. - -

442) When len is not less than dstmax, the implementation might fill the array before discovering a + +

442) When len is not less than dstmax, the implementation might fill the array before discovering a runtime-constraint violation. - +

Annex L

@@ -30522,9 +30522,9 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
  specifications in this annex.443)
 
 
footnotes
-

443) Implementations that do not define __STDC_ANALYZABLE__ are not required to conform to these +

443) Implementations that do not define __STDC_ANALYZABLE__ are not required to conform to these specifications. - +

L.2 Definitions

-- 2.20.1