X-Git-Url: http://nsz.repo.hu/git/?p=c-standard;a=blobdiff_plain;f=n1548.html;fp=n1548.html;h=6502e1f38fc038edb2365d7c53478b6b7cf9b4a8;hp=76b5a5c01fba7cd610862da48178a018543eb176;hb=ab68f160796f4e7ccdad2293ab70d639aa497643;hpb=d91a54200067e06b0499f3612315d997f6de0dad diff --git a/n1548.html b/n1548.html index 76b5a5c..6502e1f 100644 --- a/n1548.html +++ b/n1548.html @@ -12,6 +12,7 @@ INTERNATIONAL STANDARD (C)ISO/IEC ISO/IEC 9 +

Contents

Programming languages -- C

 
@@ -44,6 +45,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
 
 
+

Contents

Contents

+

Contents

Foreword

ISO (the International Organization for Standardization) and IEC (the International @@ -692,6 +695,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. are also for information only. +

Contents

Introduction

With the introduction of new devices and extended character sets, new features may be @@ -726,11 +730,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

Programming languages -- C

+

Contents

1. Scope

This International Standard specifies the form and establishes the interpretation of @@ -767,6 +773,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. data-processing systems. It is intended for use by implementors and programmers. +

Contents

2. Normative references

The following referenced documents are indispensable for the application of this @@ -794,6 +801,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. designated IEC 559:1989). +

Contents

3. Terms, definitions, and symbols

For the purposes of this International Standard, the following definitions apply. Other @@ -803,6 +811,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

3.1

access
@@ -817,12 +826,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. NOTE 3 Expressions that are not evaluated do not access objects. +

Contents

3.2

alignment
requirement that objects of a particular type be located on storage boundaries with addresses that are particular multiples of a byte address +

Contents

3.3

argument
@@ -832,11 +843,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. expression, or a sequence of preprocessing tokens in the comma-separated list bounded by the parentheses in a function-like macro invocation +

Contents

3.4

behavior
external appearance or action +

Contents

3.4.1

implementation-defined behavior
@@ -846,6 +859,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. when a signed integer is shifted right. +

Contents

3.4.2

locale-specific behavior
@@ -857,6 +871,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. characters other than the 26 lowercase Latin letters. +

Contents

3.4.3

undefined behavior
@@ -872,6 +887,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. EXAMPLE An example of undefined behavior is the behavior on integer overflow. +

Contents

3.4.4

unspecified behavior
@@ -883,6 +899,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. evaluated. +

Contents

3.5

bit
@@ -892,6 +909,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. NOTE It need not be possible to express the address of each individual bit of an object. +

Contents

3.6

byte
@@ -906,12 +924,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. bit. +

Contents

3.7

character
<abstract> member of a set of elements used for the organization, control, or representation of data +

Contents

3.7.1

character
@@ -919,6 +939,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. <C> bit representation that fits in a byte +

Contents

3.7.2

multibyte character
@@ -928,36 +949,42 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. NOTE The extended character set is a superset of the basic character set. +

Contents

3.7.3

wide character
bit representation that fits in an object of type wchar_t, capable of representing any character in the current locale +

Contents

3.8

constraint
restriction, either syntactic or semantic, by which the exposition of language elements is to be interpreted +

Contents

3.9

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 +

Contents

3.10

diagnostic message
message belonging to an implementation-defined subset of the implementation's message output +

Contents

3.11

forward reference
reference to a later subclause of this International Standard that contains additional information relevant to this subclause +

Contents

3.12

implementation
@@ -965,11 +992,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. control options, that performs translation of programs for, and supports execution of functions in, a particular execution environment +

Contents

3.13

implementation limit
restriction imposed upon programs by the implementation +

Contents

3.14

memory location
@@ -1003,6 +1032,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. modified, but b and a, for example, can be. +

Contents

3.15

object
@@ -1012,6 +1042,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. NOTE When referenced, an object may be interpreted as having a particular type; see 6.3.2.1. +

Contents

3.16

parameter
@@ -1021,12 +1052,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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 +

Contents

3.17

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 +

Contents

3.18

runtime-constraint
@@ -1040,21 +1073,25 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. constraints for a library function are not violated by the program; see K.3.1.4. +

Contents

3.19

value
precise meaning of the contents of an object when interpreted as having a specific type +

Contents

3.19.1

implementation-defined value
unspecified value where each implementation documents how the choice is made +

Contents

3.19.2

indeterminate value
either an unspecified value or a trap representation +

Contents

3.19.3

unspecified value
@@ -1064,11 +1101,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. NOTE An unspecified value cannot be a trap representation. +

Contents

3.19.4

trap representation
an object representation that need not represent a value of the object type +

Contents

3.19.5

perform a trap
@@ -1083,6 +1122,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. representation might perform a trap but is not required to (see 6.2.6.1). +

Contents

3.20

[^ x^]
@@ -1091,6 +1131,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. EXAMPLE [^2.4^] is 3, [^-2.4^] is -2. +

Contents

3.21

[_ x_]
@@ -1103,6 +1144,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

4. Conformance

In this International Standard, ''shall'' is to be interpreted as a requirement on an @@ -1177,6 +1219,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. implementation. +

Contents

5. Environment

An implementation translates C source files and executes C programs in two data- @@ -1187,10 +1230,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: In this clause, only a few of many possible forward references have been noted. +

Contents

5.1 Conceptual models

+

Contents

5.1.1 Translation environment

+

Contents

5.1.1.1 Program structure

A C program need not all be translated at the same time. The text of the program is kept @@ -1206,6 +1252,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: linkages of identifiers (6.2.2), external definitions (6.9), preprocessing directives (6.10). +

Contents

5.1.1.2 Translation phases

The precedence among the syntax rules of translation is specified by the following @@ -1271,6 +1318,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. character. +

Contents

5.1.1.3 Diagnostics

A conforming implementation shall produce at least one diagnostic message (identified in @@ -1294,6 +1342,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. valid program is still correctly translated. It may also successfully translate an invalid program. +

Contents

5.1.2 Execution environments

Two execution environments are defined: freestanding and hosted. In both cases, @@ -1304,6 +1353,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. environment.

Forward references: storage durations of objects (6.2.4), initialization (6.7.9). +

Contents

5.1.2.1 Freestanding environment

In a freestanding environment (in which C program execution may take place without any @@ -1314,6 +1364,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The effect of program termination in a freestanding environment is implementation- defined. +

Contents

5.1.2.2 Hosted environment

A hosted environment need not be provided, but shall conform to the following @@ -1324,6 +1375,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

5.1.2.2.1 Program startup

The function called at program startup is named main. The implementation declares no @@ -1366,6 +1418,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. char ** argv, and so on. +

Contents

5.1.2.2.2 Program execution

In a hosted environment, a program may use all the functions, macros, type definitions, @@ -1376,6 +1429,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

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 @@ -1390,6 +1444,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. will have ended in the former case, even where they would not have in the latter. +

Contents

5.1.2.3 Program execution

The semantic descriptions in this International Standard describe the behavior of an @@ -1578,6 +1633,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. cannot interleave, but can be executed in any order. +

Contents

5.1.2.4 Multi-threaded executions and data races

Under a hosted implementation, a program can have more than one thread of execution @@ -1796,8 +1852,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. release/consume in place of release/acquire. +

Contents

5.2 Environmental considerations

+

Contents

5.2.1 Character sets

Two sets of characters and their associated collating sequences shall be defined: the set in @@ -1854,6 +1912,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

5.2.1.1 Trigraph sequences

Before any other processing takes place, each occurrence of one of the following @@ -1892,6 +1951,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. described in ISO/IEC 646, which is a subset of the seven-bit US ASCII code set. +

Contents

5.2.1.2 Multibyte characters

The source character set may contain multibyte characters, used to represent members of @@ -1923,6 +1983,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. of a sequence of valid multibyte characters. +

Contents

5.2.2 Character display semantics

The active position is that location on a display device where the next character output by @@ -1965,6 +2026,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. International Standard.

Forward references: the isprint function (7.4.1.8), the fputc function (7.21.7.3). +

Contents

5.2.3 Signals and interrupts

Functions shall be implemented such that they may be interrupted at any time by a signal, @@ -1974,6 +2036,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. image (the instructions that compose the executable representation of a function) on a per-invocation basis. +

Contents

5.2.4 Environmental limits

Both the translation and execution environments constrain the implementation of @@ -1981,6 +2044,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. environmental limits on a conforming implementation; the library-related limits are discussed in clause 7. +

Contents

5.2.4.1 Translation limits

The implementation shall be able to translate and execute at least one program that @@ -2029,6 +2093,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

5.2.4.2 Numerical limits

An implementation is required to document all the limits specified in this subclause, @@ -2036,6 +2101,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. specified in <stdint.h>.

Forward references: integer types <stdint.h> (7.20). +

Contents

5.2.4.2.1 Sizes of integer types <limits.h>

The values given below shall be replaced by constant expressions suitable for use in #if @@ -2100,6 +2166,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

20) See 6.2.5. +

Contents

5.2.4.2.2 Characteristics of floating types <float.h>

The characteristics of floating types are defined in terms of a model that describes a @@ -2440,8 +2507,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. limits are one less than shown here. +

Contents

6. Language

+

Contents

6.1 Notation

In the syntax notation used in this clause, syntactic categories (nonterminals) are @@ -2459,8 +2528,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

A summary of the language syntax is given in annex A. +

Contents

6.2 Concepts

+

Contents

6.2.1 Scopes of identifiers

An identifier can denote an object; a function; a tag or a member of a structure, union, or @@ -2517,6 +2588,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (6.9.1), identifiers (6.4.2), macro replacement (6.10.3), name spaces of identifiers (6.2.3), source file inclusion (6.10.2), statements (6.8). +

Contents

6.2.2 Linkages of identifiers

An identifier declared in different scopes or in the same scope more than once can be @@ -2565,6 +2637,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.2.3 Name spaces of identifiers

If more than one declaration of a particular identifier is visible at any point in a @@ -2590,6 +2663,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.2.4 Storage durations of objects

An object has a storage duration that determines its lifetime. There are four storage @@ -2661,6 +2735,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

36) The address of such an object is taken implicitly when an array member is accessed. +

Contents

6.2.5 Types

The meaning of a value stored in an object or returned by a function is determined by the @@ -2897,8 +2972,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. arguments to functions, return values from functions, and members of unions. +

Contents

6.2.6 Representations of types

+

Contents

6.2.6.1 General

The representations of all types are unspecified except as stated in this subclause. @@ -2974,6 +3051,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. on values of type T may distinguish between them. +

Contents

6.2.6.2 Integer types

For unsigned integer types other than unsigned char, the bits of the object @@ -3047,6 +3125,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. bits. +

Contents

6.2.7 Compatible type and composite type

Two types have compatible type if their types are the same. Additional rules for @@ -3119,6 +3198,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.2.8 Alignment of objects

Complete object types have alignment requirements which place restrictions on the @@ -3166,6 +3246,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. alignment has been applied. +

Contents

6.3 Conversions

Several operators convert operand values from one type to another automatically. This @@ -3178,8 +3259,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. representation.

Forward references: cast operators (6.5.4). +

Contents

6.3.1 Arithmetic operands

+

Contents

6.3.1.1 Boolean, characters, and integers

Every integer type has an integer conversion rank defined as follows: @@ -3231,6 +3314,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. shift operators, as specified by their respective subclauses. +

Contents

6.3.1.2 Boolean type

When any scalar value is converted to _Bool, the result is 0 if the value compares equal @@ -3240,6 +3324,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

59) NaNs do not compare equal to 0 and thus convert to 1. +

Contents

6.3.1.3 Signed and unsigned integers

When a value with integer type is converted to another integer type other than _Bool, if @@ -3256,6 +3341,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

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, @@ -3280,6 +3366,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. range of portable real floating values is (-1, Utype_MAX+1). +

Contents

6.3.1.5 Real floating types

When a value of real floating type is converted to a real floating type, if the value being @@ -3291,11 +3378,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. conversions (6.3.1.8, 6.8.6.4) may be represented in greater precision and range than that required by the new type. +

Contents

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

Contents

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 @@ -3306,6 +3395,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. complex value is discarded and the value of the real part is converted according to the conversion rules for the corresponding real type. +

Contents

6.3.1.8 Usual arithmetic conversions

Many operators that expect operands of arithmetic type cause conversions and yield result @@ -3360,8 +3450,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

63) The cast and assignment operators are still required to remove extra range and precision. +

Contents

6.3.2 Other operands

+

Contents

6.3.2.1 Lvalues, arrays, and function designators

An lvalue is an expression (with an object type other than void) that potentially @@ -3416,6 +3508,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. designator and violates the constraint in 6.5.3.4. +

Contents

6.3.2.2 void

The (nonexistent) value of a void expression (an expression that has type void) shall not @@ -3424,6 +3517,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. expression, its value or designator is discarded. (A void expression is evaluated for its side effects.) +

Contents

6.3.2.3 Pointers

A pointer to void may be converted to or from a pointer to any object type. A pointer to @@ -3486,6 +3580,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. correctly aligned for a pointer to type C. +

Contents

6.4 Lexical elements

Syntax

@@ -3559,6 +3654,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. occur in source files. +

Contents

6.4.1 Keywords

Syntax

@@ -3591,8 +3687,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.4.2 Identifiers

+

Contents

6.4.2.1 General

Syntax

@@ -3653,6 +3751,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Extended characters may produce a long external identifier. +

Contents

6.4.2.2 Predefined identifiers

Semantics

@@ -3693,6 +3792,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. identifier is explicitly declared using the name __func__, the behavior is undefined. +

Contents

6.4.3 Universal character names

Syntax

@@ -3734,6 +3834,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.4.4 Constants

Syntax

