X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=n1256.html;h=8a01d3335d5b749b85d65c222471b8003493b1fe;hb=9a0e8db52bafd217550cd4c63eb973bfe61f923a;hp=aa9717a7ada3a4a60e240d16c5f22736db9a01a8;hpb=7df8cd2a500cd0285ce82e96357a0d7e06b3956f;p=c-standard
diff --git a/n1256.html b/n1256.html
index aa9717a..8a01d33 100644
--- a/n1256.html
+++ b/n1256.html
@@ -5,7 +5,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
-Contents
+
ISO (the International Organization for Standardization) and IEC (the International
Electrotechnical Commission) form the specialized system for worldwide
@@ -476,7 +476,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
also for information only.
-Introduction
+
With the introduction of new devices and extended character sets, new features may be
added to this International Standard. Subclauses in the language and library clauses warn
@@ -515,7 +515,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
-1. Scope
+
This International Standard specifies the form and establishes the interpretation of
programs written in the C programming language.1) It specifies
@@ -552,7 +552,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
data-processing systems. It is intended for use by implementors and programmers.
-2. Normative references
+
The following normative documents contain provisions which, through reference in this
text, constitute provisions of this International Standard. For dated references,
@@ -584,7 +584,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
designated IEC 559:1989).
-3. Terms, definitions, and symbols
+
For the purposes of this International Standard, the following definitions apply. Other
terms are defined where they appear in italic type or on the left side of a syntax rule.
@@ -593,9 +593,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Standard are to be interpreted according to ISO/IEC 2382-1. Mathematical symbols not
defined in this International Standard are to be interpreted according to ISO 31-11.
-3.1
+
- access
+ access
<execution-time action> to read or modify the value of an object
NOTE 1 Where only one of these two actions is meant, ''read'' or ''modify'' is used.
@@ -607,38 +607,38 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
NOTE 3 Expressions that are not evaluated do not access objects.
-3.2
+
- alignment
+ alignment
requirement that objects of a particular type be located on storage boundaries with
addresses that are particular multiples of a byte address
-3.3
+
- argument
- actual argument
- actual parameter (deprecated)
+ argument
+ actual argument
+ actual parameter (deprecated)
expression in the comma-separated list bounded by the parentheses in a function call
expression, or a sequence of preprocessing tokens in the comma-separated list bounded
by the parentheses in a function-like macro invocation
-3.4
+
- behavior
+ behavior
external appearance or action
-3.4.1
+
- implementation-defined behavior
+ implementation-defined behavior
unspecified behavior where each implementation documents how the choice is made
EXAMPLE An example of implementation-defined behavior is the propagation of the high-order bit
when a signed integer is shifted right.
-3.4.2
+
- locale-specific behavior
+ locale-specific behavior
behavior that depends on local conventions of nationality, culture, and language that each
implementation documents
@@ -647,9 +647,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
characters other than the 26 lowercase Latin letters.
-3.4.3
+
- undefined behavior
+ undefined behavior
behavior, upon use of a nonportable or erroneous program construct or of erroneous data,
for which this International Standard imposes no requirements
@@ -662,9 +662,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
EXAMPLE An example of undefined behavior is the behavior on integer overflow.
-3.4.4
+
- unspecified behavior
+ unspecified behavior
use of an unspecified value, or other behavior where this International Standard provides
two or more possibilities and imposes no further requirements on which is chosen in any
instance
@@ -673,18 +673,18 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
evaluated.
-3.5
+
- bit
+ bit
unit of data storage in the execution environment large enough to hold an object that may
have one of two values
NOTE It need not be possible to express the address of each individual bit of an object.
-3.6
+
- byte
+ byte
addressable unit of data storage large enough to hold any member of the basic character
set of the execution environment
@@ -696,73 +696,73 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
bit.
-3.7
+
- character
+ character
<abstract> member of a set of elements used for the organization, control, or
representation of data
-3.7.1
+
- character
+ character
single-byte character
<C> bit representation that fits in a byte
-3.7.2
+
- multibyte character
+ multibyte character
sequence of one or more bytes representing a member of the extended character set of
either the source or the execution environment
NOTE The extended character set is a superset of the basic character set.
-3.7.3
+
- wide character
+ wide character
bit representation that fits in an object of type wchar_t, capable of representing any
character in the current locale
-3.8
+
- constraint
+ constraint
restriction, either syntactic or semantic, by which the exposition of language elements is
to be interpreted
-3.9
+
- correctly rounded result
+ correctly rounded result
representation in the result format that is nearest in value, subject to the current rounding
mode, to what the result would be given unlimited range and precision
-3.10
+
- diagnostic message
+ diagnostic message
message belonging to an implementation-defined subset of the implementation's message
output
-3.11
+
- forward reference
+ forward reference
reference to a later subclause of this International Standard that contains additional
information relevant to this subclause
-3.12
+
- implementation
+ implementation
particular set of software, running in a particular translation environment under particular
control options, that performs translation of programs for, and supports execution of
functions in, a particular execution environment
-3.13
+
- implementation limit
+ implementation limit
restriction imposed upon programs by the implementation
-3.14
+
- object
+ object
region of data storage in the execution environment, the contents of which can represent
values
@@ -770,62 +770,62 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
NOTE When referenced, an object may be interpreted as having a particular type; see 6.3.2.1.
-3.15
+
- parameter
+ parameter
formal parameter
formal argument (deprecated)
object declared as part of a function declaration or definition that acquires a value on
entry to the function, or an identifier from the comma-separated list bounded by the
parentheses immediately following the macro name in a function-like macro definition
-3.16
+
- recommended practice
+ recommended practice
specification that is strongly recommended as being in keeping with the intent of the
standard, but that may be impractical for some implementations
-3.17
+
- value
+ value
precise meaning of the contents of an object when interpreted as having a specific type
-3.17.1
+
- implementation-defined value
+ implementation-defined value
unspecified value where each implementation documents how the choice is made
-3.17.2
+
- indeterminate value
+ indeterminate value
either an unspecified value or a trap representation
-3.17.3
+
- unspecified value
+ unspecified value
valid value of the relevant type where this International Standard imposes no
requirements on which value is chosen in any instance
NOTE An unspecified value cannot be a trap representation.
-3.18
+
- ??? x???
+ ??? x???
ceiling of x: the least integer greater than or equal to x
EXAMPLE ???2.4??? is 3, ???-2.4??? is -2.
-3.19
+
- ??? x???
+ ??? x???
floor of x: the greatest integer less than or equal to x
EXAMPLE ???2.4??? is 2, ???-2.4??? is -3.
-4. Conformance
+
In this International Standard, ''shall'' is to be interpreted as a requirement on an
implementation or on a program; conversely, ''shall not'' is to be interpreted as a
@@ -898,7 +898,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
implementation.
-5. Environment
+
An implementation translates C source files and executes C programs in two data- processing-system environments, which will be called the translation environment and @@ -908,11 +908,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Forward references: In this clause, only a few of many possible forward references
have been noted.
-5.1 Conceptual models
+
A C program need not all be translated at the same time. The text of the program is kept in units called source files, (or preprocessing files) in this International Standard. A @@ -927,7 +927,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Forward references: linkages of identifiers (6.2.2), external definitions (6.9),
preprocessing directives (6.10).
-5.1.1.2 Translation phases
+
The precedence among the syntax rules of translation is specified by the following
phases.5)
@@ -992,7 +992,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
character.
-5.1.1.3 Diagnostics
+
A conforming implementation shall produce at least one diagnostic message (identified in
an implementation-defined manner) if a preprocessing translation unit or translation unit
@@ -1014,7 +1014,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
valid program is still correctly translated. It may also successfully translate an invalid program.
-5.1.2 Execution environments
+
Two execution environments are defined: freestanding and hosted. In both cases, program startup occurs when a designated C function is called by the execution @@ -1024,7 +1024,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 environment.
Forward references: storage durations of objects (6.2.4), initialization (6.7.8).
-5.1.2.1 Freestanding environment
+
In a freestanding environment (in which C program execution may take place without any
benefit of an operating system), the name and type of the function called at program
@@ -1034,7 +1034,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The effect of program termination in a freestanding environment is implementation-
defined.
-5.1.2.2 Hosted environment
+
A hosted environment need not be provided, but shall conform to the following
specifications if present.
@@ -1044,7 +1044,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
-5.1.2.2.1 Program startup
+
The function called at program startup is named main. The implementation declares no
prototype for this function. It shall be defined with a return type of int and with no
@@ -1084,7 +1084,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
char ** argv, and so on.
-5.1.2.2.2 Program execution
+
In a hosted environment, a program may use all the functions, macros, type definitions,
and objects described in the library clause (clause 7).
@@ -1093,7 +1093,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
-5.1.2.2.3 Program termination
+
If the return type of the main function is a type compatible with int, a return from the
initial call to the main function is equivalent to calling the exit function with the value
@@ -1107,7 +1107,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
will have ended in the former case, even where they would not have in the latter.
-5.1.2.3 Program execution
+
The semantic descriptions in this International Standard describe the behavior of an
abstract machine in which issues of optimization are irrelevant.
@@ -1272,9 +1272,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
effects matter, freeing the implementations in other cases.
-5.2 Environmental considerations
+
Two sets of characters and their associated collating sequences shall be defined: the set in which source files are written (the source character set), and the set interpreted in the @@ -1326,7 +1326,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Forward references: universal character names (6.4.3), character constants (6.4.4.4),
preprocessing directives (6.10), string literals (6.4.5), comments (6.4.9), string (7.1.1).
-5.2.1.1 Trigraph sequences
+
Before any other processing takes place, each occurrence of one of the following
sequences of three characters (called trigraph sequences12)) is replaced with the
@@ -1359,7 +1359,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
described in ISO/IEC 646, which is a subset of the seven-bit US ASCII code set.
-5.2.1.2 Multibyte characters
+
The source character set may contain multibyte characters, used to represent members of
the extended character set. The execution character set may also contain multibyte
@@ -1390,7 +1390,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
of a sequence of valid multibyte characters.
-5.2.2 Character display semantics
+
The active position is that location on a display device where the next character output by the fputc function would appear. The intent of writing a printing character (as defined @@ -1402,33 +1402,31 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Alphabetic escape sequences representing nongraphic characters in the execution character set are intended to produce actions on display devices as follows: - \a (alert) Produces an audible or visible alert without changing the active position. - \b (backspace) Moves the active position to the previous position on the current line. If -
+
- logical page.- \n (new line) Moves the active position to the initial position of the next line. - \r (carriage return) Moves the active position to the initial position of the current line. - \t (horizontal tab) Moves the active position to the next horizontal tabulation position -
+ device is unspecified. +
-
tabulation position. If the active position is at or past the last defined vertical - tabulation position, the behavior of the display device is unspecified.+ tabulation position, the behavior of the display device is unspecified. +
Each of these escape sequences shall produce a unique implementation-defined value which can be stored in a single char object. The external representations in a text file need not be identical to the internal representations, and are outside the scope of this International Standard.
Forward references: the isprint function (7.4.1.8), the fputc function (7.19.7.3).
-5.2.3 Signals and interrupts
+
Functions shall be implemented such that they may be interrupted at any time by a signal,
or may be called by a signal handler, or both, with no alteration to earlier, but still active,
@@ -1437,14 +1435,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
image (the instructions that compose the executable representation of a function) on a
per-invocation basis.
-5.2.4 Environmental limits
+
Both the translation and execution environments constrain the implementation of
language translators and libraries. The following summarizes the language-related
environmental limits on a conforming implementation; the library-related limits are
discussed in clause 7.
-5.2.4.1 Translation limits
+
The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits:13) @@ -1490,14 +1488,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
14) See ''future language directions'' (6.11.3).
-5.2.4.2 Numerical limits
+
An implementation is required to document all the limits specified in this subclause, which are specified in the headers <limits.h> and <float.h>. Additional limits are specified in <stdint.h>.
Forward references: integer types <stdint.h> (7.18).
-5.2.4.2.1 Sizes of integer types
+
The values given below shall be replaced by constant expressions suitable for use in #if preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX, the @@ -1561,7 +1559,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
15) See 6.2.5.
-5.2.4.2.2 Characteristics of floating types
+
The characteristics of floating types are defined in terms of a model that describes a
representation of floating-point numbers and values that provide information about an
@@ -1829,9 +1827,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
limits are one less than shown here.
-6. Language
+
In the syntax notation used in this clause, syntactic categories (nonterminals) are indicated by italic type, and literal words and character set members (terminals) by bold @@ -1847,9 +1845,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
A summary of the language syntax is given in annex A.
-6.2 Concepts
+
An identifier can denote an object; a function; a tag or a member of a structure, union, or
enumeration; a typedef name; a label name; a macro name; or a macro parameter. The
@@ -1901,7 +1899,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
(6.9.1), identifiers (6.4.2), name spaces of identifiers (6.2.3), macro replacement (6.10.3),
source file inclusion (6.10.2), statements (6.8).
-6.2.2 Linkages of identifiers
+
An identifier declared in different scopes or in the same scope more than once can be made to refer to the same object or function by a process called linkage.21) There are @@ -1949,7 +1947,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
23) As specified in 6.2.1, the later declaration might hide the prior declaration.
-6.2.3 Name spaces of identifiers
+
If more than one declaration of a particular identifier is visible at any point in a translation unit, the syntactic context disambiguates uses that refer to different entities. @@ -1977,7 +1975,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
24) There is only one name space for tags even though three are possible.
-6.2.4 Storage durations of objects
+
An object has a storage duration that determines its lifetime. There are three storage
durations: static, automatic, and allocated. Allocated storage is described in 7.20.3.
@@ -2028,7 +2026,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
embedded block prior to the declaration, leaves the scope of the declaration.
-6.2.5 Types
+
The meaning of a value stored in an object or returned by a function is determined by the
type of the expression used to access it. (An identifier declared to be an object is the
@@ -2245,9 +2243,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
arguments to functions, return values from functions, and members of unions.
-6.2.6 Representations of types
+
The representations of all types are unspecified except as stated in this subclause.
@@ -2317,7 +2315,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
on values of type T may distinguish between them.
-6.2.6.2 Integer types
+
For unsigned integer types other than unsigned char, the bits of the object
representation shall be divided into two groups: value bits and padding bits (there need
@@ -2387,7 +2385,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
bits.
-6.2.7 Compatible type and composite type
+
Two types have compatible type if their types are the same. Additional rules for determining whether two types are compatible are described in 6.7.2 for type specifiers, @@ -2444,7 +2442,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
47) As specified in 6.2.1, the later declaration might hide the prior declaration.
-6.3 Conversions
+
Several operators convert operand values from one type to another automatically. This subclause specifies the result required from such an implicit conversion, as well as those @@ -2456,9 +2454,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 representation.
Forward references: cast operators (6.5.4).
-6.3.1 Arithmetic operands
+
Every integer type has an integer conversion rank defined as follows:
When any scalar value is converted to _Bool, the result is 0 if the value compares equal
to 0; otherwise, the result is 1.
-6.3.1.3 Signed and unsigned integers
+
When a value with integer type is converted to another integer type other than _Bool, if the value can be represented by the new type, it is unchanged. @@ -2528,7 +2526,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
49) The rules describe arithmetic on the mathematical value, not the value of a given type of expression.
-6.3.1.4 Real floating and integer
+
When a finite value of real floating type is converted to an integer type other than _Bool,
the fractional part is discarded (i.e., the value is truncated toward zero). If the value of
@@ -2549,7 +2547,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
range of portable real floating values is (-1, Utype_MAX+1).
-6.3.1.5 Real floating types
+
When a float is promoted to double or long double, or a double is promoted
to long double, its value is unchanged (if the source value is represented in the
@@ -2564,12 +2562,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
value, chosen in an implementation-defined manner. If the value being converted is
outside the range of values that can be represented, the behavior is undefined.
-6.3.1.6 Complex types
+
When a value of complex type is converted to another complex type, both the real and
imaginary parts follow the conversion rules for the corresponding real types.
-6.3.1.7 Real and complex
+
When a value of real type is converted to a complex type, the real part of the complex
result value is determined by the rules of conversion to the corresponding real type and
@@ -2579,7 +2577,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
complex value is discarded and the value of the real part is converted according to the
conversion rules for the corresponding real type.
-6.3.1.8 Usual arithmetic conversions
+
Many operators that expect operands of arithmetic type cause conversions and yield result
types in a similar way. The purpose is to determine a common real type for the operands
@@ -2633,9 +2631,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
described in 6.3.1.4 and 6.3.1.5.
-6.3.2 Other operands
+
An lvalue is an expression with an object type or an incomplete type other than void;53)
if an lvalue does not designate an object when it is evaluated, the behavior is undefined.
@@ -2683,7 +2681,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
designator and violates the constraint in 6.5.3.4.
-6.3.2.2 void
+
The (nonexistent) value of a void expression (an expression that has type void) shall not
be used in any way, and implicit or explicit conversions (except to void) shall not be
@@ -2691,7 +2689,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
expression, its value or designator is discarded. (A void expression is evaluated for its
side effects.)
-6.3.2.3 Pointers
+
A pointer to void may be converted to or from a pointer to any incomplete or object
type. A pointer to any incomplete or object type may be converted to a pointer to void
@@ -2748,7 +2746,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
correctly aligned for a pointer to type C.
-6.4 Lexical elements
+
@@ -2820,7 +2818,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 occur in source files. -6.4.1 Keywords
+6.4.1 Keywords
Syntax
@@ -2849,9 +2847,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 200759) One possible specification for imaginary types appears in annex G. -
6.4.2 Identifiers
+6.4.2 Identifiers
-6.4.2.1 General
+6.4.2.1 General
Syntax
@@ -2909,7 +2907,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Extended characters may produce a long external identifier. -6.4.2.2 Predefined identifiers
+6.4.2.2 Predefined identifiers
Semantics
The identifier __func__ shall be implicitly declared by the translator as if, @@ -2946,7 +2944,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 identifier is explicitly declared using the name __func__, the behavior is undefined. -
6.4.3 Universal character names
+6.4.3 Universal character names
Syntax
@@ -2985,7 +2983,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 200763) Short identifiers for characters were first specified in ISO/IEC 10646-1/AMD9:1997. -
6.4.4 Constants
+6.4.4 Constants
Syntax
@@ -3002,7 +3000,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Each constant has a type, determined by its form and value, as detailed later. -
6.4.4.1 Integer constants
+6.4.4.1 Integer constants
Syntax
@@ -3101,7 +3099,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 its list and has no extended integer type, then the integer constant has no type. -
6.4.4.2 Floating constants
+6.4.4.2 Floating constants
Syntax
@@ -3189,7 +3187,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 floating constants (see 7.20.1.3). -
6.4.4.3 Enumeration constants
+6.4.4.3 Enumeration constants
Syntax
@@ -3200,7 +3198,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 An identifier declared as an enumeration constant has type int.Forward references: enumeration specifiers (6.7.2.2). -
6.4.4.4 Character constants
+6.4.4.4 Character constants
Syntax
@@ -3332,7 +3330,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the result is not a token and a diagnostic is required. See ''future language directions'' (6.11.4). -
6.4.5 String literals
+6.4.5 String literals
Syntax
@@ -3397,7 +3395,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 it by a \0 escape sequence. -6.4.6 Punctuators
+6.4.6 Punctuators
Syntax
@@ -3435,7 +3433,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 interchanged. -6.4.7 Header names
+6.4.7 Header names
Syntax
@@ -3490,7 +3488,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 200770) For an example of a header name preprocessing token used in a #pragma directive, see 6.10.9. -
6.4.8 Preprocessing numbers
+6.4.8 Preprocessing numbers
Syntax
@@ -3520,7 +3518,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -6.4.9 Comments
+6.4.9 Comments
Except within a character constant, a string literal, or a comment, the characters /* introduce a comment. The contents of such a comment are examined only to identify @@ -3556,7 +3554,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
71) Thus, /* ... */ comments do not nest. -
6.5 Expressions
+6.5 Expressions
An expression is a sequence of operators and operands that specifies computation of a value, or that designates an object or a function, or that generates side effects, or that @@ -3656,7 +3654,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 documented. -
6.5.1 Primary expressions
+6.5.1 Primary expressions
Syntax
@@ -3686,7 +3684,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 200779) Thus, an undeclared identifier is a violation of the syntax. -
6.5.2 Postfix operators
+6.5.2 Postfix operators
Syntax
@@ -3710,7 +3708,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 assignment-expression argument-expression-list , assignment-expression-6.5.2.1 Array subscripting
+6.5.2.1 Array subscripting
Constraints
One of the expressions shall have type ''pointer to object type'', the other expression shall @@ -3747,7 +3745,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (6.5.3.2), array declarators (6.7.5.2). -
6.5.2.2 Function calls
+6.5.2.2 Function calls
Constraints
The expression that denotes the called function80) shall have type pointer to function @@ -3835,7 +3833,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 adjusted to have a pointer type as described in 6.9.1. -
6.5.2.3 Structure and union members
+6.5.2.3 Structure and union members
Constraints
The first operand of the . operator shall have a qualified or unqualified structure or union @@ -3945,7 +3943,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 its operand), the expression (&E)->MOS is the same as E.MOS. -
6.5.2.4 Postfix increment and decrement operators
+6.5.2.4 Postfix increment and decrement operators
Constraints
The operand of the postfix increment or decrement operator shall have qualified or @@ -3964,7 +3962,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 it).
Forward references: additive operators (6.5.6), compound assignment (6.5.16.2). -
6.5.2.5 Compound literals
+6.5.2.5 Compound literals
Constraints
The type name shall specify an object type or an array of unknown size, but not a variable @@ -4100,7 +4098,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the same or overlapping representations. -
6.5.3 Unary operators
+6.5.3 Unary operators
Syntax
@@ -4114,7 +4112,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 unary-operator: one of & * + - ~ !-6.5.3.1 Prefix increment and decrement operators
+6.5.3.1 Prefix increment and decrement operators
Constraints
The operand of the prefix increment or decrement operator shall have qualified or @@ -4130,7 +4128,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 operand is decremented.
Forward references: additive operators (6.5.6), compound assignment (6.5.16.2). -
6.5.3.2 Address and indirection operators
+6.5.3.2 Address and indirection operators
Constraints
The operand of the unary & operator shall be either a function designator, the result of a @@ -4168,7 +4166,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 end of its lifetime. -
6.5.3.3 Unary arithmetic operators
+6.5.3.3 Unary arithmetic operators
Constraints
The operand of the unary + or - operator shall have arithmetic type; of the ~ operator, @@ -4196,7 +4194,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -
6.5.3.4 The sizeof operator
+6.5.3.4 The sizeof operator
Constraints
The sizeof operator shall not be applied to an expression that has function type or an @@ -4263,7 +4261,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 size of the adjusted (pointer) type (see 6.9.1). -
6.5.4 Cast operators
+6.5.4 Cast operators
Syntax
@@ -4299,7 +4297,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 unqualified version of the type. -6.5.5 Multiplicative operators
+6.5.5 Multiplicative operators
Syntax
@@ -4330,7 +4328,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 200790) This is often called ''truncation toward zero''. -
6.5.6 Additive operators
+6.5.6 Additive operators
Syntax
@@ -4430,7 +4428,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 element'' requirements. -6.5.7 Bitwise shift operators
+6.5.7 Bitwise shift operators
Syntax
@@ -4463,7 +4461,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 part of the quotient of E1 / 2E2 . If E1 has a signed type and a negative value, the resulting value is implementation-defined. -6.5.8 Relational operators
+6.5.8 Relational operators
Syntax
@@ -4514,7 +4512,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 means (a<b)<c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''. -6.5.9 Equality operators
+6.5.9 Equality operators
Syntax
@@ -4574,7 +4572,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 behavior. -6.5.10 Bitwise AND operator
+6.5.10 Bitwise AND operator
Syntax
@@ -4597,7 +4595,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -6.5.11 Bitwise exclusive OR operator
+6.5.11 Bitwise exclusive OR operator
Syntax
@@ -4615,7 +4613,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 in the result is set if and only if exactly one of the corresponding bits in the converted operands is set). -6.5.12 Bitwise inclusive OR operator
+6.5.12 Bitwise inclusive OR operator
Syntax
@@ -4634,7 +4632,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 operands is set). -6.5.13 Logical AND operator
+6.5.13 Logical AND operator
Syntax
@@ -4653,7 +4651,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 there is a sequence point after the evaluation of the first operand. If the first operand compares equal to 0, the second operand is not evaluated. -6.5.14 Logical OR operator
+6.5.14 Logical OR operator
Syntax
@@ -4673,7 +4671,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 unequal to 0, the second operand is not evaluated. -6.5.15 Conditional operator
+6.5.15 Conditional operator
Syntax
@@ -4746,7 +4744,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 200795) A conditional expression does not yield an lvalue. -
6.5.16 Assignment operators
+6.5.16 Assignment operators
Syntax
@@ -4772,7 +4770,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 behavior is undefined. -6.5.16.1 Simple assignment
+6.5.16.1 Simple assignment
Constraints
One of the following shall hold:96) @@ -4849,7 +4847,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 not volatile from the type int volatile * const). -
6.5.16.2 Compound assignment
+6.5.16.2 Compound assignment
Constraints
For the operators += and -= only, either the left operand shall be a pointer to an object @@ -4864,7 +4862,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 expression E1 = E1 op (E2) only in that the lvalue E1 is evaluated only once. -
6.5.17 Comma operator
+6.5.17 Comma operator
Syntax
@@ -4897,7 +4895,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 200797) A comma operator does not yield an lvalue. -
6.6 Constant expressions
+6.6 Constant expressions
Syntax
@@ -4983,7 +4981,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the expression is a valid integer constant expression with value one. -6.7 Declarations
+6.7 Declarations
Syntax
@@ -5041,7 +5039,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007101) Function definitions have a different syntax, described in 6.9.1. -
6.7.1 Storage-class specifiers
+6.7.1 Storage-class specifiers
Syntax
@@ -5089,7 +5087,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 register is sizeof. -6.7.2 Type specifiers
+6.7.2 Type specifiers
Syntax
@@ -5165,7 +5163,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007104) Freestanding implementations are not required to provide complex types. * -
6.7.2.1 Structure and union specifiers
+6.7.2.1 Structure and union specifiers
Syntax
@@ -5362,7 +5360,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 layouts. -6.7.2.2 Enumeration specifiers
+6.7.2.2 Enumeration specifiers
Syntax
@@ -5423,7 +5421,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 been seen. -6.7.2.3 Tags
+6.7.2.3 Tags
Constraints
A specific type shall have its content defined at most once. @@ -5542,7 +5540,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
113) A similar construction with enum does not exist. -
6.7.3 Type qualifiers
+6.7.3 Type qualifiers
Syntax
@@ -5644,7 +5642,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007118) Both of these can occur through the use of typedefs. -
6.7.3.1 Formal definition of restrict
+6.7.3.1 Formal definition of restrict
Let D be a declaration of an ordinary identifier that provides a means of designating an object P as a restrict-qualified pointer to type T. @@ -5761,7 +5759,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 expressions *p and p[1] are not. -
6.7.4 Function specifiers
+6.7.4 Function specifiers
Syntax
@@ -5843,7 +5841,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 duration are also distinct in each of the definitions. -6.7.5 Declarators
+6.7.5 Declarators
Syntax
@@ -5914,7 +5912,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 directly or via one or more typedefs.Forward references: array declarators (6.7.5.2), type definitions (6.7.7). -
6.7.5.1 Pointer declarators
+6.7.5.1 Pointer declarators
Semantics
If, in the declaration ''T D1'', D1 has the form @@ -5946,7 +5944,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 declares constant_ptr as an object that has type ''const-qualified pointer to int''. -
6.7.5.2 Array declarators
+6.7.5.2 Array declarators
Constraints
In addition to optional type qualifiers and the keyword static, the [ and ] may delimit @@ -6064,7 +6062,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
124) Thus, * can be used only in function declarations that are not definitions (see 6.7.5.3). -
6.7.5.3 Function declarators (including prototypes)
+6.7.5.3 Function declarators (including prototypes)
Constraints
A function declarator shall not specify a return type that is a function type or an array @@ -6226,7 +6224,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
127) If both function types are ''old style'', parameter types are not compared. -
6.7.6 Type names
+6.7.6 Type names
Syntax
@@ -6278,7 +6276,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 parameter specification'', rather than redundant parentheses around the omitted identifier. -6.7.7 Type definitions
+6.7.7 Type definitions
Syntax
@@ -6376,7 +6374,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 a[i-1] = b[i]; }-6.7.8 Initialization
+6.7.8 Initialization
Syntax
@@ -6690,7 +6688,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007133) In particular, the evaluation order need not be the same as the order of subobject initialization. -
6.8 Statements and blocks
+6.8 Statements and blocks
Syntax
@@ -6722,7 +6720,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Forward references: expression and null statements (6.8.3), selection statements (6.8.4), iteration statements (6.8.5), the return statement (6.8.6.4). -
6.8.1 Labeled statements
+6.8.1 Labeled statements
Syntax
@@ -6744,7 +6742,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 them.Forward references: the goto statement (6.8.6.1), the switch statement (6.8.4.2). -
6.8.2 Compound statement
+6.8.2 Compound statement
Syntax
@@ -6760,7 +6758,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007A compound statement is a block. -
6.8.3 Expression and null statements
+6.8.3 Expression and null statements
Syntax
@@ -6815,7 +6813,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007134) Such as assignments, and function calls which have side effects. -
6.8.4 Selection statements
+6.8.4 Selection statements
Syntax
@@ -6832,7 +6830,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 enclosing block. Each associated substatement is also a block whose scope is a strict subset of the scope of the selection statement. -6.8.4.1 The if statement
+6.8.4.1 The if statement
Constraints
The controlling expression of an if statement shall have scalar type. @@ -6847,7 +6845,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 An else is associated with the lexically nearest preceding if that is allowed by the syntax. -
6.8.4.2 The switch statement
+6.8.4.2 The switch statement
Constraints
The controlling expression of a switch statement shall have integer type. @@ -6908,7 +6906,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 default label associated with the switch that is in the block containing the declaration. -
6.8.5 Iteration statements
+6.8.5 Iteration statements
Syntax
@@ -6943,17 +6941,17 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 statement is not evaluated before entering the loop body, nor is clause-1 of a for statement. -6.8.5.1 The while statement
+6.8.5.1 The while statement
The evaluation of the controlling expression takes place before each execution of the loop body. -
6.8.5.2 The do statement
+6.8.5.2 The do statement
The evaluation of the controlling expression takes place after each execution of the loop body. -
6.8.5.3 The for statement
+6.8.5.3 The for statement
The statement
@@ -6976,7 +6974,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 specifies an operation (such as incrementing) that is performed after each iteration. --6.8.6 Jump statements
+6.8.6 Jump statements
Syntax
@@ -6994,7 +6992,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 --6.8.6.1 The goto statement
+6.8.6.1 The goto statement
Constraints
The identifier in a goto statement shall name a label located somewhere in the enclosing @@ -7049,7 +7047,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 goto lab4; // invalid: going INTO scope of VLA.
6.8.6.2 The continue statement
+6.8.6.2 The continue statement
Constraints
A continue statement shall appear only in or as a loop body. @@ -7072,7 +7070,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
138) Following the contin: label is a null statement. -
6.8.6.3 The break statement
+6.8.6.3 The break statement
Constraints
A break statement shall appear only in or as a switch body or loop body. @@ -7085,7 +7083,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -
6.8.6.4 The return statement
+6.8.6.4 The return statement
Constraints
A return statement with an expression shall not appear in a function whose return type @@ -7135,7 +7133,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 range and precision. -
6.9 External definitions
+6.9 External definitions
Syntax
@@ -7180,7 +7178,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 external definition for it. -has no effect. -6.9.1 Function definitions
+6.9.1 Function definitions
Syntax
@@ -7312,7 +7310,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007-142) See ''future language directions'' (6.11.7). -
6.9.2 External object definitions
+6.9.2 External object definitions
Semantics
If the declaration of an identifier for an object has file scope and an initializer, the @@ -7356,7 +7354,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 zero on program startup. -
6.10 Preprocessing directives
+6.10 Preprocessing directives
Syntax
@@ -7462,7 +7460,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 # character string literal creation operator in 6.10.3.2, for example). -
6.10.1 Conditional inclusion
+6.10.1 Conditional inclusion
Constraints
The expression that controls conditional inclusion shall be an integer constant expression @@ -7555,7 +7553,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 including within a preprocessing directive. -
6.10.2 Source file inclusion
+6.10.2 Source file inclusion
Constraints
A #include directive shall identify a header or source file that can be processed by the @@ -7636,7 +7634,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 phases in 5.1.1.2); thus, an expansion that results in two string literals is an invalid directive. -
6.10.3 Macro replacement
+6.10.3 Macro replacement
Constraints
Two replacement lists are identical if and only if the preprocessing tokens in both have @@ -7726,7 +7724,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
150) Despite the name, a non-directive is a preprocessing directive. -
6.10.3.1 Argument substitution
+6.10.3.1 Argument substitution
After the arguments for the invocation of a function-like macro have been identified, argument substitution takes place. A parameter in the replacement list, unless preceded @@ -7740,7 +7738,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 were a parameter, and the variable arguments shall form the preprocessing tokens used to replace it. -
6.10.3.2 The # operator
+6.10.3.2 The # operator
Constraints
Each # preprocessing token in the replacement list for a function-like macro shall be @@ -7764,7 +7762,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ## operators is unspecified. -
6.10.3.3 The ## operator
+6.10.3.3 The ## operator
Constraints
A ## preprocessing token shall not occur at the beginning or at the end of a replacement @@ -7814,7 +7812,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 exist only within translation phase 4. -
6.10.3.4 Rescanning and further replacement
+6.10.3.4 Rescanning and further replacement
After all parameters in the replacement list have been substituted and # and ## processing has taken place, all placemarker preprocessing tokens are removed. Then, the @@ -7832,7 +7830,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 as a preprocessing directive even if it resembles one, but all pragma unary operator expressions within it are then processed as specified in 6.10.9 below. -
6.10.3.5 Scope of macro definitions
+6.10.3.5 Scope of macro definitions
A macro definition lasts (independent of block structure) until a corresponding #undef directive is encountered or (if none is encountered) until the end of the preprocessing @@ -7976,7 +7974,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 printf("x is %d but y is %d", x, y));
6.10.4 Line control
+6.10.4 Line control
Constraints
The string literal of a #line directive, if present, shall be a character string literal. @@ -8010,7 +8008,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 previous forms and is then processed as appropriate. -
6.10.5 Error directive
+6.10.5 Error directive
Semantics
A preprocessing directive of the form @@ -8019,7 +8017,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 causes the implementation to produce a diagnostic message that includes the specified sequence of preprocessing tokens. -
6.10.6 Pragma directive
+6.10.6 Pragma directive
Semantics
A preprocessing directive of the form @@ -8059,7 +8057,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
153) See ''future language directions'' (6.11.8). -
6.10.7 Null directive
+6.10.7 Null directive
Semantics
A preprocessing directive of the form @@ -8067,7 +8065,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 # new-line
6.10.8 Predefined macro names
+6.10.8 Predefined macro names
The following macro names154) shall be defined by the implementation: __DATE__ The date of translation of the preprocessing translation unit: a character @@ -8140,7 +8138,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int that is increased with each revision of this International Standard. -
6.10.9 Pragma operator
+6.10.9 Pragma operator
Semantics
A unary operator expression of the form: @@ -8169,59 +8167,59 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 #define PRAGMA(x) _Pragma(#x) LISTING ( ..\listing.dir )
6.11 Future language directions
+6.11 Future language directions
-6.11.1 Floating types
+6.11.1 Floating types
Future standardization may include additional floating-point types, including those with greater range, precision, or both than long double. -
6.11.2 Linkages of identifiers
+6.11.2 Linkages of identifiers
Declaring an identifier with internal linkage at file scope without the static storage- class specifier is an obsolescent feature. -
6.11.3 External names
+6.11.3 External names
Restriction of the significance of an external name to fewer than 255 characters (considering each universal character name or extended source character as a single character) is an obsolescent feature that is a concession to existing implementations. -
6.11.4 Character escape sequences
+6.11.4 Character escape sequences
Lowercase letters as escape sequences are reserved for future standardization. Other characters may be used in extensions. -
6.11.5 Storage-class specifiers
+6.11.5 Storage-class specifiers
The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. -
6.11.6 Function declarators
+6.11.6 Function declarators
The use of function declarators with empty parentheses (not prototype-format parameter type declarators) is an obsolescent feature. -
6.11.7 Function definitions
+6.11.7 Function definitions
The use of function definitions with separate parameter identifier and declaration lists (not prototype-format parameter type and identifier declarators) is an obsolescent feature. -
6.11.8 Pragma directives
+6.11.8 Pragma directives
Pragmas whose first preprocessing token is STDC are reserved for future standardization. -
6.11.9 Predefined macro names
+6.11.9 Predefined macro names
Macro names beginning with __STDC_ are reserved for future standardization. -
7. Library
+7. Library
-7.1 Introduction
+7.1 Introduction
-7.1.1 Definitions of terms
+7.1.1 Definitions of terms
A string is a contiguous sequence of characters terminated by and including the first null character. The term multibyte string is sometimes used instead to emphasize special @@ -8264,7 +8262,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 implementation's choice. -
7.1.2 Standard headers
+7.1.2 Standard headers
Each library function is declared, with a type that includes a prototype, in a header,159) whose contents are made available by the #include preprocessing directive. The @@ -8315,7 +8313,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 necessarily valid source file names. -
7.1.3 Reserved identifiers
+7.1.3 Reserved identifiers
Each header declares or defines all identifiers listed in its associated subclause, and optionally declares or defines identifiers listed in its associated future library directions @@ -8349,7 +8347,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 setjmp, and va_end. -
7.1.4 Use of library functions
+7.1.4 Use of library functions
Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow: If an argument to a function has an invalid value (such as a value @@ -8448,7 +8446,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
164) Thus, a signal handler cannot, in general, call standard library functions. -
7.2 Diagnostics
+7.2 Diagnostics
The header <assert.h> defines the assert macro and refers to another macro,
@@ -8465,9 +8463,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 macro definition is suppressed in order to access an actual function, the behavior is undefined. -7.2.1 Program diagnostics
+7.2.1 Program diagnostics
-7.2.1.1 The assert macro
+7.2.1.1 The assert macro
Synopsis
@@ -8498,9 +8496,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Assertion failed: expression, function abc, file xyz, line nnn. -7.3 Complex arithmetic
+7.3 Complex arithmetic
-7.3.1 Introduction
+7.3.1 Introduction
The header <complex.h> defines macros and declares functions that support complex arithmetic.166) Each synopsis specifies a family of functions consisting of a principal @@ -8550,12 +8548,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
168) A specification for imaginary types is in informative annex G. -
7.3.2 Conventions
+7.3.2 Conventions
Values are interpreted as radians, not degrees. An implementation may set errno but is not required to. -
7.3.3 Branch cuts
+7.3.3 Branch cuts
Some of the functions below have branch cuts, across which the function is discontinuous. For implementations with a signed zero (including all IEC 60559 @@ -8574,7 +8572,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the finite endpoint of the cut along the negative real axis approaches the cut from above, so the cut maps to the positive imaginary axis. -
7.3.4 The CX_LIMITED_RANGE pragma
+7.3.4 The CX_LIMITED_RANGE pragma
Synopsis
@@ -8610,9 +8608,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 where the programmer can determine they are safe. -7.3.5 Trigonometric functions
+7.3.5 Trigonometric functions
-7.3.5.1 The cacos functions
+7.3.5.1 The cacos functions
Synopsis
@@ -8630,7 +8628,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 mathematically unbounded along the imaginary axis and in the interval [0, pi ] along the real axis. -7.3.5.2 The casin functions
+7.3.5.2 The casin functions
Synopsis
@@ -8649,7 +8647,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 along the real axis. -7.3.5.3 The catan functions
+7.3.5.3 The catan functions
Synopsis
@@ -8667,7 +8665,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 mathematically unbounded along the imaginary axis and in the interval [-pi /2, +pi /2] along the real axis. -7.3.5.4 The ccos functions
+7.3.5.4 The ccos functions
Synopsis
@@ -8682,7 +8680,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The ccos functions return the complex cosine value. -
7.3.5.5 The csin functions
+7.3.5.5 The csin functions
Synopsis
@@ -8698,7 +8696,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The csin functions return the complex sine value. -7.3.5.6 The ctan functions
+7.3.5.6 The ctan functions
Synopsis
@@ -8713,9 +8711,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The ctan functions return the complex tangent value. -
7.3.6 Hyperbolic functions
+7.3.6 Hyperbolic functions
-7.3.6.1 The cacosh functions
+7.3.6.1 The cacosh functions
Synopsis
@@ -8733,7 +8731,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 half-strip of non-negative values along the real axis and in the interval [-ipi , +ipi ] along the imaginary axis. -7.3.6.2 The casinh functions
+7.3.6.2 The casinh functions
Synopsis
@@ -8752,7 +8750,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 strip mathematically unbounded along the real axis and in the interval [-ipi /2, +ipi /2] along the imaginary axis. -7.3.6.3 The catanh functions
+7.3.6.3 The catanh functions
Synopsis
@@ -8770,7 +8768,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 strip mathematically unbounded along the real axis and in the interval [-ipi /2, +ipi /2] along the imaginary axis. -7.3.6.4 The ccosh functions
+7.3.6.4 The ccosh functions
Synopsis
@@ -8785,7 +8783,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The ccosh functions return the complex hyperbolic cosine value. -
7.3.6.5 The csinh functions
+7.3.6.5 The csinh functions
Synopsis
@@ -8801,7 +8799,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The csinh functions return the complex hyperbolic sine value. -
7.3.6.6 The ctanh functions
+7.3.6.6 The ctanh functions
Synopsis
@@ -8816,9 +8814,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The ctanh functions return the complex hyperbolic tangent value. -
7.3.7 Exponential and logarithmic functions
+7.3.7 Exponential and logarithmic functions
-7.3.7.1 The cexp functions
+7.3.7.1 The cexp functions
Synopsis
@@ -8833,7 +8831,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The cexp functions return the complex base-e exponential value. -
7.3.7.2 The clog functions
+7.3.7.2 The clog functions
Synopsis
@@ -8852,9 +8850,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 mathematically unbounded along the real axis and in the interval [-ipi , +ipi ] along the imaginary axis. -
7.3.8 Power and absolute-value functions
+7.3.8 Power and absolute-value functions
-7.3.8.1 The cabs functions
+7.3.8.1 The cabs functions
Synopsis
@@ -8870,7 +8868,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The cabs functions return the complex absolute value. -
7.3.8.2 The cpow functions
+7.3.8.2 The cpow functions
Synopsis
@@ -8888,7 +8886,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The cpow functions return the complex power function value. -7.3.8.3 The csqrt functions
+7.3.8.3 The csqrt functions
Synopsis
@@ -8905,9 +8903,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The csqrt functions return the complex square root value, in the range of the right half- plane (including the imaginary axis). -7.3.9 Manipulation functions
+7.3.9 Manipulation functions
-7.3.9.1 The carg functions
+7.3.9.1 The carg functions
Synopsis
@@ -8923,7 +8921,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The carg functions return the value of the argument in the interval [-pi , +pi ]. -
7.3.9.2 The cimag functions
+7.3.9.2 The cimag functions
Synopsis
@@ -8943,7 +8941,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
170) For a variable z of complex type, z == creal(z) + cimag(z)*I. -
7.3.9.3 The conj functions
+7.3.9.3 The conj functions
Synopsis
@@ -8959,7 +8957,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The conj functions return the complex conjugate value. -
7.3.9.4 The cproj functions
+7.3.9.4 The cproj functions
Synopsis
@@ -8984,7 +8982,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.3.9.5 The creal functions
+7.3.9.5 The creal functions
Synopsis
@@ -9008,7 +9006,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007171) For a variable z of complex type, z == creal(z) + cimag(z)*I. -
7.4 Character handling
+7.4 Character handling
The header <ctype.h> declares several functions useful for classifying and mapping characters.172) In all cases the argument is an int, the value of which shall be @@ -9032,12 +9030,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 values lie from 0 (NUL) through 0x1F (US), and the character 0x7F (DEL). -
7.4.1 Character classification functions
+7.4.1 Character classification functions
The functions in this subclause return nonzero (true) if and only if the value of the argument c conforms to that in the description of the function. -
7.4.1.1 The isalnum function
+7.4.1.1 The isalnum function
Synopsis
@@ -9047,7 +9045,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isalnum function tests for any character for which isalpha or isdigit is true. -
7.4.1.2 The isalpha function
+7.4.1.2 The isalpha function
Synopsis
@@ -9069,7 +9067,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 characters; all four combinations are possible. -7.4.1.3 The isblank function
+7.4.1.3 The isblank function
Synopsis
@@ -9083,7 +9081,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 space (' '), and horizontal tab ('\t'). In the "C" locale, isblank returns true only for the standard blank characters. -7.4.1.4 The iscntrl function
+7.4.1.4 The iscntrl function
Synopsis
@@ -9093,7 +9091,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The iscntrl function tests for any control character. -
7.4.1.5 The isdigit function
+7.4.1.5 The isdigit function
Synopsis
@@ -9103,7 +9101,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isdigit function tests for any decimal-digit character (as defined in 5.2.1). -
7.4.1.6 The isgraph function
+7.4.1.6 The isgraph function
Synopsis
@@ -9118,7 +9116,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isgraph function tests for any printing character except space (' '). -
7.4.1.7 The islower function
+7.4.1.7 The islower function
Synopsis
@@ -9131,7 +9129,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 isspace is true. In the "C" locale, islower returns true only for the lowercase letters (as defined in 5.2.1). -7.4.1.8 The isprint function
+7.4.1.8 The isprint function
Synopsis
@@ -9141,7 +9139,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isprint function tests for any printing character including space (' '). -
7.4.1.9 The ispunct function
+7.4.1.9 The ispunct function
Synopsis
@@ -9154,7 +9152,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 locale, ispunct returns true for every printing character for which neither isspace nor isalnum is true. -7.4.1.10 The isspace function
+7.4.1.10 The isspace function
Synopsis
@@ -9169,7 +9167,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). In the "C" locale, isspace returns true only for the standard white-space characters. -7.4.1.11 The isupper function
+7.4.1.11 The isupper function
Synopsis
@@ -9182,7 +9180,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 isspace is true. In the "C" locale, isupper returns true only for the uppercase letters (as defined in 5.2.1). -7.4.1.12 The isxdigit function
+7.4.1.12 The isxdigit function
Synopsis
@@ -9192,9 +9190,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isxdigit function tests for any hexadecimal-digit character (as defined in 6.4.4.1). -
7.4.2 Character case mapping functions
+7.4.2 Character case mapping functions
-7.4.2.1 The tolower function
+7.4.2.1 The tolower function
Synopsis
@@ -9211,7 +9209,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for any given locale); otherwise, the argument is returned unchanged. -7.4.2.2 The toupper function
+7.4.2.2 The toupper function
Synopsis
@@ -9228,7 +9226,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for any given locale); otherwise, the argument is returned unchanged. -7.5 Errors
+7.5 Errors
The header <errno.h> defines several macros, all relating to the reporting of error conditions. @@ -9273,7 +9271,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
177) See ''future library directions'' (7.26.3). -
7.6 Floating-point environment
+7.6 Floating-point environment
The header <fenv.h> declares two types and several macros and functions to provide access to the floating-point environment. The floating-point environment refers @@ -9384,7 +9382,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 FLT_ROUNDS, they are not required to do so. -
7.6.1 The FENV_ACCESS pragma
+7.6.1 The FENV_ACCESS pragma
Synopsis
@@ -9446,7 +9444,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ''off'', just one evaluation of x + 1 would suffice. -7.6.2 Floating-point exceptions
+7.6.2 Floating-point exceptions
The following functions provide access to the floating-point status flags.186) The int input argument for the functions represents a subset of floating-point exceptions, and can @@ -9462,7 +9460,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 content of flags. -
7.6.2.1 The feclearexcept function
+7.6.2.1 The feclearexcept function
Synopsis
@@ -9480,7 +9478,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.6.2.2 The fegetexceptflag function
+7.6.2.2 The fegetexceptflag function
Synopsis
@@ -9497,7 +9495,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fegetexceptflag function returns zero if the representation was successfully stored. Otherwise, it returns a nonzero value. -7.6.2.3 The feraiseexcept function
+7.6.2.3 The feraiseexcept function
Synopsis
@@ -9526,7 +9524,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 in F.7.6 is in the same spirit. -7.6.2.4 The fesetexceptflag function
+7.6.2.4 The fesetexceptflag function
Synopsis
@@ -9547,7 +9545,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 all the specified flags were successfully set to the appropriate state. Otherwise, it returns a nonzero value. -7.6.2.5 The fetestexcept function
+7.6.2.5 The fetestexcept function
Synopsis
@@ -9589,12 +9587,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007188) This mechanism allows testing several floating-point exceptions with just one function call. -
7.6.3 Rounding
+7.6.3 Rounding
The fegetround and fesetround functions provide control of rounding direction modes. -
7.6.3.1 The fegetround function
+7.6.3.1 The fegetround function
Synopsis
@@ -9609,7 +9607,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 representing the current rounding direction or a negative value if there is no such rounding direction macro or the current rounding direction is not determinable. -7.6.3.2 The fesetround function
+7.6.3.2 The fesetround function
Synopsis
@@ -9645,12 +9643,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 }-7.6.4 Environment
+7.6.4 Environment
The functions in this section manage the floating-point environment -- status flags and control modes -- as one entity. -
7.6.4.1 The fegetenv function
+7.6.4.1 The fegetenv function
Synopsis
@@ -9665,7 +9663,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fegetenv function returns zero if the environment was successfully stored. Otherwise, it returns a nonzero value. -7.6.4.2 The feholdexcept function
+7.6.4.2 The feholdexcept function
Synopsis
@@ -9690,7 +9688,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 function to write routines that hide spurious floating-point exceptions from their callers. -7.6.4.3 The fesetenv function
+7.6.4.3 The fesetenv function
Synopsis
@@ -9708,7 +9706,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fesetenv function returns zero if the environment was successfully established. Otherwise, it returns a nonzero value. -7.6.4.4 The feupdateenv function
+7.6.4.4 The feupdateenv function
Synopsis
@@ -9751,7 +9749,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 return result; }-7.7 Characteristics of floating types
+7.7 Characteristics of floating types
The header <float.h> defines several macros that expand to various limits and parameters of the standard floating-point types. @@ -9760,7 +9758,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 in 5.2.4.2.2. -
7.8 Format conversion of integer types
+7.8 Format conversion of integer types
The header <inttypes.h> includes the header <stdint.h> and extends it with additional facilities provided by hosted implementations. @@ -9779,7 +9777,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
190) See ''future library directions'' (7.26.4). -
7.8.1 Macros for format specifiers
+7.8.1 Macros for format specifiers
Each of the following object-like macros191) expands to a character string literal containing a conversion specifier, possibly modified by a length modifier, suitable for use @@ -9846,9 +9844,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 same. -
7.8.2 Functions for greatest-width integer types
+7.8.2 Functions for greatest-width integer types
-7.8.2.1 The imaxabs function
+7.8.2.1 The imaxabs function
Synopsis
@@ -9870,7 +9868,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007193) The absolute value of the most negative number cannot be represented in two's complement. -
7.8.2.2 The imaxdiv function
+7.8.2.2 The imaxdiv function
Synopsis
@@ -9887,7 +9885,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 quot (the quotient) and rem (the remainder), each of which has type intmax_t. If either part of the result cannot be represented, the behavior is undefined. -7.8.2.3 The strtoimax and strtoumax functions
+7.8.2.3 The strtoimax and strtoumax functions
Synopsis
@@ -9912,7 +9910,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (7.20.1.4). -7.8.2.4 The wcstoimax and wcstoumax functions
+7.8.2.4 The wcstoimax and wcstoumax functions
Synopsis
@@ -9938,7 +9936,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (7.24.4.1.2). --7.9 Alternative spellings
+7.9 Alternative spellings
The header <iso646.h> defines the following eleven macros (on the left) that expand to the corresponding tokens (on the right): @@ -9956,7 +9954,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 xor ^ xor_eq ^=
7.10 Sizes of integer types
+7.10 Sizes of integer types
The header <limits.h> defines several macros that expand to various limits and parameters of the standard integer types. @@ -9965,7 +9963,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 in 5.2.4.2.1. -
7.11 Localization
+7.11 Localization
The header <locale.h> declares two functions, one type, and defines several macros.
@@ -10022,9 +10020,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
195) See ''future library directions'' (7.26.5). -
7.11.1 Locale control
+7.11.1 Locale control
-7.11.1.1 The setlocale function
+7.11.1.1 The setlocale function
Synopsis
@@ -10085,9 +10083,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 locale when category has the value LC_ALL. -7.11.2 Numeric formatting convention inquiry
+7.11.2 Numeric formatting convention inquiry
-7.11.2.1 The localeconv function
+7.11.2.1 The localeconv function
Synopsis
@@ -10315,7 +10313,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 3 +$1.25 +$ 1.25 + $1.25 4 $+1.25 $+ 1.25 $ +1.25-7.12 Mathematics
+7.12 Mathematics
The header <math.h> declares two types and many mathematical functions and defines several macros. Most synopses specify a family of functions consisting of a principal @@ -10432,7 +10430,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 substantially slower. -
7.12.1 Treatment of error conditions
+7.12.1 Treatment of error conditions
The behavior of each of the functions in <math.h> is specified for all representable values of its input arguments, except where stated otherwise. Each function shall execute @@ -10484,7 +10482,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 also ''flush-to-zero'' underflow. -
7.12.2 The FP_CONTRACT pragma
+7.12.2 The FP_CONTRACT pragma
Synopsis
@@ -10510,12 +10508,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.12.3 Classification macros
+7.12.3 Classification macros
In the synopses in this subclause, real-floating indicates that the argument shall be an expression of real floating type. -
7.12.3.1 The fpclassify macro
+7.12.3.1 The fpclassify macro
Synopsis
@@ -10546,7 +10544,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 become subnormal when converted to double, and zero when converted to float. -7.12.3.2 The isfinite macro
+7.12.3.2 The isfinite macro
Synopsis
@@ -10568,7 +10566,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The isfinite macro returns a nonzero value if and only if its argument has a finite value. -7.12.3.3 The isinf macro
+7.12.3.3 The isinf macro
Synopsis
@@ -10584,7 +10582,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The isinf macro returns a nonzero value if and only if its argument has an infinite value. -7.12.3.4 The isnan macro
+7.12.3.4 The isnan macro
Synopsis
@@ -10604,7 +10602,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 NaNs in the evaluation type but not in the semantic type. -7.12.3.5 The isnormal macro
+7.12.3.5 The isnormal macro
Synopsis
@@ -10626,7 +10624,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The isnormal macro returns a nonzero value if and only if its argument has a normal value. -7.12.3.6 The signbit macro
+7.12.3.6 The signbit macro
Synopsis
@@ -10645,9 +10643,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 unsigned, it is treated as positive. -7.12.4 Trigonometric functions
+7.12.4 Trigonometric functions
-7.12.4.1 The acos functions
+7.12.4.1 The acos functions
Synopsis
@@ -10668,7 +10666,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.12.4.2 The asin functions
+7.12.4.2 The asin functions
Synopsis
@@ -10684,7 +10682,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The asin functions return arcsin x in the interval [-pi /2, +pi /2] radians. -
7.12.4.3 The atan functions
+7.12.4.3 The atan functions
Synopsis
@@ -10699,7 +10697,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The atan functions return arctan x in the interval [-pi /2, +pi /2] radians. -
7.12.4.4 The atan2 functions
+7.12.4.4 The atan2 functions
Synopsis
@@ -10717,7 +10715,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The atan2 functions return arctan y/x in the interval [-pi , +pi ] radians. -7.12.4.5 The cos functions
+7.12.4.5 The cos functions
Synopsis
@@ -10732,7 +10730,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The cos functions return cos x. -
7.12.4.6 The sin functions
+7.12.4.6 The sin functions
Synopsis
@@ -10747,7 +10745,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The sin functions return sin x. -
7.12.4.7 The tan functions
+7.12.4.7 The tan functions
Synopsis
@@ -10763,9 +10761,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The tan functions return tan x. -7.12.5 Hyperbolic functions
+7.12.5 Hyperbolic functions
-7.12.5.1 The acosh functions
+7.12.5.1 The acosh functions
Synopsis
@@ -10781,7 +10779,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The acosh functions return arcosh x in the interval [0, +(inf)]. -
7.12.5.2 The asinh functions
+7.12.5.2 The asinh functions
Synopsis
@@ -10796,7 +10794,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The asinh functions return arsinh x. -
7.12.5.3 The atanh functions
+7.12.5.3 The atanh functions
Synopsis
@@ -10814,7 +10812,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The atanh functions return artanh x. -
7.12.5.4 The cosh functions
+7.12.5.4 The cosh functions
Synopsis
@@ -10830,7 +10828,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The cosh functions return cosh x. -
7.12.5.5 The sinh functions
+7.12.5.5 The sinh functions
Synopsis
@@ -10846,7 +10844,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The sinh functions return sinh x. -
7.12.5.6 The tanh functions
+7.12.5.6 The tanh functions
Synopsis
@@ -10862,9 +10860,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The tanh functions return tanh x. -
7.12.6 Exponential and logarithmic functions
+7.12.6 Exponential and logarithmic functions
-7.12.6.1 The exp functions
+7.12.6.1 The exp functions
Synopsis
@@ -10880,7 +10878,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The exp functions return ex . -
7.12.6.2 The exp2 functions
+7.12.6.2 The exp2 functions
Synopsis
@@ -10896,7 +10894,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The exp2 functions return 2x . -
7.12.6.3 The expm1 functions
+7.12.6.3 The expm1 functions
Synopsis
@@ -10917,7 +10915,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
208) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. -
7.12.6.4 The frexp functions
+7.12.6.4 The frexp functions
Synopsis
@@ -10935,7 +10933,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 frexp functions return the value x, such that x has a magnitude in the interval [1/2, 1) or zero, and value equals x x 2*exp . If value is zero, both parts of the result are zero. -7.12.6.5 The ilogb functions
+7.12.6.5 The ilogb functions
Synopsis
@@ -10961,7 +10959,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The ilogb functions return the exponent of x as a signed int value.Forward references: the logb functions (7.12.6.11). -
7.12.6.6 The ldexp functions
+7.12.6.6 The ldexp functions
Synopsis
@@ -10977,7 +10975,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The ldexp functions return x x 2exp . -
7.12.6.7 The log functions
+7.12.6.7 The log functions
Synopsis
@@ -10993,7 +10991,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The log functions return loge x. -
7.12.6.8 The log10 functions
+7.12.6.8 The log10 functions
Synopsis
@@ -11010,7 +11008,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The log10 functions return log10 x. -
7.12.6.9 The log1p functions
+7.12.6.9 The log1p functions
Synopsis
@@ -11031,7 +11029,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007209) For small magnitude x, log1p(x) is expected to be more accurate than log(1 + x). -
7.12.6.10 The log2 functions
+7.12.6.10 The log2 functions
Synopsis
@@ -11052,7 +11050,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.12.6.11 The logb functions
+7.12.6.11 The logb functions
Synopsis
@@ -11072,7 +11070,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The logb functions return the signed exponent of x. -
7.12.6.12 The modf functions
+7.12.6.12 The modf functions
Synopsis
@@ -11090,7 +11088,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The modf functions return the signed fractional part of value. -7.12.6.13 The scalbn and scalbln functions
+7.12.6.13 The scalbn and scalbln functions
Synopsis
@@ -11109,9 +11107,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The scalbn and scalbln functions return x x FLT_RADIXn . -
7.12.7 Power and absolute-value functions
+7.12.7 Power and absolute-value functions
-7.12.7.1 The cbrt functions
+7.12.7.1 The cbrt functions
Synopsis
@@ -11126,7 +11124,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The cbrt functions return x1/3 . -
7.12.7.2 The fabs functions
+7.12.7.2 The fabs functions
Synopsis
@@ -11142,7 +11140,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The fabs functions return | x |. -
7.12.7.3 The hypot functions
+7.12.7.3 The hypot functions
Synopsis
@@ -11162,7 +11160,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ??? ???????????????-7.12.7.4 The pow functions
+7.12.7.4 The pow functions
Synopsis
@@ -11180,7 +11178,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007-The pow functions return xy . -
7.12.7.5 The sqrt functions
+7.12.7.5 The sqrt functions
Synopsis
@@ -11200,9 +11198,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ??? ???
7.12.8 Error and gamma functions
+7.12.8 Error and gamma functions
-7.12.8.1 The erf functions
+7.12.8.1 The erf functions
Synopsis
@@ -11229,7 +11227,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ??? 0-7.12.8.2 The erfc functions
+7.12.8.2 The erfc functions
Synopsis
@@ -11257,7 +11255,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 ??? ??? x-7.12.8.3 The lgamma functions
+7.12.8.3 The lgamma functions
Synopsis
@@ -11274,7 +11272,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The lgamma functions return loge | (Gamma)(x) |. -
7.12.8.4 The tgamma functions
+7.12.8.4 The tgamma functions
Synopsis
@@ -11291,9 +11289,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The tgamma functions return (Gamma)(x). -
7.12.9 Nearest integer functions
+7.12.9 Nearest integer functions
-7.12.9.1 The ceil functions
+7.12.9.1 The ceil functions
Synopsis
@@ -11309,7 +11307,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The ceil functions return ???x???, expressed as a floating-point number. -
7.12.9.2 The floor functions
+7.12.9.2 The floor functions
Synopsis
@@ -11324,7 +11322,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The floor functions return ???x???, expressed as a floating-point number. -
7.12.9.3 The nearbyint functions
+7.12.9.3 The nearbyint functions
Synopsis
@@ -11341,7 +11339,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The nearbyint functions return the rounded integer value. -
7.12.9.4 The rint functions
+7.12.9.4 The rint functions
Synopsis
@@ -11359,7 +11357,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The rint functions return the rounded integer value. -
7.12.9.5 The lrint and llrint functions
+7.12.9.5 The lrint and llrint functions
Synopsis
@@ -11380,7 +11378,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The lrint and llrint functions return the rounded integer value. -
7.12.9.6 The round functions
+7.12.9.6 The round functions
Synopsis
@@ -11398,7 +11396,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The round functions return the rounded integer value. -7.12.9.7 The lround and llround functions
+7.12.9.7 The lround and llround functions
Synopsis
@@ -11419,7 +11417,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The lround and llround functions return the rounded integer value. -
7.12.9.8 The trunc functions
+7.12.9.8 The trunc functions
Synopsis
@@ -11436,9 +11434,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The trunc functions return the truncated integer value. -7.12.10 Remainder functions
+7.12.10 Remainder functions
-7.12.10.1 The fmod functions
+7.12.10.1 The fmod functions
Synopsis
@@ -11456,7 +11454,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 whether a domain error occurs or the fmod functions return zero is implementation- defined. -7.12.10.2 The remainder functions
+7.12.10.2 The remainder functions
Synopsis
@@ -11484,7 +11482,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 x.'' This definition is applicable for all implementations. -7.12.10.3 The remquo functions
+7.12.10.3 The remquo functions
Synopsis
@@ -11505,9 +11503,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 pointed to by quo is unspecified and whether a domain error occurs or the functions return zero is implementation defined. -7.12.11 Manipulation functions
+7.12.11 Manipulation functions
-7.12.11.1 The copysign functions
+7.12.11.1 The copysign functions
Synopsis
@@ -11526,7 +11524,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The copysign functions return a value with the magnitude of x and the sign of y. -7.12.11.2 The nan functions
+7.12.11.2 The nan functions
Synopsis
@@ -11548,7 +11546,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If the implementation does not support quiet NaNs, the functions return zero.Forward references: the strtod, strtof, and strtold functions (7.20.1.3). -
7.12.11.3 The nextafter functions
+7.12.11.3 The nextafter functions
Synopsis
@@ -11576,7 +11574,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 function. -7.12.11.4 The nexttoward functions
+7.12.11.4 The nexttoward functions
Synopsis
@@ -11595,9 +11593,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 range or precision in a floating second argument. -7.12.12 Maximum, minimum, and positive difference functions
+7.12.12 Maximum, minimum, and positive difference functions
-7.12.12.1 The fdim functions
+7.12.12.1 The fdim functions
Synopsis
@@ -11617,7 +11615,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The fdim functions return the positive difference value. -
7.12.12.2 The fmax functions
+7.12.12.2 The fmax functions
Synopsis
@@ -11641,7 +11639,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 fmax functions choose the numeric value. See F.9.9.2. -7.12.12.3 The fmin functions
+7.12.12.3 The fmin functions
Synopsis
@@ -11660,9 +11658,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007214) The fmin functions are analogous to the fmax functions in their treatment of NaNs. -
7.12.13 Floating multiply-add
+7.12.13 Floating multiply-add
-7.12.13.1 The fma functions
+7.12.13.1 The fma functions
Synopsis
@@ -11685,7 +11683,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.12.14 Comparison macros
+7.12.14 Comparison macros
The relational and equality operators support the usual mathematical relationships between numeric values. For any ordered pair of numeric values exactly one of the @@ -11704,7 +11702,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 NaNs; the result in these cases is false. -
7.12.14.1 The isgreater macro
+7.12.14.1 The isgreater macro
Synopsis
@@ -11720,7 +11718,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isgreater macro returns the value of (x) > (y). -
7.12.14.2 The isgreaterequal macro
+7.12.14.2 The isgreaterequal macro
Synopsis
@@ -11740,7 +11738,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isgreaterequal macro returns the value of (x) >= (y). -
7.12.14.3 The isless macro
+7.12.14.3 The isless macro
Synopsis
@@ -11756,7 +11754,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The isless macro returns the value of (x) < (y). -
7.12.14.4 The islessequal macro
+7.12.14.4 The islessequal macro
Synopsis
@@ -11772,7 +11770,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The islessequal macro returns the value of (x) <= (y). -
7.12.14.5 The islessgreater macro
+7.12.14.5 The islessgreater macro
Synopsis
@@ -11790,7 +11788,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The islessgreater macro returns the value of (x) < (y) || (x) > (y). -
7.12.14.6 The isunordered macro
+7.12.14.6 The isunordered macro
Synopsis
@@ -11804,7 +11802,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The isunordered macro returns 1 if its arguments are unordered and 0 otherwise. -7.13 Nonlocal jumps
+7.13 Nonlocal jumps
The header <setjmp.h> defines the macro setjmp, and declares one function and one type, for bypassing the normal function call and return discipline.216) @@ -11828,9 +11826,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 a program. -
7.13.1 Save calling environment
+7.13.1 Save calling environment
-7.13.1.1 The setjmp macro
+7.13.1.1 The setjmp macro
Synopsis
@@ -11863,9 +11861,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007If the invocation appears in any other context, the behavior is undefined. -
7.13.2 Restore calling environment
+7.13.2 Restore calling environment
-7.13.2.1 The longjmp function
+7.13.2.1 The longjmp function
Synopsis
@@ -11931,7 +11929,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007218) This includes, but is not limited to, the floating-point status flags and the state of open files. -
7.14 Signal handling
+7.14 Signal handling
The header <signal.h> declares a type and two functions and defines several macros, for handling various signals (conditions that may be reported during program execution). @@ -11979,9 +11977,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 and termination. -
7.14.1 Specify signal handling
+7.14.1 Specify signal handling
-7.14.1.1 The signal function
+7.14.1.1 The signal function
Synopsis
@@ -12044,9 +12042,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007220) If any signal is generated by an asynchronous signal handler, the behavior is undefined. -
7.14.2 Send signal
+7.14.2 Send signal
-7.14.2.1 The raise function
+7.14.2.1 The raise function
Synopsis
@@ -12062,7 +12060,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The raise function returns zero if successful, nonzero if unsuccessful. -7.15 Variable arguments
+7.15 Variable arguments
The header <stdarg.h> declares a type and defines four macros, for advancing through a list of arguments whose number and types are not known to the called function @@ -12089,7 +12087,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 case the original function may make further use of the original list after the other function returns. -
7.15.1 Variable argument list access macros
+7.15.1 Variable argument list access macros
The va_start and va_arg macros described in this subclause shall be implemented as macros, not functions. It is unspecified whether va_copy and va_end are macros or @@ -12099,7 +12097,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 shall be matched by a corresponding invocation of the va_end macro in the same function. -
7.15.1.1 The va_arg macro
+7.15.1.1 The va_arg macro
Synopsis
@@ -12130,7 +12128,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 value of the argument after that specified by parmN . Successive invocations return the values of the remaining arguments in succession. -These types are required. -7.15.1.2 The va_copy macro
+7.15.1.2 The va_copy macro
Synopsis
@@ -12147,7 +12145,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007These types are optional. -The va_copy macro returns no value. -
7.15.1.3 The va_end macro
+7.15.1.3 The va_end macro
Synopsis
@@ -12167,7 +12165,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007All other types of this form are optional. -The va_end macro returns no value. -
7.15.1.4 The va_start macro
+7.15.1.4 The va_start macro
Synopsis
@@ -12246,7 +12244,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 f4(n_ptrs, array); }-7.16 Boolean type and values
+7.16 Boolean type and values
The header <stdbool.h> defines four macros.
@@ -12279,7 +12277,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
222) See ''future library directions'' (7.26.7). -
7.17 Common definitions
+7.17 Common definitions
The following types and macros are defined in the standard header <stddef.h>. Some are also defined in other headers, as noted in their respective subclauses. @@ -12322,7 +12320,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
Forward references: localization (7.11). -
7.18 Integer types
+7.18 Integer types
The header <stdint.h> declares sets of integer types having specified widths, and defines corresponding sets of macros.223) It also defines macros that specify limits of @@ -12354,7 +12352,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
224) Some of these types may denote implementation-defined extended integer types. -
7.18.1 Integer types
+7.18.1 Integer types
When typedef names differing only in the absence or presence of the initial u are defined, they shall denote corresponding signed and unsigned types as described in 6.2.5; an @@ -12368,7 +12366,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -
7.18.1.1 Exact-width integer types
+7.18.1.1 Exact-width integer types
The typedef name intN_t designates a signed integer type with width N , no padding bits, and a two's complement representation. Thus, int8_t denotes a signed integer @@ -12381,7 +12379,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 widths of 8, 16, 32, or 64 bits, no padding bits, and (for the signed types) that have a two's complement representation, it shall define the corresponding typedef names. -
7.18.1.2 Minimum-width integer types
+7.18.1.2 Minimum-width integer types
The typedef name int_leastN_t designates a signed integer type with a width of at least N , such that no signed integer type with lesser size has at least the specified width. @@ -12400,7 +12398,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int_least64_t uint_least64_t
7.18.1.3 Fastest minimum-width integer types
+7.18.1.3 Fastest minimum-width integer types
Each of the following types designates an integer type that is usually fastest225) to operate with among all integer types that have at least the specified width. @@ -12428,7 +12426,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 signedness and width requirements. -
7.18.1.4 Integer types capable of holding object pointers
+7.18.1.4 Integer types capable of holding object pointers
The following type designates a signed integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, @@ -12442,7 +12440,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 uintptr_t
7.18.1.5 Greatest-width integer types
+7.18.1.5 Greatest-width integer types
The following type designates a signed integer type capable of representing any value of any signed integer type: @@ -12454,7 +12452,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 uintmax_t
7.18.2 Limits of specified-width integer types
+7.18.2 Limits of specified-width integer types
The following object-like macros226) specify the minimum and maximum limits of the types declared in <stdint.h>. Each macro name corresponds to a similar type name in @@ -12474,7 +12472,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 before <stdint.h> is included. -
7.18.2.1 Limits of exact-width integer types
+7.18.2.1 Limits of exact-width integer types
The following object-like macros227) specify the minimum and maximum limits of
integer types corresponding to types defined in other standard headers.
@@ -12591,7 +12589,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
character set.
-7.18.4 Macros for integer constants
+
The following function-like macros230) expand to integer constants suitable for
initializing objects that have integer types corresponding to types defined in
@@ -12616,7 +12614,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
defined before <stdint.h> is included.
-7.18.4.1 Macros for minimum-width integer constants
+
The macro INTN_C(value) shall expand to an integer constant expression
corresponding to the type int_leastN_t. The macro UINTN_C(value) shall expand
@@ -12624,7 +12622,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
example, if uint_least64_t is a name for the type unsigned long long int,
then UINT64_C(0x123) might expand to the integer constant 0x123ULL.
-7.18.4.2 Macros for greatest-width integer constants
+
The following macro expands to an integer constant expression having the value specified by its argument and the type intmax_t: @@ -12636,9 +12634,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
UINTMAX_C(value)-
The header <stdio.h> declares three types, several macros, and many functions for
performing input and output.
@@ -12738,7 +12736,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
all possible strings of length FILENAME_MAX cannot be expected to be opened successfully.
-7.19.2 Streams
+
Input and output, whether to or from physical devices such as terminals and tape drives, or whether to or from files supported on structured storage devices, are mapped into @@ -12816,7 +12814,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
233) The three predefined streams stdin, stdout, and stderr are unoriented at program startup.
-7.19.3 Files
+
A stream is associated with an external file (which may be a physical device) by opening
a file, which may involve creating a new file. Creating an existing file causes its former
@@ -12928,9 +12926,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
with state-dependent encoding that does not assuredly end in the initial shift state.
-7.19.4 Operations on files
+
@@ -12946,7 +12944,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The remove function returns zero if the operation succeeds, nonzero if it fails. -
7.19.4.2 The rename function
+7.19.4.2 The rename function
Synopsis
@@ -12969,7 +12967,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 or that it is necessary to copy its contents to effectuate its renaming. -7.19.4.3 The tmpfile function
+7.19.4.3 The tmpfile function
Synopsis
@@ -12993,7 +12991,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 cannot be created, the tmpfile function returns a null pointer.Forward references: the fopen function (7.19.5.3). -
7.19.4.4 The tmpnam function
+7.19.4.4 The tmpnam function
Synopsis
@@ -13031,9 +13029,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 is ended, and before program termination. -7.19.5 File access functions
+7.19.5 File access functions
-7.19.5.1 The fclose function
+7.19.5.1 The fclose function
Synopsis
@@ -13052,7 +13050,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fclose function returns zero if the stream was successfully closed, or EOF if any errors were detected. -7.19.5.2 The fflush function
+7.19.5.2 The fflush function
Synopsis
@@ -13074,7 +13072,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 error occurs, otherwise it returns zero.
Forward references: the fopen function (7.19.5.3). -
7.19.5.3 The fopen function
+7.19.5.3 The fopen function
Synopsis
@@ -13139,7 +13137,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 conform to the properties in 7.19.2). -7.19.5.4 The freopen function
+7.19.5.4 The freopen function
Synopsis
@@ -13173,7 +13171,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 returned by the fopen function may be assigned. -7.19.5.5 The setbuf function
+7.19.5.5 The setbuf function
Synopsis
@@ -13190,7 +13188,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The setbuf function returns no value.Forward references: the setvbuf function (7.19.5.6). -
7.19.5.6 The setvbuf function
+7.19.5.6 The setvbuf function
Synopsis
@@ -13225,7 +13223,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 before a buffer that has automatic storage duration is deallocated upon block exit. -7.19.6 Formatted input/output functions
+7.19.6 Formatted input/output functions
The formatted input/output functions shall behave as if there is a sequence point after the actions associated with each specifier.240) @@ -13234,7 +13232,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
240) The fprintf functions perform writes to memory for the %n specifier. -
7.19.6.1 The fprintf function
+7.19.6.1 The fprintf function
Synopsis
@@ -13613,7 +13611,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the case of fixed-point conversion by the source value as well. -7.19.6.2 The fscanf function
+7.19.6.2 The fscanf function
Synopsis
@@ -13983,7 +13981,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007253) See ''future library directions'' (7.26.9). -
7.19.6.3 The printf function
+7.19.6.3 The printf function
Synopsis
@@ -13998,7 +13996,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The printf function returns the number of characters transmitted, or a negative value if an output or encoding error occurred. -7.19.6.4 The scanf function
+7.19.6.4 The scanf function
Synopsis
@@ -14015,7 +14013,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.19.6.5 The snprintf function
+7.19.6.5 The snprintf function
Synopsis
@@ -14038,7 +14036,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 value if an encoding error occurred. Thus, the null-terminated output has been completely written if and only if the returned value is nonnegative and less than n. -7.19.6.6 The sprintf function
+7.19.6.6 The sprintf function
Synopsis
@@ -14056,7 +14054,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The sprintf function returns the number of characters written in the array, not counting the terminating null character, or a negative value if an encoding error occurred. -7.19.6.7 The sscanf function
+7.19.6.7 The sscanf function
Synopsis
@@ -14077,7 +14075,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 early matching failure. -7.19.6.8 The vfprintf function
+7.19.6.8 The vfprintf function
Synopsis
@@ -14122,7 +14120,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 vsscanf invoke the va_arg macro, the value of arg after the return is indeterminate. -7.19.6.9 The vfscanf function
+7.19.6.9 The vfscanf function
Synopsis
@@ -14144,7 +14142,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.19.6.10 The vprintf function
+7.19.6.10 The vprintf function
Synopsis
@@ -14164,7 +14162,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 if an output or encoding error occurred. -7.19.6.11 The vscanf function
+7.19.6.11 The vscanf function
Synopsis
@@ -14185,7 +14183,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.19.6.12 The vsnprintf function
+7.19.6.12 The vsnprintf function
Synopsis
@@ -14209,7 +14207,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 completely written if and only if the returned value is nonnegative and less than n. -7.19.6.13 The vsprintf function
+7.19.6.13 The vsprintf function
Synopsis
@@ -14230,7 +14228,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The vsprintf function returns the number of characters written in the array, not counting the terminating null character, or a negative value if an encoding error occurred. -7.19.6.14 The vsscanf function
+7.19.6.14 The vsscanf function
Synopsis
@@ -14253,9 +14251,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 early matching failure. -7.19.7 Character input/output functions
+7.19.7 Character input/output functions
-7.19.7.1 The fgetc function
+7.19.7.1 The fgetc function
Synopsis
@@ -14279,7 +14277,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007255) An end-of-file and a read error can be distinguished by use of the feof and ferror functions. -
7.19.7.2 The fgets function
+7.19.7.2 The fgets function
Synopsis
@@ -14304,7 +14302,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.19.7.3 The fputc function
+7.19.7.3 The fputc function
Synopsis
@@ -14322,7 +14320,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fputc function returns the character written. If a write error occurs, the error indicator for the stream is set and fputc returns EOF. -7.19.7.4 The fputs function
+7.19.7.4 The fputs function
Synopsis
@@ -14338,7 +14336,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fputs function returns EOF if a write error occurs; otherwise it returns a nonnegative value. -7.19.7.5 The getc function
+7.19.7.5 The getc function
Synopsis
@@ -14357,7 +14355,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 getc returns EOF. If a read error occurs, the error indicator for the stream is set and getc returns EOF. -7.19.7.6 The getchar function
+7.19.7.6 The getchar function
Synopsis
@@ -14373,7 +14371,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 getchar returns EOF. If a read error occurs, the error indicator for the stream is set and getchar returns EOF. -7.19.7.7 The gets function
+7.19.7.7 The gets function
Synopsis
@@ -14394,7 +14392,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Forward references: future library directions (7.26.9). -
7.19.7.8 The putc function
+7.19.7.8 The putc function
Synopsis
@@ -14410,7 +14408,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The putc function returns the character written. If a write error occurs, the error indicator for the stream is set and putc returns EOF. -7.19.7.9 The putchar function
+7.19.7.9 The putchar function
Synopsis
@@ -14424,7 +14422,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The putchar function returns the character written. If a write error occurs, the error indicator for the stream is set and putchar returns EOF. -7.19.7.10 The puts function
+7.19.7.10 The puts function
Synopsis
@@ -14441,7 +14439,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 value. -7.19.7.11 The ungetc function
+7.19.7.11 The ungetc function
Synopsis
@@ -14486,9 +14484,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007256) See ''future library directions'' (7.26.9). -
7.19.8 Direct input/output functions
+7.19.8 Direct input/output functions
-7.19.8.1 The fread function
+7.19.8.1 The fread function
Synopsis
@@ -14512,7 +14510,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 fread returns zero and the contents of the array and the state of the stream remain unchanged. -7.19.8.2 The fwrite function
+7.19.8.2 The fwrite function
Synopsis
@@ -14536,9 +14534,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 less than nmemb only if a write error is encountered. If size or nmemb is zero, fwrite returns zero and the state of the stream remains unchanged. -7.19.9 File positioning functions
+7.19.9 File positioning functions
-7.19.9.1 The fgetpos function
+7.19.9.1 The fgetpos function
Synopsis
@@ -14557,7 +14555,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 returns nonzero and stores an implementation-defined positive value in errno.Forward references: the fsetpos function (7.19.9.3). -
7.19.9.2 The fseek function
+7.19.9.2 The fseek function
Synopsis
@@ -14588,7 +14586,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The fseek function returns nonzero only for a request that cannot be satisfied.Forward references: the ftell function (7.19.9.4). -
7.19.9.3 The fsetpos function
+7.19.9.3 The fsetpos function
Synopsis
@@ -14611,7 +14609,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 If successful, the fsetpos function returns zero; on failure, the fsetpos function returns nonzero and stores an implementation-defined positive value in errno. -7.19.9.4 The ftell function
+7.19.9.4 The ftell function
Synopsis
@@ -14633,7 +14631,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for the stream. On failure, the ftell function returns -1L and stores an implementation-defined positive value in errno. -7.19.9.5 The rewind function
+7.19.9.5 The rewind function
Synopsis
@@ -14650,9 +14648,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The rewind function returns no value. -
7.19.10 Error-handling functions
+7.19.10 Error-handling functions
-7.19.10.1 The clearerr function
+7.19.10.1 The clearerr function
Synopsis
@@ -14667,7 +14665,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The clearerr function returns no value. -7.19.10.2 The feof function
+7.19.10.2 The feof function
Synopsis
@@ -14681,7 +14679,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The feof function returns nonzero if and only if the end-of-file indicator is set for stream. -7.19.10.3 The ferror function
+7.19.10.3 The ferror function
Synopsis
@@ -14695,7 +14693,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The ferror function returns nonzero if and only if the error indicator is set for stream. -7.19.10.4 The perror function
+7.19.10.4 The perror function
Synopsis
@@ -14715,7 +14713,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Forward references: the strerror function (7.21.6.2). -
7.20 General utilities
+7.20 General utilities
The header <stdlib.h> declares five types and several functions of general utility, and defines several macros.257) @@ -14759,13 +14757,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
257) See ''future library directions'' (7.26.10). -
7.20.1 Numeric conversion functions
+7.20.1 Numeric conversion functions
The functions atof, atoi, atol, and atoll need not affect the value of the integer expression errno on an error. If the value of the result cannot be represented, the behavior is undefined. -
7.20.1.1 The atof function
+7.20.1.1 The atof function
Synopsis
@@ -14782,7 +14780,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The atof function returns the converted value.Forward references: the strtod, strtof, and strtold functions (7.20.1.3). -
7.20.1.2 The atoi, atol, and atoll functions
+7.20.1.2 The atoi, atol, and atoll functions
Synopsis
@@ -14806,7 +14804,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (7.20.1.4). -7.20.1.3 The strtod, strtof, and strtold functions
+7.20.1.3 The strtod, strtof, and strtold functions
Synopsis
@@ -14916,7 +14914,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 to the same internal floating value, but if not will round to adjacent values. -7.20.1.4 The strtol, strtoll, strtoul, and strtoull functions
+7.20.1.4 The strtol, strtoll, strtoul, and strtoull functions
Synopsis
@@ -14991,9 +14989,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 and sign of the value, if any), and the value of the macro ERANGE is stored in errno. -7.20.2 Pseudo-random sequence generation functions
+7.20.2 Pseudo-random sequence generation functions
-7.20.2.1 The rand function
+7.20.2.1 The rand function
Synopsis
@@ -15012,7 +15010,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The value of the RAND_MAX macro shall be at least 32767. -
7.20.2.2 The srand function
+7.20.2.2 The srand function
Synopsis
@@ -15046,7 +15044,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 }-7.20.3 Memory management functions
+7.20.3 Memory management functions
The order and contiguity of storage allocated by successive calls to the calloc, malloc, and realloc functions is unspecified. The pointer returned if the allocation @@ -15060,7 +15058,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object. -
7.20.3.1 The calloc function
+7.20.3.1 The calloc function
Synopsis
@@ -15079,7 +15077,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 constant. -7.20.3.2 The free function
+7.20.3.2 The free function
Synopsis
@@ -15099,7 +15097,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The free function returns no value. -
7.20.3.3 The malloc function
+7.20.3.3 The malloc function
Synopsis
@@ -15113,7 +15111,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The malloc function returns either a null pointer or a pointer to the allocated space. -
7.20.3.4 The realloc function
+7.20.3.4 The realloc function
Synopsis
@@ -15139,9 +15137,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 allocated. -7.20.4 Communication with the environment
+7.20.4 Communication with the environment
-7.20.4.1 The abort function
+7.20.4.1 The abort function
Synopsis
@@ -15159,7 +15157,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The abort function does not return to its caller. -
7.20.4.2 The atexit function
+7.20.4.2 The atexit function
Synopsis
@@ -15177,7 +15175,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The atexit function returns zero if the registration succeeds, nonzero if it fails.Forward references: the exit function (7.20.4.3). -
7.20.4.3 The exit function
+7.20.4.3 The exit function
Synopsis
@@ -15212,7 +15210,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 other registered functions. -7.20.4.4 The _Exit function
+7.20.4.4 The _Exit function
Synopsis
@@ -15235,7 +15233,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.20.4.5 The getenv function
+7.20.4.5 The getenv function
Synopsis
@@ -15255,7 +15253,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 overwritten by a subsequent call to the getenv function. If the specified name cannot be found, a null pointer is returned. -7.20.4.6 The system function
+7.20.4.6 The system function
Synopsis
@@ -15275,7 +15273,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 function does return, it returns an implementation-defined value. --7.20.5 Searching and sorting utilities
+7.20.5 Searching and sorting utilities
These utilities make use of a comparison function to search or sort arrays of unspecified type. Where an argument declared as size_t nmemb specifies the length of the array @@ -15312,7 +15310,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 (char *)p < (char *)base + nmemb * size
7.20.5.1 The bsearch function
+7.20.5.1 The bsearch function
Synopsis
@@ -15345,7 +15343,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007264) In practice, the entire array is sorted according to the comparison function. -
7.20.5.2 The qsort function
+7.20.5.2 The qsort function
Synopsis
@@ -15373,9 +15371,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.20.6 Integer arithmetic functions
+7.20.6 Integer arithmetic functions
-7.20.6.1 The abs, labs and llabs functions
+7.20.6.1 The abs, labs and llabs functions
Synopsis
@@ -15395,7 +15393,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007265) The absolute value of the most negative number cannot be represented in two's complement. -
7.20.6.2 The div, ldiv, and lldiv functions
+7.20.6.2 The div, ldiv, and lldiv functions
Synopsis
@@ -15420,7 +15418,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.20.7 Multibyte/wide character conversion functions
+7.20.7 Multibyte/wide character conversion functions
The behavior of the multibyte character functions is affected by the LC_CTYPE category of the current locale. For a state-dependent encoding, each function is placed into its @@ -15436,7 +15434,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 character codes, but are grouped with an adjacent multibyte character. -
7.20.7.1 The mblen function
+7.20.7.1 The mblen function
Synopsis
@@ -15466,7 +15464,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.20.7.2 The mbtowc function
+7.20.7.2 The mbtowc function
Synopsis
@@ -15497,7 +15495,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 In no case will the value returned be greater than n or the value of the MB_CUR_MAX macro. -7.20.7.3 The wctomb function
+7.20.7.3 The wctomb function
Synopsis
@@ -15525,12 +15523,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007In no case will the value returned be greater than the value of the MB_CUR_MAX macro. -
7.20.8 Multibyte/wide string conversion functions
+7.20.8 Multibyte/wide string conversion functions
The behavior of the multibyte string functions is affected by the LC_CTYPE category of the current locale. -
7.20.8.1 The mbstowcs function
+7.20.8.1 The mbstowcs function
Synopsis
@@ -15565,7 +15563,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007267) The array will not be null-terminated if the value returned is n. -
7.20.8.2 The wcstombs function
+7.20.8.2 The wcstombs function
Synopsis
@@ -15592,9 +15590,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 any.267) -7.21 String handling
+7.21 String handling
-7.21.1 String function conventions
+7.21.1 String function conventions
The header <string.h> declares one type and several functions, and defines one macro useful for manipulating arrays of character type and other objects treated as arrays @@ -15619,9 +15617,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
268) See ''future library directions'' (7.26.11). -
7.21.2 Copying functions
+7.21.2 Copying functions
-7.21.2.1 The memcpy function
+7.21.2.1 The memcpy function
Synopsis
@@ -15643,7 +15641,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.21.2.2 The memmove function
+7.21.2.2 The memmove function
Synopsis
@@ -15660,7 +15658,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The memmove function returns the value of s1. -
7.21.2.3 The strcpy function
+7.21.2.3 The strcpy function
Synopsis
@@ -15676,7 +15674,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The strcpy function returns the value of s1. -
7.21.2.4 The strncpy function
+7.21.2.4 The strncpy function
Synopsis
@@ -15703,9 +15701,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 not be null-terminated. -7.21.3 Concatenation functions
+7.21.3 Concatenation functions
-7.21.3.1 The strcat function
+7.21.3.1 The strcat function
Synopsis
@@ -15722,7 +15720,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The strcat function returns the value of s1. -
7.21.3.2 The strncat function
+7.21.3.2 The strncat function
Synopsis
@@ -15749,14 +15747,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 strlen(s1)+n+1. -7.21.4 Comparison functions
+7.21.4 Comparison functions
The sign of a nonzero value returned by the comparison functions memcmp, strcmp, and strncmp is determined by the sign of the difference between the values of the first pair of characters (both interpreted as unsigned char) that differ in the objects being compared. -
7.21.4.1 The memcmp function
+7.21.4.1 The memcmp function
Synopsis
@@ -15778,7 +15776,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 comparison. -7.21.4.2 The strcmp function
+7.21.4.2 The strcmp function
Synopsis
@@ -15796,7 +15794,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 pointed to by s2. -7.21.4.3 The strcoll function
+7.21.4.3 The strcoll function
Synopsis
@@ -15812,7 +15810,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2 when both are interpreted as appropriate to the current locale. -7.21.4.4 The strncmp function
+7.21.4.4 The strncmp function
Synopsis
@@ -15829,7 +15827,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 accordingly as the possibly null-terminated array pointed to by s1 is greater than, equal to, or less than the possibly null-terminated array pointed to by s2. -7.21.4.5 The strxfrm function
+7.21.4.5 The strxfrm function
Synopsis
@@ -15860,9 +15858,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 1 + strxfrm(NULL, s, 0)-7.21.5 Search functions
+7.21.5 Search functions
-7.21.5.1 The memchr function
+7.21.5.1 The memchr function
Synopsis
@@ -15878,7 +15876,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The memchr function returns a pointer to the located character, or a null pointer if the character does not occur in the object. -7.21.5.2 The strchr function
+7.21.5.2 The strchr function
Synopsis
@@ -15895,7 +15893,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 character does not occur in the string. -7.21.5.3 The strcspn function
+7.21.5.3 The strcspn function
Synopsis
@@ -15910,7 +15908,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The strcspn function returns the length of the segment. -
7.21.5.4 The strpbrk function
+7.21.5.4 The strpbrk function
Synopsis
@@ -15925,7 +15923,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The strpbrk function returns a pointer to the character, or a null pointer if no character from s2 occurs in s1. -7.21.5.5 The strrchr function
+7.21.5.5 The strrchr function
Synopsis
@@ -15942,7 +15940,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 occur in the string. -7.21.5.6 The strspn function
+7.21.5.6 The strspn function
Synopsis
@@ -15956,7 +15954,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The strspn function returns the length of the segment. -
7.21.5.7 The strstr function
+7.21.5.7 The strstr function
Synopsis
@@ -15972,7 +15970,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The strstr function returns a pointer to the located string, or a null pointer if the string is not found. If s2 points to a string with zero length, the function returns s1. -7.21.5.8 The strtok function
+7.21.5.8 The strtok function
Synopsis
@@ -16020,9 +16018,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 t = strtok(NULL, "?"); // t is a null pointer-7.21.6 Miscellaneous functions
+7.21.6 Miscellaneous functions
-7.21.6.1 The memset function
+7.21.6.1 The memset function
Synopsis
@@ -16037,7 +16035,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The memset function returns the value of s. -7.21.6.2 The strerror function
+7.21.6.2 The strerror function
Synopsis
@@ -16056,7 +16054,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 specific. The array pointed to shall not be modified by the program, but may be overwritten by a subsequent call to the strerror function. -7.21.6.3 The strlen function
+7.21.6.3 The strlen function
Synopsis
@@ -16071,7 +16069,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 character. -7.22 Type-generic math
+7.22 Type-generic math
The header <tgmath.h> includes the headers <math.h> and <complex.h> and defines several type-generic macros. @@ -16196,9 +16194,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the behavior is undefined. -
7.23 Date and time
+7.23 Date and time
-7.23.1 Components of time
+7.23.1 Components of time
The header <time.h> defines two macros, and declares several types and functions for manipulating time. Many functions deal with a calendar time that represents the current @@ -16249,9 +16247,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
274) The range [0, 60] for tm_sec allows for a positive leap second. -
7.23.2 Time manipulation functions
+7.23.2 Time manipulation functions
-7.23.2.1 The clock function
+7.23.2.1 The clock function
Synopsis
@@ -16274,7 +16272,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the program and its return value subtracted from the value returned by subsequent calls. -7.23.2.2 The difftime function
+7.23.2.2 The difftime function
Synopsis
@@ -16293,7 +16291,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.23.2.3 The mktime function
+7.23.2.3 The mktime function
Synopsis
@@ -16350,7 +16348,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 causes it to attempt to determine whether Daylight Saving Time is in effect for the specified time. -7.23.2.4 The time function
+7.23.2.4 The time function
Synopsis
@@ -16367,7 +16365,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 available. If timer is not a null pointer, the return value is also assigned to the object it points to. -7.23.3 Time conversion functions
+7.23.3 Time conversion functions
Except for the strftime function, these functions each return a pointer to one of two types of static objects: a broken-down time structure or an array of char. Execution of @@ -16376,7 +16374,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 previous call to any of them. The implementation shall behave as if no other library functions call these functions. -
7.23.3.1 The asctime function
+7.23.3.1 The asctime function
Synopsis
@@ -16413,7 +16411,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The asctime function returns a pointer to the string. -
7.23.3.2 The ctime function
+7.23.3.2 The ctime function
Synopsis
@@ -16432,7 +16430,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Forward references: the localtime function (7.23.3.4). -
7.23.3.3 The gmtime function
+7.23.3.3 The gmtime function
Synopsis
@@ -16447,7 +16445,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The gmtime function returns a pointer to the broken-down time, or a null pointer if the specified time cannot be converted to UTC. -7.23.3.4 The localtime function
+7.23.3.4 The localtime function
Synopsis
@@ -16462,7 +16460,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The localtime function returns a pointer to the broken-down time, or a null pointer if the specified time cannot be converted to local time. -7.23.3.5 The strftime function
+7.23.3.5 The strftime function
Synopsis
@@ -16641,9 +16639,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 zero is returned and the contents of the array are indeterminate. -7.24 Extended multibyte and wide character utilities
+7.24 Extended multibyte and wide character utilities
-7.24.1 Introduction
+7.24.1 Introduction
The header <wchar.h> declares four data types, one tag, four macros, and many functions.277) @@ -16700,7 +16698,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
279) The value of the macro WEOF may differ from that of EOF and need not be negative. -
7.24.2 Formatted wide character input/output functions
+7.24.2 Formatted wide character input/output functions
The formatted wide character input/output functions shall behave as if there is a sequence point after the actions associated with each specifier.280) @@ -16709,7 +16707,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
280) The fwprintf functions perform writes to memory for the %n specifier. -
7.24.2.1 The fwprintf function
+7.24.2.1 The fwprintf function
Synopsis
@@ -17043,7 +17041,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the case of fixed-point conversion by the source value as well. -7.24.2.2 The fwscanf function
+7.24.2.2 The fwscanf function
Synopsis
@@ -17314,7 +17312,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007290) See ''future library directions'' (7.26.12). -
7.24.2.3 The swprintf function
+7.24.2.3 The swprintf function
Synopsis
@@ -17334,7 +17332,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 counting the terminating null wide character, or a negative value if an encoding error occurred or if n or more wide characters were requested to be written. -7.24.2.4 The swscanf function
+7.24.2.4 The swscanf function
Synopsis
@@ -17355,7 +17353,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 early matching failure. -7.24.2.5 The vfwprintf function
+7.24.2.5 The vfwprintf function
Synopsis
@@ -17403,7 +17401,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 invoke the va_arg macro, the value of arg after the return is indeterminate. -7.24.2.6 The vfwscanf function
+7.24.2.6 The vfwscanf function
Synopsis
@@ -17426,7 +17424,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.24.2.7 The vswprintf function
+7.24.2.7 The vswprintf function
Synopsis
@@ -17449,7 +17447,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 occurred or if n or more wide characters were requested to be generated. -7.24.2.8 The vswscanf function
+7.24.2.8 The vswscanf function
Synopsis
@@ -17471,7 +17469,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.24.2.9 The vwprintf function
+7.24.2.9 The vwprintf function
Synopsis
@@ -17491,7 +17489,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 value if an output or encoding error occurred. -7.24.2.10 The vwscanf function
+7.24.2.10 The vwscanf function
Synopsis
@@ -17512,7 +17510,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.24.2.11 The wprintf function
+7.24.2.11 The wprintf function
Synopsis
@@ -17527,7 +17525,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wprintf function returns the number of wide characters transmitted, or a negative value if an output or encoding error occurred. -7.24.2.12 The wscanf function
+7.24.2.12 The wscanf function
Synopsis
@@ -17545,9 +17543,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. -7.24.3 Wide character input/output functions
+7.24.3 Wide character input/output functions
-7.24.3.1 The fgetwc function
+7.24.3.1 The fgetwc function
Synopsis
@@ -17574,7 +17572,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Also, errno will be set to EILSEQ by input/output functions only if an encoding error occurs. -7.24.3.2 The fgetws function
+7.24.3.2 The fgetws function
Synopsis
@@ -17599,7 +17597,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 null pointer is returned. If a read or encoding error occurs during the operation, the array contents are indeterminate and a null pointer is returned. -7.24.3.3 The fputwc function
+7.24.3.3 The fputwc function
Synopsis
@@ -17619,7 +17617,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 error indicator for the stream is set and fputwc returns WEOF. If an encoding error occurs, the value of the macro EILSEQ is stored in errno and fputwc returns WEOF. -7.24.3.4 The fputws function
+7.24.3.4 The fputws function
Synopsis
@@ -17637,7 +17635,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 returns a nonnegative value. -7.24.3.5 The fwide function
+7.24.3.5 The fwide function
Synopsis
@@ -17660,7 +17658,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007293) If the orientation of the stream has already been determined, fwide does not change it. -
7.24.3.6 The getwc function
+7.24.3.6 The getwc function
Synopsis
@@ -17677,7 +17675,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The getwc function returns the next wide character from the input stream pointed to by stream, or WEOF. -7.24.3.7 The getwchar function
+7.24.3.7 The getwchar function
Synopsis
@@ -17696,7 +17694,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The getwchar function returns the next wide character from the input stream pointed to by stdin, or WEOF. -7.24.3.8 The putwc function
+7.24.3.8 The putwc function
Synopsis
@@ -17712,7 +17710,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The putwc function returns the wide character written, or WEOF. -
7.24.3.9 The putwchar function
+7.24.3.9 The putwchar function
Synopsis
@@ -17725,7 +17723,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The putwchar function returns the character written, or WEOF. -
7.24.3.10 The ungetwc function
+7.24.3.10 The ungetwc function
Synopsis
@@ -17762,7 +17760,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The ungetwc function returns the wide character pushed back, or WEOF if the operation fails. -7.24.4 General wide string utilities
+7.24.4 General wide string utilities
The header <wchar.h> declares a number of functions useful for wide string manipulation. Various methods are used for determining the lengths of the arrays, but in @@ -17778,9 +17776,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 zero wide characters. -
7.24.4.1 Wide string numeric conversion functions
+7.24.4.1 Wide string numeric conversion functions
-7.24.4.1.1 The wcstod, wcstof, and wcstold functions
+7.24.4.1.1 The wcstod, wcstof, and wcstold functions
Synopsis
@@ -17902,7 +17900,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 to the same internal floating value, but if not will round to adjacent values. -7.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions
+7.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions
Synopsis
@@ -17976,9 +17974,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 LLONG_MAX, ULONG_MAX, or ULLONG_MAX is returned (according to the return type sign of the value, if any), and the value of the macro ERANGE is stored in errno. -7.24.4.2 Wide string copying functions
+7.24.4.2 Wide string copying functions
-7.24.4.2.1 The wcscpy function
+7.24.4.2.1 The wcscpy function
Synopsis
@@ -17994,7 +17992,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcscpy function returns the value of s1. -7.24.4.2.2 The wcsncpy function
+7.24.4.2.2 The wcsncpy function
Synopsis
@@ -18020,7 +18018,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 result will not be null-terminated. -7.24.4.2.3 The wmemcpy function
+7.24.4.2.3 The wmemcpy function
Synopsis
@@ -18041,7 +18039,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -7.24.4.2.4 The wmemmove function
+7.24.4.2.4 The wmemmove function
Synopsis
@@ -18059,9 +18057,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The wmemmove function returns the value of s1. -
7.24.4.3 Wide string concatenation functions
+7.24.4.3 Wide string concatenation functions
-7.24.4.3.1 The wcscat function
+7.24.4.3.1 The wcscat function
Synopsis
@@ -18077,7 +18075,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The wcscat function returns the value of s1. -
7.24.4.3.2 The wcsncat function
+7.24.4.3.2 The wcsncat function
Synopsis
@@ -18102,13 +18100,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 wcslen(s1)+n+1. -7.24.4.4 Wide string comparison functions
+7.24.4.4 Wide string comparison functions
Unless explicitly stated otherwise, the functions described in this subclause order two wide characters the same way as two integers of the underlying integer type designated by wchar_t. -
7.24.4.4.1 The wcscmp function
+7.24.4.4.1 The wcscmp function
Synopsis
@@ -18124,7 +18122,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 accordingly as the wide string pointed to by s1 is greater than, equal to, or less than the wide string pointed to by s2. -7.24.4.4.2 The wcscoll function
+7.24.4.4.2 The wcscoll function
Synopsis
@@ -18145,7 +18143,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 wide string pointed to by s2 when both are interpreted as appropriate to the current locale. -7.24.4.4.3 The wcsncmp function
+7.24.4.4.3 The wcsncmp function
Synopsis
@@ -18163,7 +18161,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 accordingly as the possibly null-terminated array pointed to by s1 is greater than, equal to, or less than the possibly null-terminated array pointed to by s2. -7.24.4.4.4 The wcsxfrm function
+7.24.4.4.4 The wcsxfrm function
Synopsis
@@ -18193,7 +18191,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 1 + wcsxfrm(NULL, s, 0)-7.24.4.4.5 The wmemcmp function
+7.24.4.4.5 The wmemcmp function
Synopsis
@@ -18210,9 +18208,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 accordingly as the object pointed to by s1 is greater than, equal to, or less than the object pointed to by s2. -7.24.4.5 Wide string search functions
+7.24.4.5 Wide string search functions
-7.24.4.5.1 The wcschr function
+7.24.4.5.1 The wcschr function
Synopsis
@@ -18227,7 +18225,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcschr function returns a pointer to the located wide character, or a null pointer if the wide character does not occur in the wide string. -7.24.4.5.2 The wcscspn function
+7.24.4.5.2 The wcscspn function
Synopsis
@@ -18243,7 +18241,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The wcscspn function returns the length of the segment. -
7.24.4.5.3 The wcspbrk function
+7.24.4.5.3 The wcspbrk function
Synopsis
@@ -18258,7 +18256,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcspbrk function returns a pointer to the wide character in s1, or a null pointer if no wide character from s2 occurs in s1. -7.24.4.5.4 The wcsrchr function
+7.24.4.5.4 The wcsrchr function
Synopsis
@@ -18273,7 +18271,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcsrchr function returns a pointer to the wide character, or a null pointer if c does not occur in the wide string. -7.24.4.5.5 The wcsspn function
+7.24.4.5.5 The wcsspn function
Synopsis
@@ -18289,7 +18287,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcsspn function returns the length of the segment. -7.24.4.5.6 The wcsstr function
+7.24.4.5.6 The wcsstr function
Synopsis
@@ -18306,7 +18304,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 wide string is not found. If s2 points to a wide string with zero length, the function returns s1. -7.24.4.5.7 The wcstok function
+7.24.4.5.7 The wcstok function
Synopsis
@@ -18363,7 +18361,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 t = wcstok(NULL, L"?", &ptr1); // t is a null pointer-7.24.4.5.8 The wmemchr function
+7.24.4.5.8 The wmemchr function
Synopsis
@@ -18380,9 +18378,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the wide character does not occur in the object. -7.24.4.6 Miscellaneous functions
+7.24.4.6 Miscellaneous functions
-7.24.4.6.1 The wcslen function
+7.24.4.6.1 The wcslen function
Synopsis
@@ -18396,7 +18394,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The wcslen function returns the number of wide characters that precede the terminating null wide character. -7.24.4.6.2 The wmemset function
+7.24.4.6.2 The wmemset function
Synopsis
@@ -18410,9 +18408,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The wmemset function returns the value of s. -
7.24.5 Wide character time conversion functions
+7.24.5 Wide character time conversion functions
-7.24.5.1 The wcsftime function
+7.24.5.1 The wcsftime function
Synopsis
@@ -18442,7 +18440,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 wide character. Otherwise, zero is returned and the contents of the array are indeterminate. -7.24.6 Extended multibyte/wide character conversion utilities
+7.24.6 Extended multibyte/wide character conversion utilities
The header <wchar.h> declares an extended set of functions useful for conversion between multibyte characters and wide characters. @@ -18479,9 +18477,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 character string. -
7.24.6.1 Single-byte/wide character conversion functions
+7.24.6.1 Single-byte/wide character conversion functions
-7.24.6.1.1 The btowc function
+7.24.6.1.1 The btowc function
Synopsis
@@ -18498,7 +18496,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 does not constitute a valid single-byte character in the initial shift state. Otherwise, it returns the wide character representation of that character. -7.24.6.1.2 The wctob function
+7.24.6.1.2 The wctob function
Synopsis
@@ -18516,9 +18514,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 length one in the initial shift state. Otherwise, it returns the single-byte representation of that character as an unsigned char converted to an int. -7.24.6.2 Conversion state functions
+7.24.6.2 Conversion state functions
-7.24.6.2.1 The mbsinit function
+7.24.6.2.1 The mbsinit function
Synopsis
@@ -18534,7 +18532,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The mbsinit function returns nonzero if ps is a null pointer or if the pointed-to object describes an initial conversion state; otherwise, it returns zero. -7.24.6.3 Restartable multibyte/wide character conversion functions
+7.24.6.3 Restartable multibyte/wide character conversion functions
These functions differ from the corresponding multibyte character functions of 7.20.7 (mblen, mbtowc, and wctomb) in that they have an extra parameter, ps, of type @@ -18547,7 +18545,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Also unlike their corresponding functions, the return value does not represent whether the encoding is state-dependent. -
7.24.6.3.1 The mbrlen function
+7.24.6.3.1 The mbrlen function
Synopsis
@@ -18569,7 +18567,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007Forward references: the mbrtowc function (7.24.6.3.2). -
7.24.6.3.2 The mbrtowc function
+7.24.6.3.2 The mbrtowc function
Synopsis
@@ -18620,7 +18618,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 sequence of redundant shift sequences (for implementations with state-dependent encodings). -7.24.6.3.3 The wcrtomb function
+7.24.6.3.3 The wcrtomb function
Synopsis
@@ -18648,7 +18646,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the function stores the value of the macro EILSEQ in errno and returns (size_t)(-1); the conversion state is unspecified. -7.24.6.4 Restartable multibyte/wide string conversion functions
+7.24.6.4 Restartable multibyte/wide string conversion functions
These functions differ from the corresponding multibyte string functions of 7.20.8 (mbstowcs and wcstombs) in that they have an extra parameter, ps, of type pointer to @@ -18664,7 +18662,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 to reflect the amount of the source processed by that invocation. -
7.24.6.4.1 The mbsrtowcs function
+7.24.6.4.1 The mbsrtowcs function
Synopsis
@@ -18707,7 +18705,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007301) Thus, the value of len is ignored if dst is a null pointer. -
7.24.6.4.2 The wcsrtombs function
+7.24.6.4.2 The wcsrtombs function
Synopsis
@@ -18752,9 +18750,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 include those necessary to reach the initial shift state immediately before the null byte. -7.25 Wide character classification and mapping utilities
+7.25 Wide character classification and mapping utilities
-7.25.1 Introduction
+7.25.1 Introduction
The header <wctype.h> declares three data types, one macro, and many functions.303)
@@ -18797,7 +18795,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
303) See ''future library directions'' (7.26.13). -
7.25.2 Wide character classification utilities
+7.25.2 Wide character classification utilities
The header <wctype.h> declares several functions useful for classifying wide characters. @@ -18807,7 +18805,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 term control wide character refers to a member of a locale-specific set of wide characters that are not printing wide characters. -
7.25.2.1 Wide character classification functions
+7.25.2.1 Wide character classification functions
The functions in this subclause return nonzero (true) if and only if the value of the argument wc conforms to that in the description of the function. @@ -18826,7 +18824,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 && iswspace(wc) is true, but not both. -
7.25.2.1.1 The iswalnum function
+7.25.2.1.1 The iswalnum function
Synopsis
@@ -18837,7 +18835,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The iswalnum function tests for any wide character for which iswalpha or iswdigit is true. -7.25.2.1.2 The iswalpha function
+7.25.2.1.2 The iswalpha function
Synopsis
@@ -18857,7 +18855,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 wide characters; all four combinations are possible. -7.25.2.1.3 The iswblank function
+7.25.2.1.3 The iswblank function
Synopsis
@@ -18871,7 +18869,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 characters are the following: space (L' '), and horizontal tab (L'\t'). In the "C" locale, iswblank returns true only for the standard blank characters. -7.25.2.1.4 The iswcntrl function
+7.25.2.1.4 The iswcntrl function
Synopsis
@@ -18881,7 +18879,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The iswcntrl function tests for any control wide character. -
7.25.2.1.5 The iswdigit function
+7.25.2.1.5 The iswdigit function
Synopsis
@@ -18892,7 +18890,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The iswdigit function tests for any wide character that corresponds to a decimal-digit character (as defined in 5.2.1). -7.25.2.1.6 The iswgraph function
+7.25.2.1.6 The iswgraph function
Synopsis
@@ -18914,7 +18912,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 characters other than ' '. -7.25.2.1.7 The iswlower function
+7.25.2.1.7 The iswlower function
Synopsis
@@ -18926,7 +18924,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 letter or is one of a locale-specific set of wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace is true. -7.25.2.1.8 The iswprint function
+7.25.2.1.8 The iswprint function
Synopsis
@@ -18936,7 +18934,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007The iswprint function tests for any printing wide character. -
7.25.2.1.9 The iswpunct function
+7.25.2.1.9 The iswpunct function
Synopsis
@@ -18948,7 +18946,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 specific set of punctuation wide characters for which neither iswspace nor iswalnum is true.306) -7.25.2.1.10 The iswspace function
+7.25.2.1.10 The iswspace function
Synopsis
@@ -18964,7 +18962,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 set of white-space wide characters for which none of iswalnum, iswgraph, or iswpunct is true. -7.25.2.1.11 The iswupper function
+7.25.2.1.11 The iswupper function
Synopsis
@@ -18976,7 +18974,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 letter or is one of a locale-specific set of wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace is true. -7.25.2.1.12 The iswxdigit function
+7.25.2.1.12 The iswxdigit function
Synopsis
@@ -18987,13 +18985,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The iswxdigit function tests for any wide character that corresponds to a hexadecimal-digit character (as defined in 6.4.4.1). -7.25.2.2 Extensible wide character classification functions
+7.25.2.2 Extensible wide character classification functions
The functions wctype and iswctype provide extensible wide character classification as well as testing equivalent to that performed by the functions described in the previous subclause (7.25.2.1). -
7.25.2.2.1 The iswctype function
+7.25.2.2.1 The iswctype function
Synopsis
@@ -19027,7 +19025,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 character wc has the property described by desc.Forward references: the wctype function (7.25.2.2.2). -
7.25.2.2.2 The wctype function
+7.25.2.2.2 The wctype function
Synopsis
@@ -19047,13 +19045,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 as the second argument to the iswctype function; otherwise, it returns zero. * -7.25.3 Wide character case mapping utilities
+7.25.3 Wide character case mapping utilities
The header <wctype.h> declares several functions useful for mapping wide characters. -
7.25.3.1 Wide character case mapping functions
+7.25.3.1 Wide character case mapping functions
-7.25.3.1.1 The towlower function
+7.25.3.1.1 The towlower function
Synopsis
@@ -19070,7 +19068,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 characters (always the same one for any given locale); otherwise, the argument is returned unchanged. -7.25.3.1.2 The towupper function
+7.25.3.1.2 The towupper function
Synopsis
@@ -19087,14 +19085,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 characters (always the same one for any given locale); otherwise, the argument is returned unchanged. -7.25.3.2 Extensible wide character case mapping functions
+7.25.3.2 Extensible wide character case mapping functions
The functions wctrans and towctrans provide extensible wide character mapping as well as case mapping equivalent to that performed by the functions described in the previous subclause (7.25.3.1). -
7.25.3.2.1 The towctrans function
+7.25.3.2.1 The towctrans function
Synopsis
@@ -19116,7 +19114,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The towctrans function returns the mapped value of wc using the mapping described by desc. -7.25.3.2.2 The wctrans function
+7.25.3.2.2 The wctrans function
Synopsis
@@ -19136,12 +19134,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 as the second argument to the towctrans function; otherwise, it returns zero. -7.26 Future library directions
+7.26 Future library directions
The following names are grouped under individual headers for convenience. All external names described below are reserved no matter what headers are included by the program. -
7.26.1 Complex arithmetic
+7.26.1 Complex arithmetic
The function names
@@ -19151,37 +19149,37 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 and the same names suffixed with f or l may be added to the declarations in the <complex.h> header. -7.26.2 Character handling
+7.26.2 Character handling
Function names that begin with either is or to, and a lowercase letter may be added to the declarations in the <ctype.h> header. -
7.26.3 Errors
+7.26.3 Errors
Macros that begin with E and a digit or E and an uppercase letter may be added to the declarations in the <errno.h> header. -
7.26.4 Format conversion of integer types
+7.26.4 Format conversion of integer types
Macro names beginning with PRI or SCN followed by any lowercase letter or X may be added to the macros defined in the <inttypes.h> header. -
7.26.5 Localization
+7.26.5 Localization
Macros that begin with LC_ and an uppercase letter may be added to the definitions in the <locale.h> header. -
7.26.6 Signal handling
+7.26.6 Signal handling
Macros that begin with either SIG and an uppercase letter or SIG_ and an uppercase letter may be added to the definitions in the <signal.h> header. -
7.26.7 Boolean type and values
+7.26.7 Boolean type and values
The ability to undefine and perhaps then redefine the macros bool, true, and false is an obsolescent feature. -
7.26.8 Integer types
+7.26.8 Integer types
Typedef names beginning with int or uint and ending with _t may be added to the types defined in the <stdint.h> header. Macro names beginning with INT or UINT @@ -19189,7 +19187,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 <stdint.h> header. -
7.26.9 Input/output
+7.26.9 Input/output
Lowercase letters may be added to the conversion specifiers and length modifiers in fprintf and fscanf. Other characters may be used in extensions. @@ -19199,17 +19197,17 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 The use of ungetc on a binary stream where the file position indicator is zero prior to the call is an obsolescent feature. -
7.26.10 General utilities
+7.26.10 General utilities
Function names that begin with str and a lowercase letter may be added to the declarations in the <stdlib.h> header. -
7.26.11 String handling
+7.26.11 String handling
Function names that begin with str, mem, or wcs and a lowercase letter may be added to the declarations in the <string.h> header. -
7.26.12 Extended multibyte and wide character utilities
+7.26.12 Extended multibyte and wide character utilities
Function names that begin with wcs and a lowercase letter may be added to the declarations in the <wchar.h> header. @@ -19217,14 +19215,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 Lowercase letters may be added to the conversion specifiers and length modifiers in fwprintf and fwscanf. Other characters may be used in extensions. -
7.26.13 Wide character classification and mapping utilities
+7.26.13 Wide character classification and mapping utilities
<wctype.h>Function names that begin with is or to and a lowercase letter may be added to the declarations in the <wctype.h> header. -
Annex A
+Annex A
(informative) @@ -19232,9 +19230,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 NOTE The notation is described in 6.1. -A.1 Lexical grammar
+A.1 Lexical grammar
-A.1.1 Lexical elements
+A.1.1 Lexical elements
(6.4) token:keyword @@ -19252,7 +19250,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 punctuator each non-white-space character that cannot be one of the above-A.1.2 Keywords
+A.1.2 Keywords
(6.4.1) keyword: one of@@ -19267,7 +19265,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 double long typedef else register union-A.1.3 Identifiers
+A.1.3 Identifiers
(6.4.2.1) identifier:identifier-nondigit @@ -19288,7 +19286,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007-0 1 2 3 4 5 6 7 8 9-A.1.4 Universal character names
+A.1.4 Universal character names
(6.4.3) universal-character-name:\u hex-quad @@ -19298,7 +19296,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit-A.1.5 Constants
+A.1.5 Constants
(6.4.4) constant:integer-constant @@ -19435,7 +19433,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 \x hexadecimal-digit hexadecimal-escape-sequence hexadecimal-digit-A.1.6 String literals
+A.1.6 String literals
(6.4.5) string-literal:" s-char-sequenceopt " @@ -19451,7 +19449,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 the double-quote ", backslash \, or new-line character escape-sequence-A.1.7 Punctuators
+A.1.7 Punctuators
(6.4.6) punctuator: one of[ ] ( ) { } . -> @@ -19462,7 +19460,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 , # ## <: :> <% %> %: %:%:-A.1.8 Header names
+A.1.8 Header names
(6.4.7) header-name:< h-char-sequence > @@ -19484,7 +19482,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 any member of the source character set except the new-line character and "-A.1.9 Preprocessing numbers
+A.1.9 Preprocessing numbers
(6.4.8) pp-number:@@ -19498,9 +19496,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 pp-number P sign pp-number .-A.2 Phrase structure grammar
+A.2 Phrase structure grammar
-A.2.1 Expressions
+A.2.1 Expressions
(6.5.1) primary-expression:identifier @@ -19606,7 +19604,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007-conditional-expression-A.2.2 Declarations
+A.2.2 Declarations
(6.7) declaration:declaration-specifiers init-declarator-listopt ;@@ -19778,7 +19776,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 [ constant-expression ] . identifierA.2.3 Statements
+A.2.3 Statements
(6.8) statement:labeled-statement @@ -19825,7 +19823,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 break ; return expressionopt ;-A.2.4 External definitions
+A.2.4 External definitions
(6.9) translation-unit:external-declaration @@ -19842,7 +19840,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 declaration declaration-list declaration-A.3 Preprocessing directives
+A.3 Preprocessing directives
(6.10) preprocessing-file:groupopt@@ -19914,17 +19912,17 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007the new-line character-Annex B
+Annex B
(informative) Library summary-B.1 Diagnostics
+B.1 Diagnostics
NDEBUG void assert(scalar expression);-B.2 Complex
+B.2 Complex
@@ -19999,7 +19997,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 float crealf(float complex z); long double creall(long double complex z);-B.3 Character handling
+B.3 Character handling
int isalnum(int c); int isalpha(int c); @@ -20016,11 +20014,11 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int tolower(int c); int toupper(int c);-B.4 Errors
+B.4 Errors
EDOM EILSEQ ERANGE errno-B.5 Floating-point environment
+B.5 Floating-point environment
fenv_t FE_OVERFLOW FE_TOWARDZERO @@ -20042,7 +20040,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int fesetenv(const fenv_t *envp); int feupdateenv(const fenv_t *envp);-B.6 Characteristics of floating types
+B.6 Characteristics of floating types
FLT_ROUNDS DBL_MIN_EXP FLT_MAX FLT_EVAL_METHOD LDBL_MIN_EXP DBL_MAX @@ -20056,7 +20054,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 LDBL_DIG DBL_MAX_10_EXP FLT_MIN_EXP LDBL_MAX_10_EXP-B.7 Format conversion of integer types
+B.7 Format conversion of integer types
imaxdiv_t @@ -20082,13 +20080,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);-B.8 Alternative spellings
+B.8 Alternative spellings
and bitor not_eq xor and_eq compl or xor_eq bitand not or_eq-B.9 Sizes of integer types
+B.9 Sizes of integer types
CHAR_BIT CHAR_MAX INT_MIN ULONG_MAX SCHAR_MIN MB_LEN_MAX INT_MAX LLONG_MIN @@ -20096,14 +20094,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 UCHAR_MAX SHRT_MAX LONG_MIN ULLONG_MAX CHAR_MIN USHRT_MAX LONG_MAX-B.10 Localization
+B.10 Localization
struct lconv LC_ALL LC_CTYPE LC_NUMERIC NULL LC_COLLATE LC_MONETARY LC_TIME char *setlocale(int category, const char *locale); struct lconv *localeconv(void);-B.11 Mathematics
+B.11 Mathematics
@@ -20304,13 +20302,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int islessgreater(real-floating x, real-floating y); int isunordered(real-floating x, real-floating y);B.12 Nonlocal jumps
+B.12 Nonlocal jumps
jmp_buf int setjmp(jmp_buf env); void longjmp(jmp_buf env, int val);-B.13 Signal handling
+B.13 Signal handling
sig_atomic_t SIG_IGN SIGILL SIGTERM SIG_DFL SIGABRT SIGINT @@ -20318,7 +20316,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 void (*signal(int sig, void (*func)(int)))(int); int raise(int sig);-B.14 Variable arguments
+B.14 Variable arguments
va_list type va_arg(va_list ap, type); @@ -20326,7 +20324,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 void va_end(va_list ap); void va_start(va_list ap, parmN);-B.15 Boolean type and values
+B.15 Boolean type and values
bool @@ -20334,12 +20332,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 false __bool_true_false_are_defined-B.16 Common definitions
+B.16 Common definitions
ptrdiff_t size_t wchar_t NULL offsetof(type, member-designator)-B.17 Integer types
+B.17 Integer types
intN_t INT_LEASTN_MIN PTRDIFF_MAX uintN_t INT_LEASTN_MAX SIG_ATOMIC_MIN @@ -20355,7 +20353,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 INTN_MAX UINTMAX_MAX UINTMAX_C(value) UINTN_MAX PTRDIFF_MIN-B.18 Input/output
+B.18 Input/output
@@ -20434,7 +20432,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 int ferror(FILE *stream); void perror(const char *s);-B.19 General utilities
+B.19 General utilities
@@ -20494,7 +20492,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n);-B.20 String handling
+B.20 String handling
size_t @@ -20529,7 +20527,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 char *strerror(int errnum); size_t strlen(const char *s);-B.21 Type-generic math
+B.21 Type-generic math
acos sqrt fmod nextafter asin fabs frexp nexttoward @@ -20547,7 +20545,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 log fmax lround cproj pow fmin nearbyint creal-B.22 Date and time
+B.22 Date and time
NULL size_t time_t @@ -20565,7 +20563,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 const char * restrict format, const struct tm * restrict timeptr);-B.23 Extended multibyte/wide character utilities
+B.23 Extended multibyte/wide character utilities
@@ -20673,7 +20671,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 const wchar_t ** restrict src, size_t len, mbstate_t * restrict ps);-B.24 Wide character classification and mapping utilities
+B.24 Wide character classification and mapping utilities
@@ -20697,7 +20695,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 wint_t towctrans(wint_t wc, wctrans_t desc); wctrans_t wctrans(const char *property);-Annex C
+Annex C
(informative) @@ -20722,7 +20720,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 -Annex D
+Annex D
(normative) @@ -20811,7 +20809,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 2107, 210A-2113, 2115, 2118-211D, 2124, 2126, 2128, 212A-2131, 2133-2138, 2160-2182, 3005-3007, 3021-3029-Annex E
+Annex E
(informative) @@ -20896,12 +20894,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 #define LDBL_EPSILON 1E-9 #define LDBL_MIN 1E-37-Annex F
+Annex F
(normative) IEC 60559 floating-point arithmetic-F.1 Introduction
+F.1 Introduction
This annex specifies C language support for the IEC 60559 floating-point standard. The IEC 60559 floating-point standard is specifically Binary floating-point arithmetic for @@ -20915,7 +20913,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 a binding between the C language and IEC 60559 is indicated, the IEC 60559-specified behavior is adopted by reference, unless stated otherwise. -
F.2 Types
+F.2 Types
The C floating types match the IEC 60559 formats as follows:
This specification does not define the behavior of signaling NaNs.309) It generally uses
the term NaN to denote quiet NaNs. The NAN and INFINITY macros and the nan
@@ -20954,7 +20952,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
sufficient for closure of the arithmetic.
-F.3 Operators and functions
+
C operators and functions provide IEC 60559 required and recommended facilities as listed below. @@ -21032,7 +21030,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 macros defined in 7.12.3 do not distinguish signaling from quiet NaNs).
If the floating value is infinite or NaN or if the integral part of the floating value exceeds
the range of the integer type, then the ''invalid'' floating-point exception is raised and the
@@ -21048,7 +21046,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
<math.h>.
-F.5 Binary-decimal conversion
+
Conversion from the widest supported IEC 60559 format to decimal with
DECIMAL_DIG digits and back is the identity function.311)
@@ -21076,7 +21074,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
DBL_DIG are 18 and 15, respectively, for these formats.)
-F.6 Contracted expressions
+
A contracted expression treats infinities, NaNs, signed zeros, subnormals, and the
rounding directions in a manner consistent with the basic arithmetic operations covered
@@ -21087,7 +21085,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
consistent with the basic arithmetic operations. A contracted expression should deliver
the same value as its uncontracted counterpart, else should be correctly rounded (once).
-F.7 Floating-point environment
+
The floating-point environment defined in <fenv.h> includes the IEC 60559 floating- point exception status flags and directed-rounding control modes. It includes also @@ -21098,7 +21096,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
312) This specification does not require dynamic rounding precision nor trap enablement modes.
-F.7.1 Environment management
+
IEC 60559 requires that floating-point operations implicitly raise floating-point exception
status flags, and that rounding control modes can be set explicitly to affect result values of
@@ -21112,7 +21110,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
which allows certain optimizations (see F.8).
-F.7.2 Translation
+
During translation the IEC 60559 default modes are in effect:
At program startup the floating-point environment is initialized as prescribed by IEC 60559: @@ -21150,7 +21148,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
An arithmetic constant expression of floating type, other than one in an initializer for an
object that has static storage duration, is evaluated (as if) during execution; thus, it is
@@ -21189,7 +21187,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
const static double one_third = 1.0/3.0;
-F.7.5 Initialization
+
All computation for automatic initialization is done (as if) at execution time; thus, it is
affected by any operative modes and raises floating-point exceptions as required by
@@ -21235,7 +21233,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
could be done at translation time, regardless of the expression evaluation method.
-F.7.6 Changing the environment
+
Operations defined in 6.5 and functions and macros defined for the standard libraries
change floating-point status flags and control modes just as indicated by their
@@ -21247,12 +21245,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
''inexact'', or ''underflow'' and ''inexact''), then ''overflow'' or ''underflow'' is raised
before ''inexact''.
-F.8 Optimization
+
This section identifies code transformations that might subvert IEC 60559-specified
behavior, and others that do not.
-F.8.1 Global transformations
+
Floating-point arithmetic operations and external function calls may entail side effects which optimization shall honor, at least where the state of the FENV_ACCESS pragma is @@ -21285,7 +21283,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
if (0 < n) x + 1;-
x / 2 <-> x * 0.5 Although similar transformations involving inexact
@@ -21348,7 +21346,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 for complex z. --F.8.3 Relational operators
+F.8.3 Relational operators
x != x -> false The statement x != x is true if x is a NaN. x == x -> true The statement x == x is false if x is a NaN. @@ -21401,7 +21399,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 f();
The implementation shall honor floating-point exceptions raised by execution-time constant arithmetic wherever the state of the FENV_ACCESS pragma is ''on''. (See F.7.4 @@ -21416,7 +21414,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
319) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward.
-F.9 Mathematics
+
This subclause contains specifications of <math.h> facilities that are particularly suited
for IEC 60559 implementations.
@@ -21479,9 +21477,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
avoiding them would be too costly.
-F.9.1 Trigonometric functions
+
If the correct result is outside the range of the return type, the numeric result is
unspecified and the ''invalid'' floating-point exception is raised.
-F.9.3.6 The ldexp functions
+
On a binary system, ldexp(x, exp) is equivalent to scalbn(x, exp).
-F.9.3.7 The log functions
+
sqrt is fully specified as a basic arithmetic operation in IEC 60559.
-F.9.5 Error and gamma functions
+
See the sample implementation for ceil in F.9.6.1.
-F.9.6.3 The nearbyint functions
+
The nearbyint functions use IEC 60559 rounding according to the current rounding direction. They do not raise the ''inexact'' floating-point exception if the result differs in @@ -21874,12 +21872,12 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The rint functions differ from the nearbyint functions only in that they do raise the
''inexact'' floating-point exception if the result differs in value from the argument.
-F.9.6.5 The lrint and llrint functions
+
The lrint and llrint functions provide floating-to-integer conversion as prescribed
by IEC 60559. They round according to the current rounding direction. If the rounded
@@ -21889,7 +21887,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
exception.
-F.9.6.6 The round functions
+
The lround and llround functions differ from the lrint and llrint functions
with the default rounding direction just in that the lround and llround functions
round halfway cases away from zero and need not raise the ''inexact'' floating-point
exception for non-integer arguments that round to within the range of the return type.
-F.9.6.8 The trunc functions
+
The trunc functions use IEC 60559 rounding toward zero (regardless of the current rounding direction). @@ -21934,9 +21932,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The remainder functions are fully specified as a basic arithmetic operation in
IEC 60559.
-F.9.7.3 The remquo functions
+
The remquo functions follow the specifications for the remainder functions. They
have no further specifications special to IEC 60559 implementations.
-F.9.8 Manipulation functions
+
copysign is specified in the Appendix to IEC 60559.
-F.9.8.2 The nan functions
+
All IEC 60559 implementations support quiet NaNs, in all floating formats.
-F.9.8.3 The nextafter functions
+
No additional requirements beyond those on nextafter.
-F.9.9 Maximum, minimum, and positive difference functions
+
No additional requirements.
-F.9.9.2 The fmax functions
+
If just one argument is a NaN, the fmax functions return the other argument (if both
arguments are NaNs, the functions return a NaN).
@@ -22013,13 +22011,13 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
return +0; however, implementation in software might be impractical.
-F.9.9.3 The fmin functions
+
The fmin functions are analogous to the fmax functions (see F.9.9.2).
-F.9.10 Floating multiply-add
+
(informative) IEC 60559-compatible complex arithmetic-
This annex supplements annex F to specify complex arithmetic for compatibility with
IEC 60559 real floating-point arithmetic. Although these specifications have been
@@ -22050,7 +22048,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
recommended practice. An implementation that defines
__STDC_IEC_559_COMPLEX__ should conform to the specifications in this annex.
-G.2 Types
+
There is a new keyword _Imaginary, which is used to specify imaginary types. It is used as a type specifier within declaration specifiers in the same way as _Complex is @@ -22069,7 +22067,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The imaginary type domain comprises the imaginary types.
-G.3 Conventions
+
A complex or imaginary value with at least one infinite part is regarded as an infinity
(even if its other part is a NaN). A complex or imaginary value is a finite number if each
@@ -22077,14 +22075,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
a zero if each of its parts is a zero.
-G.4 Conversions
+
Conversions among imaginary types follow rules analogous to those for real floating
types.
-G.4.2 Real and imaginary
+
When a value of imaginary type is converted to a real type other than _Bool,324) the result is a positive zero. @@ -22096,7 +22094,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
324) See 6.3.1.2.
-G.4.3 Imaginary and complex
+
When a value of imaginary type is converted to a complex type, the real part of the
complex result value is a positive zero and the imaginary part of the complex result value
@@ -22106,7 +22104,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
complex value is discarded and the value of the imaginary part is converted according to
the conversion rules for the corresponding real types.
-G.5 Binary operators
+
The following subclauses supplement 6.5 in order to specify the type of the result for an
operation with an imaginary operand.
@@ -22123,7 +22121,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
-G.5.1 Multiplicative operators
+
If one operand has real type and the other operand has imaginary type, then the result has
@@ -22294,7 +22292,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
(at least where the state for CX_LIMITED_RANGE is ''off'').
-G.5.2 Additive operators
+
If both operands have imaginary type, then the result has imaginary type. (If one operand @@ -22315,7 +22313,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
x + iy (x (+-) u) + iy x + i(y (+-) v) (x (+-) u) + i(y (+-) v)-
The macros
@@ -22385,9 +22383,9 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 other part is a NaN. -G.6.1 Trigonometric functions
+G.6.1 Trigonometric functions
-G.6.1.1 The cacos functions
+G.6.1.1 The cacos functions
The cpow functions raise floating-point exceptions if appropriate for the calculation of
the parts of the result, and may raise spurious exceptions.327)
@@ -22606,7 +22604,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
implementations that treat special cases more carefully.
-G.6.4.2 The csqrt functions
+
Type-generic macros that accept complex arguments also accept imaginary arguments. If
an argument is imaginary, the macro expands to an expression whose type is real,
@@ -22654,29 +22652,29 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
asinh(iy) = i asin(y)
atanh(iy) = i atan(y)
-Annex H
+
(informative) Language independent arithmetic-
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
IEC 60559 (annex F) in that it covers integer and diverse floating-point arithmetics.
-H.2 Types
+
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
unit in the last place (ULP) accuracy requirement (LIA-1 subclause 5.2.8).
-H.2.1 Boolean type
+
The LIA-1 data type Boolean is implemented by the C data type bool with values of
true and false, all from <stdbool.h>.
-H.2.2 Integer types
+
The signed C integer types int, long int, long long int, and the corresponding
unsigned types are compatible with LIA-1. If an implementation adds support for the
@@ -22696,7 +22694,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
is always 0 for the unsigned types, and is not provided for those types.
-H.2.2.1 Integer operations
+
The integer operations on integer types are the following:
addI x + y
@@ -22714,7 +22712,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
geqI x >= y
where x and y are expressions of the same integer type.
-H.2.3 Floating-point types
+
The C floating-point types float, double, and long double are compatible with
LIA-1. If an implementation adds support for the LIA-1 exceptional values
@@ -22723,7 +22721,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
operations (see annex F) along with IEC 60559 status flags and traps has LIA-1
conformant types.
-H.2.3.1 Floating-point parameters
+
The parameters for a floating point data type can be accessed by the following:
r FLT_RADIX
@@ -22738,7 +22736,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
epsilon FLT_EPSILON, DBL_EPSILON, LDBL_EPSILON
rnd_style FLT_ROUNDS
-H.2.3.2 Floating-point operations
+
The floating-point operations on floating-point types are the following:
addF x + y
@@ -22762,7 +22760,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
where x and y are expressions of the same floating point type, n is of type int, and li
is of type long int.
-H.2.3.3 Rounding styles
+
The C Standard requires all floating types to use the same radix and rounding style, so
that only one identifier for each is provided to map to LIA-1.
@@ -22775,7 +22773,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
provided that an implementation extends FLT_ROUNDS to cover the rounding style used
in all relevant LIA-1 operations, not just addition as in C.
-H.2.4 Type conversions
+
The LIA-1 type conversions are the following type casts:
cvtI' -> I (int)i, (long int)i, (long long int)i,
@@ -22812,14 +22810,14 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
implementation uses round-to-nearest.
-H.3 Notification
+
Notification is the process by which a user or program is informed that an exceptional
arithmetic operation has occurred. C's operations are compatible with LIA-1 in that C
allows an implementation to cause a notification to occur when any arithmetic operation
returns an exceptional value as defined in LIA-1 clause 5.
-H.3.1 Notification alternatives
+
LIA-1 requires at least the following two alternatives for handling of notifications:
setting indicators or trap-and-terminate. LIA-1 allows a third alternative: trap-and-
@@ -22839,7 +22837,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
math library function calls. User-provided signal handlers for SIGFPE allow for trap-
and-resume behavior with the same constraint.
-H.3.1.1 Indicators
+
C's <fenv.h> status flags are compatible with the LIA-1 indicators.
@@ -22864,7 +22862,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
This documentation makes that distinction because <fenv.h> covers only the floating-
point indicators.
-H.3.1.2 Traps
+
C is compatible with LIA-1's trap requirements for arithmetic operations, but not for
math library functions (which are not permitted to generate any externally visible
@@ -22882,7 +22880,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
resume, at the programmer's option.
-Annex I
+
(informative) @@ -22926,7 +22924,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
(informative) @@ -22934,7 +22932,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 This annex collects some information about portability that appears in this International Standard. -J.1 Unspecified behavior
+J.1 Unspecified behavior
The following are unspecified:
The behavior is undefined in the following circumstances:
A conforming implementation is required to document its choice of behavior in each of
the areas listed in this subclause. The following are implementation-defined:
-J.3.1 Translation
+
The following characteristics of a hosted environment are locale-specific and are required to be documented by the implementation: @@ -23815,7 +23813,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
The following extensions are widely used in many systems, but are not portable to all
implementations. The inclusion of any extension that may cause a strictly conforming
@@ -23823,34 +23821,34 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
extensions are new keywords, extra library functions declared in standard headers, or
predefined macros with names that do not begin with an underscore.
-J.5.1 Environment arguments
+
In a hosted environment, the main function receives a third argument, char *envp[],
that points to a null-terminated array of pointers to char, each of which points to a string
that provides information about the environment for this execution of the program
(5.1.2.2.1).
-J.5.2 Specialized identifiers
+
Characters other than the underscore _, letters, and digits, that are not part of the basic
source character set (such as the dollar sign $, or characters in national character sets)
may appear in an identifier (6.4.2).
-J.5.3 Lengths and cases of identifiers
+
All characters in identifiers (with or without external linkage) are significant (6.4.2).
-J.5.4 Scopes of identifiers
+
A function identifier, or the identifier of an object the declaration of which contains the
keyword extern, has file scope (6.2.1).
-J.5.5 Writable string literals
+
String literals are modifiable (in which case, identical string literals should denote distinct
objects) (6.4.5).
-J.5.6 Other arithmetic types
+
Additional arithmetic types, such as __int128 or double double, and their
appropriate conversions are defined (6.2.5, 6.3.1). Additional floating types may have
@@ -23858,7 +23856,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
other floating types, and may be used to define float_t or double_t.
-J.5.7 Function pointer casts
+
A pointer to an object or to void may be cast to a pointer to a function, allowing data to
be invoked as a function (6.5.4).
@@ -23866,69 +23864,69 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007
A pointer to a function may be cast to a pointer to an object or to void, allowing a
function to be inspected or modified (for example, by a debugger) (6.5.4).
-J.5.8 Extended bit-field types
+
A bit-field may be declared with a type other than _Bool, unsigned int, or
signed int, with an appropriate maximum width (6.7.2.1).
-J.5.9 The fortran keyword
+
The fortran function specifier may be used in a function declaration to indicate that
calls suitable for FORTRAN should be generated, or that a different representation for the
external name is to be generated (6.7.4).
-J.5.10 The asm keyword
+
The asm keyword may be used to insert assembly language directly into the translator output (6.8). The most common implementation is via a statement of the form:
asm ( character-string-literal );-
There may be more than one external definition for the identifier of an object, with or
without the explicit use of the keyword extern; if the definitions disagree, or more than
one is initialized, the behavior is undefined (6.9.2).
-J.5.12 Predefined macro names
+
Macro names that do not begin with an underscore, describing the translation and
execution environments, are defined by the implementation before translation begins
(6.10.8).
-J.5.13 Floating-point status flags
+
If any floating-point status flags are set on normal termination after all calls to functions
registered by the atexit function have been made (see 7.20.4.3), the implementation
writes some diagnostics indicating the fact to the stderr stream, if it is still open,
-J.5.14 Extra arguments for signal handlers
+
Handlers for specific signals are called with extra arguments in addition to the signal
number (7.14.1.1).
-J.5.15 Additional stream types and file-opening modes
+
Additional mappings from files to streams are supported (7.19.2).
Additional file-opening modes may be specified by characters appended to the mode
argument of the fopen function (7.19.5.3).
-J.5.16 Defined file position indicator
+
The file position indicator is decremented by each successful call to the ungetc or
ungetwc function for a text stream, except if its value was zero before a call (7.19.7.11,
7.24.3.10).
-J.5.17 Math error reporting
+
Functions declared in <complex.h> and <math.h> raise SIGFPE to report errors
instead of, or in addition to, setting errno or raising floating-point exceptions (7.3,
7.12).
-Bibliography
+
??? x ???, 3.18 , (comma punctuator), 6.5.2, 6.7, 6.7.2.1, 6.7.2.2, 6.7.2.3, 6.7.8