<a name="Foreword" href="#Foreword"><b> Foreword</b></a>
1 ISO (the International Organization for Standardization) and IEC (the International
<a name="Foreword" href="#Foreword"><b> Foreword</b></a>
1 ISO (the International Organization for Standardization) and IEC (the International
-- increased minimum translation limits
-- additional floating-point characteristics in <a href="#7.7"><float.h></a>
-- increased minimum translation limits
-- additional floating-point characteristics in <a href="#7.7"><float.h></a>
<a name="Introduction" href="#Introduction"><b> Introduction</b></a>
1 With the introduction of new devices and extended character sets, new features may be
<a name="Introduction" href="#Introduction"><b> Introduction</b></a>
1 With the introduction of new devices and extended character sets, new features may be
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.
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.
-- all minimal requirements of a data-processing system that is capable of supporting a
conforming implementation.
-- all minimal requirements of a data-processing system that is capable of supporting a
conforming implementation.
2 EXAMPLE An example of locale-specific behavior is whether the islower function returns true for
characters other than the 26 lowercase Latin letters.
2 EXAMPLE An example of locale-specific behavior is whether the islower function returns true for
characters other than the 26 lowercase Latin letters.
use is guarded by a #ifdef directive with the appropriate macro. For example:
#ifdef __STDC_IEC_559__ /* FE_UPWARD defined */
/* ... */
use is guarded by a #ifdef directive with the appropriate macro. For example:
#ifdef __STDC_IEC_559__ /* FE_UPWARD defined */
/* ... */
3) This implies that a conforming implementation reserves no identifiers other than those explicitly
reserved in this International Standard.
3) This implies that a conforming implementation reserves no identifiers other than those explicitly
reserved in this International Standard.
7 A conforming program is one that is acceptable to a conforming implementation.4)
8 An implementation shall be accompanied by a document that defines all implementation-
7 A conforming program is one that is acceptable to a conforming implementation.4)
8 An implementation shall be accompanied by a document that defines all implementation-
and any external representation. The description is conceptual only, and does not specify any
particular implementation.
and any external representation. The description is conceptual only, and does not specify any
particular implementation.
2. Each instance of a backslash character (\) immediately followed by a new-line
character is deleted, splicing physical source lines to form logical source lines.
2. Each instance of a backslash character (\) immediately followed by a new-line
character is deleted, splicing physical source lines to form logical source lines.
<a name="5.1.1.3" href="#5.1.1.3"><b> 5.1.1.3 Diagnostics</b></a>
1 A conforming implementation shall produce at least one diagnostic message (identified in
<a name="5.1.1.3" href="#5.1.1.3"><b> 5.1.1.3 Diagnostics</b></a>
1 A conforming implementation shall produce at least one diagnostic message (identified in
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.
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.
<a name="5.1.2.2.1" href="#5.1.2.2.1"><b> 5.1.2.2.1 Program startup</b></a>
1 The function called at program startup is named main. The implementation declares no
<a name="5.1.2.2.1" href="#5.1.2.2.1"><b> 5.1.2.2.1 Program startup</b></a>
1 The function called at program startup is named main. The implementation declares no
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.
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.
<a name="5.1.2.2.3" href="#5.1.2.2.3"><b> 5.1.2.2.3 Program termination</b></a>
1 If the return type of the main function is a type compatible with int, a return from the
<a name="5.1.2.2.3" href="#5.1.2.2.3"><b> 5.1.2.2.3 Program termination</b></a>
1 If the return type of the main function is a type compatible with int, a return from the
the execution environment. Evaluation of an expression may produce side effects. At
certain specified points in the execution sequence called sequence points, all side effects
of previous evaluations shall be complete and no side effects of subsequent evaluations
the execution environment. Evaluation of an expression may produce side effects. At
certain specified points in the execution sequence called sequence points, all side effects
of previous evaluations shall be complete and no side effects of subsequent evaluations
3 In the abstract machine, all expressions are evaluated as specified by the semantics. An
actual implementation need not evaluate part of an expression if it can deduce that its
value is not used and that no needed side effects are produced (including any caused by
3 In the abstract machine, all expressions are evaluated as specified by the semantics. An
actual implementation need not evaluate part of an expression if it can deduce that its
value is not used and that no needed side effects are produced (including any caused by
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
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
environment library <a href="#7.6"><fenv.h></a> provides a programming facility for indicating when these side
effects matter, freeing the implementations in other cases.
environment library <a href="#7.6"><fenv.h></a> provides a programming facility for indicating when these side
effects matter, freeing the implementations in other cases.
-- At program termination, all data written into files shall be identical to the result that
execution of the program according to the abstract semantics would have produced.
-- At program termination, all data written into files shall be identical to the result that
execution of the program according to the abstract semantics would have produced.
f1 = f2 * d;
the multiplication may be executed using single-precision arithmetic if the implementation can ascertain
that the result would be the same as if it were executed using double-precision arithmetic (for example, if d
f1 = f2 * d;
the multiplication may be executed using single-precision arithmetic if the implementation can ascertain
that the result would be the same as if it were executed using double-precision arithmetic (for example, if d
12 EXAMPLE 4 Implementations employing wide registers have to take care to honor appropriate
semantics. Values are independent of whether they are represented in a register or in memory. For
12 EXAMPLE 4 Implementations employing wide registers have to take care to honor appropriate
semantics. Values are independent of whether they are represented in a register or in memory. For
- z = x + x * y; // not equivalent to z = x * (<a href="#1.0">1.0</a> + y);
- y = x / <a href="#5.0">5.0</a>; // not equivalent to y = x * 0.2;
+ z = x + x * y; // not equivalent to z = x * (1.0 + y);
+ y = x / 5.0; // not equivalent to y = x * 0.2;
<a name="5.2" href="#5.2"><b> 5.2 Environmental considerations</b></a>
<a name="5.2.1" href="#5.2.1"><b> 5.2.1 Character sets</b></a>
<a name="5.2" href="#5.2"><b> 5.2 Environmental considerations</b></a>
<a name="5.2.1" href="#5.2.1"><b> 5.2.1 Character sets</b></a>
other characters are encountered in a source file (except in an identifier, a character
constant, a string literal, a header name, a comment, or a preprocessing token that is never
other characters are encountered in a source file (except in an identifier, a character
constant, a string literal, a header name, a comment, or a preprocessing token that is never
converted to a token), the behavior is undefined.
4 A letter is an uppercase letter or a lowercase letter as defined above; in this International
converted to a token), the behavior is undefined.
4 A letter is an uppercase letter or a lowercase letter as defined above; in this International
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.
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.
-- A multibyte character set may have a state-dependent encoding, wherein each
sequence of multibyte characters begins in an initial shift state and enters other
-- A multibyte character set may have a state-dependent encoding, wherein each
sequence of multibyte characters begins in an initial shift state and enters other
tabulation position, the behavior of the display device is unspecified.
\v (vertical tab) Moves the active position to the initial position of the next vertical
tabulation position. If the active position is at or past the last defined vertical
tabulation position, the behavior of the display device is unspecified.
\v (vertical tab) Moves the active position to the initial position of the next vertical
tabulation position. If the active position is at or past the last defined vertical
tabulation position, the behavior of the display device is unspecified.
3 Each of these escape sequences shall produce a unique implementation-defined value
tabulation position, the behavior of the display device is unspecified.
3 Each of these escape sequences shall produce a unique implementation-defined value
universal character name specifying a short identifier of 00010000 or more is
considered 10 characters, and each extended source character is considered the same
universal character name specifying a short identifier of 00010000 or more is
considered 10 characters, and each extended source character is considered the same
(absolute value) to those shown, with the same sign.
-- number of bits for smallest object that is not a bit-field (byte)
(absolute value) to those shown, with the same sign.
-- number of bits for smallest object that is not a bit-field (byte)
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.
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.
18) Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through
the function fesetround in <a href="#7.6"><fenv.h></a>.
18) Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through
the function fesetround in <a href="#7.6"><fenv.h></a>.
implementation-defined (positive) values that are less than or equal to those shown:
-- the difference between 1 and the least value greater than 1 that is representable in the
given floating point type, b1- p
implementation-defined (positive) values that are less than or equal to those shown:
-- the difference between 1 and the least value greater than 1 that is representable in the
given floating point type, b1- p
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.
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.
indicates an optional expression enclosed in braces.
2 When syntactic categories are referred to in the main text, they are not italicized and
words are separated by spaces instead of hyphens.
indicates an optional expression enclosed in braces.
2 When syntactic categories are referred to in the main text, they are not italicized and
words are separated by spaces instead of hyphens.
<a name="6.2" href="#6.2"><b> 6.2 Concepts</b></a>
<a name="6.2.1" href="#6.2.1"><b> 6.2.1 Scopes of identifiers</b></a>
1 An identifier can denote an object; a function; a tag or a member of a structure, union, or
<a name="6.2" href="#6.2"><b> 6.2 Concepts</b></a>
<a name="6.2.1" href="#6.2.1"><b> 6.2.1 Scopes of identifiers</b></a>
1 An identifier can denote an object; a function; a tag or a member of a structure, union, or
declares the identifier appears inside a block or within the list of parameter declarations in
a function definition, the identifier has block scope, which terminates at the end of the
associated block. If the declarator or type specifier that declares the identifier appears
declares the identifier appears inside a block or within the list of parameter declarations in
a function definition, the identifier has block scope, which terminates at the end of the
associated block. If the declarator or type specifier that declares the identifier appears
within the list of parameter declarations in a function prototype (not part of a function
definition), the identifier has function prototype scope, which terminates at the end of the
within the list of parameter declarations in a function prototype (not part of a function
definition), the identifier has function prototype scope, which terminates at the end of the
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
prior declaration of that identifier is visible,23) if the prior declaration specifies internal or
external linkage, the linkage of the identifier at the later declaration is the same as the
prior declaration of that identifier is visible,23) if the prior declaration specifies internal or
external linkage, the linkage of the identifier at the later declaration is the same as the
23) As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
24) There is only one name space for tags even though three are possible.
23) As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
24) There is only one name space for tags even though three are possible.
<a name="6.2.4" href="#6.2.4"><b> 6.2.4 Storage durations of objects</b></a>
1 An object has a storage duration that determines its lifetime. There are three storage
<a name="6.2.4" href="#6.2.4"><b> 6.2.4 Storage durations of objects</b></a>
1 An object has a storage duration that determines its lifetime. There are three storage
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.
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.
<a name="6.2.5" href="#6.2.5"><b> 6.2.5 Types</b></a>
1 The meaning of a value stored in an object or returned by a function is determined by the
<a name="6.2.5" href="#6.2.5"><b> 6.2.5 Types</b></a>
1 The meaning of a value stored in an object or returned by a function is determined by the
7 The standard signed integer types and standard unsigned integer types are collectively
called the standard integer types, the extended signed integer types and extended
7 The standard signed integer types and standard unsigned integer types are collectively
called the standard integer types, the extended signed integer types and extended
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'' (<a href="#6.11.1">6.11.1</a>).
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'' (<a href="#6.11.1">6.11.1</a>).
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 <a href="#7.1.3">7.1.3</a>.
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 <a href="#7.1.3">7.1.3</a>.
15 The three types char, signed char, and unsigned char are collectively called
the character types. The implementation shall define char to have the same range,
15 The three types char, signed char, and unsigned char are collectively called
the character types. The implementation shall define char to have the same range,
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.
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.
-- A pointer type may be derived from a function type, an object type, or an incomplete
type, called the referenced type. A pointer type describes an object whose value
-- A pointer type may be derived from a function type, an object type, or an incomplete
type, called the referenced type. A pointer type describes an object whose value
39) The same representation and alignment requirements are meant to imply interchangeability as
arguments to functions, return values from functions, and members of unions.
39) The same representation and alignment requirements are meant to imply interchangeability as
arguments to functions, return values from functions, and members of unions.
pointers to structure types shall have the same representation and alignment requirements
as each other. All pointers to union types shall have the same representation and
pointers to structure types shall have the same representation and alignment requirements
as each other. All pointers to union types shall have the same representation and
with unsigned types. All other combinations of padding bits are alternative object representations of
the value specified by the value bits.
with unsigned types. All other combinations of padding bits are alternative object representations of
the value specified by the value bits.
there shall be exactly one sign bit. Each bit that is a value bit shall have the same value as
the same bit in the object representation of the corresponding unsigned type (if there are
there shall be exactly one sign bit. Each bit that is a value bit shall have the same value as
the same bit in the object representation of the corresponding unsigned type (if there are
for signed integer types the width is one greater than the precision.
<a name="6.2.7" href="#6.2.7"><b> 6.2.7 Compatible type and composite type</b></a>
for signed integer types the width is one greater than the precision.
<a name="6.2.7" href="#6.2.7"><b> 6.2.7 Compatible type and composite type</b></a>
46) Two types need not be identical to be compatible.
47) As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
46) Two types need not be identical to be compatible.
47) As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
5 EXAMPLE Given the following two file scope declarations:
int f(int (*)(), double (*)[3]);
5 EXAMPLE Given the following two file scope declarations:
int f(int (*)(), double (*)[3]);
<a name="6.3" href="#6.3"><b> 6.3 Conversions</b></a>
1 Several operators convert operand values from one type to another automatically. This
<a name="6.3" href="#6.3"><b> 6.3 Conversions</b></a>
1 Several operators convert operand values from one type to another automatically. This
-- An object or expression with an integer type whose integer conversion rank is less
than or equal to the rank of int and unsigned int.
-- An object or expression with an integer type whose integer conversion rank is less
than or equal to the rank of int and unsigned int.
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).
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).
exactly, the result is either the nearest higher or nearest lower representable value, chosen
in an implementation-defined manner. If the value being converted is outside the range of
exactly, the result is either the nearest higher or nearest lower representable value, chosen
in an implementation-defined manner. If the value being converted is outside the range of
operand is converted, without change of type domain, to a type whose
corresponding real type is long double.
operand is converted, without change of type domain, to a type whose
corresponding real type is long double.
Otherwise, if the corresponding real type of either operand is double, the other
operand is converted, without change of type domain, to a type whose
Otherwise, if the corresponding real type of either operand is double, the other
operand is converted, without change of type domain, to a type whose
52) The cast and assignment operators are still required to perform their specified conversions as
described in <a href="#6.3.1.4">6.3.1.4</a> and <a href="#6.3.1.5">6.3.1.5</a>.
52) The cast and assignment operators are still required to perform their specified conversions as
described in <a href="#6.3.1.4">6.3.1.4</a> and <a href="#6.3.1.5">6.3.1.5</a>.
<a name="6.3.2" href="#6.3.2"><b> 6.3.2 Other operands</b></a>
<a name="6.3.2.1" href="#6.3.2.1"><b> 6.3.2.1 Lvalues, arrays, and function designators</b></a>
<a name="6.3.2" href="#6.3.2"><b> 6.3.2 Other operands</b></a>
<a name="6.3.2.1" href="#6.3.2.1"><b> 6.3.2.1 Lvalues, arrays, and function designators</b></a>
54) Because this conversion does not occur, the operand of the sizeof operator remains a function
designator and violates the constraint in <a href="#6.5.3.4">6.5.3.4</a>.
54) Because this conversion does not occur, the operand of the sizeof operator remains a function
designator and violates the constraint in <a href="#6.5.3.4">6.5.3.4</a>.
<a href="#6.3.2.2">6.3.2.2</a> void
1 The (nonexistent) value of a void expression (an expression that has type void) shall not
<a href="#6.3.2.2">6.3.2.2</a> void
1 The (nonexistent) value of a void expression (an expression that has type void) shall not
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.
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.
converted to a pointer to a character type, the result points to the lowest addressed byte of
the object. Successive increments of the result, up to the size of the object, yield pointers
converted to a pointer to a character type, the result points to the lowest addressed byte of
the object. Successive increments of the result, up to the size of the object, yield pointers
58) An additional category, placemarkers, is used internally in translation phase 4 (see <a href="#6.10.3.3">6.10.3.3</a>); it cannot
occur in source files.
58) An additional category, placemarkers, is used internally in translation phase 4 (see <a href="#6.10.3.3">6.10.3.3</a>); it cannot
occur in source files.
4 If the input stream has been parsed into preprocessing tokens up to a given character, the
next preprocessing token is the longest sequence of characters that could constitute a
4 If the input stream has been parsed into preprocessing tokens up to a given character, the
next preprocessing token is the longest sequence of characters that could constitute a
<a name="6.4.2" href="#6.4.2"><b> 6.4.2 Identifiers</b></a>
<a name="6.4.2.1" href="#6.4.2.1"><b> 6.4.2.1 General</b></a>
<a name="6.4.2" href="#6.4.2"><b> 6.4.2 Identifiers</b></a>
<a name="6.4.2.1" href="#6.4.2.1"><b> 6.4.2.1 General</b></a>
one or more entities as described in <a href="#6.2.1">6.2.1</a>. Lowercase and uppercase letters are distinct.
There is no specific limit on the maximum length of an identifier.
3 Each universal character name in an identifier shall designate a character whose encoding
one or more entities as described in <a href="#6.2.1">6.2.1</a>. Lowercase and uppercase letters are distinct.
There is no specific limit on the maximum length of an identifier.
3 Each universal character name in an identifier shall designate a character whose encoding
character shall not be a universal character name designating a digit. An implementation
may allow multibyte characters that are not part of the basic source character set to
appear in identifiers; which characters and their correspondence to universal character
character shall not be a universal character name designating a digit. An implementation
may allow multibyte characters that are not part of the basic source character set to
appear in identifiers; which characters and their correspondence to universal character
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.
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.
61) Since the name __func__ is reserved for any use by the implementation (<a href="#7.1.3">7.1.3</a>), if any other
identifier is explicitly declared using the name __func__, the behavior is undefined.
61) Since the name __func__ is reserved for any use by the implementation (<a href="#7.1.3">7.1.3</a>), if any other
identifier is explicitly declared using the name __func__, the behavior is undefined.
64) The specification for the library functions recommends more accurate conversion than required for
floating constants (see <a href="#7.20.1.3">7.20.1.3</a>).
64) The specification for the library functions recommends more accurate conversion than required for
floating constants (see <a href="#7.20.1.3">7.20.1.3</a>).
65) The semantics of these characters were discussed in <a href="#5.2.2">5.2.2</a>. If any other character follows a backslash,
the result is not a token and a diagnostic is required. See ''future language directions'' (<a href="#6.11.4">6.11.4</a>).
65) The semantics of these characters were discussed in <a href="#5.2.2">5.2.2</a>. If any other character follows a backslash,
the result is not a token and a diagnostic is required. See ''future language directions'' (<a href="#6.11.4">6.11.4</a>).
66) A character string literal need not be a string (see <a href="#7.1.1">7.1.1</a>), because a null character may be embedded in
it by a \0 escape sequence.
66) A character string literal need not be a string (see <a href="#7.1.1">7.1.1</a>), because a null character may be embedded in
it by a \0 escape sequence.
sequence, as defined by the mbstowcs function with an implementation-defined current
locale. The value of a string literal containing a multibyte character or escape sequence
sequence, as defined by the mbstowcs function with an implementation-defined current
locale. The value of a string literal containing a multibyte character or escape sequence
3 In all aspects of the language, the six tokens67)
<: :> <% %> %: %:%:
3 In all aspects of the language, the six tokens67)
<: :> <% %> %: %:%:
sequence between the " delimiters, the behavior is undefined.69) Header name
preprocessing tokens are recognized only within #include preprocessing directives and
sequence between the " delimiters, the behavior is undefined.69) Header name
preprocessing tokens are recognized only within #include preprocessing directives and
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 <a href="#6.10.9">6.10.9</a>.
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 <a href="#6.10.9">6.10.9</a>.
<a name="6.4.9" href="#6.4.9"><b> 6.4.9 Comments</b></a>
1 Except within a character constant, a string literal, or a comment, the characters /*
<a name="6.4.9" href="#6.4.9"><b> 6.4.9 Comments</b></a>
1 Except within a character constant, a string literal, or a comment, the characters /*
<a name="6.5" href="#6.5"><b> 6.5 Expressions</b></a>
1 An expression is a sequence of operators and operands that specifies computation of a
<a name="6.5" href="#6.5"><b> 6.5 Expressions</b></a>
1 An expression is a sequence of operators and operands that specifies computation of a
indicated in each subclause by the syntax for the expressions discussed therein.
75) Allocated objects have no declared type.
indicated in each subclause by the syntax for the expressions discussed therein.
75) Allocated objects have no declared type.
effective type of the object for that access and for subsequent accesses that do not modify
the stored value. If a value is copied into an object having no declared type using
effective type of the object for that access and for subsequent accesses that do not modify
the stored value. If a value is copied into an object having no declared type using
object (in which case it is an lvalue) or a function (in which case it is a function
designator).79)
3 A constant is a primary expression. Its type depends on its form and value, as detailed in
object (in which case it is an lvalue) or a function (in which case it is a function
designator).79)
3 A constant is a primary expression. Its type depends on its form and value, as detailed in
4 A string literal is a primary expression. It is an lvalue with type as detailed in <a href="#6.4.5">6.4.5</a>.
5 A parenthesized expression is a primary expression. Its type and value are identical to
those of the unparenthesized expression. It is an lvalue, a function designator, or a void
4 A string literal is a primary expression. It is an lvalue with type as detailed in <a href="#6.4.5">6.4.5</a>.
5 A parenthesized expression is a primary expression. Its type and value are identical to
those of the unparenthesized expression. It is an lvalue, a function designator, or a void
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 <a href="#6.9.1">6.9.1</a>.
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 <a href="#6.9.1">6.9.1</a>.
-- one promoted type is a signed integer type, the other promoted type is the
corresponding unsigned integer type, and the value is representable in both types;
-- one promoted type is a signed integer type, the other promoted type is the
corresponding unsigned integer type, and the value is representable in both types;
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.
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.
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.
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.
6 The value of the compound literal is that of an unnamed object initialized by the
initializer list. If the compound literal occurs outside the body of a function, the object
6 The value of the compound literal is that of an unnamed object initialized by the
initializer list. If the compound literal occurs outside the body of a function, the object
86) This allows implementations to share storage for string literals and constant compound literals with
the same or overlapping representations.
86) This allows implementations to share storage for string literals and constant compound literals with
the same or overlapping representations.
omitted, except that the constraints on the operators still apply and the result is not an
lvalue. Similarly, if the operand is the result of a [] operator, neither the & operator nor
omitted, except that the constraints on the operators still apply and the result is not an
lvalue. Similarly, if the operand is the result of a [] operator, neither the & operator nor
the unary * that is implied by the [] is evaluated and the result is as if the & operator
were removed and the [] operator were changed to a + operator. Otherwise, the result is
the unary * that is implied by the [] is evaluated and the result is as if the & operator
were removed and the [] operator were changed to a + operator. Otherwise, the result is
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 <a href="#6.9.1">6.9.1</a>).
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 <a href="#6.9.1">6.9.1</a>).
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.
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.
object of type ptrdiff_t. Moreover, if the expression P points either to an element of
an array object or one past the last element of an array object, and the expression Q points
to the last element of the same array object, the expression ((Q)+1)-(P) has the same
object of type ptrdiff_t. Moreover, if the expression P points either to an element of
an array object or one past the last element of an array object, and the expression Q points
to the last element of the same array object, the expression ((Q)+1)-(P) has the same
value as ((Q)-(P))+1 and as -((P)-((Q)+1)), and has the value zero if the
expression P points one past the last element of the array object, even though the
value as ((Q)-(P))+1 and as -((P)-((Q)+1)), and has the value zero if the
expression P points one past the last element of the array object, even though the
4 The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are filled with
zeros. If E1 has an unsigned type, the value of the result is E1 x 2E2 , reduced modulo
4 The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are filled with
zeros. If E1 has an unsigned type, the value of the result is E1 x 2E2 , reduced modulo
pointers to structure members declared later compare greater than pointers to members
declared earlier in the structure, and pointers to array elements with larger subscript
pointers to structure members declared later compare greater than pointers to members
declared earlier in the structure, and pointers to array elements with larger subscript
values compare greater than pointers to elements of the same array with lower subscript
values. All pointers to members of the same union object compare equal. If the
values compare greater than pointers to elements of the same array with lower subscript
values. All pointers to members of the same union object compare equal. If the
means (a<b)<c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''.
93) Because of the precedences, a<b == c<d is 1 whenever a<b and c<d have the same truth-value.
means (a<b)<c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''.
93) Because of the precedences, a<b == c<d is 1 whenever a<b and c<d have the same truth-value.
5 Otherwise, at least one operand is a pointer. If one operand is a pointer and the other is a
null pointer constant, the null pointer constant is converted to the type of the pointer. If
5 Otherwise, at least one operand is a pointer. If one operand is a pointer and the other is a
null pointer constant, the null pointer constant is converted to the type of the pointer. If
pointer to an appropriately qualified version of void.
7 EXAMPLE The common type that results when the second and third operands are pointers is determined
pointer to an appropriately qualified version of void.
7 EXAMPLE The common type that results when the second and third operands are pointers is determined
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).
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).
negative, so the operands of the comparison can never compare equal. Therefore, for full portability, the
variable c should be declared as int.
negative, so the operands of the comparison can never compare equal. Therefore, for full portability, the
variable c should be declared as int.
constraints that apply to the integer constant expressions used in conditional-inclusion preprocessing
directives are discussed in <a href="#6.10.1">6.10.1</a>.
constraints that apply to the integer constant expressions used in conditional-inclusion preprocessing
directives are discussed in <a href="#6.10.1">6.10.1</a>.
-- an address constant, or
-- an address constant for an object type plus or minus an integer constant expression.
-- an address constant, or
-- an address constant for an object type plus or minus an integer constant expression.
additional type information, or an initializer, or both. The declarators contain the
identifiers (if any) being declared.
additional type information, or an initializer, or both. The declarators contain the
identifiers (if any) being declared.
6 If an aggregate or union object is declared with a storage-class specifier other than
typedef, the properties resulting from the storage-class specifier, except with respect to
6 If an aggregate or union object is declared with a storage-class specifier other than
typedef, the properties resulting from the storage-class specifier, except with respect to
-- unsigned, or unsigned int
-- long, signed long, long int, or signed long int
-- unsigned, or unsigned int
-- long, signed long, long int, or signed long int
Semantics
5 As discussed in <a href="#6.2.5">6.2.5</a>, a structure is a type consisting of a sequence of members, whose
Semantics
5 As discussed in <a href="#6.2.5">6.2.5</a>, a structure is a type consisting of a sequence of members, whose
12 Each non-bit-field member of a structure or union object is aligned in an implementation-
defined manner appropriate to its type.
12 Each non-bit-field member of a structure or union object is aligned in an implementation-
defined manner appropriate to its type.
struct s t1 = { 0 }; // valid
struct s t2 = { 1, { <a href="#4.2">4.2</a> }}; // invalid
struct s t1 = { 0 }; // valid
struct s t2 = { 1, { <a href="#4.2">4.2</a> }}; // invalid
5 EXAMPLE The following fragment:
enum hue { chartreuse, burgundy, claret=20, winedark };
5 EXAMPLE The following fragment:
enum hue { chartreuse, burgundy, claret=20, winedark };
when a pointer to or a function returning a structure or union is being declared. (See incomplete types
in <a href="#6.2.5">6.2.5</a>.) The specification has to be complete before such a function is called or defined.
when a pointer to or a function returning a structure or union is being declared. (See incomplete types
in <a href="#6.2.5">6.2.5</a>.) The specification has to be complete before such a function is called or defined.
union content, or enumeration content. If an identifier is provided,112) the type specifier
also declares the identifier to be the tag of that type.
union content, or enumeration content. If an identifier is provided,112) the type specifier
also declares the identifier to be the tag of that type.
5 If an attempt is made to modify an object defined with a const-qualified type through use
of an lvalue with non-const-qualified type, the behavior is undefined. If an attempt is
5 If an attempt is made to modify an object defined with a const-qualified type through use
of an lvalue with non-const-qualified type, the behavior is undefined. If an attempt is
association between the allocated object and the pointer.
118) Both of these can occur through the use of typedefs.
association between the allocated object and the pointer.
118) Both of these can occur through the use of typedefs.
11 EXAMPLE 2 The following declarations and expressions illustrate the behavior when type qualifiers
modify an aggregate type:
11 EXAMPLE 2 The following declarations and expressions illustrate the behavior when type qualifiers
modify an aggregate type:
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.
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.
implementation-defined.121)
6 Any function with internal linkage can be an inline function. For a function with external
linkage, the following restrictions apply: If a function is declared with an inline
implementation-defined.121)
6 Any function with internal linkage can be an inline function. For a function with external
linkage, the following restrictions apply: If a function is declared with an inline
function specifier, then it shall also be defined in the same translation unit. If all of the
file scope declarations for a function in a translation unit include the inline function
function specifier, then it shall also be defined in the same translation unit. If all of the
file scope declarations for a function in a translation unit include the inline function
extern creates an external definition. The following example shows an entire translation unit.
inline double fahr(double t)
{
extern creates an external definition. The following example shows an entire translation unit.
inline double fahr(double t)
{
}
extern double fahr(double); // creates an external definition
double convert(int is_fahr, double temp)
}
extern double fahr(double); // creates an external definition
double convert(int is_fahr, double temp)
corresponding inline definitions in other translation units, all corresponding objects with static storage
duration are also distinct in each of the definitions.
corresponding inline definitions in other translation units, all corresponding objects with static storage
duration are also distinct in each of the definitions.
scope, storage duration, and type indicated by the declaration specifiers.
3 A full declarator is a declarator that is not part of another declarator. The end of a full
declarator is a sequence point. If, in the nested sequence of declarators in a full
scope, storage duration, and type indicated by the declaration specifiers.
3 A full declarator is a declarator that is not part of another declarator. The end of a full
declarator is a sequence point. If, in the nested sequence of declarators in a full
declarator, there is a declarator specifying a variable length array type, the type specified
by the full declarator is said to be variably modified. Furthermore, any type derived by
declarator, there is a declarator specifying a variable length array type, the type specified
by the full declarator is said to be variably modified. Furthermore, any type derived by
type has a known constant size, the array type is not a variable length array type;
otherwise, the array type is a variable length array type.
type has a known constant size, the array type is not a variable length array type;
otherwise, the array type is a variable length array type.
10 EXAMPLE 4 All declarations of variably modified (VM) types have to be at either block scope or
function prototype scope. Array objects declared with the static or extern storage-class specifier
10 EXAMPLE 4 All declarations of variably modified (VM) types have to be at either block scope or
function prototype scope. Array objects declared with the static or extern storage-class specifier
and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list
T '', then the type specified for ident is ''derived-declarator-type-list function returning
and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list
T '', then the type specified for ident is ''derived-declarator-type-list function returning
126) See ''future language directions'' (<a href="#6.11.6">6.11.6</a>).
127) If both function types are ''old style'', parameter types are not compared.
126) See ''future language directions'' (<a href="#6.11.6">6.11.6</a>).
127) If both function types are ''old style'', parameter types are not compared.
Moreover, the parameter type lists, if both are present, shall agree in the number of
parameters and in use of the ellipsis terminator; corresponding parameters shall have
Moreover, the parameter type lists, if both are present, shall agree in the number of
parameters and in use of the ellipsis terminator; corresponding parameters shall have
20 EXAMPLE 4 The following prototype has a variably modified parameter.
void addscalar(int n, int m,
20 EXAMPLE 4 The following prototype has a variably modified parameter.
void addscalar(int n, int m,
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.
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.
. identifier
then the current object (defined below) shall have structure or union type and the
identifier shall be the name of a member of that type.
. identifier
then the current object (defined below) shall have structure or union type and the
identifier shall be the name of a member of that type.
17 Each brace-enclosed initializer list has an associated current object. When no
designations are present, subobjects of the current object are initialized in order according
to the type of the current object: array elements in increasing subscript order, structure
17 Each brace-enclosed initializer list has an associated current object. When no
designations are present, subobjects of the current object are initialized in order according
to the type of the current object: array elements in increasing subscript order, structure
members in declaration order, and the first named member of a union.129) In contrast, a
designation causes the following initializer to begin initialization of the subobject
members in declaration order, and the first named member of a union.129) In contrast, a
designation causes the following initializer to begin initialization of the subobject
23 The order in which any side effects occur among the initialization list expressions is
unspecified.133)
24 EXAMPLE 1 Provided that <a href="#7.3"><complex.h></a> has been #included, the declarations
int i = <a href="#3.5">3.5</a>;
double complex c = 5 + 3 * I;
23 The order in which any side effects occur among the initialization list expressions is
unspecified.133)
24 EXAMPLE 1 Provided that <a href="#7.3"><complex.h></a> has been #included, the declarations
int i = <a href="#3.5">3.5</a>;
double complex c = 5 + 3 * I;
32 EXAMPLE 8 The declaration
char s[] = "abc", t[3] = "abc";
32 EXAMPLE 8 The declaration
char s[] = "abc", t[3] = "abc";
2 In both forms, the first substatement is executed if the expression compares unequal to 0.
In the else form, the second substatement is executed if the expression compares equal
2 In both forms, the first substatement is executed if the expression compares unequal to 0.
In the else form, the second substatement is executed if the expression compares equal
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.
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.
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.
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.
<a name="6.8.5.1" href="#6.8.5.1"><b> 6.8.5.1 The while statement</b></a>
1 The evaluation of the controlling expression takes place before each execution of the loop
<a name="6.8.5.1" href="#6.8.5.1"><b> 6.8.5.1 The while statement</b></a>
1 The evaluation of the controlling expression takes place before each execution of the loop
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.
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.
4 EXAMPLE 2 A goto statement is not allowed to jump past any declarations of objects with variably
modified types. A jump within the scope, however, is permitted.
4 EXAMPLE 2 A goto statement is not allowed to jump past any declarations of objects with variably
modified types. A jump within the scope, however, is permitted.
140) Thus, if an identifier declared with external linkage is not used in an expression, there need be no
external definition for it.
140) Thus, if an identifier declared with external linkage is not used in an expression, there need be no
external definition for it.
significance, as all white space is equivalent except in certain situations during preprocessing (see the
# character string literal creation operator in <a href="#6.10.3.2">6.10.3.2</a>, for example).
significance, as all white space is equivalent except in certain situations during preprocessing (see the
# character string literal creation operator in <a href="#6.10.3.2">6.10.3.2</a>, for example).
invocation of a function-like macro.
3 A text line shall not begin with a # preprocessing token. A non-directive shall not begin
invocation of a function-like macro.
3 A text line shall not begin with a # preprocessing token. A non-directive shall not begin
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.
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.
before the terminating new-line character. However, comments may appear anywhere in a source file,
including within a preprocessing directive.
before the terminating new-line character. However, comments may appear anywhere in a source file,
including within a preprocessing directive.
# include "q-char-sequence" new-line
causes the replacement of that directive by the entire contents of the source file identified
# include "q-char-sequence" new-line
causes the replacement of that directive by the entire contents of the source file identified
148) Note that adjacent string literals are not concatenated into a single string literal (see the translation
phases in <a href="#5.1.1.2">5.1.1.2</a>); thus, an expansion that results in two string literals is an invalid directive.
148) Note that adjacent string literals are not concatenated into a single string literal (see the translation
phases in <a href="#5.1.1.2">5.1.1.2</a>); thus, an expansion that results in two string literals is an invalid directive.
replacement list of preprocessing tokens are not considered part of the replacement list
for either form of macro.
replacement list of preprocessing tokens are not considered part of the replacement list
for either form of macro.
8 If a # preprocessing token, followed by an identifier, occurs lexically at the point at which
a preprocessing directive could begin, the identifier is not subject to macro replacement.
8 If a # preprocessing token, followed by an identifier, occurs lexically at the point at which
a preprocessing directive could begin, the identifier is not subject to macro replacement.
are never scanned for macro names or parameters.
150) Despite the name, a non-directive is a preprocessing directive.
are never scanned for macro names or parameters.
150) Despite the name, a non-directive is a preprocessing directive.
merger, the number of arguments is one more than the number of parameters in the macro
definition (excluding the ...).
merger, the number of arguments is one more than the number of parameters in the macro
definition (excluding the ...).
151) Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that
exist only within translation phase 4.
151) Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that
exist only within translation phase 4.
<a name="6.10.3.4" href="#6.10.3.4"><b> 6.10.3.4 Rescanning and further replacement</b></a>
1 After all parameters in the replacement list have been substituted and # and ##
<a name="6.10.3.4" href="#6.10.3.4"><b> 6.10.3.4 Rescanning and further replacement</b></a>
1 After all parameters in the replacement list have been substituted and # and ##
printf("x" "1" "= %d, x" "2" "= %s", x1, x2);
fputs(
printf("x" "1" "= %d, x" "2" "= %s", x1, x2);
fputs(
report(x>y, "x is %d but y is %d", x, y);
report(x>y, "x is %d but y is %d", x, y);
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.
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.
2 The following macro names are conditionally defined by the implementation:
__STDC_IEC_559__ The integer constant 1, intended to indicate conformance to the
2 The following macro names are conditionally defined by the implementation:
__STDC_IEC_559__ The integer constant 1, intended to indicate conformance to the
compatible complex arithmetic).
__STDC_ISO_10646__ An integer constant of the form yyyymmL (for example,
199712L). If this symbol is defined, then every character in the Unicode
compatible complex arithmetic).
__STDC_ISO_10646__ An integer constant of the form yyyymmL (for example,
199712L). If this symbol is defined, then every character in the Unicode
2 EXAMPLE A directive of the form:
#pragma listing on "..\listing.dir"
can also be expressed as:
2 EXAMPLE A directive of the form:
#pragma listing on "..\listing.dir"
can also be expressed as:
_Pragma ( "listing on \"..\\listing.dir\"" )
The latter form is processed in the same way whether it appears literally as shown, or results from macro
_Pragma ( "listing on \"..\\listing.dir\"" )
The latter form is processed in the same way whether it appears literally as shown, or results from macro
<a name="6.11" href="#6.11"><b> 6.11 Future language directions</b></a>
<a name="6.11.1" href="#6.11.1"><b> 6.11.1 Floating types</b></a>
<a name="6.11" href="#6.11"><b> 6.11 Future language directions</b></a>
<a name="6.11.1" href="#6.11.1"><b> 6.11.1 Floating types</b></a>
<a name="7.1.2" href="#7.1.2"><b> 7.1.2 Standard headers</b></a>
1 Each library function is declared, with a type that includes a prototype, in a header,159)
<a name="7.1.2" href="#7.1.2"><b> 7.1.2 Standard headers</b></a>
1 Each library function is declared, with a type that includes a prototype, in a header,159)
fully protected by parentheses where necessary, so that it groups in an arbitrary
expression as if it were a single identifier.
6 Any declaration of a library function shall have external linkage.
fully protected by parentheses where necessary, so that it groups in an arbitrary
expression as if it were a single identifier.
6 Any declaration of a library function shall have external linkage.
159) A header is not necessarily a source file, nor are the < and > delimited sequences in header names
necessarily valid source file names.
159) A header is not necessarily a source file, nor are the < and > delimited sequences in header names
necessarily valid source file names.
<a name="7.1.3" href="#7.1.3"><b> 7.1.3 Reserved identifiers</b></a>
1 Each header declares or defines all identifiers listed in its associated subclause, and
<a name="7.1.3" href="#7.1.3"><b> 7.1.3 Reserved identifiers</b></a>
1 Each header declares or defines all identifiers listed in its associated subclause, and
the header, so if a library function is declared explicitly when its header is included, one
of the techniques shown below can be used to ensure the declaration is not affected by
the header, so if a library function is declared explicitly when its header is included, one
of the techniques shown below can be used to ensure the declaration is not affected by
definition, is thereby revealed also.
164) Thus, a signal handler cannot, in general, call standard library functions.
definition, is thereby revealed also.
164) Thus, a signal handler cannot, in general, call standard library functions.
5 EXAMPLE The function atoi may be used in any of several ways:
-- by use of its associated header (possibly generating a macro expansion)
5 EXAMPLE The function atoi may be used in any of several ways:
-- by use of its associated header (possibly generating a macro expansion)
<a name="7.2" href="#7.2"><b> 7.2 Diagnostics <assert.h></b></a>
1 The header <a href="#7.2"><assert.h></a> defines the assert macro and refers to another macro,
<a name="7.2" href="#7.2"><b> 7.2 Diagnostics <assert.h></b></a>
1 The header <a href="#7.2"><assert.h></a> defines the assert macro and refers to another macro,
Assertion failed: expression, function abc, file xyz, line nnn.
Assertion failed: expression, function abc, file xyz, line nnn.
<a name="7.3" href="#7.3"><b> 7.3 Complex arithmetic <complex.h></b></a>
<a name="7.3.1" href="#7.3.1"><b> 7.3.1 Introduction</b></a>
<a name="7.3" href="#7.3"><b> 7.3 Complex arithmetic <complex.h></b></a>
<a name="7.3.1" href="#7.3.1"><b> 7.3.1 Introduction</b></a>
defined, I shall expand to _Complex_I.
5 Notwithstanding the provisions of <a href="#7.1.3">7.1.3</a>, a program may undefine and perhaps then
redefine the macros complex, imaginary, and I.
defined, I shall expand to _Complex_I.
5 Notwithstanding the provisions of <a href="#7.1.3">7.1.3</a>, a program may undefine and perhaps then
redefine the macros complex, imaginary, and I.
166) See ''future library directions'' (<a href="#7.26.1">7.26.1</a>).
167) The imaginary unit is a number i such that i 2 = -1.
166) See ''future library directions'' (<a href="#7.26.1">7.26.1</a>).
167) The imaginary unit is a number i such that i 2 = -1.
<a name="7.3.2" href="#7.3.2"><b> 7.3.2 Conventions</b></a>
1 Values are interpreted as radians, not degrees. An implementation may set errno but is
<a name="7.3.2" href="#7.3.2"><b> 7.3.2 Conventions</b></a>
1 Values are interpreted as radians, not degrees. An implementation may set errno but is
<a name="7.3.3" href="#7.3.3"><b> 7.3.3 Branch cuts</b></a>
1 Some of the functions below have branch cuts, across which the function is
discontinuous. For implementations with a signed zero (including all IEC 60559
<a name="7.3.3" href="#7.3.3"><b> 7.3.3 Branch cuts</b></a>
1 Some of the functions below have branch cuts, across which the function is
discontinuous. For implementations with a signed zero (including all IEC 60559
one side of a cut from another so the function is continuous (except for format
limitations) as the cut is approached from either side. For example, for the square root
function, which has a branch cut along the negative real axis, the top of the cut, with
imaginary part +0, maps to the positive imaginary axis, and the bottom of the cut, with
imaginary part -0, maps to the negative imaginary axis.
one side of a cut from another so the function is continuous (except for format
limitations) as the cut is approached from either side. For example, for the square root
function, which has a branch cut along the negative real axis, the top of the cut, with
imaginary part +0, maps to the positive imaginary axis, and the bottom of the cut, with
imaginary part -0, maps to the negative imaginary axis.
sides of branch cuts. These implementations shall map a cut so the function is continuous
as the cut is approached coming around the finite endpoint of the cut in a counter
clockwise direction. (Branch cuts for the functions specified here have just one finite
sides of branch cuts. These implementations shall map a cut so the function is continuous
as the cut is approached coming around the finite endpoint of the cut in a counter
clockwise direction. (Branch cuts for the functions specified here have just one finite
declarations, the pragma takes effect from its occurrence until another
CX_LIMITED_RANGE pragma is encountered, or until the end of the translation unit.
declarations, the pragma takes effect from its occurrence until another
CX_LIMITED_RANGE pragma is encountered, or until the end of the translation unit.
<a name="7.4" href="#7.4"><b> 7.4 Character handling <ctype.h></b></a>
1 The header <a href="#7.4"><ctype.h></a> declares several functions useful for classifying and mapping
<a name="7.4" href="#7.4"><b> 7.4 Character handling <ctype.h></b></a>
1 The header <a href="#7.4"><ctype.h></a> declares several functions useful for classifying and mapping
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).
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).
none of iscntrl, isdigit, ispunct, or isspace is true.174) In the "C" locale,
isalpha returns true only for the characters for which isupper or islower is true.
none of iscntrl, isdigit, ispunct, or isspace is true.174) In the "C" locale,
isalpha returns true only for the characters for which isupper or islower is true.
174) The functions islower and isupper test true or false separately for each of these additional
characters; all four combinations are possible.
174) The functions islower and isupper test true or false separately for each of these additional
characters; all four combinations are possible.
2 The isspace function tests for any character that is a standard white-space character or
is one of a locale-specific set of characters for which isalnum is false. The standard
2 The isspace function tests for any character that is a standard white-space character or
is one of a locale-specific set of characters for which isalnum is false. The standard
white-space characters are the following: space (' '), form feed ('\f'), new-line
('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). In the
white-space characters are the following: space (' '), form feed ('\f'), new-line
('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). In the
<a name="7.5" href="#7.5"><b> 7.5 Errors <errno.h></b></a>
1 The header <a href="#7.5"><errno.h></a> defines several macros, all relating to the reporting of error
<a name="7.5" href="#7.5"><b> 7.5 Errors <errno.h></b></a>
1 The header <a href="#7.5"><errno.h></a> defines several macros, all relating to the reporting of error
value is still zero just before the return.
177) See ''future library directions'' (<a href="#7.26.3">7.26.3</a>).
value is still zero just before the return.
177) See ''future library directions'' (<a href="#7.26.3">7.26.3</a>).
<a name="7.6" href="#7.6"><b> 7.6 Floating-point environment <fenv.h></b></a>
1 The header <a href="#7.6"><fenv.h></a> declares two types and several macros and functions to provide
<a name="7.6" href="#7.6"><b> 7.6 Floating-point environment <fenv.h></b></a>
1 The header <a href="#7.6"><fenv.h></a> declares two types and several macros and functions to provide
unaware of them). The responsibilities associated with accessing the floating-point environment fall
on the programmer or program that does so explicitly.
unaware of them). The responsibilities associated with accessing the floating-point environment fall
on the programmer or program that does so explicitly.
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.
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.
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.
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.
Hence, enabled traps for floating-point exceptions raised by this function are taken. The specification
in <a href="#F.7.6">F.7.6</a> is in the same spirit.
Hence, enabled traps for floating-point exceptions raised by this function are taken. The specification
in <a href="#F.7.6">F.7.6</a> is in the same spirit.
4 EXAMPLE Save, set, and restore the rounding direction. Report an error and abort if setting the
rounding direction fails.
4 EXAMPLE Save, set, and restore the rounding direction. Report an error and abort if setting the
rounding direction fails.
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.
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.
4 EXAMPLE Hide spurious underflow floating-point exceptions:
#include <a href="#7.6"><fenv.h></a>
4 EXAMPLE Hide spurious underflow floating-point exceptions:
#include <a href="#7.6"><fenv.h></a>
<a name="7.7" href="#7.7"><b> 7.7 Characteristics of floating types <float.h></b></a>
1 The header <a href="#7.7"><float.h></a> defines several macros that expand to various limits and
<a name="7.7" href="#7.7"><b> 7.7 Characteristics of floating types <float.h></b></a>
1 The header <a href="#7.7"><float.h></a> defines several macros that expand to various limits and
<a name="7.8" href="#7.8"><b> 7.8 Format conversion of integer types <inttypes.h></b></a>
1 The header <a href="#7.8"><inttypes.h></a> includes the header <a href="#7.18"><stdint.h></a> and extends it with
<a name="7.8" href="#7.8"><b> 7.8 Format conversion of integer types <inttypes.h></b></a>
1 The header <a href="#7.8"><inttypes.h></a> includes the header <a href="#7.18"><stdint.h></a> and extends it with
<a name="7.9" href="#7.9"><b> 7.9 Alternative spellings <iso646.h></b></a>
1 The header <a href="#7.9"><iso646.h></a> defines the following eleven macros (on the left) that expand
<a name="7.9" href="#7.9"><b> 7.9 Alternative spellings <iso646.h></b></a>
1 The header <a href="#7.9"><iso646.h></a> defines the following eleven macros (on the left) that expand
<a name="7.10" href="#7.10"><b> 7.10 Sizes of integer types <limits.h></b></a>
1 The header <a href="#7.10"><limits.h></a> defines several macros that expand to various limits and
<a name="7.10" href="#7.10"><b> 7.10 Sizes of integer types <limits.h></b></a>
1 The header <a href="#7.10"><limits.h></a> defines several macros that expand to various limits and
<a name="7.11" href="#7.11"><b> 7.11 Localization <locale.h></b></a>
1 The header <a href="#7.11"><locale.h></a> declares two functions, one type, and defines several macros.
<a name="7.11" href="#7.11"><b> 7.11 Localization <locale.h></b></a>
1 The header <a href="#7.11"><locale.h></a> declares two functions, one type, and defines several macros.
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.
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.
strings shall start and end in the initial shift state. The members with type char are
nonnegative numbers, any of which can be CHAR_MAX to indicate that the value is not
strings shall start and end in the initial shift state. The members with type char are
nonnegative numbers, any of which can be CHAR_MAX to indicate that the value is not
11 EXAMPLE 2 The following table illustrates how the cs_precedes, sep_by_space, and sign_posn members
affect the formatted value.
11 EXAMPLE 2 The following table illustrates how the cs_precedes, sep_by_space, and sign_posn members
affect the formatted value.
<a name="7.12" href="#7.12"><b> 7.12 Mathematics <math.h></b></a>
1 The header <a href="#7.12"><math.h></a> declares two types and many mathematical functions and defines
<a name="7.12" href="#7.12"><b> 7.12 Mathematics <math.h></b></a>
1 The header <a href="#7.12"><math.h></a> declares two types and many mathematical functions and defines
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.
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.
HUGE_VALF, or HUGE_VALL according to the return type, with the same sign as the
correct value of the function; if the integer expression math_errhandling &
HUGE_VALF, or HUGE_VALL according to the return type, with the same sign as the
correct value of the function; if the integer expression math_errhandling &
204) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and
also ''flush-to-zero'' underflow.
204) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and
also ''flush-to-zero'' underflow.
<a name="7.12.3" href="#7.12.3"><b> 7.12.3 Classification macros</b></a>
1 In the synopses in this subclause, real-floating indicates that the argument shall be an
<a name="7.12.3" href="#7.12.3"><b> 7.12.3 Classification macros</b></a>
1 In the synopses in this subclause, real-floating indicates that the argument shall be an
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.
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.
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.
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.
207) The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is
unsigned, it is treated as positive.
207) The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is
unsigned, it is treated as positive.
<a name="7.12.5" href="#7.12.5"><b> 7.12.5 Hyperbolic functions</b></a>
<a name="7.12.5.1" href="#7.12.5.1"><b> 7.12.5.1 The acosh functions</b></a>
<a name="7.12.5" href="#7.12.5"><b> 7.12.5 Hyperbolic functions</b></a>
<a name="7.12.5.1" href="#7.12.5.1"><b> 7.12.5.1 The acosh functions</b></a>
2 The rint functions differ from the nearbyint functions (<a href="#7.12.9.3">7.12.9.3</a>) only in that the
rint functions may raise the ''inexact'' floating-point exception if the result differs in
value from the argument.
2 The rint functions differ from the nearbyint functions (<a href="#7.12.9.3">7.12.9.3</a>) only in that the
rint functions may raise the ''inexact'' floating-point exception if the result differs in
value from the argument.
<a name="7.12.10" href="#7.12.10"><b> 7.12.10 Remainder functions</b></a>
<a name="7.12.10.1" href="#7.12.10.1"><b> 7.12.10.1 The fmod functions</b></a>
<a name="7.12.10" href="#7.12.10"><b> 7.12.10 Remainder functions</b></a>
<a name="7.12.10.1" href="#7.12.10.1"><b> 7.12.10.1 The fmod functions</b></a>
| 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.
| 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.
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.
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.
fmax functions choose the numeric value. See <a href="#F.9.9.2">F.9.9.2</a>.
214) The fmin functions are analogous to the fmax functions in their treatment of NaNs.
fmax functions choose the numeric value. See <a href="#F.9.9.2">F.9.9.2</a>.
214) The fmin functions are analogous to the fmax functions in their treatment of NaNs.
<a name="7.12.14" href="#7.12.14"><b> 7.12.14 Comparison macros</b></a>
1 The relational and equality operators support the usual mathematical relationships
<a name="7.12.14" href="#7.12.14"><b> 7.12.14 Comparison macros</b></a>
1 The relational and equality operators support the usual mathematical relationships
the operands compare unordered, as an error indicator for programs written without consideration of
NaNs; the result in these cases is false.
the operands compare unordered, as an error indicator for programs written without consideration of
NaNs; the result in these cases is false.
(x) < (y) || (x) > (y); however, islessgreater(x, y) does not raise
the ''invalid'' floating-point exception when x and y are unordered (nor does it evaluate x
and y twice).
(x) < (y) || (x) > (y); however, islessgreater(x, y) does not raise
the ''invalid'' floating-point exception when x and y are unordered (nor does it evaluate x
and y twice).
<a name="7.13" href="#7.13"><b> 7.13 Nonlocal jumps <setjmp.h></b></a>
1 The header <a href="#7.13"><setjmp.h></a> defines the macro setjmp, and declares one function and
<a name="7.13" href="#7.13"><b> 7.13 Nonlocal jumps <setjmp.h></b></a>
1 The header <a href="#7.13"><setjmp.h></a> defines the macro setjmp, and declares one function and
expression of a selection or iteration statement;
-- the operand of a unary ! operator with the resulting expression being the entire
expression of a selection or iteration statement;
-- the operand of a unary ! operator with the resulting expression being the entire
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.
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.
<a name="7.14" href="#7.14"><b> 7.14 Signal handling <signal.h></b></a>
1 The header <a href="#7.14"><signal.h></a> declares a type and two functions and defines several macros,
<a name="7.14" href="#7.14"><b> 7.14 Signal handling <signal.h></b></a>
1 The header <a href="#7.14"><signal.h></a> declares a type and two functions and defines several macros,
(respectively): abort, floating-point exception, illegal instruction, interrupt, segmentation violation,
and termination.
(respectively): abort, floating-point exception, illegal instruction, interrupt, segmentation violation,
and termination.
<a name="7.14.1" href="#7.14.1"><b> 7.14.1 Specify signal handling</b></a>
<a name="7.14.1.1" href="#7.14.1.1"><b> 7.14.1.1 The signal function</b></a>
<a name="7.14.1" href="#7.14.1"><b> 7.14.1 Specify signal handling</b></a>
<a name="7.14.1.1" href="#7.14.1.1"><b> 7.14.1.1 The signal function</b></a>
<a name="7.15" href="#7.15"><b> 7.15 Variable arguments <stdarg.h></b></a>
1 The header <a href="#7.15"><stdarg.h></a> declares a type and defines four macros, for advancing
<a name="7.15" href="#7.15"><b> 7.15 Variable arguments <stdarg.h></b></a>
1 The header <a href="#7.15"><stdarg.h></a> declares a type and defines four macros, for advancing
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.
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.
macro for the same ap). Each invocation of the va_arg macro modifies ap so that the
values of successive arguments are returned in turn. The parameter type shall be a type
macro for the same ap). Each invocation of the va_arg macro modifies ap so that the
values of successive arguments are returned in turn. The parameter type shall be a type
containing the expansion of the va_copy macro, that initialized the va_list ap. The
va_end macro may modify ap so that it is no longer usable (without being reinitialized
containing the expansion of the va_copy macro, that initialized the va_list ap. The
va_end macro may modify ap so that it is no longer usable (without being reinitialized
by the va_start or va_copy macro). If there is no corresponding invocation of the
va_start or va_copy macro, or if the va_end macro is not invoked before the
by the va_start or va_copy macro). If there is no corresponding invocation of the
va_start or va_copy macro, or if the va_end macro is not invoked before the
<a name="7.16" href="#7.16"><b> 7.16 Boolean type and values <stdbool.h></b></a>
1 The header <a href="#7.16"><stdbool.h></a> defines four macros.
<a name="7.16" href="#7.16"><b> 7.16 Boolean type and values <stdbool.h></b></a>
1 The header <a href="#7.16"><stdbool.h></a> defines four macros.
<a name="7.17" href="#7.17"><b> 7.17 Common definitions <stddef.h></b></a>
1 The following types and macros are defined in the standard header <a href="#7.17"><stddef.h></a>. Some
<a name="7.17" href="#7.17"><b> 7.17 Common definitions <stddef.h></b></a>
1 The following types and macros are defined in the standard header <a href="#7.17"><stddef.h></a>. Some
<a name="7.18" href="#7.18"><b> 7.18 Integer types <stdint.h></b></a>
1 The header <a href="#7.18"><stdint.h></a> declares sets of integer types having specified widths, and
<a name="7.18" href="#7.18"><b> 7.18 Integer types <stdint.h></b></a>
1 The header <a href="#7.18"><stdint.h></a> declares sets of integer types having specified widths, and
223) See ''future library directions'' (<a href="#7.26.8">7.26.8</a>).
224) Some of these types may denote implementation-defined extended integer types.
223) See ''future library directions'' (<a href="#7.26.8">7.26.8</a>).
224) Some of these types may denote implementation-defined extended integer types.
<a name="7.18.1.1" href="#7.18.1.1"><b> 7.18.1.1 Exact-width integer types</b></a>
1 The typedef name intN_t designates a signed integer type with width N , no padding
<a name="7.18.1.1" href="#7.18.1.1"><b> 7.18.1.1 Exact-width integer types</b></a>
1 The typedef name intN_t designates a signed integer type with width N , no padding
grounds for choosing one type over another, it will simply pick some integer type satisfying the
signedness and width requirements.
grounds for choosing one type over another, it will simply pick some integer type satisfying the
signedness and width requirements.
<a name="7.18.2" href="#7.18.2"><b> 7.18.2 Limits of specified-width integer types</b></a>
1 The following object-like macros226) specify the minimum and maximum limits of the
types declared in <a href="#7.18"><stdint.h></a>. Each macro name corresponds to a similar type name in
<a name="7.18.2" href="#7.18.2"><b> 7.18.2 Limits of specified-width integer types</b></a>
1 The following object-like macros226) specify the minimum and maximum limits of the
types declared in <a href="#7.18"><stdint.h></a>. Each macro name corresponds to a similar type name in
2 Each instance of any defined macro shall be replaced by a constant expression suitable
for use in #if preprocessing directives, and this expression shall have the same type as
would an expression that is an object of the corresponding type converted according to
2 Each instance of any defined macro shall be replaced by a constant expression suitable
for use in #if preprocessing directives, and this expression shall have the same type as
would an expression that is an object of the corresponding type converted according to
226) C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined
before <a href="#7.18"><stdint.h></a> is included.
226) C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined
before <a href="#7.18"><stdint.h></a> is included.
the integer promotions. Its implementation-defined value shall be equal to or greater in
magnitude (absolute value) than the corresponding value given below, with the same sign,
the integer promotions. Its implementation-defined value shall be equal to or greater in
magnitude (absolute value) than the corresponding value given below, with the same sign,
before <a href="#7.18"><stdint.h></a> is included.
228) A freestanding implementation need not provide all of these types.
before <a href="#7.18"><stdint.h></a> is included.
228) A freestanding implementation need not provide all of these types.
1 The following function-like macros230) expand to integer constants suitable for
initializing objects that have integer types corresponding to types defined in
<a href="#7.18"><stdint.h></a>. Each macro name corresponds to a similar type name in <a href="#7.18.1.2">7.18.1.2</a> or
1 The following function-like macros230) expand to integer constants suitable for
initializing objects that have integer types corresponding to types defined in
<a href="#7.18"><stdint.h></a>. Each macro name corresponds to a similar type name in <a href="#7.18.1.2">7.18.1.2</a> or
2 The argument in any instance of these macros shall be an unsuffixed integer constant (as
defined in <a href="#6.4.4.1">6.4.4.1</a>) with a value that does not exceed the limits for the corresponding type.
3 Each invocation of one of these macros shall expand to an integer constant expression
2 The argument in any instance of these macros shall be an unsuffixed integer constant (as
defined in <a href="#6.4.4.1">6.4.4.1</a>) with a value that does not exceed the limits for the corresponding type.
3 Each invocation of one of these macros shall expand to an integer constant expression
230) C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is
defined before <a href="#7.18"><stdint.h></a> is included.
230) C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is
defined before <a href="#7.18"><stdint.h></a> is included.
<a name="7.18.4.1" href="#7.18.4.1"><b> 7.18.4.1 Macros for minimum-width integer constants</b></a>
1 The macro INTN_C(value) shall expand to an integer constant expression
<a name="7.18.4.1" href="#7.18.4.1"><b> 7.18.4.1 Macros for minimum-width integer constants</b></a>
1 The macro INTN_C(value) shall expand to an integer constant expression
<a name="7.19" href="#7.19"><b> 7.19 Input/output <stdio.h></b></a>
<a name="7.19.1" href="#7.19.1"><b> 7.19.1 Introduction</b></a>
<a name="7.19" href="#7.19"><b> 7.19 Input/output <stdio.h></b></a>
<a name="7.19.1" href="#7.19.1"><b> 7.19.1 Introduction</b></a>
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.
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.
-- The wide character input/output functions -- the union of the ungetwc function, the
wide character input functions, and the wide character output functions.
-- The wide character input/output functions -- the union of the ungetwc function, the
wide character input functions, and the wide character output functions.
stream becomes a wide-oriented stream. Similarly, once a byte input/output function has
been applied to a stream without orientation, the stream becomes a byte-oriented stream.
stream becomes a wide-oriented stream. Similarly, once a byte input/output function has
been applied to a stream without orientation, the stream becomes a byte-oriented stream.
<a name="7.19.3" href="#7.19.3"><b> 7.19.3 Files</b></a>
1 A stream is associated with an external file (which may be a physical device) by opening
<a name="7.19.3" href="#7.19.3"><b> 7.19.3 Files</b></a>
1 A stream is associated with an external file (which may be a physical device) by opening
6 The address of the FILE object used to control a stream may be significant; a copy of a
FILE object need not serve in place of the original.
6 The address of the FILE object used to control a stream may be significant; a copy of a
FILE object need not serve in place of the original.
7 At program startup, three text streams are predefined and need not be opened explicitly
-- standard input (for reading conventional input), standard output (for writing
7 At program startup, three text streams are predefined and need not be opened explicitly
-- standard input (for reading conventional input), standard output (for writing
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.
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.
multibyte character. The wide character input/output functions and the byte input/output
functions store the value of the macro EILSEQ in errno if and only if an encoding error
multibyte character. The wide character input/output functions and the byte input/output
functions store the value of the macro EILSEQ in errno if and only if an encoding error
implementation. It is still necessary to use the remove function to remove such files when their use
is ended, and before program termination.
implementation. It is still necessary to use the remove function to remove such files when their use
is ended, and before program termination.
TMP_MAX different strings, but any or all of them may already be in use by existing files
and thus not be suitable return values.
TMP_MAX different strings, but any or all of them may already be in use by existing files
and thus not be suitable return values.
remaining characters, or it might use them to select different kinds of a file (some of which might not
conform to the properties in <a href="#7.19.2">7.19.2</a>).
remaining characters, or it might use them to select different kinds of a file (some of which might not
conform to the properties in <a href="#7.19.2">7.19.2</a>).
r+b or rb+ open binary file for update (reading and writing)
w+b or wb+ truncate to zero length or create binary file for update
r+b or rb+ open binary file for update (reading and writing)
w+b or wb+ truncate to zero length or create binary file for update
as in the fopen function.238)
3 If filename is a null pointer, the freopen function attempts to change the mode of
as in the fopen function.238)
3 If filename is a null pointer, the freopen function attempts to change the mode of
(stderr, stdin, or stdout), as those identifiers need not be modifiable lvalues to which the value
returned by the fopen function may be assigned.
(stderr, stdin, or stdout), as those identifiers need not be modifiable lvalues to which the value
returned by the fopen function may be assigned.
before a buffer that has automatic storage duration is deallocated upon block exit.
240) The fprintf functions perform writes to memory for the %n specifier.
before a buffer that has automatic storage duration is deallocated upon block exit.
240) The fprintf functions perform writes to memory for the %n specifier.
specifications, each of which results in fetching zero or more subsequent arguments,
converting them, if applicable, according to the corresponding conversion specifier, and
specifications, each of which results in fetching zero or more subsequent arguments,
converting them, if applicable, according to the corresponding conversion specifier, and
242) The results of all floating conversions of a negative zero, and of negative values that round to zero,
include a minus sign.
242) The results of all floating conversions of a negative zero, and of negative values that round to zero,
include a minus sign.
following c conversion specifier applies to a wint_t argument; that a
following s conversion specifier applies to a pointer to a wchar_t
following c conversion specifier applies to a wint_t argument; that a
following s conversion specifier applies to a pointer to a wchar_t
f,F A double argument representing a floating-point number is converted to
decimal notation in the style [-]ddd.ddd, where the number of digits after
f,F A double argument representing a floating-point number is converted to
decimal notation in the style [-]ddd.ddd, where the number of digits after
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.
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.
fractional portion of the result and the decimal-point character is removed if
there is no fractional portion remaining.
fractional portion of the result and the decimal-point character is removed if
there is no fractional portion remaining.
written up to (but not including) the terminating null character. If the
precision is specified, no more than that many bytes are written. If the
written up to (but not including) the terminating null character. If the
precision is specified, no more than that many bytes are written. If the
247) Redundant shift sequences may result if multibyte characters have a state-dependent encoding.
248) See ''future library directions'' (<a href="#7.26.9">7.26.9</a>).
247) Redundant shift sequences may result if multibyte characters have a state-dependent encoding.
248) See ''future library directions'' (<a href="#7.26.9">7.26.9</a>).
11 For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded
to a hexadecimal floating number with the given precision.
11 For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded
to a hexadecimal floating number with the given precision.
int day, hour, min;
fprintf(stdout, "%s, %s %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
int day, hour, min;
fprintf(stdout, "%s, %s %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
17 EXAMPLE 2 In this example, multibyte characters do not have a state-dependent encoding, and the
members of the extended character set that consist of more than one byte each consist of exactly two bytes,
17 EXAMPLE 2 In this example, multibyte characters do not have a state-dependent encoding, and the
members of the extended character set that consist of more than one byte each consist of exactly two bytes,
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.
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.
18 Given the following wide string with length seven,
static wchar_t wstr[] = L" X Yabc Z W";
18 Given the following wide string with length seven,
static wchar_t wstr[] = L" X Yabc Z W";
-- An optional length modifier that specifies the size of the receiving object.
-- A conversion specifier character that specifies the type of conversion to be applied.
-- An optional length modifier that specifies the size of the receiving object.
-- A conversion specifier character that specifies the type of conversion to be applied.
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.
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.
in the object, the behavior is undefined.
11 The length modifiers and their meanings are:
in the object, the behavior is undefined.
11 The length modifiers and their meanings are:
for the subject sequence of the strtol function with the value 0 for the
base argument. The corresponding argument shall be a pointer to signed
integer.
for the subject sequence of the strtol function with the value 0 for the
base argument. The corresponding argument shall be a pointer to signed
integer.
o Matches an optionally signed octal integer, whose format is the same as
expected for the subject sequence of the strtoul function with the value 8
o Matches an optionally signed octal integer, whose format is the same as
expected for the subject sequence of the strtoul function with the value 8
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.
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.
characters that begins in the initial shift state. Each multibyte character is
converted to a wide character as if by a call to the mbrtowc function, with
characters that begins in the initial shift state. Each multibyte character is
converted to a wide character as if by a call to the mbrtowc function, with
during the same program execution, the pointer that results shall compare
equal to that value; otherwise the behavior of the %p conversion is undefined.
during the same program execution, the pointer that results shall compare
equal to that value; otherwise the behavior of the %p conversion is undefined.
n No input is consumed. The corresponding argument shall be a pointer to
signed integer into which is to be written the number of characters read from
n No input is consumed. The corresponding argument shall be a pointer to
signed integer into which is to be written the number of characters read from
of the characters actually written into the array. If copying takes place between objects
that overlap, the behavior is undefined.
of the characters actually written into the array. If copying takes place between objects
that overlap, the behavior is undefined.
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.
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.
<a name="7.19.7" href="#7.19.7"><b> 7.19.7 Character input/output functions</b></a>
<a name="7.19.7.1" href="#7.19.7.1"><b> 7.19.7.1 The fgetc function</b></a>
<a name="7.19.7" href="#7.19.7"><b> 7.19.7 Character input/output functions</b></a>
<a name="7.19.7.1" href="#7.19.7.1"><b> 7.19.7.1 The fgetc function</b></a>
<a name="7.19.8" href="#7.19.8"><b> 7.19.8 Direct input/output functions</b></a>
<a name="7.19.8.1" href="#7.19.8.1"><b> 7.19.8.1 The fread function</b></a>
<a name="7.19.8" href="#7.19.8"><b> 7.19.8 Direct input/output functions</b></a>
<a name="7.19.8.1" href="#7.19.8.1"><b> 7.19.8.1 The fread function</b></a>
an earlier successful call to the ftell function on a stream associated with the same file
and whence shall be SEEK_SET.
an earlier successful call to the ftell function on a stream associated with the same file
and whence shall be SEEK_SET.
5 After determining the new position, a successful call to the fseek function undoes any
effects of the ungetc function on the stream, clears the end-of-file indicator for the
5 After determining the new position, a successful call to the fseek function undoes any
effects of the ungetc function on the stream, clears the end-of-file indicator for the
stream to its position at the time of the ftell call; the difference between two such
return values is not necessarily a meaningful measure of the number of characters written
stream to its position at the time of the ftell call; the difference between two such
return values is not necessarily a meaningful measure of the number of characters written
<a name="7.20" href="#7.20"><b> 7.20 General utilities <stdlib.h></b></a>
1 The header <a href="#7.20"><stdlib.h></a> declares five types and several functions of general utility, and
<a name="7.20" href="#7.20"><b> 7.20 General utilities <stdlib.h></b></a>
1 The header <a href="#7.20"><stdlib.h></a> declares five types and several functions of general utility, and
<a name="7.20.1" href="#7.20.1"><b> 7.20.1 Numeric conversion functions</b></a>
1 The functions atof, atoi, atol, and atoll need not affect the value of the integer
<a name="7.20.1" href="#7.20.1"><b> 7.20.1 Numeric conversion functions</b></a>
1 The functions atof, atoi, atol, and atoll need not affect the value of the integer
4 If the subject sequence has the expected form for a floating-point number, the sequence of
characters starting with the first digit or the decimal-point character (whichever occurs
first) is interpreted as a floating constant according to the rules of <a href="#6.4.4.2">6.4.4.2</a>, except that the
4 If the subject sequence has the expected form for a floating-point number, the sequence of
characters starting with the first digit or the decimal-point character (whichever occurs
first) is interpreted as a floating constant according to the rules of <a href="#6.4.4.2">6.4.4.2</a>, except that the
decimal-point character is used in place of a period, and that if neither an exponent part
nor a decimal-point character appears in a decimal floating point number, or if a binary
decimal-point character is used in place of a period, and that if neither an exponent part
nor a decimal-point character appears in a decimal floating point number, or if a binary
260) DECIMAL_DIG, defined in <a href="#7.7"><float.h></a>, 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.
260) DECIMAL_DIG, defined in <a href="#7.7"><float.h></a>, 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.
resembling an integer represented in some radix determined by the value of base, and a
final string of one or more unrecognized characters, including the terminating null
resembling an integer represented in some radix determined by the value of base, and a
final string of one or more unrecognized characters, including the terminating null
<a name="7.20.2" href="#7.20.2"><b> 7.20.2 Pseudo-random sequence generation functions</b></a>
<a name="7.20.2.1" href="#7.20.2.1"><b> 7.20.2.1 The rand function</b></a>
<a name="7.20.2" href="#7.20.2"><b> 7.20.2 Pseudo-random sequence generation functions</b></a>
<a name="7.20.2.1" href="#7.20.2.1"><b> 7.20.2.1 The rand function</b></a>
realloc function, or if the space has been deallocated by a call to free or realloc,
the behavior is undefined.
realloc function, or if the space has been deallocated by a call to free or realloc,
the behavior is undefined.
<a name="7.20.4" href="#7.20.4"><b> 7.20.4 Communication with the environment</b></a>
<a name="7.20.4.1" href="#7.20.4.1"><b> 7.20.4.1 The abort function</b></a>
<a name="7.20.4" href="#7.20.4"><b> 7.20.4 Communication with the environment</b></a>
<a name="7.20.4.1" href="#7.20.4.1"><b> 7.20.4.1 The abort function</b></a>
Description
2 The exit function causes normal program termination to occur. If more than one call to
the exit function is executed by a program, the behavior is undefined.
Description
2 The exit function causes normal program termination to occur. If more than one call to
the exit function is executed by a program, the behavior is undefined.
3 First, all functions registered by the atexit function are called, in the reverse order of
their registration,262) except that a function is called after any previously registered
3 First, all functions registered by the atexit function are called, in the reverse order of
their registration,262) except that a function is called after any previously registered
262) Each function is called as many times as it was registered, and in the correct order with respect to
other registered functions.
262) Each function is called as many times as it was registered, and in the correct order with respect to
other registered functions.
<a name="7.20.5" href="#7.20.5"><b> 7.20.5 Searching and sorting utilities</b></a>
1 These utilities make use of a comparison function to search or sort arrays of unspecified
<a name="7.20.5" href="#7.20.5"><b> 7.20.5 Searching and sorting utilities</b></a>
1 These utilities make use of a comparison function to search or sort arrays of unspecified
size of each element of the array is specified by size.
3 The comparison function pointed to by compar is called with two arguments that point
size of each element of the array is specified by size.
3 The comparison function pointed to by compar is called with two arguments that point
<a name="7.20.6" href="#7.20.6"><b> 7.20.6 Integer arithmetic functions</b></a>
<a name="7.20.6.1" href="#7.20.6.1"><b> 7.20.6.1 The abs, labs and llabs functions</b></a>
<a name="7.20.6" href="#7.20.6"><b> 7.20.6 Integer arithmetic functions</b></a>
<a name="7.20.6.1" href="#7.20.6.1"><b> 7.20.6.1 The abs, labs and llabs functions</b></a>
<a name="7.20.7" href="#7.20.7"><b> 7.20.7 Multibyte/wide character conversion functions</b></a>
1 The behavior of the multibyte character functions is affected by the LC_CTYPE category
<a name="7.20.7" href="#7.20.7"><b> 7.20.7 Multibyte/wide character conversion functions</b></a>
1 The behavior of the multibyte character functions is affected by the LC_CTYPE category
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.
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.
<a name="7.21" href="#7.21"><b> 7.21 String handling <string.h></b></a>
<a name="7.21.1" href="#7.21.1"><b> 7.21.1 String function conventions</b></a>
<a name="7.21" href="#7.21"><b> 7.21 String handling <string.h></b></a>
<a name="7.21.1" href="#7.21.1"><b> 7.21.1 String function conventions</b></a>
s1.269) If copying takes place between objects that overlap, the behavior is undefined.
3 If the array pointed to by s2 is a string that is shorter than n characters, null characters
s1.269) If copying takes place between objects that overlap, the behavior is undefined.
3 If the array pointed to by s2 is a string that is shorter than n characters, null characters
string into the array pointed to by s1. The transformation is such that if the strcmp
function is applied to two transformed strings, it returns a value greater than, equal to, or
string into the array pointed to by s1. The transformation is such that if the strcmp
function is applied to two transformed strings, it returns a value greater than, equal to, or
less than zero, corresponding to the result of the strcoll function applied to the same
two original strings. No more than n characters are placed into the resulting array
less than zero, corresponding to the result of the strcoll function applied to the same
two original strings. No more than n characters are placed into the resulting array
Returns
3 The strchr function returns a pointer to the located character, or a null pointer if the
character does not occur in the string.
Returns
3 The strchr function returns a pointer to the located character, or a null pointer if the
character does not occur in the string.
that is not contained in the current separator string pointed to by s2. If no such character
is found, then there are no tokens in the string pointed to by s1 and the strtok function
that is not contained in the current separator string pointed to by s2. If no such character
is found, then there are no tokens in the string pointed to by s1 and the strtok function
returns a null pointer. If such a character is found, it is the start of the first token.
4 The strtok function then searches from there for a character that is contained in the
returns a null pointer. If such a character is found, it is the start of the first token.
4 The strtok function then searches from there for a character that is contained in the
<a name="7.22" href="#7.22"><b> 7.22 Type-generic math <tgmath.h></b></a>
1 The header <a href="#7.22"><tgmath.h></a> includes the headers <a href="#7.12"><math.h></a> and <a href="#7.3"><complex.h></a> and
<a name="7.22" href="#7.22"><b> 7.22 Type-generic math <tgmath.h></b></a>
1 The header <a href="#7.22"><tgmath.h></a> includes the headers <a href="#7.12"><math.h></a> and <a href="#7.3"><complex.h></a> and
273) If the type of the argument is not compatible with the type of the parameter for the selected function,
the behavior is undefined.
273) If the type of the argument is not compatible with the type of the parameter for the selected function,
the behavior is undefined.
function in <a href="#7.12"><math.h></a>, the corresponding type-generic macro has the same name as the
function. These type-generic macros are:
function in <a href="#7.12"><math.h></a>, the corresponding type-generic macro has the same name as the
function. These type-generic macros are:
<a name="7.23" href="#7.23"><b> 7.23 Date and time <time.h></b></a>
<a name="7.23.1" href="#7.23.1"><b> 7.23.1 Components of time</b></a>
<a name="7.23" href="#7.23"><b> 7.23 Date and time <time.h></b></a>
<a name="7.23.1" href="#7.23.1"><b> 7.23.1 Components of time</b></a>
The value of tm_isdst is positive if Daylight Saving Time is in effect, zero if Daylight
Saving Time is not in effect, and negative if the information is not available.
The value of tm_isdst is positive if Daylight Saving Time is in effect, zero if Daylight
Saving Time is not in effect, and negative if the information is not available.
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.
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.
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.
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.
consists of a % character, possibly followed by an E or O modifier character (described
below), followed by a character that determines the behavior of the conversion specifier.
All ordinary multibyte characters (including the terminating null character) are copied
consists of a % character, possibly followed by an E or O modifier character (described
below), followed by a character that determines the behavior of the conversion specifier.
All ordinary multibyte characters (including the terminating null character) are copied
unchanged into the array. If copying takes place between objects that overlap, the
behavior is undefined. No more than maxsize characters are placed into the array.
unchanged into the array. If copying takes place between objects that overlap, the
behavior is undefined. No more than maxsize characters are placed into the array.
<a name="7.24" href="#7.24"><b> 7.24 Extended multibyte and wide character utilities <wchar.h></b></a>
<a name="7.24.1" href="#7.24.1"><b> 7.24.1 Introduction</b></a>
<a name="7.24" href="#7.24"><b> 7.24 Extended multibyte and wide character utilities <wchar.h></b></a>
<a name="7.24.1" href="#7.24.1"><b> 7.24.1 Introduction</b></a>
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.
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.
-- Functions for wide string date and time conversion; and
-- Functions that provide extended capabilities for conversion between multibyte and
-- Functions for wide string date and time conversion; and
-- Functions that provide extended capabilities for conversion between multibyte and
left adjustment flag, described later, has been given) to the field width. The field
width takes the form of an asterisk * (described later) or a nonnegative decimal
left adjustment flag, described later, has been given) to the field width. The field
width takes the form of an asterisk * (described later) or a nonnegative decimal
282) The results of all floating conversions of a negative zero, and of negative values that round to zero,
include a minus sign.
282) The results of all floating conversions of a negative zero, and of negative values that round to zero,
include a minus sign.
and G conversions, the result of converting a floating-point number always
contains a decimal-point wide character, even if no digits follow it. (Normally, a
and G conversions, the result of converting a floating-point number always
contains a decimal-point wide character, even if no digits follow it. (Normally, a
an intmax_t or uintmax_t argument; or that a following n conversion
specifier applies to a pointer to an intmax_t argument.
an intmax_t or uintmax_t argument; or that a following n conversion
specifier applies to a pointer to an intmax_t argument.
z Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
size_t or the corresponding signed integer type argument; or that a
z Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
size_t or the corresponding signed integer type argument; or that a
[-]nan or [-]nan(n-wchar-sequence) -- which style, and the meaning of
any n-wchar-sequence, is implementation-defined. The F conversion
specifier produces INF, INFINITY, or NAN instead of inf, infinity, or
[-]nan or [-]nan(n-wchar-sequence) -- which style, and the meaning of
any n-wchar-sequence, is implementation-defined. The F conversion
specifier produces INF, INFINITY, or NAN instead of inf, infinity, or
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.
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.
for an exact representation of the value; if the precision is missing and
FLT_RADIX is not a power of 2, then the precision is sufficient to
for an exact representation of the value; if the precision is missing and
FLT_RADIX is not a power of 2, then the precision is sufficient to
might suffice depending on the implementation's scheme for determining the digit to the left of the
decimal-point wide character.
might suffice depending on the implementation's scheme for determining the digit to the left of the
decimal-point wide character.
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.
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.
int day, hour, min;
fwprintf(stdout, L"%ls, %ls %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
int day, hour, min;
fwprintf(stdout, L"%ls, %ls %d, %.2d:%.2d\n",
weekday, month, day, hour, min);
Forward references: the btowc function (<a href="#7.24.6.1.1">7.24.6.1.1</a>), the mbrtowc function
(<a href="#7.24.6.3.2">7.24.6.3.2</a>).
Forward references: the btowc function (<a href="#7.24.6.1.1">7.24.6.1.1</a>), the mbrtowc function
(<a href="#7.24.6.3.2">7.24.6.3.2</a>).
-- An optional length modifier that specifies the size of the receiving object.
-- A conversion specifier wide character that specifies the type of conversion to be
-- An optional length modifier that specifies the size of the receiving object.
-- A conversion specifier wide character that specifies the type of conversion to be
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.
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.
object does not have an appropriate type, or if the result of the conversion cannot be
represented in the object, the behavior is undefined.
object does not have an appropriate type, or if the result of the conversion cannot be
represented in the object, the behavior is undefined.
i Matches an optionally signed integer, whose format is the same as expected
for the subject sequence of the wcstol function with the value 0 for the
base argument. The corresponding argument shall be a pointer to signed
i Matches an optionally signed integer, whose format is the same as expected
for the subject sequence of the wcstol function with the value 0 for the
base argument. The corresponding argument shall be a pointer to signed
If an l length modifier is present, the corresponding argument shall be a
pointer to the initial element of an array of wchar_t large enough to accept
If an l length modifier is present, the corresponding argument shall be a
pointer to the initial element of an array of wchar_t large enough to accept
from the input stream so far by this call to the fwscanf function. Execution
of a %n directive does not increment the assignment count returned at the
completion of execution of the fwscanf function. No argument is
from the input stream so far by this call to the fwscanf function. Execution
of a %n directive does not increment the assignment count returned at the
completion of execution of the fwscanf function. No argument is
converted, but one is consumed. If the conversion specification includes an
assignment-suppressing wide character or a field width, the behavior is
converted, but one is consumed. If the conversion specification includes an
assignment-suppressing wide character or a field width, the behavior is
Forward references: the wcstod, wcstof, and wcstold functions (<a href="#7.24.4.1.1">7.24.4.1.1</a>), the
wcstol, wcstoll, wcstoul, and wcstoull functions (<a href="#7.24.4.1.2">7.24.4.1.2</a>), the wcrtomb
Forward references: the wcstod, wcstof, and wcstold functions (<a href="#7.24.4.1.1">7.24.4.1.1</a>), the
wcstol, wcstoll, wcstoul, and wcstoull functions (<a href="#7.24.4.1.2">7.24.4.1.2</a>), the wcrtomb
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.
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.
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.
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.
additional wide characters are read after a new-line wide character (which is retained) or
after end-of-file. A null wide character is written immediately after the last wide
additional wide characters are read after a new-line wide character (which is retained) or
after end-of-file. A null wide character is written immediately after the last wide
3 The fputws function returns EOF if a write or encoding error occurs; otherwise, it
returns a nonnegative value.
3 The fputws function returns EOF if a write or encoding error occurs; otherwise, it
returns a nonnegative value.
stream pointed to by stream. Pushed-back wide characters will be returned by
subsequent reads on that stream in the reverse order of their pushing. A successful
stream pointed to by stream. Pushed-back wide characters will be returned by
subsequent reads on that stream in the reverse order of their pushing. A successful
intervening call (with the stream pointed to by stream) to a file positioning function
(fseek, fsetpos, or rewind) discards any pushed-back wide characters for the
intervening call (with the stream pointed to by stream) to a file positioning function
(fseek, fsetpos, or rewind) discards any pushed-back wide characters for the
<a name="7.24.4.1" href="#7.24.4.1"><b> 7.24.4.1 Wide string numeric conversion functions</b></a>
<a name="7.24.4.1.1" href="#7.24.4.1.1"><b> 7.24.4.1.1 The wcstod, wcstof, and wcstold functions</b></a>
<a name="7.24.4.1" href="#7.24.4.1"><b> 7.24.4.1 Wide string numeric conversion functions</b></a>
<a name="7.24.4.1.1" href="#7.24.4.1.1"><b> 7.24.4.1.1 The wcstod, wcstof, and wcstold functions</b></a>
n-wchar-sequence nondigit
The subject sequence is defined as the longest initial subsequence of the input wide
string, starting with the first non-white-space wide character, that is of the expected form.
n-wchar-sequence nondigit
The subject sequence is defined as the longest initial subsequence of the input wide
string, starting with the first non-white-space wide character, that is of the expected form.
9 If the subject sequence has the decimal form and at most DECIMAL_DIG (defined in
<a href="#7.7"><float.h></a>) significant digits, the result should be correctly rounded. If the subject
9 If the subject sequence has the decimal form and at most DECIMAL_DIG (defined in
<a href="#7.7"><float.h></a>) significant digits, the result should be correctly rounded. If the subject
296) DECIMAL_DIG, defined in <a href="#7.7"><float.h></a>, 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.
296) DECIMAL_DIG, defined in <a href="#7.7"><float.h></a>, 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.
<a name="7.24.4.1.2" href="#7.24.4.1.2"><b> 7.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions</b></a>
Synopsis
<a name="7.24.4.1.2" href="#7.24.4.1.2"><b> 7.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions</b></a>
Synopsis
value of base is 16, the wide characters 0x or 0X may optionally precede the sequence
of letters and digits, following the sign if present.
value of base is 16, the wide characters 0x or 0X may optionally precede the sequence
of letters and digits, following the sign if present.
4 The subject sequence is defined as the longest initial subsequence of the input wide
string, starting with the first non-white-space wide character, that is of the expected form.
4 The subject sequence is defined as the longest initial subsequence of the input wide
string, starting with the first non-white-space wide character, that is of the expected form.
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.
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.
2 The wcsncat function appends not more than n wide characters (a null wide character
and those that follow it are not appended) from the array pointed to by s2 to the end of
2 The wcsncat function appends not more than n wide characters (a null wide character
and those that follow it are not appended) from the array pointed to by s2 to the end of
the wide string pointed to by s1. The initial wide character of s2 overwrites the null
wide character at the end of s1. A terminating null wide character is always appended to
the wide string pointed to by s1. The initial wide character of s2 overwrites the null
wide character at the end of s1. A terminating null wide character is always appended to
the start of the first token.
5 The wcstok function then searches from there for a wide character that is contained in
the current separator wide string. If no such wide character is found, the current token
the start of the first token.
5 The wcstok function then searches from there for a wide character that is contained in
the current separator wide string. If no such wide character is found, the current token
extends to the end of the wide string pointed to by s1, and subsequent searches in the
same wide string for a token return a null pointer. If such a wide character is found, it is
extends to the end of the wide string pointed to by s1, and subsequent searches in the
same wide string for a token return a null pointer. If such a wide character is found, it is
<a name="7.24.4.6" href="#7.24.4.6"><b> 7.24.4.6 Miscellaneous functions</b></a>
<a name="7.24.4.6.1" href="#7.24.4.6.1"><b> 7.24.4.6.1 The wcslen function</b></a>
<a name="7.24.4.6" href="#7.24.4.6"><b> 7.24.4.6 Miscellaneous functions</b></a>
<a name="7.24.4.6.1" href="#7.24.4.6.1"><b> 7.24.4.6.1 The wcslen function</b></a>
-- The argument maxsize indicates the limiting number of wide characters.
-- The argument format is a wide string and the conversion specifiers are replaced by
-- The argument maxsize indicates the limiting number of wide characters.
-- The argument format is a wide string and the conversion specifiers are replaced by
<a name="7.24.6.1" href="#7.24.6.1"><b> 7.24.6.1 Single-byte/wide character conversion functions</b></a>
<a name="7.24.6.1.1" href="#7.24.6.1.1"><b> 7.24.6.1.1 The btowc function</b></a>
<a name="7.24.6.1" href="#7.24.6.1"><b> 7.24.6.1 Single-byte/wide character conversion functions</b></a>
<a name="7.24.6.1.1" href="#7.24.6.1.1"><b> 7.24.6.1.1 The btowc function</b></a>
Description
2 If ps is not a null pointer, the mbsinit function determines whether the pointed-to
mbstate_t object describes an initial conversion state.
Description
2 If ps is not a null pointer, the mbsinit function determines whether the pointed-to
mbstate_t object describes an initial conversion state.
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).
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).
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.
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.
<a name="7.25" href="#7.25"><b> 7.25 Wide character classification and mapping utilities <wctype.h></b></a>
<a name="7.25.1" href="#7.25.1"><b> 7.25.1 Introduction</b></a>
<a name="7.25" href="#7.25"><b> 7.25 Wide character classification and mapping utilities <wctype.h></b></a>
<a name="7.25.1" href="#7.25.1"><b> 7.25.1 Introduction</b></a>
<a name="7.25.2" href="#7.25.2"><b> 7.25.2 Wide character classification utilities</b></a>
1 The header <a href="#7.25"><wctype.h></a> declares several functions useful for classifying wide
<a name="7.25.2" href="#7.25.2"><b> 7.25.2 Wide character classification utilities</b></a>
1 The header <a href="#7.25"><wctype.h></a> declares several functions useful for classifying wide
(which cannot occur for wc == L' ' of course), then either iswgraph(wc) or iswprint(wc)
&& iswspace(wc) is true, but not both.
(which cannot occur for wc == L' ' of course), then either iswgraph(wc) or iswprint(wc)
&& iswspace(wc) is true, but not both.
wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace
is true.305)
wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace
is true.305)
305) The functions iswlower and iswupper test true or false separately for each of these additional
wide characters; all four combinations are possible.
305) The functions iswlower and iswupper test true or false separately for each of these additional
wide characters; all four combinations are possible.
corresponding functions in <a href="#7.4.1">7.4.1</a> with respect to printing, white-space, single-byte execution
characters other than ' '.
corresponding functions in <a href="#7.4.1">7.4.1</a> with respect to printing, white-space, single-byte execution
characters other than ' '.
iswctype(wc, wctype("alnum")) // iswalnum(wc)
iswctype(wc, wctype("alpha")) // iswalpha(wc)
iswctype(wc, wctype("alnum")) // iswalnum(wc)
iswctype(wc, wctype("alpha")) // iswalpha(wc)
<a name="7.25.3" href="#7.25.3"><b> 7.25.3 Wide character case mapping utilities</b></a>
1 The header <a href="#7.25"><wctype.h></a> declares several functions useful for mapping wide characters.
<a name="7.25.3" href="#7.25.3"><b> 7.25.3 Wide character case mapping utilities</b></a>
1 The header <a href="#7.25"><wctype.h></a> declares several functions useful for mapping wide characters.
<a name="7.26" href="#7.26"><b> 7.26 Future library directions</b></a>
1 The following names are grouped under individual headers for convenience. All external
<a name="7.26" href="#7.26"><b> 7.26 Future library directions</b></a>
1 The following names are grouped under individual headers for convenience. All external
types defined in the <a href="#7.18"><stdint.h></a> header. Macro names beginning with INT or UINT
and ending with _MAX, _MIN, or _C may be added to the macros defined in the
<a href="#7.18"><stdint.h></a> header.
types defined in the <a href="#7.18"><stdint.h></a> header. Macro names beginning with INT or UINT
and ending with _MAX, _MIN, or _C may be added to the macros defined in the
<a href="#7.18"><stdint.h></a> header.
<a name="7.26.9" href="#7.26.9"><b> 7.26.9 Input/output <stdio.h></b></a>
1 Lowercase letters may be added to the conversion specifiers and length modifiers in
<a name="7.26.9" href="#7.26.9"><b> 7.26.9 Input/output <stdio.h></b></a>
1 Lowercase letters may be added to the conversion specifiers and length modifiers in
<a name="A.1.3" href="#A.1.3"><b>A.1.3 Identifiers</b></a>
(<a href="#6.4.2.1">6.4.2.1</a>) identifier:
<a name="A.1.3" href="#A.1.3"><b>A.1.3 Identifiers</b></a>
(<a href="#6.4.2.1">6.4.2.1</a>) identifier:
(<a href="#6.4.4.2">6.4.4.2</a>) hexadecimal-floating-constant:
hexadecimal-prefix hexadecimal-fractional-constant
(<a href="#6.4.4.2">6.4.4.2</a>) hexadecimal-floating-constant:
hexadecimal-prefix hexadecimal-fractional-constant
<a name="A.1.7" href="#A.1.7"><b>A.1.7 Punctuators</b></a>
(<a href="#6.4.6">6.4.6</a>) punctuator: one of
<a name="A.1.7" href="#A.1.7"><b>A.1.7 Punctuators</b></a>
(<a href="#6.4.6">6.4.6</a>) punctuator: one of
<a name="A.2" href="#A.2"><b>A.2 Phrase structure grammar</b></a>
<a name="A.2.1" href="#A.2.1"><b>A.2.1 Expressions</b></a>
<a name="A.2" href="#A.2"><b>A.2 Phrase structure grammar</b></a>
<a name="A.2.1" href="#A.2.1"><b>A.2.1 Expressions</b></a>
double complex catanh(double complex z);
float complex catanhf(float complex z);
long double complex catanhl(long double complex z);
double complex catanh(double complex z);
float complex catanhf(float complex z);
long double complex catanhl(long double complex z);
<a name="B.6" href="#B.6"><b>B.6 Characteristics of floating types <float.h></b></a>
FLT_ROUNDS DBL_MIN_EXP FLT_MAX
<a name="B.6" href="#B.6"><b>B.6 Characteristics of floating types <float.h></b></a>
FLT_ROUNDS DBL_MIN_EXP FLT_MAX
double frexp(double value, int *exp);
float frexpf(float value, int *exp);
double frexp(double value, int *exp);
float frexpf(float value, int *exp);
double hypot(double x, double y);
float hypotf(float x, float y);
double hypot(double x, double y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);
double pow(double x, double y);
long double hypotl(long double x, long double y);
double pow(double x, double y);
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
<a name="B.16" href="#B.16"><b>B.16 Common definitions <stddef.h></b></a>
ptrdiff_t size_t wchar_t NULL
<a name="B.16" href="#B.16"><b>B.16 Common definitions <stddef.h></b></a>
ptrdiff_t size_t wchar_t NULL
size_t fread(void * restrict ptr,
size_t size, size_t nmemb,
size_t fread(void * restrict ptr,
size_t size, size_t nmemb,
unsigned long long int strtoull(
const char * restrict nptr,
unsigned long long int strtoull(
const char * restrict nptr,
double wcstod(const wchar_t * restrict nptr,
wchar_t ** restrict endptr);
double wcstod(const wchar_t * restrict nptr,
wchar_t ** restrict endptr);
size_t wcsspn(const wchar_t *s1, const wchar_t *s2);
wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);
size_t wcsspn(const wchar_t *s1, const wchar_t *s2);
wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);
wchar_t *wcstok(wchar_t * restrict s1,
const wchar_t * restrict s2,
wchar_t *wcstok(wchar_t * restrict s1,
const wchar_t * restrict s2,
int iswupper(wint_t wc);
int iswxdigit(wint_t wc);
int iswctype(wint_t wc, wctype_t desc);
int iswupper(wint_t wc);
int iswxdigit(wint_t wc);
int iswctype(wint_t wc, wctype_t desc);
0AC7-0AC9, 0ACB-0ACD, 0AD0, 0AE0
Oriya: 0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30,
0B32-0B33, 0B36-0B39, 0B3E-0B43, 0B47-0B48, 0B4B-0B4D,
0AC7-0AC9, 0ACB-0ACD, 0AD0, 0AE0
Oriya: 0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30,
0B32-0B33, 0B36-0B39, 0B3E-0B43, 0B47-0B48, 0B4B-0B4D,
0B5C-0B5D, 0B5F-0B61
Tamil: 0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A,
0B5C-0B5D, 0B5F-0B61
Tamil: 0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A,
4 The values given in the following list shall be replaced by implementation-defined
constant expressions that are greater or equal in magnitude (absolute value) to those
shown, with the same sign:
4 The values given in the following list shall be replaced by implementation-defined
constant expressions that are greater or equal in magnitude (absolute value) to those
shown, with the same sign:
<a name="F.2.1" href="#F.2.1"><b> F.2.1 Infinities, signed zeros, and NaNs</b></a>
1 This specification does not define the behavior of signaling NaNs.309) It generally uses
<a name="F.2.1" href="#F.2.1"><b> F.2.1 Infinities, signed zeros, and NaNs</b></a>
1 This specification does not define the behavior of signaling NaNs.309) It generally uses
309) Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are
sufficient for closure of the arithmetic.
309) Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are
sufficient for closure of the arithmetic.
-- The relational and equality operators provide IEC 60559 comparisons. IEC 60559
identifies a need for additional comparison predicates to facilitate writing code that
-- The relational and equality operators provide IEC 60559 comparisons. IEC 60559
identifies a need for additional comparison predicates to facilitate writing code that
-- The signbit macro and the fpclassify macro in <a href="#7.12"><math.h></a>, used in
conjunction with the number classification macros (FP_NAN, FP_INFINITE,
-- The signbit macro and the fpclassify macro in <a href="#7.12"><math.h></a>, used in
conjunction with the number classification macros (FP_NAN, FP_INFINITE,
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.)
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.)
<a name="F.6" href="#F.6"><b> F.6 Contracted expressions</b></a>
1 A contracted expression treats infinities, NaNs, signed zeros, subnormals, and the
<a name="F.6" href="#F.6"><b> F.6 Contracted expressions</b></a>
1 A contracted expression treats infinities, NaNs, signed zeros, subnormals, and the
point control modes will be the default ones and the floating-point status flags will not be tested,
which allows certain optimizations (see <a href="#F.8">F.8</a>).
point control modes will be the default ones and the floating-point status flags will not be tested,
which allows certain optimizations (see <a href="#F.8">F.8</a>).
floating-point exception, other than ''inexact'';314) the implementation should then
proceed with the translation of the program.
floating-point exception, other than ''inexact'';314) the implementation should then
proceed with the translation of the program.
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.
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.
<a name="F.7.6" href="#F.7.6"><b> F.7.6 Changing the environment</b></a>
1 Operations defined in <a href="#6.5">6.5</a> and functions and macros defined for the standard libraries
<a name="F.7.6" href="#F.7.6"><b> F.7.6 Changing the environment</b></a>
1 Operations defined in <a href="#6.5">6.5</a> and functions and macros defined for the standard libraries
floating-point exceptions need not be precise: the actual order and number of occurrences
of floating-point exceptions (> 1) may vary from what the source code expresses. Thus,
the preceding loop could be treated as
floating-point exceptions need not be precise: the actual order and number of occurrences
of floating-point exceptions (> 1) may vary from what the source code expresses. Thus,
the preceding loop could be treated as
and others that round perfectly.
1 * x and x / 1 (->) x The expressions 1 * x, x / 1, and x are equivalent
(on IEC 60559 machines, among others).317)
and others that round perfectly.
1 * x and x / 1 (->) x The expressions 1 * x, x / 1, and x are equivalent
(on IEC 60559 machines, among others).317)
can be zero, infinite, or NaN.
x - y (<->) x + (-y) The expressions x - y, x + (-y), and (-y) + x
are equivalent (on IEC 60559 machines, among others).
can be zero, infinite, or NaN.
x - y (<->) x + (-y) The expressions x - y, x + (-y), and (-y) + x
are equivalent (on IEC 60559 machines, among others).
whose magnitude is too large.
7 The ''underflow'' floating-point exception is raised whenever a result is tiny (essentially
whose magnitude is too large.
7 The ''underflow'' floating-point exception is raised whenever a result is tiny (essentially
321) It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if
avoiding them would be too costly.
321) It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if
avoiding them would be too costly.
<a name="F.9.1.2" href="#F.9.1.2"><b> F.9.1.2 The asin functions</b></a>
1 -- asin((+-)0) returns (+-)0.
<a name="F.9.1.2" href="#F.9.1.2"><b> F.9.1.2 The asin functions</b></a>
1 -- asin((+-)0) returns (+-)0.
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.
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.
<a name="F.9.1.7" href="#F.9.1.7"><b> F.9.1.7 The tan functions</b></a>
1 -- tan((+-)0) returns (+-)0.
<a name="F.9.1.7" href="#F.9.1.7"><b> F.9.1.7 The tan functions</b></a>
1 -- tan((+-)0) returns (+-)0.
<a name="F.9.3" href="#F.9.3"><b> F.9.3 Exponential and logarithmic functions</b></a>
<a name="F.9.3.1" href="#F.9.3.1"><b> F.9.3.1 The exp functions</b></a>
<a name="F.9.3" href="#F.9.3"><b> F.9.3 Exponential and logarithmic functions</b></a>
<a name="F.9.3.1" href="#F.9.3.1"><b> F.9.3.1 The exp functions</b></a>
<a name="F.9.3.6" href="#F.9.3.6"><b> F.9.3.6 The ldexp functions</b></a>
1 On a binary system, ldexp(x, exp) is equivalent to scalbn(x, exp).
<a name="F.9.3.6" href="#F.9.3.6"><b> F.9.3.6 The ldexp functions</b></a>
1 On a binary system, ldexp(x, exp) is equivalent to scalbn(x, exp).
<a name="F.9.3.12" href="#F.9.3.12"><b> F.9.3.12 The modf functions</b></a>
1 -- modf((+-)x, iptr) returns a result with the same sign as x.
<a name="F.9.3.12" href="#F.9.3.12"><b> F.9.3.12 The modf functions</b></a>
1 -- modf((+-)x, iptr) returns a result with the same sign as x.
<a name="F.9.4.3" href="#F.9.4.3"><b> F.9.4.3 The hypot functions</b></a>
1 -- hypot(x, y), hypot(y, x), and hypot(x, -y) are equivalent.
<a name="F.9.4.3" href="#F.9.4.3"><b> F.9.4.3 The hypot functions</b></a>
1 -- hypot(x, y), hypot(y, x), and hypot(x, -y) are equivalent.
<a name="F.9.4.5" href="#F.9.4.5"><b> F.9.4.5 The sqrt functions</b></a>
1 sqrt is fully specified as a basic arithmetic operation in IEC 60559.
<a name="F.9.4.5" href="#F.9.4.5"><b> F.9.4.5 The sqrt functions</b></a>
1 sqrt is fully specified as a basic arithmetic operation in IEC 60559.
<a name="F.9.6.6" href="#F.9.6.6"><b> F.9.6.6 The round functions</b></a>
1 -- round((+-)0) returns (+-)0.
<a name="F.9.6.6" href="#F.9.6.6"><b> F.9.6.6 The round functions</b></a>
1 -- round((+-)0) returns (+-)0.
<a name="F.9.7" href="#F.9.7"><b> F.9.7 Remainder functions</b></a>
<a name="F.9.7.1" href="#F.9.7.1"><b> F.9.7.1 The fmod functions</b></a>
<a name="F.9.7" href="#F.9.7"><b> F.9.7 Remainder functions</b></a>
<a name="F.9.7.1" href="#F.9.7.1"><b> F.9.7.1 The fmod functions</b></a>
<a name="F.9.8.3" href="#F.9.8.3"><b> F.9.8.3 The nextafter functions</b></a>
1 -- nextafter(x, y) raises the ''overflow'' and ''inexact'' floating-point exceptions
<a name="F.9.8.3" href="#F.9.8.3"><b> F.9.8.3 The nextafter functions</b></a>
1 -- nextafter(x, y) raises the ''overflow'' and ''inexact'' floating-point exceptions
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.
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.
<a name="G" href="#G"><b> Annex G</b></a>
(informative)
IEC 60559-compatible complex arithmetic
<a name="G.1" href="#G.1"><b> G.1 Introduction</b></a>
<a name="G" href="#G"><b> Annex G</b></a>
(informative)
IEC 60559-compatible complex arithmetic
<a name="G.1" href="#G.1"><b> G.1 Introduction</b></a>
IEC 60559 real floating-point arithmetic. Although these specifications have been
carefully designed, there is little existing practice to validate the design decisions.
Therefore, these specifications are not normative, but should be viewed more as
IEC 60559 real floating-point arithmetic. Although these specifications have been
carefully designed, there is little existing practice to validate the design decisions.
Therefore, these specifications are not normative, but should be viewed more as
<a name="G.4" href="#G.4"><b> G.4 Conversions</b></a>
<a name="G.4.1" href="#G.4.1"><b> G.4.1 Imaginary types</b></a>
<a name="G.4" href="#G.4"><b> G.4 Conversions</b></a>
<a name="G.4.1" href="#G.4.1"><b> G.4.1 Imaginary types</b></a>
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'').
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'').
-- if the first operand is a nonzero finite number or an infinity and the second operand is
a zero, then the result of the / operator is an infinity.
-- if the first operand is a nonzero finite number or an infinity and the second operand is
a zero, then the result of the / operator is an infinity.
int recalc = 0;
if ( isinf(a) || isinf(b) ) { // z is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
int recalc = 0;
if ( isinf(a) || isinf(b) ) { // z is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
- a = copysign(isinf(a) ? <a href="#1.0">1.0</a> : 0.0, a);
- b = copysign(isinf(b) ? <a href="#1.0">1.0</a> : 0.0, b);
+ a = copysign(isinf(a) ? 1.0 : 0.0, a);
+ b = copysign(isinf(b) ? 1.0 : 0.0, b);
if (isnan(c)) c = copysign(0.0, c);
if (isnan(d)) d = copysign(0.0, d);
recalc = 1;
}
if ( isinf(c) || isinf(d) ) { // w is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
if (isnan(c)) c = copysign(0.0, c);
if (isnan(d)) d = copysign(0.0, d);
recalc = 1;
}
if ( isinf(c) || isinf(d) ) { // w is infinite
/* "Box" the infinity and change NaNs in the other factor to 0 */
- c = copysign(isinf(c) ? <a href="#1.0">1.0</a> : 0.0, c);
- d = copysign(isinf(d) ? <a href="#1.0">1.0</a> : 0.0, d);
+ c = copysign(isinf(c) ? 1.0 : 0.0, c);
+ d = copysign(isinf(d) ? 1.0 : 0.0, d);
if (isnan(a)) a = copysign(0.0, a);
if (isnan(b)) b = copysign(0.0, b);
recalc = 1;
if (isnan(a)) a = copysign(0.0, a);
if (isnan(b)) b = copysign(0.0, b);
recalc = 1;
- a = copysign(isinf(a) ? <a href="#1.0">1.0</a> : 0.0, a);
- b = copysign(isinf(b) ? <a href="#1.0">1.0</a> : 0.0, b);
+ a = copysign(isinf(a) ? 1.0 : 0.0, a);
+ b = copysign(isinf(b) ? 1.0 : 0.0, b);
x = INFINITY * ( a * c + b * d );
y = INFINITY * ( b * c - a * d );
}
else if (isinf(logbw) &&
isfinite(a) && isfinite(b)) {
x = INFINITY * ( a * c + b * d );
y = INFINITY * ( b * c - a * d );
}
else if (isinf(logbw) &&
isfinite(a) && isfinite(b)) {
- c = copysign(isinf(c) ? <a href="#1.0">1.0</a> : 0.0, c);
- d = copysign(isinf(d) ? <a href="#1.0">1.0</a> : 0.0, d);
+ c = copysign(isinf(c) ? 1.0 : 0.0, c);
+ d = copysign(isinf(d) ? 1.0 : 0.0, d);
particularly suited to IEC 60559 implementations. For families of functions, the
specifications apply to all of the functions even though only the principal function is
particularly suited to IEC 60559 implementations. For families of functions, the
specifications apply to all of the functions even though only the principal function is
shown. Unless otherwise specified, where the symbol ''(+-)'' occurs in both an argument
and the result, the result has the same sign as the argument.
shown. Unless otherwise specified, where the symbol ''(+-)'' occurs in both an argument
and the result, the result has the same sign as the argument.
implementations, including IEC 60559 ones, in <a href="#7.3.9">7.3.9</a>. These functions raise no floating-
point exceptions.
6 Each of the functions cabs and carg is specified by a formula in terms of a real
implementations, including IEC 60559 ones, in <a href="#7.3.9">7.3.9</a>. These functions raise no floating-
point exceptions.
6 Each of the functions cabs and carg is specified by a formula in terms of a real
cabs(x + iy) = hypot(x, y)
carg(x + iy) = atan2(y, x)
7 Each of the functions casin, catan, ccos, csin, and ctan is specified implicitly by
cabs(x + iy) = hypot(x, y)
carg(x + iy) = atan2(y, x)
7 Each of the functions casin, catan, ccos, csin, and ctan is specified implicitly by
<a name="G.6.1" href="#G.6.1"><b> G.6.1 Trigonometric functions</b></a>
<a name="G.6.1.1" href="#G.6.1.1"><b> G.6.1.1 The cacos functions</b></a>
<a name="G.6.1" href="#G.6.1"><b> G.6.1 Trigonometric functions</b></a>
<a name="G.6.1.1" href="#G.6.1.1"><b> G.6.1.1 The cacos functions</b></a>
-- cacosh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
floating-point exception, for finite y.
-- cacosh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
floating-point exception, for finite y.
-- catanh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
floating-point exception, for finite y.
-- catanh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
floating-point exception, for finite y.
unspecified) and raises the ''invalid'' floating-point exception.
-- csinh(+0 + iNaN) returns (+-)0 + iNaN (where the sign of the real part of the result is
unspecified).
unspecified) and raises the ''invalid'' floating-point exception.
-- csinh(+0 + iNaN) returns (+-)0 + iNaN (where the sign of the real part of the result is
unspecified).
-- csinh(x + i (inf)) returns NaN + iNaN and raises the ''invalid'' floating-point
exception, for positive finite x.
-- csinh(x + i (inf)) returns NaN + iNaN and raises the ''invalid'' floating-point
exception, for positive finite x.
<a name="G.6.3" href="#G.6.3"><b> G.6.3 Exponential and logarithmic functions</b></a>
<a name="G.6.3.1" href="#G.6.3.1"><b> G.6.3.1 The cexp functions</b></a>
<a name="G.6.3" href="#G.6.3"><b> G.6.3 Exponential and logarithmic functions</b></a>
<a name="G.6.3.1" href="#G.6.3.1"><b> G.6.3.1 The cexp functions</b></a>
-- clog(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
point exception, for finite x.
-- clog(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
point exception, for finite x.
-- clog(-(inf) + iy) returns +(inf) + ipi , for finite positive-signed y.
-- clog(+(inf) + iy) returns +(inf) + i0, for finite positive-signed y.
-- clog(-(inf) + iy) returns +(inf) + ipi , for finite positive-signed y.
-- clog(+(inf) + iy) returns +(inf) + i0, for finite positive-signed y.
327) This allows cpow( z , c ) to be implemented as cexp(c clog( z )) without precluding
implementations that treat special cases more carefully.
327) This allows cpow( z , c ) to be implemented as cexp(c clog( z )) without precluding
implementations that treat special cases more carefully.
<a name="G.7" href="#G.7"><b> G.7 Type-generic math <tgmath.h></b></a>
1 Type-generic macros that accept complex arguments also accept imaginary arguments. If
<a name="G.7" href="#G.7"><b> G.7 Type-generic math <tgmath.h></b></a>
1 Type-generic macros that accept complex arguments also accept imaginary arguments. If
<a name="H.1" href="#H.1"><b> H.1 Introduction</b></a>
1 This annex documents the extent to which the C language supports the ISO/IEC 10967-1
standard for language-independent arithmetic (LIA-1). LIA-1 is more general than
<a name="H.1" href="#H.1"><b> H.1 Introduction</b></a>
1 This annex documents the extent to which the C language supports the ISO/IEC 10967-1
standard for language-independent arithmetic (LIA-1). LIA-1 is more general than
<a name="H.2" href="#H.2"><b> H.2 Types</b></a>
1 The relevant C arithmetic types meet the requirements of LIA-1 types if an
implementation adds notification of exceptional arithmetic operations and meets the 1
<a name="H.2" href="#H.2"><b> H.2 Types</b></a>
1 The relevant C arithmetic types meet the requirements of LIA-1 types if an
implementation adds notification of exceptional arithmetic operations and meets the 1
<a name="H.2.2.1" href="#H.2.2.1"><b> H.2.2.1 Integer operations</b></a>
1 The integer operations on integer types are the following:
<a name="H.2.2.1" href="#H.2.2.1"><b> H.2.2.1 Integer operations</b></a>
1 The integer operations on integer types are the following:
LIA-1. If an implementation adds support for the LIA-1 exceptional values
''underflow'', ''floating_overflow'', and ''"undefined'', then those types are conformant
with LIA-1. An implementation that uses IEC 60559 floating-point formats and
LIA-1. If an implementation adds support for the LIA-1 exceptional values
''underflow'', ''floating_overflow'', and ''"undefined'', then those types are conformant
with LIA-1. An implementation that uses IEC 60559 floating-point formats and
conformant types.
<a name="H.2.3.1" href="#H.2.3.1"><b> H.2.3.1 Floating-point parameters</b></a>
1 The parameters for a floating point data type can be accessed by the following:
conformant types.
<a name="H.2.3.1" href="#H.2.3.1"><b> H.2.3.1 Floating-point parameters</b></a>
1 The parameters for a floating point data type can be accessed by the following:
fmax FLT_MAX, DBL_MAX, LDBL_MAX
fminN FLT_MIN, DBL_MIN, LDBL_MIN
fmax FLT_MAX, DBL_MAX, LDBL_MAX
fminN FLT_MIN, DBL_MIN, LDBL_MIN
scaleF scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
scalblnf(x, li), scalbln(x, li), scalblnl(x, li)
intpartF modff(x, &y), modf(x, &y), modfl(x, &y)
scaleF scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
scalblnf(x, li), scalbln(x, li), scalblnl(x, li)
intpartF modff(x, &y), modf(x, &y), modfl(x, &y)
<a name="H.3" href="#H.3"><b> H.3 Notification</b></a>
1 Notification is the process by which a user or program is informed that an exceptional
<a name="H.3" href="#H.3"><b> H.3 Notification</b></a>
1 Notification is the process by which a user or program is informed that an exceptional
where i is an expression of type int representing a subset of the LIA-1 indicators.
4 C allows an implementation to provide the following LIA-1 required behavior: at
program termination if any indicator is set the implementation shall send an unambiguous
where i is an expression of type int representing a subset of the LIA-1 indicators.
4 C allows an implementation to provide the following LIA-1 required behavior: at
program termination if any indicator is set the implementation shall send an unambiguous
and ''hard to ignore'' message (see LIA-1 subclause <a href="#6.1.2">6.1.2</a>)
5 LIA-1 does not make the distinction between floating-point and integer for ''undefined''.
and ''hard to ignore'' message (see LIA-1 subclause <a href="#6.1.2">6.1.2</a>)
5 LIA-1 does not make the distinction between floating-point and integer for ''undefined''.
-- A statement with no apparent effect is encountered (<a href="#6.8">6.8</a>).
-- A constant expression is used as the controlling expression of a selection statement
(<a href="#6.8.4">6.8.4</a>).
-- A statement with no apparent effect is encountered (<a href="#6.8">6.8</a>).
-- A constant expression is used as the controlling expression of a selection statement
(<a href="#6.8.4">6.8.4</a>).
-- An incorrectly formed preprocessing group is encountered while skipping a
preprocessing group (<a href="#6.10.1">6.10.1</a>).
-- An incorrectly formed preprocessing group is encountered while skipping a
preprocessing group (<a href="#6.10.1">6.10.1</a>).
-- The order in which subexpressions are evaluated and the order in which side effects
take place, except as specified for the function-call (), &&, ||, ?:, and comma
operators (<a href="#6.5">6.5</a>).
-- The order in which subexpressions are evaluated and the order in which side effects
take place, except as specified for the function-call (), &&, ||, ?:, and comma
operators (<a href="#6.5">6.5</a>).
-- The order in which the function designator, arguments, and subexpressions within the
arguments are evaluated in a function call (<a href="#6.5.2.2">6.5.2.2</a>).
-- The order in which the function designator, arguments, and subexpressions within the
arguments are evaluated in a function call (<a href="#6.5.2.2">6.5.2.2</a>).
range of the return type (<a href="#7.12.6.5">7.12.6.5</a>, <a href="#F.9.3.5">F.9.3.5</a>).
-- The result of rounding when the value is out of range (<a href="#7.12.9.5">7.12.9.5</a>, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#F.9.6.5">F.9.6.5</a>).
range of the return type (<a href="#7.12.6.5">7.12.6.5</a>, <a href="#F.9.3.5">F.9.3.5</a>).
-- The result of rounding when the value is out of range (<a href="#7.12.9.5">7.12.9.5</a>, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#F.9.6.5">F.9.6.5</a>).
-- The value stored by the remquo functions in the object pointed to by quo when y is
zero (<a href="#7.12.10.3">7.12.10.3</a>).
-- The value stored by the remquo functions in the object pointed to by quo when y is
zero (<a href="#7.12.10.3">7.12.10.3</a>).
-- Whether or when library functions in <a href="#7.12"><math.h></a> raise the ''inexact'' floating-point
exception in an IEC 60559 conformant implementation (<a href="#F.9">F.9</a>).
-- Whether or when library functions in <a href="#7.12"><math.h></a> raise the ''inexact'' floating-point
exception in an IEC 60559 conformant implementation (<a href="#F.9">F.9</a>).
-- A trap representation is read by an lvalue expression that does not have character type
(<a href="#6.2.6.1">6.2.6.1</a>).
-- A trap representation is read by an lvalue expression that does not have character type
(<a href="#6.2.6.1">6.2.6.1</a>).
-- A trap representation is produced by a side effect that modifies any part of the object
using an lvalue expression that does not have character type (<a href="#6.2.6.1">6.2.6.1</a>).
-- A trap representation is produced by a side effect that modifies any part of the object
using an lvalue expression that does not have character type (<a href="#6.2.6.1">6.2.6.1</a>).
-- The program attempts to modify a string literal (<a href="#6.4.5">6.4.5</a>).
-- The characters ', \, ", //, or /* occur in the sequence between the < and >
-- The program attempts to modify a string literal (<a href="#6.4.5">6.4.5</a>).
-- The characters ', \, ", //, or /* occur in the sequence between the < and >
-- Pointers that do not point into, or just beyond, the same array object are subtracted
(<a href="#6.5.6">6.5.6</a>).
-- Pointers that do not point into, or just beyond, the same array object are subtracted
(<a href="#6.5.6">6.5.6</a>).
-- An array subscript is out of range, even if an object is apparently accessible with the
given subscript (as in the lvalue expression a[1][7] given the declaration int
-- An array subscript is out of range, even if an object is apparently accessible with the
given subscript (as in the lvalue expression a[1][7] given the declaration int
-- An attempt is made to access, or generate a pointer to just past, a flexible array
member of a structure when the referenced object provides no elements for that array
-- An attempt is made to access, or generate a pointer to just past, a flexible array
member of a structure when the referenced object provides no elements for that array
compatible return types, or their parameters disagree in use of the ellipsis terminator
or the number and type of parameters (after default argument promotion, when there
is no parameter type list or when one type is specified by a function definition with an
compatible return types, or their parameters disagree in use of the ellipsis terminator
or the number and type of parameters (after default argument promotion, when there
is no parameter type list or when one type is specified by a function definition with an
identifier list) (<a href="#6.7.5.3">6.7.5.3</a>).
-- The value of an unnamed member of a structure or union is used (<a href="#6.7.8">6.7.8</a>).
identifier list) (<a href="#6.7.5.3">6.7.5.3</a>).
-- The value of an unnamed member of a structure or union is used (<a href="#6.7.8">6.7.8</a>).
-- The result of the preprocessing operator ## is not a valid preprocessing token
(<a href="#6.10.3.3">6.10.3.3</a>).
-- The result of the preprocessing operator ## is not a valid preprocessing token
(<a href="#6.10.3.3">6.10.3.3</a>).
-- The #line preprocessing directive that results after expansion does not match one of
the two well-defined forms, or its digit sequence specifies zero or a number greater
-- The #line preprocessing directive that results after expansion does not match one of
the two well-defined forms, or its digit sequence specifies zero or a number greater
-- The argument to the assert macro does not have a scalar type (<a href="#7.2">7.2</a>).
-- The CX_LIMITED_RANGE, FENV_ACCESS, or FP_CONTRACT pragma is used in
any context other than outside all external declarations or preceding all explicit
-- The argument to the assert macro does not have a scalar type (<a href="#7.2">7.2</a>).
-- The CX_LIMITED_RANGE, FENV_ACCESS, or FP_CONTRACT pragma is used in
any context other than outside all external declarations or preceding all explicit
declarations and statements inside a compound statement (<a href="#7.3.4">7.3.4</a>, <a href="#7.6.1">7.6.1</a>, <a href="#7.12.2">7.12.2</a>).
-- The value of an argument to a character handling function is neither equal to the value
declarations and statements inside a compound statement (<a href="#7.3.4">7.3.4</a>, <a href="#7.6.1">7.6.1</a>, <a href="#7.12.2">7.12.2</a>).
-- The value of an argument to a character handling function is neither equal to the value
invocation of the corresponding setjmp macro, that was changed between the
setjmp invocation and longjmp call (<a href="#7.13.2.1">7.13.2.1</a>).
invocation of the corresponding setjmp macro, that was changed between the
setjmp invocation and longjmp call (<a href="#7.13.2.1">7.13.2.1</a>).
-- The program specifies an invalid pointer to a signal handler function (<a href="#7.14.1.1">7.14.1.1</a>).
-- A signal handler returns when the signal corresponded to a computational exception
-- The program specifies an invalid pointer to a signal handler function (<a href="#7.14.1.1">7.14.1.1</a>).
-- A signal handler returns when the signal corresponded to a computational exception
-- The parameter parmN of a va_start macro is declared with the register
storage class, with a function or array type, or with a type that is not compatible with
the type that results after application of the default argument promotions (<a href="#7.15.1.4">7.15.1.4</a>).
-- The parameter parmN of a va_start macro is declared with the register
storage class, with a function or array type, or with a type that is not compatible with
the type that results after application of the default argument promotions (<a href="#7.15.1.4">7.15.1.4</a>).
-- The member designator parameter of an offsetof macro is an invalid right
operand of the . operator for the type parameter, or designates a bit-field (<a href="#7.17">7.17</a>).
-- The member designator parameter of an offsetof macro is an invalid right
operand of the . operator for the type parameter, or designates a bit-field (<a href="#7.17">7.17</a>).
-- A conversion specification for one of the formatted input/output functions uses a
length modifier with a conversion specifier other than those described (<a href="#7.19.6.1">7.19.6.1</a>,
-- A conversion specification for one of the formatted input/output functions uses a
length modifier with a conversion specifier other than those described (<a href="#7.19.6.1">7.19.6.1</a>,
<a href="#7.24.2.5">7.24.2.5</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.7">7.24.2.7</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.10">7.24.2.10</a>).
-- The contents of the array supplied in a call to the fgets, gets, or fgetws function
are used after a read error occurred (<a href="#7.19.7.2">7.19.7.2</a>, <a href="#7.19.7.7">7.19.7.7</a>, <a href="#7.24.3.2">7.24.3.2</a>).
<a href="#7.24.2.5">7.24.2.5</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.7">7.24.2.7</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.10">7.24.2.10</a>).
-- The contents of the array supplied in a call to the fgets, gets, or fgetws function
are used after a read error occurred (<a href="#7.19.7.2">7.19.7.2</a>, <a href="#7.19.7.7">7.19.7.7</a>, <a href="#7.24.3.2">7.24.3.2</a>).
-- The file position indicator for a binary stream is used after a call to the ungetc
function where its value was zero before the call (<a href="#7.19.7.11">7.19.7.11</a>).
-- The file position indicator for a binary stream is used after a call to the ungetc
function where its value was zero before the call (<a href="#7.19.7.11">7.19.7.11</a>).
-- The array being searched by the bsearch function does not have its elements in
proper order (<a href="#7.20.5.1">7.20.5.1</a>).
-- The array being searched by the bsearch function does not have its elements in
proper order (<a href="#7.20.5.1">7.20.5.1</a>).
<a name="J.3" href="#J.3"><b> J.3 Implementation-defined behavior</b></a>
1 A conforming implementation is required to document its choice of behavior in each of
<a name="J.3" href="#J.3"><b> J.3 Implementation-defined behavior</b></a>
1 A conforming implementation is required to document its choice of behavior in each of
<a name="J.3.4" href="#J.3.4"><b> J.3.4 Characters</b></a>
1 -- The number of bits in a byte (<a href="#3.6">3.6</a>).
<a name="J.3.4" href="#J.3.4"><b> J.3.4 Characters</b></a>
1 -- The number of bits in a byte (<a href="#3.6">3.6</a>).
-- The results of some bitwise operations on signed integers (<a href="#6.5">6.5</a>).
<a name="J.3.6" href="#J.3.6"><b> J.3.6 Floating point</b></a>
-- The results of some bitwise operations on signed integers (<a href="#6.5">6.5</a>).
<a name="J.3.6" href="#J.3.6"><b> J.3.6 Floating point</b></a>
<a name="J.3.8" href="#J.3.8"><b> J.3.8 Hints</b></a>
1 -- The extent to which suggestions made by using the register storage-class
<a name="J.3.8" href="#J.3.8"><b> J.3.8 Hints</b></a>
1 -- The extent to which suggestions made by using the register storage-class
-- The method by which preprocessing tokens (possibly resulting from macro
expansion) in a #include directive are combined into a header name (<a href="#6.10.2">6.10.2</a>).
-- The method by which preprocessing tokens (possibly resulting from macro
expansion) in a #include directive are combined into a header name (<a href="#6.10.2">6.10.2</a>).
-- The nesting limit for #include processing (<a href="#6.10.2">6.10.2</a>).
-- Whether the # operator inserts a \ character before the \ character that begins a
-- The nesting limit for #include processing (<a href="#6.10.2">6.10.2</a>).
-- Whether the # operator inserts a \ character before the \ character that begins a
-- Whether a domain error occurs or zero is returned when a remquo function has a
second argument of zero (<a href="#7.12.10.3">7.12.10.3</a>).
-- Whether a domain error occurs or zero is returned when a remquo function has a
second argument of zero (<a href="#7.12.10.3">7.12.10.3</a>).
-- The interpretation of a - character that is neither the first nor the last character, nor
the second where a ^ character is the first, in the scanlist for %[ conversion in the
fscanf or fwscanf function (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>).
-- The interpretation of a - character that is neither the first nor the last character, nor
the second where a ^ character is the first, in the scanlist for %[ conversion in the
fscanf or fwscanf function (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>).
-- The set of sequences matched by a %p conversion and the interpretation of the
corresponding input item in the fscanf or fwscanf function (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
-- The set of sequences matched by a %p conversion and the interpretation of the
corresponding input item in the fscanf or fwscanf function (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
<a name="J.4" href="#J.4"><b> J.4 Locale-specific behavior</b></a>
1 The following characteristics of a hosted environment are locale-specific and are required
<a name="J.4" href="#J.4"><b> J.4 Locale-specific behavior</b></a>
1 The following characteristics of a hosted environment are locale-specific and are required
<a name="J.5" href="#J.5"><b> J.5 Common extensions</b></a>
1 The following extensions are widely used in many systems, but are not portable to all
<a name="J.5" href="#J.5"><b> J.5 Common extensions</b></a>
1 The following extensions are widely used in many systems, but are not portable to all
<a name="J.5.7" href="#J.5.7"><b> J.5.7 Function pointer casts</b></a>
1 A pointer to an object or to void may be cast to a pointer to a function, allowing data to
<a name="J.5.7" href="#J.5.7"><b> J.5.7 Function pointer casts</b></a>
1 A pointer to an object or to void may be cast to a pointer to a function, allowing data to
<a name="J.5.14" href="#J.5.14"><b> J.5.14 Extra arguments for signal handlers</b></a>
1 Handlers for specific signals are called with extra arguments in addition to the signal
<a name="J.5.14" href="#J.5.14"><b> J.5.14 Extra arguments for signal handlers</b></a>
1 Handlers for specific signals are called with extra arguments in addition to the signal
18. ISO/IEC 10646-1:1993, Information technology -- Universal Multiple-Octet
Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.
18. ISO/IEC 10646-1:1993, Information technology -- Universal Multiple-Octet
Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.
++ (prefix increment operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a> <a href="#7.18"><stdint.h></a> header, <a href="#4">4</a>, <a href="#5.2.4.2">5.2.4.2</a>, <a href="#6.10.1">6.10.1</a>, <a href="#7.8">7.8</a>,
+= (addition assignment operator), <a href="#6.5.16.2">6.5.16.2</a> <a href="#7.18">7.18</a>, <a href="#7.26.8">7.26.8</a>
, (comma operator), <a href="#6.5.17">6.5.17</a>
++ (prefix increment operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a> <a href="#7.18"><stdint.h></a> header, <a href="#4">4</a>, <a href="#5.2.4.2">5.2.4.2</a>, <a href="#6.10.1">6.10.1</a>, <a href="#7.8">7.8</a>,
+= (addition assignment operator), <a href="#6.5.16.2">6.5.16.2</a> <a href="#7.18">7.18</a>, <a href="#7.26.8">7.26.8</a>
, (comma operator), <a href="#6.5.17">6.5.17</a>
<a href="#7.19"><stdio.h></a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19">7.19</a>, <a href="#7.26.9">7.26.9</a>, <a href="#F">F</a> __cplusplus macro, <a href="#6.10.8">6.10.8</a>
<a href="#7.20"><stdlib.h></a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.20">7.20</a>, <a href="#7.26.10">7.26.10</a>, <a href="#F">F</a> __DATE__ macro, <a href="#6.10.8">6.10.8</a>
<a href="#7.19"><stdio.h></a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19">7.19</a>, <a href="#7.26.9">7.26.9</a>, <a href="#F">F</a> __cplusplus macro, <a href="#6.10.8">6.10.8</a>
<a href="#7.20"><stdlib.h></a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.20">7.20</a>, <a href="#7.26.10">7.26.10</a>, <a href="#F">F</a> __DATE__ macro, <a href="#6.10.8">6.10.8</a>
__bool_true_false_are_defined abstract declarator, <a href="#6.7.6">6.7.6</a>
macro, <a href="#7.16">7.16</a> abstract machine, <a href="#5.1.2.3">5.1.2.3</a>
__bool_true_false_are_defined abstract declarator, <a href="#6.7.6">6.7.6</a>
macro, <a href="#7.16">7.16</a> abstract machine, <a href="#5.1.2.3">5.1.2.3</a>
access, <a href="#3.1">3.1</a>, <a href="#6.7.3">6.7.3</a> array
accuracy, see floating-point accuracy argument, <a href="#6.9.1">6.9.1</a>
access, <a href="#3.1">3.1</a>, <a href="#6.7.3">6.7.3</a> array
accuracy, see floating-point accuracy argument, <a href="#6.9.1">6.9.1</a>
arithmetic types, <a href="#6.2.5">6.2.5</a> basic character set, <a href="#3.6">3.6</a>, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1">5.2.1</a>
arithmetic, pointer, <a href="#6.5.6">6.5.6</a> basic types, <a href="#6.2.5">6.2.5</a>
arithmetic types, <a href="#6.2.5">6.2.5</a> basic character set, <a href="#3.6">3.6</a>, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1">5.2.1</a>
arithmetic, pointer, <a href="#6.5.6">6.5.6</a> basic types, <a href="#6.2.5">6.2.5</a>
behavior, <a href="#3.4">3.4</a> call by value, <a href="#6.5.2.2">6.5.2.2</a>
binary streams, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>, calloc function, <a href="#7.20.3">7.20.3</a>, <a href="#7.20.3.1">7.20.3.1</a>, <a href="#7.20.3.2">7.20.3.2</a>,
behavior, <a href="#3.4">3.4</a> call by value, <a href="#6.5.2.2">6.5.2.2</a>
binary streams, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>, calloc function, <a href="#7.20.3">7.20.3</a>, <a href="#7.20.3.1">7.20.3.1</a>, <a href="#7.20.3.2">7.20.3.2</a>,
calendar time, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.2">7.23.2.2</a>, <a href="#7.23.2.3">7.23.2.3</a>, <a href="#7.23.2.4">7.23.2.4</a>, extensible, <a href="#7.25.2.2">7.25.2.2</a>
<a href="#7.23.3.2">7.23.3.2</a>, <a href="#7.23.3.3">7.23.3.3</a>, <a href="#7.23.3.4">7.23.3.4</a> character constant, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>
calendar time, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.2">7.23.2.2</a>, <a href="#7.23.2.3">7.23.2.3</a>, <a href="#7.23.2.4">7.23.2.4</a>, extensible, <a href="#7.25.2.2">7.25.2.2</a>
<a href="#7.23.3.2">7.23.3.2</a>, <a href="#7.23.3.3">7.23.3.3</a>, <a href="#7.23.3.4">7.23.3.4</a> character constant, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>
character display semantics, <a href="#5.2.2">5.2.2</a> complex.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.3">7.3</a>, <a href="#7.22">7.22</a>, <a href="#7.26.1">7.26.1</a>,
character handling header, <a href="#7.4">7.4</a>, <a href="#7.11.1.1">7.11.1.1</a> <a href="#G.6">G.6</a>, <a href="#J.5.17">J.5.17</a>
character display semantics, <a href="#5.2.2">5.2.2</a> complex.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.3">7.3</a>, <a href="#7.22">7.22</a>, <a href="#7.26.1">7.26.1</a>,
character handling header, <a href="#7.4">7.4</a>, <a href="#7.11.1.1">7.11.1.1</a> <a href="#G.6">G.6</a>, <a href="#J.5.17">J.5.17</a>
complex type domain, <a href="#6.2.5">6.2.5</a> function, <a href="#6.3.2.1">6.3.2.1</a>
complex types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>, <a href="#G">G</a> function argument, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.9.1">6.9.1</a>
complex type domain, <a href="#6.2.5">6.2.5</a> function, <a href="#6.3.2.1">6.3.2.1</a>
complex types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>, <a href="#G">G</a> function argument, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.9.1">6.9.1</a>
function designators, <a href="#6.3.2.1">6.3.2.1</a> type-generic macro for, <a href="#7.22">7.22</a>
function parameter, <a href="#6.9.1">6.9.1</a> csinh functions, <a href="#7.3.6.5">7.3.6.5</a>, <a href="#G.6.2.5">G.6.2.5</a>
function designators, <a href="#6.3.2.1">6.3.2.1</a> type-generic macro for, <a href="#7.22">7.22</a>
function parameter, <a href="#6.9.1">6.9.1</a> csinh functions, <a href="#7.3.6.5">7.3.6.5</a>, <a href="#G.6.2.5">G.6.2.5</a>
creal type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a> function, <a href="#6.9.1">6.9.1</a>
csin functions, <a href="#7.3.5.5">7.3.5.5</a>, <a href="#G.6">G.6</a> derived declarator types, <a href="#6.2.5">6.2.5</a>
creal type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a> function, <a href="#6.9.1">6.9.1</a>
csin functions, <a href="#7.3.5.5">7.3.5.5</a>, <a href="#G.6">G.6</a> derived declarator types, <a href="#6.2.5">6.2.5</a>
derived types, <a href="#6.2.5">6.2.5</a> end-of-file indicator, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.1">7.19.7.1</a>,
designated initializer, <a href="#6.7.8">6.7.8</a> <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.7.6">7.19.7.6</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>,
derived types, <a href="#6.2.5">6.2.5</a> end-of-file indicator, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.1">7.19.7.1</a>,
designated initializer, <a href="#6.7.8">6.7.8</a> <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.7.6">7.19.7.6</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>,
<a href="#7.24.6.3.2">7.24.6.3.2</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.1">7.24.6.4.1</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a> encoding, see encoding error
end-of-file, <a href="#7.24.1">7.24.1</a> range, see range error
<a href="#7.24.6.3.2">7.24.6.3.2</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.1">7.24.6.4.1</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a> encoding, see encoding error
end-of-file, <a href="#7.24.1">7.24.1</a> range, see range error
error conditions, <a href="#7.12.1">7.12.1</a> extended characters, <a href="#5.2.1">5.2.1</a>
error functions, <a href="#7.12.8">7.12.8</a>, <a href="#F.9.5">F.9.5</a> extended integer types, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.4.4.1">6.4.4.1</a>,
error conditions, <a href="#7.12.1">7.12.1</a> extended characters, <a href="#5.2.1">5.2.1</a>
error functions, <a href="#7.12.8">7.12.8</a>, <a href="#F.9.5">F.9.5</a> extended integer types, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.4.4.1">6.4.4.1</a>,
expression statement, <a href="#6.8.3">6.8.3</a> fetestexcept function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.5">7.6.2.5</a>, <a href="#F.3">F.3</a>
extended character set, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#5.2.1.2">5.2.1.2</a> feupdateenv function, <a href="#7.6.4.2">7.6.4.2</a>, <a href="#7.6.4.4">7.6.4.4</a>, <a href="#F.3">F.3</a>
expression statement, <a href="#6.8.3">6.8.3</a> fetestexcept function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.5">7.6.2.5</a>, <a href="#F.3">F.3</a>
extended character set, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#5.2.1.2">5.2.1.2</a> feupdateenv function, <a href="#7.6.4.2">7.6.4.2</a>, <a href="#7.6.4.4">7.6.4.4</a>, <a href="#F.3">F.3</a>
fexcept_t type, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a> floating-point status flag, <a href="#7.6">7.6</a>, <a href="#F.7.6">F.7.6</a>
fflush function, <a href="#7.19.5.2">7.19.5.2</a>, <a href="#7.19.5.3">7.19.5.3</a> floor functions, <a href="#7.12.9.2">7.12.9.2</a>, <a href="#F.9.6.2">F.9.6.2</a>
fexcept_t type, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a> floating-point status flag, <a href="#7.6">7.6</a>, <a href="#F.7.6">F.7.6</a>
fflush function, <a href="#7.19.5.2">7.19.5.2</a>, <a href="#7.19.5.3">7.19.5.3</a> floor functions, <a href="#7.12.9.2">7.12.9.2</a>, <a href="#F.9.6.2">F.9.6.2</a>
floating-point number, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.2.5">6.2.5</a> fpclassify macro, <a href="#7.12.3.1">7.12.3.1</a>, <a href="#F.3">F.3</a>
floating-point rounding mode, <a href="#5.2.4.2.2">5.2.4.2.2</a> fpos_t type, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>
floating-point number, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.2.5">6.2.5</a> fpclassify macro, <a href="#7.12.3.1">7.12.3.1</a>, <a href="#F.3">F.3</a>
floating-point rounding mode, <a href="#5.2.4.2.2">5.2.4.2.2</a> fpos_t type, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>
fprintf function, <a href="#7.8.1">7.8.1</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.1">7.19.6.1</a>, language, <a href="#6.11">6.11</a>
<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.19.6.3">7.19.6.3</a>, <a href="#7.19.6.5">7.19.6.5</a>, <a href="#7.19.6.6">7.19.6.6</a>, library, <a href="#7.26">7.26</a>
fprintf function, <a href="#7.8.1">7.8.1</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.1">7.19.6.1</a>, language, <a href="#6.11">6.11</a>
<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.19.6.3">7.19.6.3</a>, <a href="#7.19.6.5">7.19.6.5</a>, <a href="#7.19.6.6">7.19.6.6</a>, library, <a href="#7.26">7.26</a>
function-like macro, <a href="#6.10.3">6.10.3</a> hypot functions, <a href="#7.12.7.3">7.12.7.3</a>, <a href="#F.9.4.3">F.9.4.3</a>
future directions hypot type-generic macro, <a href="#7.22">7.22</a>
function-like macro, <a href="#6.10.3">6.10.3</a> hypot functions, <a href="#7.12.7.3">7.12.7.3</a>, <a href="#F.9.4.3">F.9.4.3</a>
future directions hypot type-generic macro, <a href="#7.22">7.22</a>
I macro, <a href="#7.3.1">7.3.1</a>, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#G.6">G.6</a> initial position, <a href="#5.2.2">5.2.2</a>
identifier, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.5.1">6.5.1</a> initial shift state, <a href="#5.2.1.2">5.2.1.2</a>
I macro, <a href="#7.3.1">7.3.1</a>, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#G.6">G.6</a> initial position, <a href="#5.2.2">5.2.2</a>
identifier, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.5.1">6.5.1</a> initial shift state, <a href="#5.2.1.2">5.2.1.2</a>
inequality operator (!=), <a href="#6.5.9">6.5.9</a> INTMAX_C macro, <a href="#7.18.4.2">7.18.4.2</a>
INFINITY macro, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#7.12">7.12</a>, <a href="#F.2.1">F.2.1</a> INTMAX_MAX macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>
inequality operator (!=), <a href="#6.5.9">6.5.9</a> INTMAX_C macro, <a href="#7.18.4.2">7.18.4.2</a>
INFINITY macro, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#7.12">7.12</a>, <a href="#F.2.1">F.2.1</a> INTMAX_MAX macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>
INTMAX_MIN macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a> iswalpha function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>,
intmax_t type, <a href="#7.18.1.5">7.18.1.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
INTMAX_MIN macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a> iswalpha function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>,
intmax_t type, <a href="#7.18.1.5">7.18.1.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
<a href="#7.4.2.2">7.4.2.2</a>
isnan macro, <a href="#7.12.3.4">7.12.3.4</a>, <a href="#F.3">F.3</a> jmp_buf type, <a href="#7.13">7.13</a>
isnormal macro, <a href="#7.12.3.5">7.12.3.5</a> jump statements, <a href="#6.8.6">6.8.6</a>
<a href="#7.4.2.2">7.4.2.2</a>
isnan macro, <a href="#7.12.3.4">7.12.3.4</a>, <a href="#F.3">F.3</a> jmp_buf type, <a href="#7.13">7.13</a>
isnormal macro, <a href="#7.12.3.5">7.12.3.5</a> jump statements, <a href="#6.8.6">6.8.6</a>
ISO 4217, <a href="#2">2</a>, <a href="#7.11.2.1">7.11.2.1</a> keywords, <a href="#6.4.1">6.4.1</a>, <a href="#G.2">G.2</a>, <a href="#J.5.9">J.5.9</a>, <a href="#J.5.10">J.5.10</a>
ISO 8601, <a href="#2">2</a>, <a href="#7.23.3.5">7.23.3.5</a> known constant size, <a href="#6.2.5">6.2.5</a>
ISO/IEC 10646, <a href="#2">2</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.4.3">6.4.3</a>, <a href="#6.10.8">6.10.8</a>
ISO 4217, <a href="#2">2</a>, <a href="#7.11.2.1">7.11.2.1</a> keywords, <a href="#6.4.1">6.4.1</a>, <a href="#G.2">G.2</a>, <a href="#J.5.9">J.5.9</a>, <a href="#J.5.10">J.5.10</a>
ISO 8601, <a href="#2">2</a>, <a href="#7.23.3.5">7.23.3.5</a> known constant size, <a href="#6.2.5">6.2.5</a>
ISO/IEC 10646, <a href="#2">2</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.4.3">6.4.3</a>, <a href="#6.10.8">6.10.8</a>
iswalnum function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.9">7.25.2.1.9</a>, LC_NUMERIC macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
<a href="#7.25.2.1.10">7.25.2.1.10</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a> LC_TIME macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.23.3.5">7.23.3.5</a>
iswalnum function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.9">7.25.2.1.9</a>, LC_NUMERIC macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
<a href="#7.25.2.1.10">7.25.2.1.10</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a> LC_TIME macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.23.3.5">7.23.3.5</a>
lconv structure type, <a href="#7.11">7.11</a> llabs function, <a href="#7.20.6.1">7.20.6.1</a>
LDBL_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a> lldiv function, <a href="#7.20.6.2">7.20.6.2</a>
lconv structure type, <a href="#7.11">7.11</a> llabs function, <a href="#7.20.6.1">7.20.6.1</a>
LDBL_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a> lldiv function, <a href="#7.20.6.2">7.20.6.2</a>
linkage, <a href="#6.2.2">6.2.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.4">6.7.4</a>, <a href="#6.7.5.2">6.7.5.2</a>, <a href="#6.9">6.9</a>, <a href="#6.9.2">6.9.2</a>, long integer suffix, l or <a href="#L">L</a>, <a href="#6.4.4.1">6.4.4.1</a>
<a href="#6.11.2">6.11.2</a> long long int type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.7.2">6.7.2</a>,
linkage, <a href="#6.2.2">6.2.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.4">6.7.4</a>, <a href="#6.7.5.2">6.7.5.2</a>, <a href="#6.9">6.9</a>, <a href="#6.9.2">6.9.2</a>, long integer suffix, l or <a href="#L">L</a>, <a href="#6.4.4.1">6.4.4.1</a>
<a href="#6.11.2">6.11.2</a> long long int type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.7.2">6.7.2</a>,
<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a> mbsinit function, <a href="#7.24.6.2.1">7.24.6.2.1</a>
long long int type conversion, <a href="#6.3.1.1">6.3.1.1</a>, mbsrtowcs function, <a href="#7.24.6.4.1">7.24.6.4.1</a>
<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a> mbsinit function, <a href="#7.24.6.2.1">7.24.6.2.1</a>
long long int type conversion, <a href="#6.3.1.1">6.3.1.1</a>, mbsrtowcs function, <a href="#7.24.6.4.1">7.24.6.4.1</a>
<a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.6.3.1">7.24.6.3.1</a>, <a href="#7.24.6.3.2">7.24.6.3.2</a>, file, <a href="#7.19.3">7.19.3</a>
<a href="#7.24.6.4.1">7.24.6.4.1</a> internal, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>
<a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.6.3.1">7.24.6.3.1</a>, <a href="#7.24.6.3.2">7.24.6.3.2</a>, file, <a href="#7.19.3">7.19.3</a>
<a href="#7.24.6.4.1">7.24.6.4.1</a> internal, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>
label, <a href="#6.2.3">6.2.3</a> octal-character escape sequence (\octal digits),
structure/union member, <a href="#6.2.3">6.2.3</a> <a href="#6.4.4.4">6.4.4.4</a>
label, <a href="#6.2.3">6.2.3</a> octal-character escape sequence (\octal digits),
structure/union member, <a href="#6.2.3">6.2.3</a> <a href="#6.4.4.4">6.4.4.4</a>
octal constant, <a href="#6.4.4.1">6.4.4.1</a> parse state, <a href="#7.19.2">7.19.2</a>
octal digit, <a href="#6.4.4.1">6.4.4.1</a>, <a href="#6.4.4.4">6.4.4.4</a> permitted form of initializer, <a href="#6.6">6.6</a>
octal constant, <a href="#6.4.4.1">6.4.4.1</a> parse state, <a href="#7.19.2">7.19.2</a>
octal digit, <a href="#6.4.4.1">6.4.4.1</a>, <a href="#6.4.4.4">6.4.4.4</a> permitted form of initializer, <a href="#6.6">6.6</a>
perror function, <a href="#7.19.10.4">7.19.10.4</a> PRIcPTR macros, <a href="#7.8.1">7.8.1</a>
phase angle, complex, <a href="#7.3.9.1">7.3.9.1</a> primary expression, <a href="#6.5.1">6.5.1</a>
perror function, <a href="#7.19.10.4">7.19.10.4</a> PRIcPTR macros, <a href="#7.8.1">7.8.1</a>
phase angle, complex, <a href="#7.3.9.1">7.3.9.1</a> primary expression, <a href="#6.5.1">6.5.1</a>
PRIcMAX macros, <a href="#7.8.1">7.8.1</a> <a href="#7.12.9.5">7.12.9.5</a>, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#7.12.11.3">7.12.11.3</a>, <a href="#7.12.12.1">7.12.12.1</a>,
PRIcN macros, <a href="#7.8.1">7.8.1</a> <a href="#7.12.13.1">7.12.13.1</a>
PRIcMAX macros, <a href="#7.8.1">7.8.1</a> <a href="#7.12.9.5">7.12.9.5</a>, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#7.12.11.3">7.12.11.3</a>, <a href="#7.12.12.1">7.12.12.1</a>,
PRIcN macros, <a href="#7.8.1">7.8.1</a> <a href="#7.12.13.1">7.12.13.1</a>
rank, see integer conversion rank same scope, <a href="#6.2.1">6.2.1</a>
real floating type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>, save calling environment function, <a href="#7.13.1">7.13.1</a>
rank, see integer conversion rank same scope, <a href="#6.2.1">6.2.1</a>
real floating type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>, save calling environment function, <a href="#7.13.1">7.13.1</a>
rvalue, <a href="#6.3.2.1">6.3.2.1</a> SHRT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
SHRT_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
rvalue, <a href="#6.3.2.1">6.3.2.1</a> SHRT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
SHRT_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
side effects, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#6.5">6.5</a> source lines, <a href="#5.1.1.2">5.1.1.2</a>
SIG_ATOMIC_MAX macro, <a href="#7.18.3">7.18.3</a> source text, <a href="#5.1.1.2">5.1.1.2</a>
side effects, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#6.5">6.5</a> source lines, <a href="#5.1.1.2">5.1.1.2</a>
SIG_ATOMIC_MAX macro, <a href="#7.18.3">7.18.3</a> source text, <a href="#5.1.1.2">5.1.1.2</a>
name, <a href="#6.10.4">6.10.4</a>, <a href="#6.10.8">6.10.8</a> continue, <a href="#6.8.6.2">6.8.6.2</a>
source file inclusion, <a href="#6.10.2">6.10.2</a> do, <a href="#6.8.5.2">6.8.5.2</a>
name, <a href="#6.10.4">6.10.4</a>, <a href="#6.10.8">6.10.8</a> continue, <a href="#6.8.6.2">6.8.6.2</a>
source file inclusion, <a href="#6.10.2">6.10.2</a> do, <a href="#6.8.5.2">6.8.5.2</a>
else, <a href="#6.8.4.1">6.8.4.1</a> strictly conforming program, <a href="#4">4</a>
expression, <a href="#6.8.3">6.8.3</a> string, <a href="#7.1.1">7.1.1</a>
else, <a href="#6.8.4.1">6.8.4.1</a> strictly conforming program, <a href="#4">4</a>
expression, <a href="#6.8.3">6.8.3</a> string, <a href="#7.1.1">7.1.1</a>
strftime function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.23.3">7.23.3</a>, <a href="#7.23.3.5">7.23.3.5</a>, subscripting, <a href="#6.5.2.1">6.5.2.1</a>
<a href="#7.24.5.1">7.24.5.1</a> subtraction assignment operator (-=), <a href="#6.5.16.2">6.5.16.2</a>
strftime function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.23.3">7.23.3</a>, <a href="#7.23.3.5">7.23.3.5</a>, subscripting, <a href="#6.5.2.1">6.5.2.1</a>
<a href="#7.24.5.1">7.24.5.1</a> subtraction assignment operator (-=), <a href="#6.5.16.2">6.5.16.2</a>
subtraction operator (-), <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>, <a href="#G.5.2">G.5.2</a> tolower function, <a href="#7.4.2.1">7.4.2.1</a>
suffix toupper function, <a href="#7.4.2.2">7.4.2.2</a>
subtraction operator (-), <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>, <a href="#G.5.2">G.5.2</a> tolower function, <a href="#7.4.2.1">7.4.2.1</a>
suffix toupper function, <a href="#7.4.2.2">7.4.2.2</a>
token concatenation, <a href="#6.10.3.3">6.10.3.3</a> UINTMAX_C macro, <a href="#7.18.4.2">7.18.4.2</a>
token pasting, <a href="#6.10.3.3">6.10.3.3</a> UINTMAX_MAX macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>
token concatenation, <a href="#6.10.3.3">6.10.3.3</a> UINTMAX_C macro, <a href="#7.18.4.2">7.18.4.2</a>
token pasting, <a href="#6.10.3.3">6.10.3.3</a> UINTMAX_MAX macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>
uintmax_t type, <a href="#7.18.1.5">7.18.1.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, USHRT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
<a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a> usual arithmetic conversions, <a href="#6.3.1.8">6.3.1.8</a>, <a href="#6.5.5">6.5.5</a>, <a href="#6.5.6">6.5.6</a>,
uintmax_t type, <a href="#7.18.1.5">7.18.1.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, USHRT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
<a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a> usual arithmetic conversions, <a href="#6.3.1.8">6.3.1.8</a>, <a href="#6.5.5">6.5.5</a>, <a href="#6.5.6">6.5.6</a>,
uppercase letter, <a href="#5.2.1">5.2.1</a> vsprintf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.13">7.19.6.13</a>
use of library functions, <a href="#7.1.4">7.1.4</a> vsscanf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.14">7.19.6.14</a>
uppercase letter, <a href="#5.2.1">5.2.1</a> vsprintf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.13">7.19.6.13</a>
use of library functions, <a href="#7.1.4">7.1.4</a> vsscanf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.14">7.19.6.14</a>
vswprintf function, <a href="#7.24.2.7">7.24.2.7</a> wctype.h header, <a href="#7.25">7.25</a>, <a href="#7.26.13">7.26.13</a>
vswscanf function, <a href="#7.24.2.8">7.24.2.8</a> wctype_t type, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>
vswprintf function, <a href="#7.24.2.7">7.24.2.7</a> wctype.h header, <a href="#7.25">7.25</a>, <a href="#7.26.13">7.26.13</a>
vswscanf function, <a href="#7.24.2.8">7.24.2.8</a> wctype_t type, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>
wctrans_t type, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.3.2.2">7.25.3.2.2</a>
wctype function, <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>
wctrans_t type, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.3.2.2">7.25.3.2.2</a>
wctype function, <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>