@@ -3752,6 +3853,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Each constant has a type, determined by its form and value, as detailed later. +

Contents

6.4.4.1 Integer constants

Syntax

@@ -3857,6 +3959,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. its list and has no extended integer type, then the integer constant has no type. +

Contents

6.4.4.2 Floating constants

Syntax

@@ -3947,6 +4050,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. floating constants (see 7.22.1.3). +

Contents

6.4.4.3 Enumeration constants

Syntax

@@ -3959,6 +4063,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. An identifier declared as an enumeration constant has type int.

Forward references: enumeration specifiers (6.7.2.2). +

Contents

6.4.4.4 Character constants

Syntax

@@ -4104,6 +4209,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the result is not a token and a diagnostic is required. See ''future language directions'' (6.11.4). +

Contents

6.4.5 String literals

Syntax

@@ -4215,6 +4321,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. \0 escape sequence. +

Contents

6.4.6 Punctuators

Syntax

@@ -4256,6 +4363,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. interchanged. +

Contents

6.4.7 Header names

Syntax

@@ -4314,6 +4422,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.4.8 Preprocessing numbers

Syntax

@@ -4345,6 +4454,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.4.9 Comments

Except within a character constant, a string literal, or a comment, the characters /* @@ -4382,6 +4492,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.5 Expressions

An expression is a sequence of operators and operands that specifies computation of a @@ -4489,6 +4600,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. documented. +

Contents

6.5.1 Primary expressions

Syntax

@@ -4521,6 +4633,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.5.1.1 Generic selection

Syntax

@@ -4568,6 +4681,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.5.2 Postfix operators

Syntax

@@ -4588,6 +4702,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. argument-expression-list , assignment-expression +

Contents

6.5.2.1 Array subscripting

Constraints

@@ -4625,6 +4740,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: additive operators (6.5.6), address and indirection operators (6.5.3.2), array declarators (6.7.6.2). +

Contents

6.5.2.2 Function calls

Constraints

@@ -4718,6 +4834,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

94) In other words, function executions do not ''interleave'' with each other. +

Contents

6.5.2.3 Structure and union members

Constraints

@@ -4840,6 +4957,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. can be safely accessed using a non-atomic object which is assigned to or from the atomic object. +

Contents

6.5.2.4 Postfix increment and decrement operators

Constraints

@@ -4876,6 +4994,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. with result being the result of the operation. +

Contents

6.5.2.5 Compound literals

Constraints

@@ -5016,6 +5135,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the same or overlapping representations. +

Contents

6.5.3 Unary operators

Syntax

@@ -5032,6 +5152,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. & * + - ~ ! +

Contents

6.5.3.1 Prefix increment and decrement operators

Constraints

@@ -5048,6 +5169,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. operand is decremented.

Forward references: additive operators (6.5.6), compound assignment (6.5.16.2). +

Contents

6.5.3.2 Address and indirection operators

Constraints

@@ -5086,6 +5208,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. end of its lifetime. +

Contents

6.5.3.3 Unary arithmetic operators

Constraints

@@ -5113,6 +5236,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.5.3.4 The sizeof and alignof operators

Constraints

@@ -5189,6 +5313,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. size of the adjusted (pointer) type (see 6.9.1). +

Contents

6.5.4 Cast operators

Syntax

@@ -5227,6 +5352,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. unqualified version of the type. +

Contents

6.5.5 Multiplicative operators

Syntax

@@ -5260,6 +5386,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.5.6 Additive operators

Syntax

@@ -5364,6 +5491,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. element'' requirements. +

Contents

6.5.7 Bitwise shift operators

Syntax

@@ -5395,6 +5523,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. part of the quotient of E1 / 2E2 . If E1 has a signed type and a negative value, the resulting value is implementation-defined. +

Contents

6.5.8 Relational operators

Syntax

@@ -5445,6 +5574,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. means (a<b)<c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''. +

Contents

6.5.9 Equality operators

Syntax

@@ -5507,6 +5637,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. behavior. +

Contents

6.5.10 Bitwise AND operator

Syntax

@@ -5531,6 +5662,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.5.11 Bitwise exclusive OR operator

Syntax

@@ -5550,6 +5682,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. in the result is set if and only if exactly one of the corresponding bits in the converted operands is set). +

Contents

6.5.12 Bitwise inclusive OR operator

Syntax

@@ -5570,6 +5703,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. operands is set). +

Contents

6.5.13 Logical AND operator

Syntax

@@ -5591,6 +5725,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the first and second operands. If the first operand compares equal to 0, the second operand is not evaluated. +

Contents

6.5.14 Logical OR operator

Syntax

@@ -5613,6 +5748,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. not evaluated. +

Contents

6.5.15 Conditional operator

Syntax

@@ -5688,6 +5824,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.5.16 Assignment operators

Syntax

@@ -5720,6 +5857,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. when the object has volatile-qualified type. +

Contents

6.5.16.1 Simple assignment

Constraints

@@ -5806,6 +5944,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. not volatile from the type int volatile * const). +

Contents

6.5.16.2 Compound assignment

Constraints

@@ -5842,6 +5981,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. with result being the result of the operation. +

Contents

6.5.17 Comma operator

Syntax

@@ -5876,6 +6016,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.6 Constant expressions

Syntax

@@ -5967,6 +6108,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the expression is a valid integer constant expression with value one. +

Contents

6.7 Declarations

Syntax

@@ -6032,6 +6174,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.7.1 Storage-class specifiers

Syntax

@@ -6087,6 +6230,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. register is sizeof. +

Contents

6.7.2 Type specifiers

Syntax

@@ -6160,6 +6304,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: atomic type specifiers (6.7.2.4), enumeration specifiers (6.7.2.2), structure and union specifiers (6.7.2.1), tags (6.7.2.3), type definitions (6.7.8). +

Contents

6.7.2.1 Structure and union specifiers

Syntax

@@ -6404,6 +6549,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. layouts. +

Contents

6.7.2.2 Enumeration specifiers

Syntax

@@ -6467,6 +6613,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. been seen. +

Contents

6.7.2.3 Tags

Constraints

@@ -6603,6 +6750,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.7.2.4 Atomic type specifiers

Syntax

@@ -6624,6 +6772,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. interpreted as a type specifier (with a type name), not as a type qualifier. +

Contents

6.7.3 Type qualifiers

Syntax

@@ -6740,6 +6889,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.7.3.1 Formal definition of restrict

Let D be a declaration of an ordinary identifier that provides a means of designating an @@ -6863,6 +7013,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. expressions *p and p[1] are not. +

Contents

6.7.4 Function specifiers

Syntax

@@ -6971,6 +7122,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. duration are also distinct in each of the definitions. +

Contents

6.7.5 Alignment specifier

Syntax

@@ -7016,6 +7168,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. declaration. +

Contents

6.7.6 Declarators

Syntax

@@ -7091,6 +7244,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. directly or via one or more typedefs.

Forward references: array declarators (6.7.6.2), type definitions (6.7.8). +

Contents

6.7.6.1 Pointer declarators

Semantics

@@ -7126,6 +7280,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. declares constant_ptr as an object that has type ''const-qualified pointer to int''. +

Contents

6.7.6.2 Array declarators

Constraints

@@ -7252,6 +7407,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.7.6.3 Function declarators (including prototypes)

Constraints

@@ -7426,6 +7582,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.7.7 Type names

Syntax

@@ -7480,6 +7637,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. parameter specification'', rather than redundant parentheses around the omitted identifier. +

Contents

6.7.8 Type definitions

Syntax

@@ -7587,6 +7745,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. } +

Contents

6.7.9 Initialization

Syntax

@@ -7927,6 +8086,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.7.10 Static assertions

Syntax

@@ -7947,6 +8107,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: diagnostics (7.2). +

Contents

6.8 Statements and blocks

Syntax

@@ -7981,6 +8142,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward 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). +

Contents

6.8.1 Labeled statements

Syntax

@@ -8004,6 +8166,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. them.

Forward references: the goto statement (6.8.6.1), the switch statement (6.8.4.2). +

Contents

6.8.2 Compound statement

Syntax

@@ -8021,6 +8184,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

A compound statement is a block. +

Contents

6.8.3 Expression and null statements

Syntax

@@ -8080,6 +8244,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.8.4 Selection statements

Syntax

@@ -8098,6 +8263,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. enclosing block. Each associated substatement is also a block whose scope is a strict subset of the scope of the selection statement. +

Contents

6.8.4.1 The if statement

Constraints

@@ -8113,6 +8279,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. An else is associated with the lexically nearest preceding if that is allowed by the syntax. +

Contents

6.8.4.2 The switch statement

Constraints

@@ -8175,6 +8342,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. default label associated with the switch that is in the block containing the declaration. +

Contents

6.8.5 Iteration statements

Syntax

@@ -8219,16 +8387,19 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. termination cannot be proven. +

Contents

6.8.5.1 The while statement

The evaluation of the controlling expression takes place before each execution of the loop body. +

Contents

6.8.5.2 The do statement

The evaluation of the controlling expression takes place after each execution of the loop body. +

Contents

6.8.5.3 The for statement

The statement @@ -8253,6 +8424,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. specifies an operation (such as incrementing) that is performed after each iteration. +

Contents

6.8.6 Jump statements

Syntax

@@ -8272,6 +8444,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

A jump statement causes an unconditional jump to another place. +

Contents

6.8.6.1 The goto statement

Constraints

@@ -8329,6 +8502,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.8.6.2 The continue statement

Constraints

@@ -8353,6 +8527,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.8.6.3 The break statement

Constraints

@@ -8366,6 +8541,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.8.6.4 The return statement

Constraints

@@ -8416,6 +8592,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. or precision than implied by the type; a cast may be used to remove this extra range and precision. +

Contents

6.9 External definitions

Syntax

@@ -8462,6 +8639,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. external definition for it. +

Contents

6.9.1 Function definitions

Syntax

@@ -8603,6 +8781,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

164) A parameter identifier cannot be redeclared in the function body except in an enclosed block. +

Contents

6.9.2 External object definitions

Semantics

@@ -8649,6 +8828,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. zero on program startup. +

Contents

6.10 Preprocessing directives

Syntax

@@ -8757,6 +8937,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. # character string literal creation operator in 6.10.3.2, for example). +

Contents

6.10.1 Conditional inclusion

Constraints

@@ -8851,6 +9032,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. including within a preprocessing directive. +

Contents

6.10.2 Source file inclusion

Constraints

@@ -8936,6 +9118,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. phases in 5.1.1.2); thus, an expansion that results in two string literals is an invalid directive. +

Contents

6.10.3 Macro replacement

Constraints

@@ -9028,6 +9211,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.10.3.1 Argument substitution

After the arguments for the invocation of a function-like macro have been identified, @@ -9042,6 +9226,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. were a parameter, and the variable arguments shall form the preprocessing tokens used to replace it. +

Contents

6.10.3.2 The # operator

Constraints

@@ -9066,6 +9251,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. ## operators is unspecified. +

Contents

6.10.3.3 The ## operator

Constraints

@@ -9118,6 +9304,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. exist only within translation phase 4. +

Contents

6.10.3.4 Rescanning and further replacement

After all parameters in the replacement list have been substituted and # and ## @@ -9136,6 +9323,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

6.10.3.5 Scope of macro definitions

A macro definition lasts (independent of block structure) until a corresponding #undef @@ -9294,6 +9482,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.10.4 Line control

Constraints

@@ -9331,6 +9520,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. previous forms and is then processed as appropriate. +

Contents

6.10.5 Error directive

Semantics

@@ -9341,6 +9531,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. causes the implementation to produce a diagnostic message that includes the specified sequence of preprocessing tokens. +

Contents

6.10.6 Pragma directive

Semantics

@@ -9383,6 +9574,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.10.7 Null directive

Semantics

@@ -9392,6 +9584,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. has no effect. +

Contents

6.10.8 Predefined macro names

The values of the predefined macros listed in the following subclauses176) (except for @@ -9410,6 +9603,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

6.10.8.1 Mandatory macros

The following macro names shall be defined by the implementation: @@ -9454,6 +9648,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Standard. +

Contents

6.10.8.2 Environment macros

The following macro names are conditionally defined by the implementation: @@ -9492,6 +9687,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

6.10.8.3 Conditional feature macros

The following macro names are conditionally defined by the implementation: @@ -9537,6 +9733,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. each revision of this International Standard. +

Contents

6.10.9 Pragma operator

Semantics

@@ -9572,57 +9769,70 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. LISTING ( ..\listing.dir ) +

Contents

6.11 Future language directions

+

Contents

6.11.1 Floating types

Future standardization may include additional floating-point types, including those with greater range, precision, or both than long double. +

Contents

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

Contents

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

Contents

6.11.4 Character escape sequences

Lowercase letters as escape sequences are reserved for future standardization. Other characters may be used in extensions. +

Contents

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

Contents

6.11.6 Function declarators

The use of function declarators with empty parentheses (not prototype-format parameter type declarators) is an obsolescent feature. +

Contents

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

Contents

6.11.8 Pragma directives

Pragmas whose first preprocessing token is STDC are reserved for future standardization. +

Contents

6.11.9 Predefined macro names

Macro names beginning with __STDC_ are reserved for future standardization. +

Contents

7. Library

+

Contents

7.1 Introduction

+

Contents

7.1.1 Definitions of terms

A string is a contiguous sequence of characters terminated by and including the first null @@ -9666,6 +9876,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. implementation's choice. +

Contents

7.1.2 Standard headers

Each library function is declared, with a type that includes a prototype, in a header,182) @@ -9722,6 +9933,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. implementations need not support; see 6.10.8.3. +

Contents

7.1.3 Reserved identifiers

Each header declares or defines all identifiers listed in its associated subclause, and @@ -9761,6 +9973,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. va_copy, and va_end. +

Contents

7.1.4 Use of library functions

Each of the following statements applies unless explicitly stated otherwise in the detailed @@ -9886,6 +10099,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

190) This allows implementations to parallelize operations if there are no visible side effects. +

Contents

7.2 Diagnostics <assert.h>

The header <assert.h> defines the assert and static_assert macros and @@ -9912,8 +10126,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. expands to _Static_assert. +

Contents

7.2.1 Program diagnostics

+

Contents

7.2.1.1 The assert macro

Synopsis

@@ -9946,8 +10162,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Assertion failed: expression, function abc, file xyz, line nnn. +

Contents

7.3 Complex arithmetic <complex.h>

+

Contents

7.3.1 Introduction

The header <complex.h> defines macros and declares functions that support complex @@ -10005,11 +10223,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.3.2 Conventions

Values are interpreted as radians, not degrees. An implementation may set errno but is not required to. +

Contents

7.3.3 Branch cuts

Some of the functions below have branch cuts, across which the function is @@ -10029,6 +10249,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.3.4 The CX_LIMITED_RANGE pragma

Synopsis

@@ -10066,8 +10287,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. where the programmer can determine they are safe. +

Contents

7.3.5 Trigonometric functions

+

Contents

7.3.5.1 The cacos functions

Synopsis

@@ -10087,6 +10310,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. mathematically unbounded along the imaginary axis and in the interval [0, pi ] along the real axis. +

Contents

7.3.5.2 The casin functions

Synopsis

@@ -10108,6 +10332,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. along the real axis. +

Contents

7.3.5.3 The catan functions

Synopsis

@@ -10127,6 +10352,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. mathematically unbounded along the imaginary axis and in the interval [-pi /2, +pi /2] along the real axis. +

Contents

7.3.5.4 The ccos functions

Synopsis

@@ -10143,6 +10369,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The ccos functions return the complex cosine value. +

Contents

7.3.5.5 The csin functions

Synopsis

@@ -10160,6 +10387,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The csin functions return the complex sine value. +

Contents

7.3.5.6 The ctan functions

Synopsis

@@ -10176,8 +10404,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The ctan functions return the complex tangent value. +

Contents

7.3.6 Hyperbolic functions

+

Contents

7.3.6.1 The cacosh functions

Synopsis

@@ -10197,6 +10427,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. half-strip of nonnegative values along the real axis and in the interval [-ipi , +ipi ] along the imaginary axis. +

Contents

7.3.6.2 The casinh functions

Synopsis

@@ -10217,6 +10448,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. strip mathematically unbounded along the real axis and in the interval [-ipi /2, +ipi /2] along the imaginary axis. +

Contents

7.3.6.3 The catanh functions

Synopsis

@@ -10236,6 +10468,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. strip mathematically unbounded along the real axis and in the interval [-ipi /2, +ipi /2] along the imaginary axis. +

Contents

7.3.6.4 The ccosh functions

Synopsis

@@ -10253,6 +10486,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The ccosh functions return the complex hyperbolic cosine value. +

Contents

7.3.6.5 The csinh functions

Synopsis

@@ -10269,6 +10503,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The csinh functions return the complex hyperbolic sine value. +

Contents

7.3.6.6 The ctanh functions

Synopsis

@@ -10285,8 +10520,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The ctanh functions return the complex hyperbolic tangent value. +

Contents

7.3.7 Exponential and logarithmic functions

+

Contents

7.3.7.1 The cexp functions

Synopsis

@@ -10304,6 +10541,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The cexp functions return the complex base-e exponential value. +

Contents

7.3.7.2 The clog functions

Synopsis

@@ -10323,8 +10561,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. mathematically unbounded along the real axis and in the interval [-ipi , +ipi ] along the imaginary axis. +

Contents

7.3.8 Power and absolute-value functions

+

Contents

7.3.8.1 The cabs functions

Synopsis

@@ -10342,6 +10582,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The cabs functions return the complex absolute value. +

Contents

7.3.8.2 The cpow functions

Synopsis

@@ -10361,6 +10602,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The cpow functions return the complex power function value. +

Contents

7.3.8.3 The csqrt functions

Synopsis

@@ -10379,8 +10621,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The csqrt functions return the complex square root value, in the range of the right half- plane (including the imaginary axis). +

Contents

7.3.9 Manipulation functions

+

Contents

7.3.9.1 The carg functions

Synopsis

@@ -10399,6 +10643,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The carg functions return the value of the argument in the interval [-pi , +pi ]. +

Contents

7.3.9.2 The cimag functions

Synopsis

@@ -10419,6 +10664,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.3.9.3 The CMPLX macros

Synopsis

@@ -10456,6 +10702,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.3.9.4 The conj functions

Synopsis

@@ -10473,6 +10720,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The conj functions return the complex conjugate value. +

Contents

7.3.9.5 The cproj functions

Synopsis

@@ -10495,6 +10743,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The cproj functions return the value of the projection onto the Riemann sphere. +

Contents

7.3.9.6 The creal functions

Synopsis

@@ -10521,6 +10770,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.4 Character handling <ctype.h>

The header <ctype.h> declares several functions useful for classifying and mapping @@ -10545,11 +10795,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. values lie from 0 (NUL) through 0x1F (US), and the character 0x7F (DEL). +

Contents

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

Contents

7.4.1.1 The isalnum function

Synopsis

@@ -10561,6 +10813,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isalnum function tests for any character for which isalpha or isdigit is true. +

Contents

7.4.1.2 The isalpha function

Synopsis

@@ -10584,6 +10837,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. characters; all four combinations are possible. +

Contents

7.4.1.3 The isblank function

Synopsis

@@ -10599,6 +10853,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. space (' '), and horizontal tab ('\t'). In the "C" locale, isblank returns true only for the standard blank characters. +

Contents

7.4.1.4 The iscntrl function

Synopsis

@@ -10610,6 +10865,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The iscntrl function tests for any control character. +

Contents

7.4.1.5 The isdigit function

Synopsis

@@ -10621,6 +10877,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isdigit function tests for any decimal-digit character (as defined in 5.2.1). +

Contents

7.4.1.6 The isgraph function

Synopsis

@@ -10637,6 +10894,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isgraph function tests for any printing character except space (' '). +

Contents

7.4.1.7 The islower function

Synopsis

@@ -10651,6 +10909,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. isspace is true. In the "C" locale, islower returns true only for the lowercase letters (as defined in 5.2.1). +

Contents

7.4.1.8 The isprint function

Synopsis

@@ -10662,6 +10921,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isprint function tests for any printing character including space (' '). +

Contents

7.4.1.9 The ispunct function

Synopsis

@@ -10676,6 +10936,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. locale, ispunct returns true for every printing character for which neither isspace nor isalnum is true. +

Contents

7.4.1.10 The isspace function

Synopsis

@@ -10692,6 +10953,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. ('\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. +

Contents

7.4.1.11 The isupper function

Synopsis

@@ -10706,6 +10968,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. isspace is true. In the "C" locale, isupper returns true only for the uppercase letters (as defined in 5.2.1). +

Contents

7.4.1.12 The isxdigit function

Synopsis

@@ -10717,8 +10980,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isxdigit function tests for any hexadecimal-digit character (as defined in 6.4.4.1). +

Contents

7.4.2 Character case mapping functions

+

Contents

7.4.2.1 The tolower function

Synopsis

@@ -10737,6 +11002,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. for any given locale); otherwise, the argument is returned unchanged. +

Contents

7.4.2.2 The toupper function

Synopsis

@@ -10755,6 +11021,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. for any given locale); otherwise, the argument is returned unchanged. +

Contents

7.5 Errors <errno.h>

The header <errno.h> defines several macros, all relating to the reporting of error @@ -10802,6 +11069,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

203) See ''future library directions'' (7.30.3). +

Contents

7.6 Floating-point environment <fenv.h>

The header <fenv.h> defines several macros, and declares types and functions that @@ -10921,6 +11189,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. FLT_ROUNDS, they are not required to do so. +

Contents

7.6.1 The FENV_ACCESS pragma

Synopsis

@@ -10985,6 +11254,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. ''off'', just one evaluation of x + 1 would suffice. +

Contents

7.6.2 Floating-point exceptions

The following functions provide access to the floating-point status flags.212) The int @@ -11001,6 +11271,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. content of flags. +

Contents

7.6.2.1 The feclearexcept function

Synopsis

@@ -11020,6 +11291,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.6.2.2 The fegetexceptflag function

Synopsis

@@ -11038,6 +11310,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fegetexceptflag function returns zero if the representation was successfully stored. Otherwise, it returns a nonzero value. +

Contents

7.6.2.3 The feraiseexcept function

Synopsis

@@ -11068,6 +11341,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. in F.8.6 is in the same spirit. +

Contents

7.6.2.4 The fesetexceptflag function

Synopsis

@@ -11090,6 +11364,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. all the specified flags were successfully set to the appropriate state. Otherwise, it returns a nonzero value. +

Contents

7.6.2.5 The fetestexcept function

Synopsis

@@ -11134,11 +11409,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.6.3 Rounding

The fegetround and fesetround functions provide control of rounding direction modes. +

Contents

7.6.3.1 The fegetround function

Synopsis

@@ -11155,6 +11432,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.6.3.2 The fesetround function

Synopsis

@@ -11193,11 +11471,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.6.4 Environment

The functions in this section manage the floating-point environment -- status flags and control modes -- as one entity. +

Contents

7.6.4.1 The fegetenv function

Synopsis

@@ -11214,6 +11494,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fegetenv function returns zero if the environment was successfully stored. Otherwise, it returns a nonzero value. +

Contents

7.6.4.2 The feholdexcept function

Synopsis

@@ -11240,6 +11521,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. function to write routines that hide spurious floating-point exceptions from their callers. +

Contents

7.6.4.3 The fesetenv function

Synopsis

@@ -11259,6 +11541,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fesetenv function returns zero if the environment was successfully established. Otherwise, it returns a nonzero value. +

Contents

7.6.4.4 The feupdateenv function

Synopsis

@@ -11304,6 +11587,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. } +

Contents

7.7 Characteristics of floating types <float.h>

The header <float.h> defines several macros that expand to various limits and @@ -11313,6 +11597,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. in 5.2.4.2.2. +

Contents

7.8 Format conversion of integer types <inttypes.h>

The header <inttypes.h> includes the header <stdint.h> and extends it with @@ -11333,6 +11618,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

216) See ''future library directions'' (7.30.4). +

Contents

7.8.1 Macros for format specifiers

Each of the following object-like macros expands to a character string literal containing a * @@ -11401,8 +11687,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. same. +

Contents

7.8.2 Functions for greatest-width integer types

+

Contents

7.8.2.1 The imaxabs function

Synopsis

@@ -11427,6 +11715,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.8.2.2 The imaxdiv function

Synopsis

@@ -11445,6 +11734,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.8.2.3 The strtoimax and strtoumax functions

Synopsis

@@ -11471,6 +11761,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.22.1.4). +

Contents

7.8.2.4 The wcstoimax and wcstoumax functions

Synopsis

@@ -11498,6 +11789,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.28.4.1.2). +

Contents

7.9 Alternative spellings <iso646.h>

The header <iso646.h> defines the following eleven macros (on the left) that expand @@ -11517,6 +11809,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. xor_eq ^= +

Contents

7.10 Sizes of integer types <limits.h>

The header <limits.h> defines several macros that expand to various limits and @@ -11526,6 +11819,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. in 5.2.4.2.1. +

Contents

7.11 Localization <locale.h>

The header <locale.h> declares two functions, one type, and defines several macros. @@ -11586,8 +11880,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

220) See ''future library directions'' (7.30.5). +

Contents

7.11.1 Locale control

+

Contents

7.11.1.1 The setlocale function

Synopsis

@@ -11653,8 +11949,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. locale when category has the value LC_ALL. +

Contents

7.11.2 Numeric formatting convention inquiry

+

Contents

7.11.2.1 The localeconv function

Synopsis

@@ -11919,6 +12217,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 4 $+1.25 $+ 1.25 $ +1.25 +

Contents

7.12 Mathematics <math.h>

The header <math.h> declares two types and many mathematical functions and defines @@ -12047,6 +12346,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. substantially slower. +

Contents

7.12.1 Treatment of error conditions

The behavior of each of the functions in <math.h> is specified for all representable @@ -12120,6 +12420,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

230) Math errors are being indicated by the floating-point exception flags rather than by errno. +

Contents

7.12.2 The FP_CONTRACT pragma

Synopsis

@@ -12142,11 +12443,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. context, the behavior is undefined. The default state (''on'' or ''off'') for the pragma is implementation-defined. +

Contents

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

Contents

7.12.3.1 The fpclassify macro

Synopsis

@@ -12174,6 +12477,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. become subnormal when converted to double, and zero when converted to float. +

Contents

7.12.3.2 The isfinite macro

Synopsis

@@ -12192,6 +12496,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The isfinite macro returns a nonzero value if and only if its argument has a finite value. +

Contents

7.12.3.3 The isinf macro

Synopsis

@@ -12209,6 +12514,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The isinf macro returns a nonzero value if and only if its argument has an infinite value. +

Contents

7.12.3.4 The isnan macro

Synopsis

@@ -12233,6 +12539,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. NaNs in the evaluation type but not in the semantic type. +

Contents

7.12.3.5 The isnormal macro

Synopsis

@@ -12251,6 +12558,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The isnormal macro returns a nonzero value if and only if its argument has a normal value. +

Contents

7.12.3.6 The signbit macro

Synopsis

@@ -12276,8 +12584,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. unsigned, it is treated as positive. +

Contents

7.12.4 Trigonometric functions

+

Contents

7.12.4.1 The acos functions

Synopsis

@@ -12295,6 +12605,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The acos functions return arccos x in the interval [0, pi ] radians. +

Contents

7.12.4.2 The asin functions

Synopsis

@@ -12312,6 +12623,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The asin functions return arcsin x in the interval [-pi /2, +pi /2] radians. +

Contents

7.12.4.3 The atan functions

Synopsis

@@ -12329,6 +12641,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The atan functions return arctan x in the interval [-pi /2, +pi /2] radians. +

Contents

7.12.4.4 The atan2 functions

Synopsis

@@ -12347,6 +12660,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The atan2 functions return arctan y/x in the interval [-pi , +pi ] radians. +

Contents

7.12.4.5 The cos functions

Synopsis

@@ -12363,6 +12677,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The cos functions return cos x. +

Contents

7.12.4.6 The sin functions

Synopsis

@@ -12380,6 +12695,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The sin functions return sin x. +

Contents

7.12.4.7 The tan functions

Synopsis

@@ -12396,8 +12712,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The tan functions return tan x. +

Contents

7.12.5 Hyperbolic functions

+

Contents

7.12.5.1 The acosh functions

Synopsis

@@ -12415,6 +12733,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The acosh functions return arcosh x in the interval [0, +(inf)]. +

Contents

7.12.5.2 The asinh functions

Synopsis

@@ -12432,6 +12751,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The asinh functions return arsinh x. +

Contents

7.12.5.3 The atanh functions

Synopsis

@@ -12450,6 +12770,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The atanh functions return artanh x. +

Contents

7.12.5.4 The cosh functions

Synopsis

@@ -12467,6 +12788,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The cosh functions return cosh x. +

Contents

7.12.5.5 The sinh functions

Synopsis

@@ -12485,6 +12807,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The sinh functions return sinh x. +

Contents

7.12.5.6 The tanh functions

Synopsis

@@ -12501,8 +12824,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The tanh functions return tanh x. +

Contents

7.12.6 Exponential and logarithmic functions

+

Contents

7.12.6.1 The exp functions

Synopsis

@@ -12520,6 +12845,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The exp functions return ex . +

Contents

7.12.6.2 The exp2 functions

Synopsis

@@ -12538,6 +12864,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The exp2 functions return 2x . +

Contents

7.12.6.3 The expm1 functions

Synopsis

@@ -12559,6 +12886,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.12.6.4 The frexp functions

Synopsis

@@ -12584,6 +12912,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.12.6.5 The ilogb functions

Synopsis

@@ -12606,6 +12935,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The ilogb functions return the exponent of x as a signed int value.

Forward references: the logb functions (7.12.6.11). +

Contents

7.12.6.6 The ldexp functions

Synopsis

@@ -12623,6 +12953,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The ldexp functions return x x 2exp . +

Contents

7.12.6.7 The log functions

Synopsis

@@ -12641,6 +12972,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The log functions return loge x. +

Contents

7.12.6.8 The log10 functions

Synopsis

@@ -12658,6 +12990,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The log10 functions return log10 x. +

Contents

7.12.6.9 The log1p functions

Synopsis

@@ -12685,6 +13018,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.12.6.10 The log2 functions

Synopsis

@@ -12702,6 +13036,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The log2 functions return log2 x. +

Contents

7.12.6.11 The logb functions

Synopsis

@@ -12724,6 +13059,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The logb functions return the signed exponent of x. +

Contents

7.12.6.12 The modf functions

Synopsis

@@ -12743,6 +13079,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The modf functions return the signed fractional part of value. +

Contents

7.12.6.13 The scalbn and scalbln functions

Synopsis

@@ -12763,8 +13100,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The scalbn and scalbln functions return x x FLT_RADIXn . +

Contents

7.12.7 Power and absolute-value functions

+

Contents

7.12.7.1 The cbrt functions

Synopsis

@@ -12782,6 +13121,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The cbrt functions return x1/3 . +

Contents

7.12.7.2 The fabs functions

Synopsis

@@ -12798,6 +13138,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The fabs functions return | x |. +

Contents

7.12.7.3 The hypot functions

Synopsis

@@ -12820,6 +13161,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. ----- +

Contents

7.12.7.4 The pow functions

Synopsis

@@ -12840,6 +13182,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The pow functions return xy . +

Contents

7.12.7.5 The sqrt functions

Synopsis

@@ -12861,8 +13204,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. - +

Contents

7.12.8 Error and gamma functions

+

Contents

7.12.8.1 The erf functions

Synopsis

@@ -12890,6 +13235,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.12.8.2 The erfc functions

Synopsis

@@ -12919,6 +13265,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.12.8.3 The lgamma functions

Synopsis

@@ -12937,6 +13284,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The lgamma functions return loge | (Gamma)(x) |. +

Contents

7.12.8.4 The tgamma functions

Synopsis

@@ -12956,8 +13304,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The tgamma functions return (Gamma)(x). +

Contents

7.12.9 Nearest integer functions

+

Contents

7.12.9.1 The ceil functions

Synopsis

@@ -12974,6 +13324,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The ceil functions return [^x^], expressed as a floating-point number. +

Contents

7.12.9.2 The floor functions

Synopsis

@@ -12990,6 +13341,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The floor functions return [_x_], expressed as a floating-point number. +

Contents

7.12.9.3 The nearbyint functions

Synopsis

@@ -13009,6 +13361,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The nearbyint functions return the rounded integer value. +

Contents

7.12.9.4 The rint functions

Synopsis

@@ -13027,6 +13380,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The rint functions return the rounded integer value. +

Contents

7.12.9.5 The lrint and llrint functions

Synopsis

@@ -13050,6 +13404,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The lrint and llrint functions return the rounded integer value. +

Contents

7.12.9.6 The round functions

Synopsis

@@ -13068,6 +13423,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The round functions return the rounded integer value. +

Contents

7.12.9.7 The lround and llround functions

Synopsis

@@ -13090,6 +13446,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The lround and llround functions return the rounded integer value. +

Contents

7.12.9.8 The trunc functions

Synopsis

@@ -13108,8 +13465,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The trunc functions return the truncated integer value. +

Contents

7.12.10 Remainder functions

+

Contents

7.12.10.1 The fmod functions

Synopsis

@@ -13129,6 +13488,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. whether a domain error occurs or the fmod functions return zero is implementation- defined. +

Contents

7.12.10.2 The remainder functions

Synopsis

@@ -13158,6 +13518,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. all implementations. +

Contents

7.12.10.3 The remquo functions

Synopsis

@@ -13180,8 +13541,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. pointed to by quo is unspecified and whether a domain error occurs or the functions return zero is implementation defined. +

Contents

7.12.11 Manipulation functions

+

Contents

7.12.11.1 The copysign functions

Synopsis

@@ -13202,6 +13565,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The copysign functions return a value with the magnitude of x and the sign of y. +

Contents

7.12.11.2 The nan functions

Synopsis

@@ -13225,6 +13589,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. If the implementation does not support quiet NaNs, the functions return zero.

Forward references: the strtod, strtof, and strtold functions (7.22.1.3). +

Contents

7.12.11.3 The nextafter functions

Synopsis

@@ -13254,6 +13619,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. function. +

Contents

7.12.11.4 The nexttoward functions

Synopsis

@@ -13274,8 +13640,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. range or precision in a floating second argument. +

Contents

7.12.12 Maximum, minimum, and positive difference functions

+

Contents

7.12.12.1 The fdim functions

Synopsis

@@ -13298,6 +13666,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The fdim functions return the positive difference value. +

Contents

7.12.12.2 The fmax functions

Synopsis

@@ -13323,6 +13692,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. fmax functions choose the numeric value. See F.10.9.2. +

Contents

7.12.12.3 The fmin functions

Synopsis

@@ -13343,8 +13713,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.12.13 Floating multiply-add

+

Contents

7.12.13.1 The fma functions

Synopsis

@@ -13369,6 +13741,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.12.14 Comparison macros

The relational and equality operators support the usual mathematical relationships @@ -13394,6 +13767,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. type is unspecified. +

Contents

7.12.14.1 The isgreater macro

Synopsis

@@ -13411,6 +13785,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isgreater macro returns the value of (x) > (y). +

Contents

7.12.14.2 The isgreaterequal macro

Synopsis

@@ -13433,6 +13808,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isgreaterequal macro returns the value of (x) >= (y). +

Contents

7.12.14.3 The isless macro

Synopsis

@@ -13450,6 +13826,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The isless macro returns the value of (x) < (y). +

Contents

7.12.14.4 The islessequal macro

Synopsis

@@ -13468,6 +13845,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The islessequal macro returns the value of (x) <= (y). +

Contents

7.12.14.5 The islessgreater macro

Synopsis

@@ -13486,6 +13864,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The islessgreater macro returns the value of (x) < (y) || (x) > (y). +

Contents

7.12.14.6 The isunordered macro

Synopsis

@@ -13501,6 +13880,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The isunordered macro returns 1 if its arguments are unordered and 0 otherwise. +

Contents

7.13 Nonlocal jumps <setjmp.h>

The header <setjmp.h> defines the macro setjmp, and declares one function and @@ -13526,8 +13906,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. a program. +

Contents

7.13.1 Save calling environment

+

Contents

7.13.1.1 The setjmp macro

Synopsis

@@ -13562,8 +13944,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

If the invocation appears in any other context, the behavior is undefined. +

Contents

7.13.2 Restore calling environment

+

Contents

7.13.2.1 The longjmp function

Synopsis

@@ -13632,6 +14016,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.14 Signal handling <signal.h>

The header <signal.h> declares a type and two functions and defines several macros, @@ -13683,8 +14068,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. and termination. +

Contents

7.14.1 Specify signal handling

+

Contents

7.14.1.1 The signal function

Synopsis

@@ -13755,8 +14142,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.14.2 Send signal

+

Contents

7.14.2.1 The raise function

Synopsis

@@ -13774,6 +14163,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The raise function returns zero if successful, nonzero if unsuccessful. +

Contents

7.15 Alignment <stdalign.h>

The header <stdalign.h> defines two macros. @@ -13791,6 +14181,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which expands to the integer constant 1. +

Contents

7.16 Variable arguments <stdarg.h>

The header <stdarg.h> declares a type and defines four macros, for advancing @@ -13819,6 +14210,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. case the original function may make further use of the original list after the other function returns. +

Contents

7.16.1 Variable argument list access macros

The va_start and va_arg macros described in this subclause shall be implemented @@ -13829,6 +14221,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. shall be matched by a corresponding invocation of the va_end macro in the same function. +

Contents

7.16.1.1 The va_arg macro

Synopsis

@@ -13861,6 +14254,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. value of the argument after that specified by parmN . Successive invocations return the values of the remaining arguments in succession. +

Contents

7.16.1.2 The va_copy macro

Synopsis

@@ -13879,6 +14273,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The va_copy macro returns no value. +

Contents

7.16.1.3 The va_end macro

Synopsis

@@ -13900,6 +14295,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The va_end macro returns no value. +

Contents

7.16.1.4 The va_start macro

Synopsis

@@ -13983,8 +14379,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. } +

Contents

7.17 Atomics <stdatomic.h>

+

Contents

7.17.1 Introduction

The header <stdatomic.h> defines several macros and declares several types and @@ -14049,8 +14447,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. operations to volatile objects. +

Contents

7.17.2 Initialization

+

Contents

7.17.2.1 The ATOMIC_VAR_INIT macro

Synopsis

@@ -14076,6 +14476,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.17.2.2 The atomic_init generic function

Synopsis

@@ -14104,6 +14505,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.17.3 Order and consistency

The enumerated type memory_order specifies the detailed regular (non-atomic) @@ -14245,6 +14647,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

251) Among other implications, atomic variables shall not decay. +

Contents

7.17.3.1 The kill_dependency macro

Synopsis

@@ -14261,6 +14664,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The kill_dependency macro returns the value of y. +

Contents

7.17.4 Fences

This subclause introduces synchronization primitives called fences. Fences can have @@ -14284,6 +14688,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. sequenced before B and reads the value written by A or a value written by any side effect in the release sequence headed by A. +

Contents

7.17.4.1 The atomic_thread_fence function

Synopsis

@@ -14309,6 +14714,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The atomic_thread_fence function returns no value. +

Contents

7.17.4.2 The atomic_signal_fence function

Synopsis

@@ -14334,6 +14740,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The atomic_signal_fence function returns no value. +

Contents

7.17.5 Lock-free property

The atomic lock-free macros indicate the lock-free property of integer and address atomic @@ -14346,6 +14753,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. process more than once and memory shared between two processes. +

Contents

7.17.5.1 The atomic_is_lock_free generic function

Synopsis

@@ -14364,6 +14772,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. inferred from the result of a lock-free query on another object. +

Contents

7.17.6 Atomic integer and address types

For each line in the following table, the atomic type name is declared as the @@ -14422,11 +14831,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. to port existing code. +

Contents

7.17.7 Operations on atomic types

There are only a few kinds of operations on atomic types, though there are many instances of those kinds. This subclause specifies each general kind. +

Contents

7.17.7.1 The atomic_store generic functions

Synopsis

@@ -14446,6 +14857,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The atomic_store generic functions return no value. +

Contents

7.17.7.2 The atomic_load generic functions

Synopsis

@@ -14463,6 +14875,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Atomically returns the value pointed to by object. +

Contents

7.17.7.3 The atomic_exchange generic functions

Synopsis

@@ -14481,6 +14894,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Atomically returns the value pointed to by object immediately before the effects. +

Contents

7.17.7.4 The atomic_compare_exchange generic functions

Synopsis

@@ -14541,6 +14955,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The result of the comparison. +

Contents

7.17.7.5 The atomic_fetch and modify generic functions

The following operations perform arithmetic and bitwise computations. All of these @@ -14582,6 +14997,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. atomic_fetch and modify generic functions is the previous value of the atomic object. +

Contents

7.17.8 Atomic flag type and operations

The atomic_flag type provides the classic test-and-set functionality. It has two @@ -14605,6 +15021,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.17.8.1 The atomic_flag_test_and_set functions

Synopsis

@@ -14625,6 +15042,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Atomically, the value of the object immediately before the effects. +

Contents

7.17.8.2 The atomic_flag_clear functions

Synopsis

@@ -14644,6 +15062,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The atomic_flag_clear functions return no value. +

Contents

7.18 Boolean type and values <stdbool.h>

The header <stdbool.h> defines four macros. @@ -14681,6 +15100,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

252) See ''future library directions'' (7.30.7). +

Contents

7.19 Common definitions <stddef.h>

The header <stddef.h> defines the following macros and declares the following types. @@ -14736,6 +15156,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: localization (7.11). +

Contents

7.20 Integer types <stdint.h>

The header <stdint.h> declares sets of integer types having specified widths, and @@ -14768,6 +15189,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.20.1 Integer types

When typedef names differing only in the absence or presence of the initial u are defined, @@ -14782,6 +15204,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.20.1.1 Exact-width integer types

The typedef name intN_t designates a signed integer type with width N , no padding @@ -14796,6 +15219,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.20.1.2 Minimum-width integer types

The typedef name int_leastN_t designates a signed integer type with a width of at @@ -14816,6 +15240,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. All other types of this form are optional. +

Contents

7.20.1.3 Fastest minimum-width integer types

Each of the following types designates an integer type that is usually fastest255) to operate @@ -14845,6 +15270,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. signedness and width requirements. +

Contents

7.20.1.4 Integer types capable of holding object pointers

The following type designates a signed integer type with the property that any valid @@ -14861,6 +15287,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. These types are optional. +

Contents

7.20.1.5 Greatest-width integer types

The following type designates a signed integer type capable of representing any value of @@ -14875,6 +15302,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. These types are required. +

Contents

7.20.2 Limits of specified-width integer types

The following object-like macros specify the minimum and maximum limits of the types * @@ -14889,6 +15317,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. except where stated to be exactly the given value. +

Contents

7.20.2.1 Limits of exact-width integer types

+

Contents

7.20.2.2 Limits of minimum-width integer types

+

Contents

7.20.2.3 Limits of fastest minimum-width integer types

+

Contents

7.20.2.4 Limits of integer types capable of holding object pointers

+

Contents

7.20.2.5 Limits of greatest-width integer types

+

Contents

7.20.3 Limits of other integer types

The following object-like macros specify the minimum and maximum limits of integer * @@ -15014,6 +15448,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. character set. +

Contents

7.20.4 Macros for integer constants

The following function-like macros expand to integer constants suitable for initializing * @@ -15028,6 +15463,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the same type as would an expression of the corresponding type converted according to the integer promotions. The value of the expression shall be that of the argument. +

Contents

7.20.4.1 Macros for minimum-width integer constants

The macro INTN_C(value) shall expand to an integer constant expression @@ -15041,6 +15477,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.20.4.2 Macros for greatest-width integer constants

The following macro expands to an integer constant expression having the value specified @@ -15055,8 +15492,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. UINTMAX_C(value) +

Contents

7.21 Input/output <stdio.h>

+

Contents

7.21.1 Introduction

The header <stdio.h> defines several macros, and declares three types and many @@ -15168,6 +15607,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. all possible strings of length FILENAME_MAX cannot be expected to be opened successfully. +

Contents

7.21.2 Streams

Input and output, whether to or from physical devices such as terminals and tape drives, @@ -15246,6 +15686,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.21.3 Files

A stream is associated with an external file (which may be a physical device) by opening @@ -15358,8 +15799,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. with state-dependent encoding that does not assuredly end in the initial shift state. +

Contents

7.21.4 Operations on files

+

Contents

7.21.4.1 The remove function

Synopsis

@@ -15377,6 +15820,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The remove function returns zero if the operation succeeds, nonzero if it fails. +

Contents

7.21.4.2 The rename function

Synopsis

@@ -15401,6 +15845,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. or that it is necessary to copy its contents to effectuate its renaming. +

Contents

7.21.4.3 The tmpfile function

Synopsis

@@ -15426,6 +15871,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. cannot be created, the tmpfile function returns a null pointer.

Forward references: the fopen function (7.21.5.3). +

Contents

7.21.4.4 The tmpnam function

Synopsis

@@ -15467,8 +15913,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. is ended, and before program termination. +

Contents

7.21.5 File access functions

+

Contents

7.21.5.1 The fclose function

Synopsis

@@ -15490,6 +15938,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. errors were detected. +

Contents

7.21.5.2 The fflush function

Synopsis

@@ -15512,6 +15961,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. error occurs, otherwise it returns zero.

Forward references: the fopen function (7.21.5.3). +

Contents

7.21.5.3 The fopen function

Synopsis

@@ -15586,6 +16036,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. conform to the properties in 7.21.2). +

Contents

7.21.5.4 The freopen function

Synopsis

@@ -15620,6 +16071,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returned by the fopen function may be assigned. +

Contents

7.21.5.5 The setbuf function

Synopsis

@@ -15643,6 +16095,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The setbuf function returns no value.

Forward references: the setvbuf function (7.21.5.6). +

Contents

7.21.5.6 The setvbuf function

Synopsis

@@ -15679,6 +16132,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. before a buffer that has automatic storage duration is deallocated upon block exit. +

Contents

7.21.6 Formatted input/output functions

The formatted input/output functions shall behave as if there is a sequence point after the @@ -15688,6 +16142,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.21.6.1 The fprintf function

Synopsis

@@ -16095,6 +16550,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the case of fixed-point conversion by the source value as well. +

Contents

7.21.6.2 The fscanf function

Synopsis

@@ -16499,6 +16955,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

280) See ''future library directions'' (7.30.9). +

Contents

7.21.6.3 The printf function

Synopsis

@@ -16515,6 +16972,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The printf function returns the number of characters transmitted, or a negative value if an output or encoding error occurred. +

Contents

7.21.6.4 The scanf function

Synopsis

@@ -16534,6 +16992,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.21.6.5 The snprintf function

Synopsis

@@ -16557,6 +17016,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.21.6.6 The sprintf function

Synopsis

@@ -16577,6 +17037,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. counting the terminating null character, or a negative value if an encoding error occurred. +

Contents

7.21.6.7 The sscanf function

Synopsis

@@ -16598,6 +17059,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.21.6.8 The vfprintf function

Synopsis

@@ -16646,6 +17108,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. vsscanf invoke the va_arg macro, the value of arg after the return is indeterminate. +

Contents

7.21.6.9 The vfscanf function

Synopsis

@@ -16669,6 +17132,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.21.6.10 The vprintf function

Synopsis

@@ -16690,6 +17154,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The vprintf function returns the number of characters transmitted, or a negative value if an output or encoding error occurred. +

Contents

7.21.6.11 The vscanf function

Synopsis

@@ -16712,6 +17177,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.21.6.12 The vsnprintf function

Synopsis

@@ -16737,6 +17203,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.21.6.13 The vsprintf function

Synopsis

@@ -16759,6 +17226,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.21.6.14 The vsscanf function

Synopsis

@@ -16783,8 +17251,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.21.7 Character input/output functions

+

Contents

7.21.7.1 The fgetc function

Synopsis

@@ -16810,6 +17280,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.21.7.2 The fgets function

Synopsis

@@ -16833,6 +17304,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.21.7.3 The fputc function

Synopsis

@@ -16852,6 +17324,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fputc function returns the character written. If a write error occurs, the error indicator for the stream is set and fputc returns EOF. +

Contents

7.21.7.4 The fputs function

Synopsis

@@ -16869,6 +17342,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fputs function returns EOF if a write error occurs; otherwise it returns a nonnegative value. +

Contents

7.21.7.5 The getc function

Synopsis

@@ -16889,6 +17363,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. getc returns EOF. If a read error occurs, the error indicator for the stream is set and getc returns EOF. +

Contents

7.21.7.6 The getchar function

Synopsis

@@ -16906,6 +17381,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. getchar returns EOF. If a read error occurs, the error indicator for the stream is set and getchar returns EOF. * +

Contents

7.21.7.7 The putc function

Synopsis

@@ -16923,6 +17399,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The putc function returns the character written. If a write error occurs, the error indicator for the stream is set and putc returns EOF. +

Contents

7.21.7.8 The putchar function

Synopsis

@@ -16939,6 +17416,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The putchar function returns the character written. If a write error occurs, the error indicator for the stream is set and putchar returns EOF. +

Contents

7.21.7.9 The puts function

Synopsis

@@ -16956,6 +17434,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The puts function returns EOF if a write error occurs; otherwise it returns a nonnegative value. +

Contents

7.21.7.10 The ungetc function

Synopsis

@@ -16998,8 +17477,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

283) See ''future library directions'' (7.30.9). +

Contents

7.21.8 Direct input/output functions

+

Contents

7.21.8.1 The fread function

Synopsis

@@ -17030,6 +17511,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.21.8.2 The fwrite function

Synopsis

@@ -17054,8 +17536,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.21.9 File positioning functions

+

Contents

7.21.9.1 The fgetpos function

Synopsis

@@ -17077,6 +17561,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: the fsetpos function (7.21.9.3). +

Contents

7.21.9.2 The fseek function

Synopsis

@@ -17108,6 +17593,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The fseek function returns nonzero only for a request that cannot be satisfied.

Forward references: the ftell function (7.21.9.4). +

Contents

7.21.9.3 The fsetpos function

Synopsis

@@ -17133,6 +17619,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. If successful, the fsetpos function returns zero; on failure, the fsetpos function returns nonzero and stores an implementation-defined positive value in errno. +

Contents

7.21.9.4 The ftell function

Synopsis

@@ -17155,6 +17642,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. for the stream. On failure, the ftell function returns -1L and stores an implementation-defined positive value in errno. +

Contents

7.21.9.5 The rewind function

Synopsis

@@ -17175,8 +17663,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The rewind function returns no value. +

Contents

7.21.10 Error-handling functions

+

Contents

7.21.10.1 The clearerr function

Synopsis

@@ -17192,6 +17682,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The clearerr function returns no value. +

Contents

7.21.10.2 The feof function

Synopsis

@@ -17207,6 +17698,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The feof function returns nonzero if and only if the end-of-file indicator is set for stream. +

Contents

7.21.10.3 The ferror function

Synopsis

@@ -17223,6 +17715,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. stream. +

Contents

7.21.10.4 The perror function

Synopsis

@@ -17244,6 +17737,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: the strerror function (7.23.6.2). +

Contents

7.22 General utilities <stdlib.h>

The header <stdlib.h> declares five types and several functions of general utility, and @@ -17295,12 +17789,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

284) See ''future library directions'' (7.30.10). +

Contents

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

Contents

7.22.1.1 The atof function

Synopsis

@@ -17320,6 +17816,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The atof function returns the converted value.

Forward references: the strtod, strtof, and strtold functions (7.22.1.3). +

Contents

7.22.1.2 The atoi, atol, and atoll functions

Synopsis

@@ -17346,6 +17843,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. (7.22.1.4). +

Contents

7.22.1.3 The strtod, strtof, and strtold functions

Synopsis

@@ -17458,6 +17956,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. to the same internal floating value, but if not will round to adjacent values. +

Contents

7.22.1.4 The strtol, strtoll, strtoul, and strtoull functions

Synopsis

@@ -17534,8 +18033,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. and sign of the value, if any), and the value of the macro ERANGE is stored in errno. +

Contents

7.22.2 Pseudo-random sequence generation functions

+

Contents

7.22.2.1 The rand function

Synopsis

@@ -17563,6 +18064,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. particular requirements should use a generator that is known to be sufficient for their needs. +

Contents

7.22.2.2 The srand function

Synopsis

@@ -17603,6 +18105,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.22.3 Memory management functions

The order and contiguity of storage allocated by successive calls to the @@ -17618,6 +18121,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.22.3.1 The aligned_alloc function

Synopsis

@@ -17637,6 +18141,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. space. +

Contents

7.22.3.2 The calloc function

Synopsis

@@ -17657,6 +18162,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. constant. +

Contents

7.22.3.3 The free function

Synopsis

@@ -17675,6 +18181,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The free function returns no value. +

Contents

7.22.3.4 The malloc function

Synopsis

@@ -17695,6 +18202,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The malloc function returns either a null pointer or a pointer to the allocated space. +

Contents

7.22.3.5 The realloc function

Synopsis

@@ -17721,8 +18229,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. value as a pointer to the old object), or a null pointer if the new object could not be allocated. +

Contents

7.22.4 Communication with the environment

+

Contents

7.22.4.1 The abort function

Synopsis

@@ -17743,6 +18253,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The abort function does not return to its caller. +

Contents

7.22.4.2 The atexit function

Synopsis

@@ -17768,6 +18279,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. applications may need to call both registration functions with the same argument. +

Contents

7.22.4.3 The at_quick_exit function

Synopsis

@@ -17796,6 +18308,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. applications may need to call both registration functions with the same argument. +

Contents

7.22.4.4 The exit function

Synopsis

@@ -17833,6 +18346,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. other registered functions. +

Contents

7.22.4.5 The _Exit function

Synopsis

@@ -17856,6 +18370,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The _Exit function cannot return to its caller. +

Contents

7.22.4.6 The getenv function

Synopsis

@@ -17883,6 +18398,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

293) Many implementations provide non-standard functions that modify the environment list. +

Contents

7.22.4.7 The quick_exit function

Synopsis

@@ -17917,6 +18433,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. other registered functions. +

Contents

7.22.4.8 The system function

Synopsis

@@ -17937,6 +18454,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. command processor is available. If the argument is not a null pointer, and the system function does return, it returns an implementation-defined value. +

Contents

7.22.5 Searching and sorting utilities

These utilities make use of a comparison function to search or sort arrays of unspecified @@ -17980,6 +18498,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.22.5.1 The bsearch function

Synopsis

@@ -18014,6 +18533,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.22.5.2 The qsort function

Synopsis

@@ -18038,8 +18558,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The qsort function returns no value. +

Contents

7.22.6 Integer arithmetic functions

+

Contents

7.22.6.1 The abs, labs and llabs functions

Synopsis

@@ -18066,6 +18588,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.22.6.2 The div, ldiv, and lldiv functions

Synopsis

@@ -18087,6 +18610,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. each of which has the same type as the arguments numer and denom. If either part of the result cannot be represented, the behavior is undefined. +

Contents

7.22.7 Multibyte/wide character conversion functions

The behavior of the multibyte character functions is affected by the LC_CTYPE category @@ -18103,6 +18627,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. character codes, but are grouped with an adjacent multibyte character. +

Contents

7.22.7.1 The mblen function

Synopsis

@@ -18135,6 +18660,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. multibyte character).

Forward references: the mbtowc function (7.22.7.2). +

Contents

7.22.7.2 The mbtowc function

Synopsis

@@ -18168,6 +18694,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. macro. +

Contents

7.22.7.3 The wctomb function

Synopsis

@@ -18196,11 +18723,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

In no case will the value returned be greater than the value of the MB_CUR_MAX macro. +

Contents

7.22.8 Multibyte/wide string conversion functions

The behavior of the multibyte string functions is affected by the LC_CTYPE category of the current locale. +

Contents

7.22.8.1 The mbstowcs function

Synopsis

@@ -18233,6 +18762,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.22.8.2 The wcstombs function

Synopsis

@@ -18265,8 +18795,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.23 String handling <string.h>

+

Contents

7.23.1 String function conventions

The header <string.h> declares one type and several functions, and defines one @@ -18292,8 +18824,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

300) See ''future library directions'' (7.30.11). +

Contents

7.23.2 Copying functions

+

Contents

7.23.2.1 The memcpy function

Synopsis

@@ -18317,6 +18851,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.23.2.2 The memmove function

Synopsis

@@ -18335,6 +18870,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The memmove function returns the value of s1. +

Contents

7.23.2.3 The strcpy function

Synopsis

@@ -18352,6 +18888,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The strcpy function returns the value of s1. +

Contents

7.23.2.4 The strncpy function

Synopsis

@@ -18380,8 +18917,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. not be null-terminated. +

Contents

7.23.3 Concatenation functions

+

Contents

7.23.3.1 The strcat function

Synopsis

@@ -18400,6 +18939,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The strcat function returns the value of s1. +

Contents

7.23.3.2 The strncat function

Synopsis

@@ -18428,6 +18968,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. strlen(s1)+n+1. +

Contents

7.23.4 Comparison functions

The sign of a nonzero value returned by the comparison functions memcmp, strcmp, @@ -18435,6 +18976,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. pair of characters (both interpreted as unsigned char) that differ in the objects being compared. +

Contents

7.23.4.1 The memcmp function

Synopsis

@@ -18458,6 +19000,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. comparison. +

Contents

7.23.4.2 The strcmp function

Synopsis

@@ -18477,6 +19020,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. pointed to by s2. +

Contents

7.23.4.3 The strcoll function

Synopsis

@@ -18494,6 +19038,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.23.4.4 The strncmp function

Synopsis

@@ -18512,6 +19057,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.23.4.5 The strxfrm function

Synopsis

@@ -18545,8 +19091,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.23.5 Search functions

+

Contents

7.23.5.1 The memchr function

Synopsis

@@ -18565,6 +19113,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The memchr function returns a pointer to the located character, or a null pointer if the character does not occur in the object. +

Contents

7.23.5.2 The strchr function

Synopsis

@@ -18583,6 +19132,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The strchr function returns a pointer to the located character, or a null pointer if the character does not occur in the string. +

Contents

7.23.5.3 The strcspn function

Synopsis

@@ -18599,6 +19149,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The strcspn function returns the length of the segment. +

Contents

7.23.5.4 The strpbrk function

Synopsis

@@ -18615,6 +19166,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The strpbrk function returns a pointer to the character, or a null pointer if no character from s2 occurs in s1. +

Contents

7.23.5.5 The strrchr function

Synopsis

@@ -18633,6 +19185,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The strrchr function returns a pointer to the character, or a null pointer if c does not occur in the string. +

Contents

7.23.5.6 The strspn function

Synopsis

@@ -18648,6 +19201,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The strspn function returns the length of the segment. +

Contents

7.23.5.7 The strstr function

Synopsis

@@ -18665,6 +19219,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.23.5.8 The strtok function

Synopsis

@@ -18716,8 +19271,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.23.6 Miscellaneous functions

+

Contents

7.23.6.1 The memset function

Synopsis

@@ -18734,6 +19291,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The memset function returns the value of s. +

Contents

7.23.6.2 The strerror function

Synopsis

@@ -18755,6 +19313,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. specific. The array pointed to shall not be modified by the program, but may be overwritten by a subsequent call to the strerror function. +

Contents

7.23.6.3 The strlen function

Synopsis

@@ -18771,6 +19330,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. character. +

Contents

7.24 Type-generic math <tgmath.h>

The header <tgmath.h> includes the headers <math.h> and <complex.h> and @@ -18901,8 +19461,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the behavior is undefined. +

Contents

7.25 Threads <threads.h>

+

Contents

7.25.1 Introduction

The header <threads.h> defines macros, and declares types, enumeration constants, @@ -19009,8 +19571,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. was unable to allocate memory. +

Contents

7.25.2 Initialization functions

+

Contents

7.25.2.1 The call_once function

Synopsis

@@ -19028,8 +19592,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The call_once function returns no value. +

Contents

7.25.3 Condition variable functions

+

Contents

7.25.3.1 The cnd_broadcast function

Synopsis

@@ -19048,6 +19614,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The cnd_broadcast function returns thrd_success on success, or thrd_error if the request could not be honored. +

Contents

7.25.3.2 The cnd_destroy function

Synopsis

@@ -19065,6 +19632,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The cnd_destroy function returns no value. +

Contents

7.25.3.3 The cnd_init function

Synopsis

@@ -19084,6 +19652,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. memory could be allocated for the newly created condition, or thrd_error if the request could not be honored. +

Contents

7.25.3.4 The cnd_signal function

Synopsis

@@ -19102,6 +19671,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The cnd_signal function returns thrd_success on success or thrd_error if the request could not be honored. +

Contents

7.25.3.5 The cnd_timedwait function

Synopsis

@@ -19125,6 +19695,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. thrd_timeout if the time specified in the call was reached without acquiring the requested resource, or thrd_error if the request could not be honored. +

Contents

7.25.3.6 The cnd_wait function

Synopsis

@@ -19145,8 +19716,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The cnd_wait function returns thrd_success on success or thrd_error if the request could not be honored. +

Contents

7.25.4 Mutex functions

+

Contents

7.25.4.1 The mtx_destroy function

Synopsis

@@ -19163,6 +19736,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The mtx_destroy function returns no value. +

Contents

7.25.4.2 The mtx_init function

Synopsis

@@ -19188,6 +19762,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The mtx_init function returns thrd_success on success, or thrd_error if the request could not be honored. +

Contents

7.25.4.3 The mtx_lock function

Synopsis

@@ -19207,6 +19782,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. honored. +

Contents

7.25.4.4 The mtx_timedlock function

Synopsis

@@ -19227,6 +19803,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. reached without acquiring the requested resource, or thrd_error if the request could not be honored. +

Contents

7.25.4.5 The mtx_trylock function

Synopsis

@@ -19246,6 +19823,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the resource requested is already in use, or thrd_error if the request could not be honored. +

Contents

7.25.4.6 The mtx_unlock function

Synopsis

@@ -19263,8 +19841,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The mtx_unlock function returns thrd_success on success or thrd_error if the request could not be honored. +

Contents

7.25.5 Thread functions

+

Contents

7.25.5.1 The thrd_create function

Synopsis

@@ -19287,6 +19867,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. no memory could be allocated for the thread requested, or thrd_error if the request could not be honored. +

Contents

7.25.5.2 The thrd_current function

Synopsis

@@ -19301,6 +19882,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The thrd_current function returns the identifier of the thread that called it. +

Contents

7.25.5.3 The thrd_detach function

Synopsis

@@ -19319,6 +19901,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The thrd_detach function returns thrd_success on success or thrd_error if the request could not be honored. +

Contents

7.25.5.4 The thrd_equal function

Synopsis

@@ -19335,6 +19918,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The thrd_equal function returns zero if the thread thr0 and the thread thr1 refer to different threads. Otherwise the thrd_equal function returns a nonzero value. +

Contents

7.25.5.5 The thrd_exit function

Synopsis

@@ -19350,6 +19934,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The thrd_exit function returns no value. +

Contents

7.25.5.6 The thrd_join function

Synopsis

@@ -19370,6 +19955,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The thrd_join function returns thrd_success on success or thrd_error if the request could not be honored. +

Contents

7.25.5.7 The thrd_sleep function

Synopsis

@@ -19385,6 +19971,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The thrd_sleep function returns no value. +

Contents

7.25.5.8 The thrd_yield function

Synopsis

@@ -19400,8 +19987,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The thrd_yield function returns no value. +

Contents

7.25.6 Thread-specific storage functions

+

Contents

7.25.6.1 The tss_create function

Synopsis

@@ -19421,6 +20010,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. thrd_success; otherwise, thrd_error is returned and the thread-specific storage pointed to by key is set to an undefined value. +

Contents

7.25.6.2 The tss_delete function

Synopsis

@@ -19436,6 +20026,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The tss_delete function returns no value. +

Contents

7.25.6.3 The tss_get function

Synopsis

@@ -19452,6 +20043,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The tss_get function returns the value for the current thread if successful, or zero if unsuccessful. +

Contents

7.25.6.4 The tss_set function

Synopsis

@@ -19469,8 +20061,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The tss_set function returns thrd_success on success or thrd_error if the request could not be honored. +

Contents

7.25.7 Time functions

+

Contents

7.25.7.1 The xtime_get function

Synopsis

@@ -19497,8 +20091,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. xtime object is system dependent. +

Contents

7.26 Date and time <time.h>

+

Contents

7.26.1 Components of time

The header <time.h> defines two macros, and declares several types and functions for @@ -19555,8 +20151,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.26.2 Time manipulation functions

+

Contents

7.26.2.1 The clock function

Synopsis

@@ -19581,6 +20179,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the program and its return value subtracted from the value returned by subsequent calls. +

Contents

7.26.2.2 The difftime function

Synopsis

@@ -19601,6 +20200,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.26.2.3 The mktime function

Synopsis

@@ -19661,6 +20261,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. causes it to attempt to determine whether Daylight Saving Time is in effect for the specified time. +

Contents

7.26.2.4 The time function

Synopsis

@@ -19679,6 +20280,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. available. If timer is not a null pointer, the return value is also assigned to the object it points to. +

Contents

7.26.3 Time conversion functions

Except for the strftime function, these functions each return a pointer to one of two @@ -19688,6 +20290,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. previous call to any of them and the functions are not required to avoid data races. The implementation shall behave as if no other library functions call these functions. +

Contents

7.26.3.1 The asctime function

Synopsis

@@ -19737,6 +20340,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

310) See 7.26.1. +

Contents

7.26.3.2 The ctime function

Synopsis

@@ -19761,6 +20365,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. broken-down time as argument.

Forward references: the localtime function (7.26.3.4). +

Contents

7.26.3.3 The gmtime function

Synopsis

@@ -19777,6 +20382,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The gmtime function returns a pointer to the broken-down time, or a null pointer if the specified time cannot be converted to UTC. +

Contents

7.26.3.4 The localtime function

Synopsis

@@ -19793,6 +20399,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.26.3.5 The strftime function

Synopsis

@@ -20000,6 +20607,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. zero is returned and the contents of the array are indeterminate. +

Contents

7.27 Unicode utilities <uchar.h>

The header <uchar.h> declares types and functions for manipulating Unicode @@ -20018,6 +20626,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which is an unsigned integer type used for 32-bit characters and is the same type as uint_least32_t (also described in 7.20.1.2). +

Contents

7.27.1 Restartable multibyte/wide character conversion functions

These functions have a parameter, ps, of type pointer to mbstate_t that points to an @@ -20028,6 +20637,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. to avoid data races in this case. The implementation behaves as if no library function calls these functions with a null pointer for ps. +

Contents

7.27.1.1 The mbrtoc16 function

Synopsis

@@ -20089,6 +20699,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. sequence of redundant shift sequences (for implementations with state-dependent encodings). +

Contents

7.27.1.2 The c16rtomb function

Synopsis

@@ -20121,6 +20732,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the function stores the value of the macro EILSEQ in errno and returns (size_t)(-1); the conversion state is unspecified. +

Contents

7.27.1.3 The mbrtoc32 function

Synopsis

@@ -20182,6 +20794,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. sequence of redundant shift sequences (for implementations with state-dependent encodings). +

Contents

7.27.1.4 The c32rtomb function

Synopsis

@@ -20216,8 +20829,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.28 Extended multibyte and wide character utilities <wchar.h>

+

Contents

7.28.1 Introduction

The header <wchar.h> defines four macros, and declares four data types, one tag, and @@ -20279,6 +20894,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.28.2 Formatted wide character input/output functions

The formatted wide character input/output functions shall behave as if there is a sequence @@ -20288,6 +20904,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.28.2.1 The fwprintf function

Synopsis

@@ -20652,6 +21269,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the case of fixed-point conversion by the source value as well. +

Contents

7.28.2.2 The fwscanf function

Synopsis

@@ -20948,6 +21566,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

326) See ''future library directions'' (7.30.12). +

Contents

7.28.2.3 The swprintf function

Synopsis

@@ -20969,6 +21588,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.2.4 The swscanf function

Synopsis

@@ -20991,6 +21611,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. zero, in the event of an early matching failure. +

Contents

7.28.2.5 The vfwprintf function

Synopsis

@@ -21041,6 +21662,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. invoke the va_arg macro, the value of arg after the return is indeterminate. +

Contents

7.28.2.6 The vfwscanf function

Synopsis

@@ -21065,6 +21687,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.28.2.7 The vswprintf function

Synopsis

@@ -21089,6 +21712,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. occurred or if n or more wide characters were requested to be generated. +

Contents

7.28.2.8 The vswscanf function

Synopsis

@@ -21112,6 +21736,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.28.2.9 The vwprintf function

Synopsis

@@ -21133,6 +21758,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. value if an output or encoding error occurred. +

Contents

7.28.2.10 The vwscanf function

Synopsis

@@ -21155,6 +21781,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.28.2.11 The wprintf function

Synopsis

@@ -21171,6 +21798,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wprintf function returns the number of wide characters transmitted, or a negative value if an output or encoding error occurred. +

Contents

7.28.2.12 The wscanf function

Synopsis

@@ -21190,8 +21818,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns the number of input items assigned, which can be fewer than provided for, or even zero, in the event of an early matching failure. +

Contents

7.28.3 Wide character input/output functions

+

Contents

7.28.3.1 The fgetwc function

Synopsis

@@ -21220,6 +21850,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Also, errno will be set to EILSEQ by input/output functions only if an encoding error occurs. +

Contents

7.28.3.2 The fgetws function

Synopsis

@@ -21246,6 +21877,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.3.3 The fputwc function

Synopsis

@@ -21267,6 +21899,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.3.4 The fputws function

Synopsis

@@ -21286,6 +21919,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. returns a nonnegative value. +

Contents

7.28.3.5 The fwide function

Synopsis

@@ -21310,6 +21944,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.28.3.6 The getwc function

Synopsis

@@ -21328,6 +21963,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The getwc function returns the next wide character from the input stream pointed to by stream, or WEOF. +

Contents

7.28.3.7 The getwchar function

Synopsis

@@ -21348,6 +21984,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The getwchar function returns the next wide character from the input stream pointed to by stdin, or WEOF. +

Contents

7.28.3.8 The putwc function

Synopsis

@@ -21365,6 +22002,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The putwc function returns the wide character written, or WEOF. +

Contents

7.28.3.9 The putwchar function

Synopsis

@@ -21379,6 +22017,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The putwchar function returns the character written, or WEOF. +

Contents

7.28.3.10 The ungetwc function

Synopsis

@@ -21417,6 +22056,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The ungetwc function returns the wide character pushed back, or WEOF if the operation fails. +

Contents

7.28.4 General wide string utilities

The header <wchar.h> declares a number of functions useful for wide string @@ -21433,8 +22073,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. zero wide characters. +

Contents

7.28.4.1 Wide string numeric conversion functions
+

Contents

7.28.4.1.1 The wcstod, wcstof, and wcstold functions

Synopsis

@@ -21559,6 +22201,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. to the same internal floating value, but if not will round to adjacent values. +

Contents

7.28.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions

Synopsis

@@ -21634,8 +22277,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.4.2 Wide string copying functions
+

Contents

7.28.4.2.1 The wcscpy function

Synopsis

@@ -21653,6 +22298,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wcscpy function returns the value of s1. +

Contents

7.28.4.2.2 The wcsncpy function

Synopsis

@@ -21680,6 +22326,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. result will not be null-terminated. +

Contents

7.28.4.2.3 The wmemcpy function

Synopsis

@@ -21702,6 +22349,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.28.4.2.4 The wmemmove function

Synopsis

@@ -21721,8 +22369,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The wmemmove function returns the value of s1. +

Contents

7.28.4.3 Wide string concatenation functions
+

Contents

7.28.4.3.1 The wcscat function

Synopsis

@@ -21740,6 +22390,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The wcscat function returns the value of s1. +

Contents

7.28.4.3.2 The wcsncat function

Synopsis

@@ -21766,12 +22417,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. wcslen(s1)+n+1. +

Contents

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

Contents

7.28.4.4.1 The wcscmp function

Synopsis

@@ -21789,6 +22442,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. accordingly as the wide string pointed to by s1 is greater than, equal to, or less than the wide string pointed to by s2. +

Contents

7.28.4.4.2 The wcscoll function

Synopsis

@@ -21811,6 +22465,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. wide string pointed to by s2 when both are interpreted as appropriate to the current locale. +

Contents

7.28.4.4.3 The wcsncmp function

Synopsis

@@ -21830,6 +22485,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.4.4.4 The wcsxfrm function

Synopsis

@@ -21862,6 +22518,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.28.4.4.5 The wmemcmp function

Synopsis

@@ -21880,8 +22537,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. accordingly as the object pointed to by s1 is greater than, equal to, or less than the object pointed to by s2. +

Contents

7.28.4.5 Wide string search functions
+

Contents

7.28.4.5.1 The wcschr function

Synopsis

@@ -21898,6 +22557,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.4.5.2 The wcscspn function

Synopsis

@@ -21915,6 +22575,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The wcscspn function returns the length of the segment. +

Contents

7.28.4.5.3 The wcspbrk function

Synopsis

@@ -21931,6 +22592,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.4.5.4 The wcsrchr function

Synopsis

@@ -21947,6 +22609,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wcsrchr function returns a pointer to the wide character, or a null pointer if c does not occur in the wide string. +

Contents

7.28.4.5.5 The wcsspn function

Synopsis

@@ -21964,6 +22627,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wcsspn function returns the length of the segment. +

Contents

7.28.4.5.6 The wcsstr function

Synopsis

@@ -21982,6 +22646,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. wide string is not found. If s2 points to a wide string with zero length, the function returns s1. +

Contents

7.28.4.5.7 The wcstok function

Synopsis

@@ -22041,6 +22706,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

Contents

7.28.4.5.8 The wmemchr function

Synopsis

@@ -22059,8 +22725,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the wide character does not occur in the object. +

Contents

7.28.4.6 Miscellaneous functions
+

Contents

7.28.4.6.1 The wcslen function

Synopsis

@@ -22076,6 +22744,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The wcslen function returns the number of wide characters that precede the terminating null wide character. +

Contents

7.28.4.6.2 The wmemset function

Synopsis

@@ -22091,8 +22760,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The wmemset function returns the value of s. +

Contents

7.28.5 Wide character time conversion functions

+

Contents

7.28.5.1 The wcsftime function

Synopsis

@@ -22124,6 +22795,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. wide character. Otherwise, zero is returned and the contents of the array are indeterminate. +

Contents

7.28.6 Extended multibyte/wide character conversion utilities

The header <wchar.h> declares an extended set of functions useful for conversion @@ -22161,8 +22833,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. character string. +

Contents

7.28.6.1 Single-byte/wide character conversion functions
+

Contents

7.28.6.1.1 The btowc function

Synopsis

@@ -22180,6 +22854,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. does not constitute a valid single-byte character in the initial shift state. Otherwise, it returns the wide character representation of that character. +

Contents

7.28.6.1.2 The wctob function

Synopsis

@@ -22198,8 +22873,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. +

Contents

7.28.6.2 Conversion state functions
+

Contents

7.28.6.2.1 The mbsinit function

Synopsis

@@ -22217,6 +22894,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The mbsinit function returns nonzero if ps is a null pointer or if the referenced object describes an initial conversion state; otherwise, it returns zero. +

Contents

7.28.6.3 Restartable multibyte/wide character conversion functions

These functions differ from the corresponding multibyte character functions of 7.22.7 @@ -22231,6 +22909,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Also unlike their corresponding functions, the return value does not represent whether the encoding is state-dependent. +

Contents

7.28.6.3.1 The mbrlen function

Synopsis

@@ -22255,6 +22934,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

Forward references: the mbrtowc function (7.28.6.3.2). +

Contents

7.28.6.3.2 The mbrtowc function

Synopsis

@@ -22312,6 +22992,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. sequence of redundant shift sequences (for implementations with state-dependent encodings). +

Contents

7.28.6.3.3 The wcrtomb function

Synopsis

@@ -22342,6 +23023,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the function stores the value of the macro EILSEQ in errno and returns (size_t)(-1); the conversion state is unspecified. +

Contents

7.28.6.4 Restartable multibyte/wide string conversion functions

These functions differ from the corresponding multibyte string functions of 7.22.8 @@ -22359,6 +23041,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. to reflect the amount of the source processed by that invocation. +

Contents

7.28.6.4.1 The mbsrtowcs function

Synopsis

@@ -22403,6 +23086,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Contents

7.28.6.4.2 The wcsrtombs function

Synopsis

@@ -22449,8 +23133,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. include those necessary to reach the initial shift state immediately before the null byte. +

Contents

7.29 Wide character classification and mapping utilities <wctype.h>

+

Contents

7.29.1 Introduction

The header <wctype.h> defines one macro, and declares three data types and many @@ -22498,6 +23184,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

339) See ''future library directions'' (7.30.13). +

Contents

7.29.2 Wide character classification utilities

The header <wctype.h> declares several functions useful for classifying wide @@ -22508,6 +23195,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. term control wide character refers to a member of a locale-specific set of wide characters that are not printing wide characters. +

Contents

7.29.2.1 Wide character classification functions

The functions in this subclause return nonzero (true) if and only if the value of the @@ -22527,6 +23215,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. && iswspace(wc) is true, but not both. +

Contents

7.29.2.1.1 The iswalnum function

Synopsis

@@ -22539,6 +23228,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The iswalnum function tests for any wide character for which iswalpha or iswdigit is true. +

Contents

7.29.2.1.2 The iswalpha function

Synopsis

@@ -22560,6 +23250,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. wide characters; all four combinations are possible. +

Contents

7.29.2.1.3 The iswblank function

Synopsis

@@ -22575,6 +23266,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. characters are the following: space (L' '), and horizontal tab (L'\t'). In the "C" locale, iswblank returns true only for the standard blank characters. +

Contents

7.29.2.1.4 The iswcntrl function

Synopsis

@@ -22586,6 +23278,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The iswcntrl function tests for any control wide character. +

Contents

7.29.2.1.5 The iswdigit function

Synopsis

@@ -22598,6 +23291,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The iswdigit function tests for any wide character that corresponds to a decimal-digit character (as defined in 5.2.1). +

Contents

7.29.2.1.6 The iswgraph function

Synopsis

@@ -22621,6 +23315,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. characters other than ' '. +

Contents

7.29.2.1.7 The iswlower function

Synopsis

@@ -22634,6 +23329,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. letter or is one of a locale-specific set of wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace is true. +

Contents

7.29.2.1.8 The iswprint function

Synopsis

@@ -22645,6 +23341,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The iswprint function tests for any printing wide character. +

Contents

7.29.2.1.9 The iswpunct function

Synopsis

@@ -22658,6 +23355,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. specific set of punctuation wide characters for which neither iswspace nor iswalnum is true.342) +

Contents

7.29.2.1.10 The iswspace function

Synopsis

@@ -22675,6 +23373,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. set of white-space wide characters for which none of iswalnum, iswgraph, or iswpunct is true. +

Contents

7.29.2.1.11 The iswupper function

Synopsis

@@ -22688,6 +23387,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. letter or is one of a locale-specific set of wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace is true. +

Contents

7.29.2.1.12 The iswxdigit function

Synopsis

@@ -22700,12 +23400,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The iswxdigit function tests for any wide character that corresponds to a hexadecimal-digit character (as defined in 6.4.4.1). +

Contents

7.29.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.29.2.1). +

Contents

7.29.2.2.1 The iswctype function

Synopsis

@@ -22743,6 +23445,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. function returns zero (false).

Forward references: the wctype function (7.29.2.2.2). +

Contents

7.29.2.2.2 The wctype function

Synopsis

@@ -22764,12 +23467,15 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. as the second argument to the iswctype function; otherwise, it returns zero. +

Contents

7.29.3 Wide character case mapping utilities

The header <wctype.h> declares several functions useful for mapping wide characters. +

Contents

7.29.3.1 Wide character case mapping functions
+

Contents

7.29.3.1.1 The towlower function

Synopsis

@@ -22788,6 +23494,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. characters (always the same one for any given locale); otherwise, the argument is returned unchanged. +

Contents

7.29.3.1.2 The towupper function

Synopsis

@@ -22806,6 +23513,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. characters (always the same one for any given locale); otherwise, the argument is returned unchanged. +

Contents

7.29.3.2 Extensible wide character case mapping functions

The functions wctrans and towctrans provide extensible wide character mapping as @@ -22813,6 +23521,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. previous subclause (7.29.3.1). +

Contents

7.29.3.2.1 The towctrans function

Synopsis

@@ -22837,6 +23546,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The towctrans function returns the mapped value of wc using the mapping described by desc. If desc is zero, the towctrans function returns the value of wc. +

Contents

7.29.3.2.2 The wctrans function

Synopsis

@@ -22858,11 +23568,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. as the second argument to the towctrans function; otherwise, it returns zero. +

Contents

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

Contents

7.30.1 Complex arithmetic <complex.h>

The function names @@ -22874,36 +23586,43 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. and the same names suffixed with f or l may be added to the declarations in the <complex.h> header. +

Contents

7.30.2 Character handling <ctype.h>

Function names that begin with either is or to, and a lowercase letter may be added to the declarations in the <ctype.h> header. +

Contents

7.30.3 Errors <errno.h>

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

Contents

7.30.4 Format conversion of integer types <inttypes.h>

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

Contents

7.30.5 Localization <locale.h>

Macros that begin with LC_ and an uppercase letter may be added to the definitions in the <locale.h> header. +

Contents

7.30.6 Signal handling <signal.h>

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

Contents

7.30.7 Boolean type and values <stdbool.h>

The ability to undefine and perhaps then redefine the macros bool, true, and false is an obsolescent feature. +

Contents

7.30.8 Integer types <stdint.h>

Typedef names beginning with int or uint and ending with _t may be added to the @@ -22912,6 +23631,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. <stdint.h> header. +

Contents

7.30.9 Input/output <stdio.h>

Lowercase letters may be added to the conversion specifiers and length modifiers in @@ -22920,16 +23640,19 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. The use of ungetc on a binary stream where the file position indicator is zero prior to * the call is an obsolescent feature. +

Contents

7.30.10 General utilities <stdlib.h>

Function names that begin with str and a lowercase letter may be added to the declarations in the <stdlib.h> header. +

Contents

7.30.11 String handling <string.h>

Function names that begin with str, mem, or wcs and a lowercase letter may be added to the declarations in the <string.h> header. +

Contents

7.30.12 Extended multibyte and wide character utilities <wchar.h>

Function names that begin with wcs and a lowercase letter may be added to the @@ -22938,6 +23661,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. Lowercase letters may be added to the conversion specifiers and length modifiers in fwprintf and fwscanf. Other characters may be used in extensions. +

Contents

7.30.13 Wide character classification and mapping utilities

<wctype.h>

@@ -22945,6 +23669,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. declarations in the <wctype.h> header. +

Contents

Annex A

                                             (informative)
@@ -22954,8 +23679,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
  NOTE   The notation is described in 6.1.
  
 
+

Contents

A.1 Lexical grammar

+

Contents

A.1.1 Lexical elements

(6.4) token:
@@ -22977,6 +23704,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                each non-white-space character that cannot be one of the above
 
+

Contents

A.1.2 Keywords

(6.4.1) keyword: one of
@@ -22997,6 +23725,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                for                         typedef
 
+

Contents

A.1.3 Identifiers

(6.4.2.1) identifier:
@@ -23023,6 +23752,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                 0 1 2         3    4   5    6   7   8    9
 
+

Contents

A.1.4 Universal character names

(6.4.3) universal-character-name:
@@ -23035,6 +23765,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                             hexadecimal-digit hexadecimal-digit
 
+

Contents

A.1.5 Constants

(6.4.4) constant:
@@ -23206,6 +23937,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                hexadecimal-escape-sequence hexadecimal-digit
 
+

Contents

A.1.6 String literals

(6.4.5) string-literal:
@@ -23230,6 +23962,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                 escape-sequence
 
+

Contents

A.1.7 Punctuators

(6.4.6) punctuator: one of @@ -23243,6 +23976,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. <: :> <% %> %: %:%:
+

Contents

A.1.8 Header names

(6.4.7) header-name:
@@ -23270,6 +24004,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                             the new-line character and "
 
+

Contents

A.1.9 Preprocessing numbers

(6.4.8) pp-number: @@ -23285,8 +24020,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. pp-number . +

Contents

A.2 Phrase structure grammar

+

Contents

A.2.1 Expressions

(6.5.1) primary-expression:
@@ -23430,6 +24167,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                conditional-expression
 
+

Contents

A.2.2 Declarations

(6.7) declaration:
@@ -23658,6 +24396,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                 _Static_assert ( constant-expression , string-literal ) ;
 
+

Contents

A.2.3 Statements

(6.8) statement:
@@ -23714,6 +24453,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                return expressionopt ;
 
+

Contents

A.2.4 External definitions

(6.9) translation-unit:
@@ -23735,6 +24475,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                declaration-list declaration
 
+

Contents

A.3 Preprocessing directives

(6.10) preprocessing-file:
@@ -23822,12 +24563,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                the new-line character
 
+

Contents

Annex B

                               (informative)
                           Library summary
 
+

Contents

B.1 Diagnostics <assert.h>

          NDEBUG
@@ -23835,6 +24578,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          void assert(scalar expression);
 
+

Contents

B.2 Complex <complex.h>

@@ -23915,6 +24659,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. long double creall(long double complex z); +

Contents

B.3 Character handling <ctype.h>

          int   isalnum(int c);
@@ -23933,6 +24678,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          int   toupper(int c);
 
+

Contents

B.4 Errors <errno.h>

          EDOM           EILSEQ            ERANGE           errno
@@ -23940,6 +24686,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          errno_t
 
+

Contents

B.5 Floating-point environment <fenv.h>

@@ -23963,6 +24710,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
        int   feupdateenv(const fenv_t *envp);
 
+

Contents

B.6 Characteristics of floating types <float.h>

        FLT_ROUNDS              DBL_DIG                 FLT_MAX
@@ -23981,6 +24729,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
        FLT_DIG                 LDBL_MAX_10_EXP
 
+

Contents

B.7 Format conversion of integer types <inttypes.h>

@@ -24008,6 +24757,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                  wchar_t ** restrict endptr, int base);
 
+

Contents

B.8 Alternative spellings <iso646.h>

          and            bitor             not_eq           xor
@@ -24015,6 +24765,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          bitand         not               or_eq
 
+

Contents

B.9 Sizes of integer types <limits.h>

          CHAR_BIT       CHAR_MAX          INT_MIN          ULONG_MAX
@@ -24024,6 +24775,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          CHAR_MIN       USHRT_MAX         LONG_MAX
 
+

Contents

B.10 Localization <locale.h>

          struct lconv   LC_ALL            LC_CTYPE         LC_NUMERIC
@@ -24032,6 +24784,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          struct lconv *localeconv(void);
 
+

Contents

B.11 Mathematics <math.h>

@@ -24234,6 +24987,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. int isunordered(real-floating x, real-floating y); +

Contents

B.12 Nonlocal jumps <setjmp.h>

        jmp_buf
@@ -24241,6 +24995,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
        _Noreturn void longjmp(jmp_buf env, int val);
 
+

Contents

B.13 Signal handling <signal.h>

@@ -24251,12 +25006,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
        int raise(int sig);
 
+

Contents

B.14 Alignment <stdalign.h>

          alignas
          __alignas_is_defined
 
+

Contents

B.15 Variable arguments <stdarg.h>

          va_list
@@ -24266,6 +25023,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          void va_start(va_list ap, parmN);
 
+

Contents

B.16 Atomics <stdatomic.h>

@@ -24335,6 +25093,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. volatile atomic_flag *object, memory_order order); +

Contents

B.17 Boolean type and values <stdbool.h>

          bool
@@ -24343,6 +25102,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          __bool_true_false_are_defined
 
+

Contents

B.18 Common definitions <stddef.h>

          ptrdiff_t       max_align_t       NULL
@@ -24352,6 +25112,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          rsize_t
 
+

Contents

B.19 Integer types <stdint.h>

@@ -24372,6 +25133,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          RSIZE_MAX
 
+

Contents

B.20 Input/output <stdio.h>

@@ -24495,6 +25257,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. char *gets_s(char *s, rsize_t n); +

Contents

B.21 General utilities <stdlib.h>

@@ -24595,6 +25358,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. const wchar_t * restrict src, rsize_t len); +

Contents

B.22 String handling <string.h>

@@ -24662,6 +25426,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. size_t strnlen_s(const char *s, size_t maxsize); +

Contents

B.23 Type-generic math <tgmath.h>

          acos         sqrt              fmod             nextafter
@@ -24681,6 +25446,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
          pow          fmin              nearbyint        creal
 
+

Contents

B.24 Threads <threads.h>

@@ -24724,6 +25490,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
        int xtime_get(xtime *xt, int base);
 
+

Contents

B.25 Date and time <time.h>

@@ -24754,6 +25521,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
               struct tm * restrict result);
 
+

Contents

B.26 Unicode utilities <uchar.h>

          mbstate_t     size_t            char16_t         char32_t
@@ -24769,6 +25537,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
               mbstate_t * restrict ps);
 
+

Contents

B.27 Extended multibyte/wide character utilities <wchar.h>

@@ -24953,6 +25722,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. mbstate_t * restrict ps); +

Contents

B.28 Wide character classification and mapping utilities <wctype.h>

@@ -24977,6 +25747,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
        wctrans_t wctrans(const char *property);
 
+

Contents

Annex C

                                      (informative)
@@ -25008,6 +25779,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
 
 
 
+

Contents

Annex D

                                      (normative)
@@ -25017,6 +25789,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
  This clause lists the hexadecimal code values that are valid in universal character names
  in identifiers.
 
+

Contents

D.1 Ranges of characters allowed

00A8, 00AA, 00AD, 00AF, 00B2-00B5, 00B7-00BA, 00BC-00BE, 00C0-00D6, @@ -25038,11 +25811,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 60000-6FFFD, 70000-7FFFD, 80000-8FFFD, 90000-9FFFD, A0000-AFFFD, B0000-BFFFD, C0000-CFFFD, D0000-DFFFD, E0000-EFFFD +

Contents

D.2 Ranges of characters disallowed initially

0300-036F, 1DC0-1DFF, 20D0-20FF, FE20-FE2F +

Contents

Annex E

                                     (informative)
@@ -25137,12 +25912,14 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
         #define    LDBL_MIN                                  1E-37
 
+

Contents

Annex F

                                            (normative)
                        IEC 60559 floating-point arithmetic
 
+

Contents

F.1 Introduction

This annex specifies C language support for the IEC 60559 floating-point standard. The @@ -25164,6 +25941,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. specifications. +

Contents

F.2 Types

The C floating types match the IEC 60559 formats as follows: @@ -25192,6 +25970,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. all double values. +

Contents

F.2.1 Infinities, signed zeros, and NaNs

This specification does not define the behavior of signaling NaNs.346) It generally uses @@ -25203,6 +25982,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. sufficient for closure of the arithmetic. +

Contents

F.3 Operators and functions

C operators and functions provide IEC 60559 required and recommended facilities as @@ -25284,6 +26064,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. macros defined in 7.12.3 do not distinguish signaling from quiet NaNs). +

Contents

F.4 Floating to integer conversion

If the integer type is _Bool, 6.3.1.2 applies and no floating-point exceptions are raised @@ -25303,6 +26084,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. <math.h>. +

Contents

F.5 Binary-decimal conversion

Conversion from the widest supported IEC 60559 format to decimal with @@ -25330,6 +26112,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. DBL_DIG are 18 and 15, respectively, for these formats.) +

Contents

F.6 The return statement

If the return expression is evaluated in a floating-point format different from the return type, the expression is converted as if by assignment349) to the return type of the function @@ -25339,6 +26122,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

349) Assignment removes any extra range and precision. +

Contents

F.7 Contracted expressions

A contracted expression is correctly rounded (once) and treats infinities, NaNs, signed @@ -25349,6 +26133,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. A contracted expression should raise floating-point exceptions in a manner generally consistent with the basic arithmetic operations. * +

Contents

F.8 Floating-point environment

The floating-point environment defined in <fenv.h> includes the IEC 60559 floating- @@ -25360,6 +26145,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

350) This specification does not require dynamic rounding precision nor trap enablement modes. +

Contents

F.8.1 Environment management

IEC 60559 requires that floating-point operations implicitly raise floating-point exception @@ -25379,6 +26165,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which allows certain optimizations (see F.9). +

Contents

F.8.2 Translation

During translation the IEC 60559 default modes are in effect: @@ -25400,6 +26187,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. strtod, provide execution-time conversion of numeric strings. +

Contents

F.8.3 Execution

At program startup the floating-point environment is initialized as prescribed by @@ -25412,6 +26200,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

  • Trapping or stopping (if supported) is disabled on all floating-point exceptions. +

    Contents

    F.8.4 Constant expressions

    An arithmetic constant expression of floating type, other than one in an initializer for an @@ -25454,6 +26243,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

  • +

    Contents

    F.8.5 Initialization

    All computation for automatic initialization is done (as if) at execution time; thus, it is @@ -25502,6 +26292,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. could be done at translation time, regardless of the expression evaluation method. +

    Contents

    F.8.6 Changing the environment

    Operations defined in 6.5 and functions and macros defined for the standard libraries @@ -25514,11 +26305,13 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. ''inexact'', or ''underflow'' and ''inexact''), then ''overflow'' or ''underflow'' is raised before ''inexact''. +

    Contents

    F.9 Optimization

    This section identifies code transformations that might subvert IEC 60559-specified behavior, and others that do not. +

    Contents

    F.9.1 Global transformations

    Floating-point arithmetic operations and external function calls may entail side effects @@ -25554,6 +26347,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. if (0 < n) x + 1;

    +

    Contents

    F.9.2 Expression transformations

    x/2 <-> x x 0.5 Although similar transformations involving inexact constants @@ -25622,6 +26416,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. for complex z. +

    Contents

    F.9.3 Relational operators

    x != x -> false The expression x != x is true if x is a NaN. @@ -25680,6 +26475,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. +

    Contents

    F.9.4 Constant arithmetic

    The implementation shall honor floating-point exceptions raised by execution-time @@ -25695,6 +26491,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

    357) 0 - 0 yields -0 instead of +0 just when the rounding direction is downward. +

    Contents

    F.10 Mathematics <math.h>

    This subclause contains specifications of <math.h> facilities that are particularly suited @@ -25758,8 +26555,10 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. avoiding them would be too costly. +

    Contents

    F.10.1 Trigonometric functions

    +

    Contents

    F.10.1.1 The acos functions

    +

    Contents

    F.10.1.2 The asin functions

    +

    Contents

    F.10.1.3 The atan functions

    +

    Contents

    F.10.1.4 The atan2 functions