BS ISO/IEC 9899:2018
$215.11
Information technology. Programming languages. C
Published By | Publication Date | Number of Pages |
BSI | 2018 | 536 |
This document specifies the form and establishes the interpretation of programs written in the C programming language.1) It specifies
-
the representation of C programs;
-
the syntax and constraints of the C language;
-
the semantic rules for interpreting C programs;
-
the representation of input data to be processed by C programs;
-
the representation of output data produced by C programs;
-
the restrictions and limits imposed by a conforming implementation of C.
This document does not specify
-
the mechanism by which C programs are transformed for use by a data-processing system;
-
the mechanism by which C programs are invoked for use by a data-processing system;
-
the mechanism by which input data are transformed for use by a C program;
-
the mechanism by which output data are transformed after being produced by a C program;
-
the size or complexity of a program and its data that will exceed the capacity of any specific data-processing system or the capacity of a particular processor;
-
all minimal requirements of a data-processing system that is capable of supporting a conforming implementation.
PDF Catalog
PDF Pages | PDF Title |
---|---|
2 | undefined |
3 | 74528.pdf |
5 | Contents |
13 | Foreword |
14 | Introduction |
15 | 1 Scope |
16 | 2 Normative references |
17 | 3 Terms, definitions, and symbols 3.1 access (verb) 3.2 alignment 3.3 argument 3.4 behavior 3.4.1 implementation-defined behavior 3.4.2 locale-specific behavior |
18 | 3.4.3 undefined behavior 3.4.4 unspecified behavior 3.5 bit 3.6 byte 3.7 character 3.7.1 character 3.7.2 multibyte character |
19 | 3.7.3 wide character 3.8 constraint 3.9 correctly rounded result 3.10 diagnostic message 3.11 forward reference 3.12 implementation 3.13 implementation limit 3.14 memory location |
20 | 3.15 object 3.16 parameter 3.17 recommended practice 3.18 runtime-constraint 3.19 value 3.19.1 implementation-defined value 3.19.2 indeterminate value 3.19.3 unspecified value |
21 | 3.19.4 trap representation 3.19.5 perform a trap 3.20 ceiling 3.21 floor |
22 | 4 Conformance |
23 | 5 Environment 5.1 Conceptual models 5.1.1 Translation environment 5.1.1.1 Program structure 5.1.1.2 Translation phases |
24 | 5.1.1.3 Diagnostics 5.1.2 Execution environments 5.1.2.1 Freestanding environment 5.1.2.2 Hosted environment |
25 | 5.1.2.2.1 Program startup 5.1.2.2.2 Program execution 5.1.2.2.3 Program termination 5.1.2.3 Program execution |
28 | 5.1.2.4 Multi-threaded executions and data races |
31 | 5.2 Environmental considerations 5.2.1 Character sets |
32 | 5.2.1.1 Trigraph sequences 5.2.1.2 Multibyte characters |
33 | 5.2.2 Character display semantics 5.2.3 Signals and interrupts 5.2.4 Environmental limits 5.2.4.1 Translation limits |
34 | 5.2.4.2 Numerical limits 5.2.4.2.1 Sizes of integer types |
36 | 5.2.4.2.2 Characteristics of floating types |
42 | 6 Language 6.1 Notation 6.2 Concepts 6.2.1 Scopes of identifiers |
43 | 6.2.2 Linkages of identifiers 6.2.3 Name spaces of identifiers |
44 | 6.2.4 Storage durations of objects |
45 | 6.2.5 Types |
47 | 6.2.6 Representations of types 6.2.6.1 General |
48 | 6.2.6.2 Integer types |
49 | 6.2.7 Compatible type and composite type |
50 | 6.2.8 Alignment of objects |
51 | 6.3 Conversions 6.3.1 Arithmetic operands 6.3.1.1 Boolean, characters, and integers |
52 | 6.3.1.2 Boolean type 6.3.1.3 Signed and unsigned integers 6.3.1.4 Real floating and integer |
53 | 6.3.1.5 Real floating types 6.3.1.6 Complex types 6.3.1.7 Real and complex 6.3.1.8 Usual arithmetic conversions |
54 | 6.3.2 Other operands 6.3.2.1 Lvalues, arrays, and function designators 6.3.2.2 void |
55 | 6.3.2.3 Pointers 6.4 Lexical elements |
56 | 6.4.1 Keywords |
57 | 6.4.2 Identifiers 6.4.2.1 General |
58 | 6.4.2.2 Predefined identifiers 6.4.3 Universal character names |
59 | 6.4.4 Constants 6.4.4.1 Integer constants |
61 | 6.4.4.2 Floating constants |
62 | 6.4.4.3 Enumeration constants 6.4.4.4 Character constants |
64 | 6.4.5 String literals |
66 | 6.4.6 Punctuators |
67 | 6.4.7 Header names 6.4.8 Preprocessing numbers |
68 | 6.4.9 Comments |
69 | 6.5 Expressions |
70 | 6.5.1 Primary expressions 6.5.1.1 Generic selection |
71 | 6.5.2 Postfix operators 6.5.2.1 Array subscripting |
72 | 6.5.2.2 Function calls |
73 | 6.5.2.3 Structure and union members |
75 | 6.5.2.4 Postfix increment and decrement operators 6.5.2.5 Compound literals |
77 | 6.5.3 Unary operators 6.5.3.1 Prefix increment and decrement operators |
78 | 6.5.3.2 Address and indirection operators 6.5.3.3 Unary arithmetic operators 6.5.3.4 The sizeof and _Alignof operators |
79 | 6.5.4 Cast operators |
80 | 6.5.5 Multiplicative operators 6.5.6 Additive operators |
82 | 6.5.7 Bitwise shift operators 6.5.8 Relational operators |
83 | 6.5.9 Equality operators |
84 | 6.5.10 Bitwise AND operator 6.5.11 Bitwise exclusive OR operator 6.5.12 Bitwise inclusive OR operator |
85 | 6.5.13 Logical AND operator 6.5.14 Logical OR operator 6.5.15 Conditional operator |
86 | 6.5.16 Assignment operators |
87 | 6.5.16.1 Simple assignment |
88 | 6.5.16.2 Compound assignment |
89 | 6.5.17 Comma operator |
90 | 6.6 Constant expressions |
92 | 6.7 Declarations |
93 | 6.7.1 Storage-class specifiers 6.7.2 Type specifiers |
95 | 6.7.2.1 Structure and union specifiers |
98 | 6.7.2.2 Enumeration specifiers |
99 | 6.7.2.3 Tags |
101 | 6.7.2.4 Atomic type specifiers 6.7.3 Type qualifiers |
103 | 6.7.3.1 Formal definition of restrict |
104 | 6.7.4 Function specifiers |
106 | 6.7.5 Alignment specifier 6.7.6 Declarators |
107 | 6.7.6.1 Pointer declarators |
108 | 6.7.6.2 Array declarators |
110 | 6.7.6.3 Function declarators (including prototypes) |
112 | 6.7.7 Type names |
113 | 6.7.8 Type definitions |
114 | 6.7.9 Initialization |
119 | 6.7.10 Static assertions |
120 | 6.8 Statements and blocks 6.8.1 Labeled statements |
121 | 6.8.2 Compound statement 6.8.3 Expression and null statements |
122 | 6.8.4 Selection statements 6.8.4.1 The if statement 6.8.4.2 The switch statement |
123 | 6.8.5 Iteration statements 6.8.5.1 The while statement 6.8.5.2 The do statement |
124 | 6.8.5.3 The for statement 6.8.6 Jump statements 6.8.6.1 The goto statement |
125 | 6.8.6.2 The continue statement 6.8.6.3 The break statement 6.8.6.4 The return statement |
127 | 6.9 External definitions 6.9.1 Function definitions |
129 | 6.9.2 External object definitions |
131 | 6.10 Preprocessing directives |
132 | 6.10.1 Conditional inclusion |
133 | 6.10.2 Source file inclusion |
135 | 6.10.3 Macro replacement |
136 | 6.10.3.1 Argument substitution 6.10.3.2 The # operator 6.10.3.3 The ## operator |
137 | 6.10.3.4 Rescanning and further replacement |
138 | 6.10.3.5 Scope of macro definitions |
140 | 6.10.4 Line control 6.10.5 Error directive |
141 | 6.10.6 Pragma directive 6.10.7 Null directive 6.10.8 Predefined macro names 6.10.8.1 Mandatory macros |
142 | 6.10.8.2 Environment macros 6.10.8.3 Conditional feature macros |
143 | 6.10.9 Pragma operator |
144 | 6.11 Future language directions 6.11.1 Floating types 6.11.2 Linkages of identifiers 6.11.3 External names 6.11.4 Character escape sequences 6.11.5 Storage-class specifiers 6.11.6 Function declarators 6.11.7 Function definitions 6.11.8 Pragma directives 6.11.9 Predefined macro names |
145 | 7 Library 7.1 Introduction 7.1.1 Definitions of terms 7.1.2 Standard headers |
146 | 7.1.3 Reserved identifiers 7.1.4 Use of library functions |
149 | 7.2 Diagnostics 7.2.1 Program diagnostics 7.2.1.1 The assert macro |
150 | 7.3 Complex arithmetic 7.3.1 Introduction 7.3.2 Conventions 7.3.3 Branch cuts |
151 | 7.3.4 The CX_LIMITED_RANGE pragma 7.3.5 Trigonometric functions 7.3.5.1 The cacos functions |
152 | 7.3.5.2 The casin functions 7.3.5.3 The catan functions 7.3.5.4 The ccos functions 7.3.5.5 The csin functions |
153 | 7.3.5.6 The ctan functions 7.3.6 Hyperbolic functions 7.3.6.1 The cacosh functions 7.3.6.2 The casinh functions 7.3.6.3 The catanh functions |
154 | 7.3.6.4 The ccosh functions 7.3.6.5 The csinh functions 7.3.6.6 The ctanh functions 7.3.7 Exponential and logarithmic functions 7.3.7.1 The cexp functions |
155 | 7.3.7.2 The clog functions 7.3.8 Power and absolute-value functions 7.3.8.1 The cabs functions 7.3.8.2 The cpow functions |
156 | 7.3.8.3 The csqrt functions 7.3.9 Manipulation functions 7.3.9.1 The carg functions 7.3.9.2 The cimag functions 7.3.9.3 The CMPLX macros |
157 | 7.3.9.4 The conj functions 7.3.9.5 The cproj functions 7.3.9.6 The creal functions |
159 | 7.4 Character handling 7.4.1 Character classification functions 7.4.1.1 The isalnum function 7.4.1.2 The isalpha function 7.4.1.3 The isblank function |
160 | 7.4.1.4 The iscntrl function 7.4.1.5 The isdigit function 7.4.1.6 The isgraph function 7.4.1.7 The islower function 7.4.1.8 The isprint function 7.4.1.9 The ispunct function |
161 | 7.4.1.10 The isspace function 7.4.1.11 The isupper function 7.4.1.12 The isxdigit function 7.4.2 Character case mapping functions 7.4.2.1 The tolower function 7.4.2.2 The toupper function |
163 | 7.5 Errors |
164 | 7.6 Floating-point environment |
165 | 7.6.1 The FENV_ACCESS pragma |
166 | 7.6.2 Floating-point exceptions 7.6.2.1 The feclearexcept function 7.6.2.2 The fegetexceptflag function |
167 | 7.6.2.3 The feraiseexcept function 7.6.2.4 The fesetexceptflag function 7.6.2.5 The fetestexcept function |
168 | 7.6.3 Rounding 7.6.3.1 The fegetround function 7.6.3.2 The fesetround function |
169 | 7.6.4 Environment 7.6.4.1 The fegetenv function 7.6.4.2 The feholdexcept function 7.6.4.3 The fesetenv function |
170 | 7.6.4.4 The feupdateenv function |
171 | 7.7 Characteristics of floating types |
172 | 7.8 Format conversion of integer types 7.8.1 Macros for format specifiers |
173 | 7.8.2 Functions for greatest-width integer types 7.8.2.1 The imaxabs function 7.8.2.2 The imaxdiv function 7.8.2.3 The strtoimax and strtoumax functions 7.8.2.4 The wcstoimax and wcstoumax functions |
175 | 7.9 Alternative spellings |
176 | 7.10 Sizes of integer types |
177 | 7.11 Localization 7.11.1 Locale control 7.11.1.1 The setlocale function |
178 | 7.11.2 Numeric formatting convention inquiry 7.11.2.1 The localeconv function |
183 | 7.12 Mathematics |
184 | 7.12.1 Treatment of error conditions |
185 | 7.12.2 The FP_CONTRACT pragma |
186 | 7.12.3 Classification macros 7.12.3.1 The fpclassify macro 7.12.3.2 The isfinite macro 7.12.3.3 The isinf macro 7.12.3.4 The isnan macro |
187 | 7.12.3.5 The isnormal macro 7.12.3.6 The signbit macro 7.12.4 Trigonometric functions 7.12.4.1 The acos functions |
188 | 7.12.4.2 The asin functions 7.12.4.3 The atan functions 7.12.4.4 The atan2 functions 7.12.4.5 The cos functions |
189 | 7.12.4.6 The sin functions 7.12.4.7 The tan functions 7.12.5 Hyperbolic functions 7.12.5.1 The acosh functions 7.12.5.2 The asinh functions |
190 | 7.12.5.3 The atanh functions 7.12.5.4 The cosh functions 7.12.5.5 The sinh functions 7.12.5.6 The tanh functions |
191 | 7.12.6 Exponential and logarithmic functions 7.12.6.1 The exp functions 7.12.6.2 The exp2 functions 7.12.6.3 The expm1 functions 7.12.6.4 The frexp functions |
192 | 7.12.6.5 The ilogb functions 7.12.6.6 The ldexp functions 7.12.6.7 The log functions |
193 | 7.12.6.8 The log10 functions 7.12.6.9 The log1p functions 7.12.6.10 The log2 functions 7.12.6.11 The logb functions |
194 | 7.12.6.12 The modf functions 7.12.6.13 The scalbn and scalbln functions 7.12.7 Power and absolute-value functions 7.12.7.1 The cbrt functions |
195 | 7.12.7.2 The fabs functions 7.12.7.3 The hypot functions 7.12.7.4 The pow functions 7.12.7.5 The sqrt functions |
196 | 7.12.8 Error and gamma functions 7.12.8.1 The erf functions 7.12.8.2 The erfc functions 7.12.8.3 The lgamma functions |
197 | 7.12.8.4 The tgamma functions 7.12.9 Nearest integer functions 7.12.9.1 The ceil functions 7.12.9.2 The floor functions 7.12.9.3 The nearbyint functions |
198 | 7.12.9.4 The rint functions 7.12.9.5 The lrint and llrint functions 7.12.9.6 The round functions 7.12.9.7 The lround and llround functions |
199 | 7.12.9.8 The trunc functions 7.12.10 Remainder functions 7.12.10.1 The fmod functions 7.12.10.2 The remainder functions |
200 | 7.12.10.3 The remquo functions 7.12.11 Manipulation functions 7.12.11.1 The copysign functions 7.12.11.2 The nan functions |
201 | 7.12.11.3 The nextafter functions 7.12.11.4 The nexttoward functions 7.12.12 Maximum, minimum, and positive difference functions 7.12.12.1 The fdim functions |
202 | 7.12.12.2 The fmax functions 7.12.12.3 The fmin functions 7.12.13 Floating multiply-add 7.12.13.1 The fma functions |
203 | 7.12.14 Comparison macros 7.12.14.1 The isgreater macro 7.12.14.2 The isgreaterequal macro 7.12.14.3 The isless macro |
204 | 7.12.14.4 The islessequal macro 7.12.14.5 The islessgreater macro 7.12.14.6 The isunordered macro |
205 | 7.13 Nonlocal jumps 7.13.1 Save calling environment 7.13.1.1 The setjmp macro 7.13.2 Restore calling environment 7.13.2.1 The longjmp function |
207 | 7.14 Signal handling 7.14.1 Specify signal handling 7.14.1.1 The signal function |
208 | 7.14.2 Send signal 7.14.2.1 The raise function |
210 | 7.15 Alignment |
211 | 7.16 Variable arguments 7.16.1 Variable argument list access macros 7.16.1.1 The va_arg macro |
212 | 7.16.1.2 The va_copy macro 7.16.1.3 The va_end macro 7.16.1.4 The va_start macro |
214 | 7.17 Atomics 7.17.1 Introduction |
215 | 7.17.2 Initialization 7.17.2.1 The ATOMIC_VAR_INIT macro 7.17.2.2 The atomic_init generic function 7.17.3 Order and consistency |
217 | 7.17.3.1 The kill_dependency macro |
218 | 7.17.4 Fences 7.17.4.1 The atomic_thread_fence function 7.17.4.2 The atomic_signal_fence function |
219 | 7.17.5 Lock-free property 7.17.5.1 The atomic_islockfree generic function 7.17.6 Atomic integer types |
220 | 7.17.7 Operations on atomic types 7.17.7.1 The atomic_store generic functions 7.17.7.2 The atomic_load generic functions |
221 | 7.17.7.3 The atomic_exchange generic functions 7.17.7.4 The atomic_compare_exchange generic functions |
222 | 7.17.7.5 The atomic_fetch and modify generic functions 7.17.8 Atomic flag type and operations |
223 | 7.17.8.1 The atomic_flag_test_and_set functions 7.17.8.2 The atomic_flag_clear functions |
224 | 7.18 Boolean type and values |
225 | 7.19 Common definitions |
226 | 7.20 Integer types 7.20.1 Integer types 7.20.1.1 Exact-width integer types 7.20.1.2 Minimum-width integer types |
227 | 7.20.1.3 Fastest minimum-width integer types 7.20.1.4 Integer types capable of holding object pointers 7.20.1.5 Greatest-width integer types 7.20.2 Limits of specified-width integer types |
228 | 7.20.2.1 Limits of exact-width integer types 7.20.2.2 Limits of minimum-width integer types 7.20.2.3 Limits of fastest minimum-width integer types 7.20.2.4 Limits of integer types capable of holding object pointers |
229 | 7.20.2.5 Limits of greatest-width integer types 7.20.3 Limits of other integer types |
230 | 7.20.4 Macros for integer constants 7.20.4.1 Macros for minimum-width integer constants 7.20.4.2 Macros for greatest-width integer constants |
231 | 7.21 Input/output 7.21.1 Introduction |
232 | 7.21.2 Streams |
233 | 7.21.3 Files |
235 | 7.21.4 Operations on files 7.21.4.1 The remove function 7.21.4.2 The rename function |
236 | 7.21.4.3 The tmpfile function 7.21.4.4 The tmpnam function 7.21.5 File access functions 7.21.5.1 The fclose function |
237 | 7.21.5.2 The fflush function 7.21.5.3 The fopen function |
238 | 7.21.5.4 The freopen function |
239 | 7.21.5.5 The setbuf function 7.21.5.6 The setvbuf function 7.21.6 Formatted input/output functions |
240 | 7.21.6.1 The fprintf function |
246 | 7.21.6.2 The fscanf function |
251 | 7.21.6.3 The printf function 7.21.6.4 The scanf function |
252 | 7.21.6.5 The snprintf function 7.21.6.6 The sprintf function 7.21.6.7 The sscanf function |
253 | 7.21.6.8 The vfprintf function 7.21.6.9 The vfscanf function |
254 | 7.21.6.10 The vprintf function 7.21.6.11 The vscanf function 7.21.6.12 The vsnprintf function |
255 | 7.21.6.13 The vsprintf function 7.21.6.14 The vsscanf function 7.21.7 Character input/output functions 7.21.7.1 The fgetc function |
256 | 7.21.7.2 The fgets function 7.21.7.3 The fputc function 7.21.7.4 The fputs function |
257 | 7.21.7.5 The getc function 7.21.7.6 The getchar function 7.21.7.7 The putc function 7.21.7.8 The putchar function |
258 | 7.21.7.9 The puts function 7.21.7.10 The ungetc function 7.21.8 Direct input/output functions 7.21.8.1 The fread function |
259 | 7.21.8.2 The fwrite function 7.21.9 File positioning functions 7.21.9.1 The fgetpos function |
260 | 7.21.9.2 The fseek function 7.21.9.3 The fsetpos function 7.21.9.4 The ftell function |
261 | 7.21.9.5 The rewind function 7.21.10 Error-handling functions 7.21.10.1 The clearerr function 7.21.10.2 The feof function |
262 | 7.21.10.3 The ferror function 7.21.10.4 The perror function |
263 | 7.22 General utilities 7.22.1 Numeric conversion functions 7.22.1.1 The atof function |
264 | 7.22.1.2 The atoi, atol, and atoll functions 7.22.1.3 The strtod, strtof, and strtold functions |
266 | 7.22.1.4 The strtol, strtoll, strtoul, and strtoull functions |
267 | 7.22.2 Pseudo-random sequence generation functions 7.22.2.1 The rand function 7.22.2.2 The srand function |
268 | 7.22.3 Memory management functions 7.22.3.1 The alignedalloc function 7.22.3.2 The calloc function |
269 | 7.22.3.3 The free function 7.22.3.4 The malloc function 7.22.3.5 The realloc function |
270 | 7.22.4 Communication with the environment 7.22.4.1 The abort function 7.22.4.2 The atexit function 7.22.4.3 The atquickexit function |
271 | 7.22.4.4 The exit function 7.22.4.5 The Exit function 7.22.4.6 The getenv function |
272 | 7.22.4.7 The quickexit function 7.22.4.8 The system function |
273 | 7.22.5 Searching and sorting utilities 7.22.5.1 The bsearch function |
274 | 7.22.5.2 The qsort function 7.22.6 Integer arithmetic functions 7.22.6.1 The abs, labs and dlabs functions 7.22.6.2 The div, ldiv, and lldiv functions |
275 | 7.22.7 Multibyte/wide character conversion functions 7.22.7.1 The mblen function 7.22.7.2 The mbtowc function |
276 | 7.22.7.3 The wctomb function 7.22.8 Multibyte/wide string conversion functions 7.22.8.1 The mbstowcs function |
277 | 7.22.8.2 The wcstombs function |
278 | 7.23 _Noreturn |
279 | 7.24 String handling 7.24.1 String function conventions 7.24.2 Copying functions 7.24.2.1 The memcpy function 7.24.2.2 The memmove function 7.24.2.3 The strcpy function |
280 | 7.24.2.4 The strncpy function 7.24.3 Concatenation functions 7.24.3.1 The strcat function 7.24.3.2 The strncat function |
281 | 7.24.4 Comparison functions 7.24.4.1 The memcmp function 7.24.4.2 The strcmp function 7.24.4.3 The strcoll function |
282 | 7.24.4.4 The strncmp function 7.24.4.5 The strxfrm function 7.24.5 Search functions 7.24.5.1 The memchr function |
283 | 7.24.5.2 The strchr function 7.24.5.3 The strcspn function 7.24.5.4 The strpbrk function 7.24.5.5 The strrchr function |
284 | 7.24.5.6 The strspn function 7.24.5.7 The strstr function 7.24.5.8 The strtok function |
285 | 7.24.6 Miscellaneous functions 7.24.6.1 The memset function 7.24.6.2 The strerror function |
286 | 7.24.6.3 The strlen function |
287 | 7.25 Type-generic math |
289 | 7.26 Threads 7.26.1 Introduction |
290 | 7.26.2 Initialization functions 7.26.2.1 The callonce function 7.26.3 Condition variable functions 7.26.3.1 The cndbroadcast function |
291 | 7.26.3.2 The cnddestroy function 7.26.3.3 The cndinit function 7.26.3.4 The cndsignal function 7.26.3.5 The cndtimedwait function |
292 | 7.26.3.6 The cndwait function 7.26.4 Mutex functions 7.26.4.1 The mtxdestroy function 7.26.4.2 The mtxinit function |
293 | 7.26.4.3 The mtxlock function 7.26.4.4 The mtxtimedlock function 7.26.4.5 The mtxtrylock function |
294 | 7.26.4.6 The mtxunlock function 7.26.5 Thread functions 7.26.5.1 The thrdcreate function 7.26.5.2 The thrdcurrent function |
295 | 7.26.5.3 The thrddetach function 7.26.5.4 The thrdequal function 7.26.5.5 The thrdexit function 7.26.5.6 The thrdjoin function |
296 | 7.26.5.7 The thrdsleep function 7.26.5.8 The thrdyield function 7.26.6 Thread-specific storage functions 7.26.6.1 The tsscreate function |
297 | 7.26.6.2 The tssdelete function 7.26.6.3 The tssget function 7.26.6.4 The tssset function |
299 | 7.27 Date and time |
300 | 7.27.2 Time manipulation functions 7.27.2.1 The clock function 7.27.2.2 The difftime function 7.27.2.3 The mktime function |
301 | 7.27.2.4 The time function 7.27.2.5 The timespecget function |
302 | 7.27.3 Time conversion functions 7.27.3.1 The asctime function 7.27.3.2 The ctime function |
303 | 7.27.3.3 The gmtime function 7.27.3.4 The localtime function 7.27.3.5 The strftime function |
307 | 7.28 Unicode utilities 7.28.1 Restartable multibyte/wide character conversion functions 7.28.1.1 The mbrtoc16 function |
308 | 7.28.1.2 The c16rtomb function 7.28.1.3 The mbrtoc32 function |
309 | 7.28.1.4 The c32rtomb function |
310 | 7.29 Extended multibyte and wide character utilities 7.29.1 Introduction 7.29.2 Formatted wide character input/output functions |
311 | 7.29.2.1 The fwprintf function |
315 | 7.29.2.2 The fwscanf function |
319 | 7.29.2.3 The swprintf function 7.29.2.4 The swscanf function |
320 | 7.29.2.5 The vfwprintf function 7.29.2.6 The vfwscanf function |
321 | 7.29.2.7 The vswprintf function 7.29.2.8 The vswscanf function 7.29.2.9 The vwprintf function |
322 | 7.29.2.10 The vwscanf function 7.29.2.11 The wprintf function 7.29.2.12 The wscanf function 7.29.3 Wide character input/output functions 7.29.3.1 The fgetwc function |
323 | 7.29.3.2 The fgetws function 7.29.3.3 The fputwc function |
324 | 7.29.3.4 The fputws function 7.29.3.5 The fwide function 7.29.3.6 The getwc function 7.29.3.7 The getwchar function |
325 | 7.29.3.8 The putwc function 7.29.3.9 The putwchar function 7.29.3.10 The ungetwc function |
326 | 7.29.4 General wide string utilities 7.29.4.1 Wide string numeric conversion functions 7.29.4.1.1 The wcstod, wcstof, and wcstold functions |
327 | 7.29.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions |
329 | 7.29.4.2 Wide string copying functions 7.29.4.2.1 The wcscpy function 7.29.4.2.2 The wcsncpy function 7.29.4.2.3 The wmemcpy function 7.29.4.2.4 The wmemmove function |
330 | 7.29.4.3 Wide string concatenation functions 7.29.4.3.1 The wcscat function 7.29.4.3.2 The wcsncat function 7.29.4.4 Wide string comparison functions 7.29.4.4.1 The wcscmp function |
331 | 7.29.4.4.2 The wcscoll function 7.29.4.4.3 The wcsncmp function 7.29.4.4.4 The wcsxfrm function |
332 | 7.29.4.4.5 The wmemcmp function 7.29.4.5 Wide string search functions 7.29.4.5.1 The wcschr function 7.29.4.5.2 The wcscspn function |
333 | 7.29.4.5.3 The wcspbrk function 7.29.4.5.4 The wcsrchr function 7.29.4.5.5 The wcsspn function 7.29.4.5.6 The wcsstr function |
334 | 7.29.4.5.7 The wcstok function 7.29.4.5.8 The wmemchr function |
335 | 7.29.4.6 Miscellaneous functions 7.29.4.6.1 The wcslen function 7.29.4.6.2 The wmemset function 7.29.5 Wide character time conversion functions 7.29.5.1 The wcsftime function |
336 | 7.29.6 Extended multibyte/wide character conversion utilities 7.29.6.1 Single-byte/wide character conversion functions 7.29.6.1.1 The btowc function 7.29.6.1.2 The wctob function |
337 | 7.29.6.2 Conversion state functions 7.29.6.2.1 The mbsinit function 7.29.6.3 Restartable multibyte/wide character conversion functions 7.29.6.3.1 The mbrlen function 7.29.6.3.2 The mbrtowc function |
338 | 7.29.6.3.3 The wcrtomb function |
339 | 7.29.6.4 Restartable multibyte/wide string conversion functions 7.29.6.4.1 The mbsrtowcs function 7.29.6.4.2 The wcsrtombs function |
341 | 7.30 Wide character classification and mapping utilities 7.30.1 Introduction 7.30.2 Wide character classification utilities 7.30.2.1 Wide character classification functions |
342 | 7.30.2.1.1 The iswalnum function 7.30.2.1.2 The iswalpha function 7.30.2.1.3 The iswblank function 7.30.2.1.4 The iswcntrl function 7.30.2.1.5 The iswdigit function |
343 | 7.30.2.1.6 The iswgraph function 7.30.2.1.7 The iswlower function 7.30.2.1.8 The iswprint function 7.30.2.1.9 The iswpunct function 7.30.2.1.10 The iswspace function 7.30.2.1.11 The iswupper function |
344 | 7.30.2.1.12 The iswxdigit function 7.30.2.2 Extensible wide character classification functions 7.30.2.2.1 The iswctype function 7.30.2.2.2 The wctype function |
345 | 7.30.3 Wide character case mapping utilities 7.30.3.1 Wide character case mapping functions 7.30.3.1.1 The towlower function 7.30.3.1.2 The towupper function 7.30.3.2 Extensible wide character case mapping functions 7.30.3.2.1 The towctrans function |
346 | 7.30.3.2.2 The wctrans function |
347 | 7.31 Future library directions 7.31.1 Complex arithmetic 7.31.2 Character handling 7.31.3 Errors 7.31.4 Floating-point environment 7.31.5 Format conversion of integer types 7.31.6 Localization 7.31.7 Signal handling 7.31.8 Atomics 7.31.9 Boolean type and values 7.31.10 Integer types |
348 | 7.31.11 Input/output 7.31.12 General utilities 7.31.13 String handling 7.31.14 Date and time |
349 | Annex A (informative) Language syntax summary A.1 Lexical grammar A.1.1 Lexical elements A.1.2 Keywords A.1.3 Identifiers |
350 | A.1.4 Universal character names A.1.5 Constants |
352 | A.1.6 String literals A.1.7 Punctuators |
353 | A.1.8 Header names A.1.9 Preprocessing numbers A.2 Phrase structure grammar A.2.1 Expressions |
355 | A.2.2 Declarations |
358 | A.2.3 Statements |
359 | A.2.4 External definitions A.3 Preprocessing directives |
360 | A.4 Floating-point subject sequence A.4.1 NaN char sequence A.4.2 NaN wchar sequence |
361 | Annex B (informative) Library summary B.1 Diagnostics B.2 Complex |
362 | B.3 Character handling B.4 Errors B.5 Floating-point environment |
363 | B.6 Characteristics of floating types B.7 Format conversion of integer types |
364 | B.8 Alternative spellings B.9 Sizes of integer types B.10 Localization B.11 Mathematics |
367 | B.12 Nonlocal jumps B.13 Signal handling |
368 | B.14 Alignment B.15 Variable arguments B.16 Atomics |
369 | B.17 Boolean type and values B.18 Common definitions B.19 Integer types |
370 | B.20 Input/output |
372 | B.21 General utilities |
373 | B.22 _Noreturn B.23 String handling |
374 | B.24 Type-generic math |
375 | B.25 Threads B.26 Date and time |
376 | B.27 Unicode utilities B.28 Extended multibyte/wide character utilities |
379 | B.29 Wide character classification and mapping utilities |
381 | Annex C (informative) Sequence points |
382 | Annex D (normative) Universal character names for identifiers D.1 Ranges of characters allowed D.2 Ranges of characters disallowed initially |
383 | Annex E (informative) Implementation limits |
385 | Annex F (normative) IEC 60559 floating-point arithmetic F.1 Introduction F.2 Types F.2.1 Infinities, signed zeros, and NaNs F.3 Operators and functions |
387 | F.4 Floating to integer conversion F.5 Binary-decimal conversion F.6 The return statement F.7 Contracted expressions |
388 | F.8 Floating-point environment F.8.1 Environment management F.8.2 Translation F.8.3 Execution F.8.4 Constant expressions |
389 | F.8.5 Initialization F.8.6 Changing the environment |
390 | F.9 Optimization F.9.1 Global transformations F.9.2 Expression transformations |
391 | F.9.3 Relational operators |
392 | F.9.4 Constant arithmetic F.10 Mathematics |
393 | F.10.1 Trigonometric functions F.10.1.1 The acos functions F.10.1.2 The asin functions F.10.1.3 The atan functions F.10.1.4 The atan2 functions F.10.1.5 The cos functions F.10.1.6 The sin functions F.10.1.7 The tan functions |
394 | F.10.2 Hyperbolic functions F.10.2.1 The acosh functions F.10.2.2 The asinh functions F.10.2.3 The atanh functions F.10.2.4 The cosh functions F.10.2.5 The sinh functions F.10.2.6 The tanh functions F.10.3 Exponential and logarithmic functions F.10.3.1 The exp functions F.10.3.2 The exp2 functions F.10.3.3 The expm1 functions |
395 | F.10.3.4 The frexp functions F.10.3.5 The ilogb functions F.10.3.6 The ldexp functions F.10.3.7 The log functions F.10.3.8 The log10 functions F.10.3.9 The log1p functions |
396 | F.10.3.10 The log2 functions F.10.3.11 The logb functions F.10.3.12 The modf functions F.10.3.13 The scalbn and scalbln functions F.10.4 Power and absolute value functions F.10.4.1 The cbrt functions |
397 | F.10.4.2 The fabs functions F.10.4.3 The hypot functions F.10.4.4 The pow functions F.10.4.5 The sqrt functions |
398 | F.10.5 Error and gamma functions F.10.5.1 The erf functions F.10.5.2 The erfc functions F.10.5.3 The lgamma functions F.10.5.4 The tgamma functions F.10.6 Nearest integer functions F.10.6.1 The ceil functions |
399 | F.10.6.2 The floor functions F.10.6.3 The nearbyint functions F.10.6.4 The rint functions F.10.6.5 The lrint and llrint functions F.10.6.6 The round functions |
400 | F.10.6.7 The lround and llround functions F.10.6.8 The trunc functions F.10.7 Remainder functions F.10.7.1 The fmod functions F.10.7.2 The remainder functions F.10.7.3 The remquo functions F.10.8 Manipulation functions F.10.8.1 The copysign functions |
401 | F.10.8.2 The nan functions F.10.8.3 The nextafter functions F.10.8.4 The nexttoward functions F.10.9 Maximum, minimum, and positive difference functions F.10.9.1 The fdim functions F.10.9.2 The fmax functions F.10.9.3 The fmin functions F.10.10 Floating multiply-add F.10.10.1 The fma functions F.10.11 Comparison macros |
403 | Annex G (normative) IEC 60559-compatible complex arithmetic G.1 Introduction G.2 Types G.3 Conventions G.4 Conversions G.4.1 Imaginary types G.4.2 Real and imaginary G.4.3 Imaginary and complex G.5 Binary operators |
404 | G.5.1 Multiplicative operators |
406 | G.5.2 Additive operators G.6 Complex arithmetic |
407 | G.6.1 Trigonometric functions G.6.1.1 The cacos functions |
408 | G.6.2 Hyperbolic functions G.6.2.1 The cacosh functions G.6.2.2 The casinh functions |
409 | G.6.2.3 The catanh functions G.6.2.4 The ccosh functions |
410 | G.6.2.5 The csinh functions G.6.2.6 The ctanh functions |
411 | G.6.3 Exponential and logarithmic functions G.6.3.1 The cexp functions G.6.3.2 The clog functions |
412 | G.6.4 Power and absolute-value functions G.6.4.1 The cpow functions G.6.4.2 The csqrt functions G.7 Type-generic math |
413 | Annex H (informative) Language independent arithmetic H.1 Introduction H.2 Types H.2.1 Boolean type H.2.2 Integer types H.2.2.1 Integer operations |
414 | H.2.3 Floating-point types H.2.3.1 Floating-point parameters H.2.3.2 Floating-point operations |
415 | H.2.3.3 Rounding styles H.2.4 Type conversions H.3 Notification |
416 | H.3.1 Notification alternatives H.3.1.1 Indicators H.3.1.2 Traps |
417 | Annex I (informative) Common warnings |
418 | Annex J (informative) Portability issues J.1 Unspecified behavior |
420 | J.2 Undefined behavior |
431 | J.3 Implementation-defined behavior J.3.1 Translation J.3.2 Environment J.3.3 Identifiers J.3.4 Characters |
432 | J.3.5 Integers J.3.6 Floating point |
433 | J.3.7 Arrays and pointers J.3.8 Hints J.3.9 Structures, unions, enumerations, and bit-fields J.3.10 Qualifiers J.3.11 Preprocessing directives |
434 | J.3.12 Library functions |
436 | J.3.13 Architecture J.4 Locale-specific behavior |
437 | J.5 Common extensions J.5.1 Environment arguments J.5.2 Specialized identifiers J.5.3 Lengths and cases of identifiers J.5.4 Scopes of identifiers J.5.5 Writable string literals J.5.6 Other arithmetic types J.5.7 Function pointer casts J.5.8 Extended bit-field types J.5.9 The fortran keyword J.5.10 The asm keyword |
438 | J.5.11 Multiple external definitions J.5.12 Predefined macro names J.5.13 Floating-point status flags J.5.14 Extra arguments for signal handlers J.5.15 Additional stream types and file-opening modes J.5.16 Defined file position indicator J.5.17 Math error reporting |
439 | Annex K (normative) Bounds-checking interfaces K.1 Background K.2 Scope K.3 Library K.3.1 Introduction K.3.1.1 Standard headers |
440 | K.3.1.2 Reserved identifiers K.3.1.3 Use of errno K.3.1.4 Runtime-constraint violations K.3.2 Errors |
441 | K.3.3 Common definitions K.3.4 Integer types K.3.5 Input/output |
442 | K.3.5.1 Operations on files The tmpfile_s function The tmpnam_s function |
443 | K.3.5.2 File access functions The fopen_s function |
444 | The freopen_s function |
445 | K.3.5.3 Formatted input/output functions The fprintf_s function The fscanf_s function |
447 | The printf_s function The scanf_s function The snprintf_s function |
448 | The sprintf_s function |
449 | The sscanf_s function The vfprintf_s function |
450 | The vfscanf_s function The vprintf_s function |
451 | The vscanf_s function The vsnprintf_s function |
452 | The vsprintf_s function The vsscanf_s function |
453 | K.3.5.4 Character input/output functions The gets_s function |
454 | K.3.6 General utilities K.3.6.1 Runtime-constraint handling The set_constraint_handler_s function |
455 | The abort_handler_s function The ignore_handler_s function K.3.6.2 Communication with the environment The getenv_s function |
456 | K.3.6.3 Searching and sorting utilities The bsearch_s function |
457 | The qsort_s function |
458 | K.3.6.4 Multibyte/wide character conversion functions The wctomb_s function K.3.6.5 Multibyte/wide string conversion functions |
459 | The mbstowcs_s function The wcstombs_s function |
460 | K.3.7 String handling |
461 | K.3.7.1 Copying functions The memcpy_s function The memmove_s function |
462 | The strcpy_s function The strncpy_s function |
463 | K.3.7.2 Concatenation functions The strcat_s function |
464 | The strncat_s function |
465 | K.3.7.3 Search functions The strtok_s function |
466 | K.3.7.4 Miscellaneous functions The memset_s function The strerror_s function |
467 | The strerrorlen_s function The strnlen_s function K.3.8 Date and time |
468 | K.3.8.1 Components of time K.3.8.2 Time conversion functions The asctime_s function |
469 | The ctime_s function The gmtime_s function |
470 | The localtime_s function K.3.9 Extended multibyte and wide character utilities K.3.9.1 Formatted wide character input/output functions The fwprintf_s function |
471 | The fwscanf_s function |
472 | The snwprintf_s function The swprintf_s function |
473 | The swscanf_s function The vfwprintf_s function |
474 | The vfwscanf_s function The vsnwprintf_s function |
475 | The vswprintf_s function |
476 | The vswscanf_s function The vwprintf_s function |
477 | The vwscanf_s function The wprintf_s function |
478 | The wscanf_s function K.3.9.2 General wide string utilities Wide string copying functions The wcscpy_s function |
479 | The wcsncpy_s function The wmemcpy_s function |
480 | The wmemmove_s function |
481 | Wide string concatenation functions The wcscat_s function The wcsncat_s function |
482 | Wide string search functions The wcstok_s function |
483 | Miscellaneous functions The wcsnlen_s function |
484 | K.3.9.3 Extended multibyte/wide character conversion utilities Restartable multibyte/wide character conversion functions The wcrtomb_s function |
485 | Restartable multibyte/wide string conversion functions The mbsrtowcs_s function |
486 | The wcsrtombs_s function |
488 | Annex L (normative) Analyzability L.1 Scope L.2 Definitions L.2.1 out-of-bounds store L.2.2 bounded undefined behavior L.2.3 critical undefined behavior L.3 Requirements |
490 | Annex M (informative) Change History M.1 Fourth Edition M.2 Third Edition M.3 Second Edition |
492 | M.4 First Edition, Amendment 1 |
493 | Bibliography |
494 | Index |