manual fix of section c99 6
[c-standard] / n1256.html
1 <html><head><title>WG14/N1256   Septermber 7, 2007  ISO/IEC 9899:TC3</title></head><body>
2 <pre><!--page 1 -->
3 WG14/N1256                Committee Draft -- Septermber 7, 2007                   ISO/IEC 9899:TC3
4
5
6 </pre>
7
8 <h2><a name="Contents" href="#Contents">Contents</a></h2>
9 <ul>
10 <li><a href="#Foreword">Foreword</a>
11 <li><a href="#Introduction">Introduction</a>
12 <li><a href="#1">1. Scope</a>
13 <li><a href="#2">2. Normative references</a>
14 <li><a href="#3">3. Terms, definitions, and symbols</a>
15 <li><a href="#4">4. Conformance</a>
16 <li><a href="#5">5. Environment</a>
17 <ul>
18 <li><a href="#5.1">   5.1 Conceptual models</a>
19 <ul>
20 <li><a href="#5.1.1">        5.1.1  Translation environment</a>
21 <li><a href="#5.1.2">        5.1.2  Execution environments</a>
22 </ul>
23 <li><a href="#5.2">   5.2 Environmental considerations</a>
24 <ul>
25 <li><a href="#5.2.1">        5.2.1 Character sets</a>
26 <li><a href="#5.2.2">        5.2.2  Character display semantics</a>
27 <li><a href="#5.2.3">        5.2.3 Signals and interrupts</a>
28 <li><a href="#5.2.4">        5.2.4  Environmental limits</a>
29 </ul>
30 </ul>
31 <li><a href="#6">6. Language</a>
32 <ul>
33 <li><a href="#6.1">   6.1 Notation</a>
34 <li><a href="#6.2">   6.2 Concepts</a>
35 <ul>
36 <li><a href="#6.2.1">        6.2.1 Scopes of identifiers</a>
37 <li><a href="#6.2.2">        6.2.2   Linkages of identifiers</a>
38 <li><a href="#6.2.3">        6.2.3 Name spaces of identifiers</a>
39 <li><a href="#6.2.4">        6.2.4 Storage durations of objects</a>
40 <li><a href="#6.2.5">        6.2.5 Types</a>
41 <li><a href="#6.2.6">        6.2.6 Representations of types</a>
42 <li><a href="#6.2.7">        6.2.7 Compatible type and composite type</a>
43 </ul>
44 <li><a href="#6.3">   6.3 Conversions</a>
45 <ul>
46 <li><a href="#6.3.1">        6.3.1 Arithmetic operands</a>
47 <li><a href="#6.3.2">        6.3.2 Other operands</a>
48 </ul>
49 <li><a href="#6.4">   6.4 Lexical elements</a>
50 <ul>
51 <li><a href="#6.4.1">        6.4.1 Keywords</a>
52 <li><a href="#6.4.2">        6.4.2 Identifiers</a>
53 <li><a href="#6.4.3">        6.4.3 Universal character names</a>
54 <li><a href="#6.4.4">        6.4.4   Constants</a>
55 <li><a href="#6.4.5">        6.4.5 String literals</a>
56 <li><a href="#6.4.6">        6.4.6   Punctuators</a>
57 <li><a href="#6.4.7">        6.4.7 Header names</a>
58 <li><a href="#6.4.8">        6.4.8 Preprocessing numbers</a>
59 <li><a href="#6.4.9">        6.4.9 Comments</a>
60 </ul>
61 <li><a href="#6.5">   6.5 Expressions</a>
62 <!--page 2 -->
63 <ul>
64 <li><a href="#6.5.1">          6.5.1   Primary expressions</a>
65 <li><a href="#6.5.2">          6.5.2 Postfix operators</a>
66 <li><a href="#6.5.3">          6.5.3   Unary operators</a>
67 <li><a href="#6.5.4">          6.5.4 Cast operators</a>
68 <li><a href="#6.5.5">          6.5.5   Multiplicative operators</a>
69 <li><a href="#6.5.6">          6.5.6 Additive operators</a>
70 <li><a href="#6.5.7">          6.5.7 Bitwise shift operators</a>
71 <li><a href="#6.5.8">          6.5.8   Relational operators</a>
72 <li><a href="#6.5.9">          6.5.9 Equality operators</a>
73 <li><a href="#6.5.10">          6.5.10 Bitwise AND operator</a>
74 <li><a href="#6.5.11">          6.5.11 Bitwise exclusive OR operator</a>
75 <li><a href="#6.5.12">          6.5.12 Bitwise inclusive OR operator</a>
76 <li><a href="#6.5.13">          6.5.13 Logical AND operator</a>
77 <li><a href="#6.5.14">          6.5.14 Logical OR operator</a>
78 <li><a href="#6.5.15">          6.5.15 Conditional operator</a>
79 <li><a href="#6.5.16">          6.5.16 Assignment operators</a>
80 <li><a href="#6.5.17">          6.5.17 Comma operator</a>
81 </ul>
82 <li><a href="#6.6">     6.6 Constant expressions</a>
83 <li><a href="#6.7">     6.7 Declarations</a>
84 <ul>
85 <li><a href="#6.7.1">          6.7.1 Storage-class specifiers</a>
86 <li><a href="#6.7.2">          6.7.2   Type specifiers</a>
87 <li><a href="#6.7.3">          6.7.3 Type qualifiers</a>
88 <li><a href="#6.7.4">          6.7.4   Function specifiers</a>
89 <li><a href="#6.7.5">          6.7.5 Declarators</a>
90 <li><a href="#6.7.6">          6.7.6 Type names</a>
91 <li><a href="#6.7.7">          6.7.7   Type definitions</a>
92 <li><a href="#6.7.8">          6.7.8 Initialization</a>
93 </ul>
94 <li><a href="#6.8">     6.8 Statements and blocks</a>
95 <ul>
96 <li><a href="#6.8.1">          6.8.1   Labeled statements</a>
97 <li><a href="#6.8.2">          6.8.2 Compound statement</a>
98 <li><a href="#6.8.3">          6.8.3 Expression and null statements</a>
99 <li><a href="#6.8.4">          6.8.4 Selection statements</a>
100 <li><a href="#6.8.5">          6.8.5 Iteration statements</a>
101 <li><a href="#6.8.6">          6.8.6 Jump statements</a>
102 </ul>
103 <li><a href="#6.9">     6.9 External definitions</a>
104 <ul>
105 <li><a href="#6.9.1">          6.9.1   Function definitions</a>
106 <li><a href="#6.9.2">          6.9.2 External object definitions</a>
107 </ul>
108 <li><a href="#6.10">     6.10 Preprocessing directives</a>
109 <ul>
110 <li><a href="#6.10.1">          6.10.1 Conditional inclusion</a>
111 <li><a href="#6.10.2">          6.10.2 Source file inclusion</a>
112 <li><a href="#6.10.3">          6.10.3 Macro replacement</a>
113 <li><a href="#6.10.4">          6.10.4 Line control</a>
114 <li><a href="#6.10.5">          6.10.5 Error directive</a>
115 <li><a href="#6.10.6">          6.10.6 Pragma directive</a>
116 <!--page 3 -->
117 <li><a href="#6.10.7">       6.10.7 Null directive</a>
118 <li><a href="#6.10.8">       6.10.8 Predefined macro names</a>
119 <li><a href="#6.10.9">       6.10.9 Pragma operator</a>
120 </ul>
121 <li><a href="#6.11">  6.11 Future language directions</a>
122 <ul>
123 <li><a href="#6.11.1">       6.11.1 Floating types</a>
124 <li><a href="#6.11.2">       6.11.2 Linkages of identifiers</a>
125 <li><a href="#6.11.3">       6.11.3 External names</a>
126 <li><a href="#6.11.4">       6.11.4 Character escape sequences</a>
127 <li><a href="#6.11.5">       6.11.5 Storage-class specifiers</a>
128 <li><a href="#6.11.6">       6.11.6 Function declarators</a>
129 <li><a href="#6.11.7">       6.11.7 Function definitions</a>
130 <li><a href="#6.11.8">       6.11.8 Pragma directives</a>
131 <li><a href="#6.11.9">       6.11.9 Predefined macro names</a>
132 </ul>
133 </ul>
134 <li><a href="#7">7. Library</a>
135 <ul>
136 <li><a href="#7.1">   7.1 Introduction</a>
137 <ul>
138 <li><a href="#7.1.1">         7.1.1 Definitions of terms</a>
139 <li><a href="#7.1.2">         7.1.2 Standard headers</a>
140 <li><a href="#7.1.3">         7.1.3 Reserved identifiers</a>
141 <li><a href="#7.1.4">         7.1.4 Use of library functions</a>
142 </ul>
143 <li><a href="#7.2">   7.2 Diagnostics &lt;assert.h&gt;</a>
144 <ul>
145 <li><a href="#7.2.1">         7.2.1 Program diagnostics</a>
146 </ul>
147 <li><a href="#7.3">   7.3 Complex arithmetic &lt;complex.h&gt;</a>
148 <ul>
149 <li><a href="#7.3.1">         7.3.1 Introduction</a>
150 <li><a href="#7.3.2">         7.3.2 Conventions</a>
151 <li><a href="#7.3.3">         7.3.3 Branch cuts</a>
152 <li><a href="#7.3.4">         7.3.4 The CX_LIMITED_RANGE pragma</a>
153 <li><a href="#7.3.5">         7.3.5 Trigonometric functions</a>
154 <li><a href="#7.3.6">         7.3.6 Hyperbolic functions</a>
155 <li><a href="#7.3.7">         7.3.7 Exponential and logarithmic functions</a>
156 <li><a href="#7.3.8">         7.3.8 Power and absolute-value functions</a>
157 <li><a href="#7.3.9">         7.3.9 Manipulation functions</a>
158 </ul>
159 <li><a href="#7.4">   7.4 Character handling &lt;ctype.h&gt;</a>
160 <ul>
161 <li><a href="#7.4.1">         7.4.1 Character classification functions</a>
162 <li><a href="#7.4.2">         7.4.2 Character case mapping functions</a>
163 </ul>
164 <li><a href="#7.5">   7.5 Errors &lt;errno.h&gt;</a>
165 <li><a href="#7.6">   7.6 Floating-point environment &lt;fenv.h&gt;</a>
166 <ul>
167 <li><a href="#7.6.1">         7.6.1 The FENV_ACCESS pragma</a>
168 <li><a href="#7.6.2">         7.6.2 Floating-point exceptions</a>
169 <li><a href="#7.6.3">         7.6.3 Rounding</a>
170 <li><a href="#7.6.4">         7.6.4 Environment</a>
171 </ul>
172 <li><a href="#7.7">   7.7 Characteristics of floating types &lt;float.h&gt;</a>
173 <li><a href="#7.8">   7.8 Format conversion of integer types &lt;inttypes.h&gt;</a>
174 <ul>
175 <li><a href="#7.8.1">         7.8.1 Macros for format specifiers</a>
176 <li><a href="#7.8.2">         7.8.2 Functions for greatest-width integer types</a>
177 <!--page 4 -->
178 </ul>
179 <li><a href="#7.9">     7.9 Alternative spellings &lt;iso646.h&gt;</a>
180 <li><a href="#7.10">     7.10 Sizes of integer types &lt;limits.h&gt;</a>
181 <li><a href="#7.11">     7.11 Localization &lt;locale.h&gt;</a>
182 <ul>
183 <li><a href="#7.11.1">          7.11.1 Locale control</a>
184 <li><a href="#7.11.2">          7.11.2 Numeric formatting convention inquiry</a>
185 </ul>
186 <li><a href="#7.12">     7.12 Mathematics &lt;math.h&gt;</a>
187 <ul>
188 <li><a href="#7.12.1">          7.12.1 Treatment of error conditions</a>
189 <li><a href="#7.12.2">          7.12.2 The FP_CONTRACT pragma</a>
190 <li><a href="#7.12.3">          7.12.3 Classification macros</a>
191 <li><a href="#7.12.4">          7.12.4 Trigonometric functions</a>
192 <li><a href="#7.12.5">          7.12.5 Hyperbolic functions</a>
193 <li><a href="#7.12.6">          7.12.6 Exponential and logarithmic functions</a>
194 <li><a href="#7.12.7">          7.12.7 Power and absolute-value functions</a>
195 <li><a href="#7.12.8">          7.12.8 Error and gamma functions</a>
196 <li><a href="#7.12.9">          7.12.9 Nearest integer functions</a>
197 <li><a href="#7.12.10">          7.12.10 Remainder functions</a>
198 <li><a href="#7.12.11">          7.12.11 Manipulation functions</a>
199 <li><a href="#7.12.12">          7.12.12 Maximum, minimum, and positive difference functions</a>
200 <li><a href="#7.12.13">          7.12.13 Floating multiply-add</a>
201 <li><a href="#7.12.14">          7.12.14 Comparison macros</a>
202 </ul>
203 <li><a href="#7.13">     7.13 Nonlocal jumps &lt;setjmp.h&gt;</a>
204 <ul>
205 <li><a href="#7.13.1">          7.13.1 Save calling environment</a>
206 <li><a href="#7.13.2">          7.13.2 Restore calling environment</a>
207 </ul>
208 <li><a href="#7.14">     7.14 Signal handling &lt;signal.h&gt;</a>
209 <ul>
210 <li><a href="#7.14.1">          7.14.1 Specify signal handling</a>
211 <li><a href="#7.14.2">          7.14.2 Send signal</a>
212 </ul>
213 <li><a href="#7.15">     7.15 Variable arguments &lt;stdarg.h&gt;</a>
214 <ul>
215 <li><a href="#7.15.1">          7.15.1 Variable argument list access macros</a>
216 </ul>
217 <li><a href="#7.16">     7.16 Boolean type and values &lt;stdbool.h&gt;</a>
218 <li><a href="#7.17">     7.17 Common definitions &lt;stddef.h&gt;</a>
219 <li><a href="#7.18">     7.18 Integer types &lt;stdint.h&gt;</a>
220 <ul>
221 <li><a href="#7.18.1">          7.18.1 Integer types</a>
222 <li><a href="#7.18.2">          7.18.2 Limits of specified-width integer types</a>
223 <li><a href="#7.18.3">          7.18.3 Limits of other integer types</a>
224 <li><a href="#7.18.4">          7.18.4 Macros for integer constants</a>
225 </ul>
226 <li><a href="#7.19">     7.19 Input/output &lt;stdio.h&gt;</a>
227 <ul>
228 <li><a href="#7.19.1">          7.19.1 Introduction</a>
229 <li><a href="#7.19.2">          7.19.2 Streams</a>
230 <li><a href="#7.19.3">          7.19.3 Files</a>
231 <li><a href="#7.19.4">          7.19.4 Operations on files</a>
232 <li><a href="#7.19.5">          7.19.5 File access functions</a>
233 <li><a href="#7.19.6">          7.19.6 Formatted input/output functions</a>
234 <li><a href="#7.19.7">          7.19.7 Character input/output functions</a>
235 <li><a href="#7.19.8">          7.19.8 Direct input/output functions</a>
236 <!--page 5 -->
237 <li><a href="#7.19.9">         7.19.9 File positioning functions</a>
238 <li><a href="#7.19.10">         7.19.10 Error-handling functions</a>
239 </ul>
240 <li><a href="#7.20">  7.20   General utilities &lt;stdlib.h&gt;</a>
241 <ul>
242 <li><a href="#7.20.1">         7.20.1 Numeric conversion functions</a>
243 <li><a href="#7.20.2">         7.20.2 Pseudo-random sequence generation functions</a>
244 <li><a href="#7.20.3">         7.20.3 Memory management functions</a>
245 <li><a href="#7.20.4">         7.20.4 Communication with the environment</a>
246 <li><a href="#7.20.5">         7.20.5 Searching and sorting utilities</a>
247 <li><a href="#7.20.6">         7.20.6 Integer arithmetic functions</a>
248 <li><a href="#7.20.7">         7.20.7 Multibyte/wide character conversion functions</a>
249 <li><a href="#7.20.8">         7.20.8 Multibyte/wide string conversion functions</a>
250 </ul>
251 <li><a href="#7.21">  7.21   String handling &lt;string.h&gt;</a>
252 <ul>
253 <li><a href="#7.21.1">         7.21.1 String function conventions</a>
254 <li><a href="#7.21.2">         7.21.2 Copying functions</a>
255 <li><a href="#7.21.3">         7.21.3 Concatenation functions</a>
256 <li><a href="#7.21.4">         7.21.4 Comparison functions</a>
257 <li><a href="#7.21.5">         7.21.5 Search functions</a>
258 <li><a href="#7.21.6">         7.21.6 Miscellaneous functions</a>
259 </ul>
260 <li><a href="#7.22">  7.22   Type-generic math &lt;tgmath.h&gt;</a>
261 <li><a href="#7.23">  7.23   Date and time &lt;time.h&gt;</a>
262 <ul>
263 <li><a href="#7.23.1">         7.23.1 Components of time</a>
264 <li><a href="#7.23.2">         7.23.2 Time manipulation functions</a>
265 <li><a href="#7.23.3">         7.23.3 Time conversion functions</a>
266 </ul>
267 <li><a href="#7.24">  7.24   Extended multibyte and wide character utilities &lt;wchar.h&gt;</a>
268 <ul>
269 <li><a href="#7.24.1">         7.24.1 Introduction</a>
270 <li><a href="#7.24.2">         7.24.2 Formatted wide character input/output functions</a>
271 <li><a href="#7.24.3">         7.24.3 Wide character input/output functions</a>
272 <li><a href="#7.24.4">         7.24.4 General wide string utilities</a>
273 <li><a href="#7.24.5">         7.24.5 Wide character time conversion functions</a>
274 <li><a href="#7.24.6">         7.24.6 Extended multibyte/wide character conversion utilities</a>
275 </ul>
276 <li><a href="#7.25">  7.25   Wide character classification and mapping utilities &lt;wctype.h&gt;</a>
277 <ul>
278 <li><a href="#7.25.1">         7.25.1 Introduction</a>
279 <li><a href="#7.25.2">         7.25.2 Wide character classification utilities</a>
280 <li><a href="#7.25.3">         7.25.3 Wide character case mapping utilities</a>
281 </ul>
282 <li><a href="#7.26">  7.26   Future library directions</a>
283 <ul>
284 <li><a href="#7.26.1">         7.26.1 Complex arithmetic &lt;complex.h&gt;</a>
285 <li><a href="#7.26.2">         7.26.2 Character handling &lt;ctype.h&gt;</a>
286 <li><a href="#7.26.3">         7.26.3 Errors &lt;errno.h&gt;</a>
287 <li><a href="#7.26.4">         7.26.4 Format conversion of integer types &lt;inttypes.h&gt;</a>
288 <li><a href="#7.26.5">         7.26.5 Localization &lt;locale.h&gt;</a>
289 <li><a href="#7.26.6">         7.26.6 Signal handling &lt;signal.h&gt;</a>
290 <li><a href="#7.26.7">         7.26.7 Boolean type and values &lt;stdbool.h&gt;</a>
291 <li><a href="#7.26.8">         7.26.8 Integer types &lt;stdint.h&gt;</a>
292 <li><a href="#7.26.9">         7.26.9 Input/output &lt;stdio.h&gt;</a>
293 <!--page 6 -->
294 <li><a href="#7.26.10">        7.26.10 General utilities &lt;stdlib.h&gt;</a>
295 <li><a href="#7.26.11">        7.26.11 String handling &lt;string.h&gt;</a>
296 <li><a href="#7.26.12">        7.26.12 Extended multibyte and wide character utilities <wchar.h></a>
297 <li><a href="#7.26.13">        7.26.13 Wide character classification and mapping utilities <wctype.h></a>
298 </ul>
299 </ul>
300 <li><a href="#A">Annex A (informative) Language syntax summary</a>
301 <ul>
302 <li><a href="#A.1">  A.1 Lexical grammar</a>
303 <li><a href="#A.2">  A.2 Phrase structure grammar</a>
304 <li><a href="#A.3">  A.3 Preprocessing directives</a>
305 </ul>
306 <li><a href="#B">Annex B (informative) Library summary</a>
307 <ul>
308 <li><a href="#B.1">  B.1 Diagnostics &lt;assert.h&gt;</a>
309 <li><a href="#B.2">  B.2 Complex &lt;complex.h&gt;</a>
310 <li><a href="#B.3">  B.3 Character handling &lt;ctype.h&gt;</a>
311 <li><a href="#B.4">  B.4 Errors &lt;errno.h&gt;</a>
312 <li><a href="#B.5">  B.5 Floating-point environment &lt;fenv.h&gt;</a>
313 <li><a href="#B.6">  B.6 Characteristics of floating types &lt;float.h&gt;</a>
314 <li><a href="#B.7">  B.7 Format conversion of integer types &lt;inttypes.h&gt;</a>
315 <li><a href="#B.8">  B.8 Alternative spellings &lt;iso646.h&gt;</a>
316 <li><a href="#B.9">  B.9 Sizes of integer types &lt;limits.h&gt;</a>
317 <li><a href="#B.10">  B.10 Localization &lt;locale.h&gt;</a>
318 <li><a href="#B.11">  B.11 Mathematics &lt;math.h&gt;</a>
319 <li><a href="#B.12">  B.12 Nonlocal jumps &lt;setjmp.h&gt;</a>
320 <li><a href="#B.13">  B.13 Signal handling &lt;signal.h&gt;</a>
321 <li><a href="#B.14">  B.14 Variable arguments &lt;stdarg.h&gt;</a>
322 <li><a href="#B.15">  B.15 Boolean type and values &lt;stdbool.h&gt;</a>
323 <li><a href="#B.16">  B.16 Common definitions &lt;stddef.h&gt;</a>
324 <li><a href="#B.17">  B.17 Integer types &lt;stdint.h&gt;</a>
325 <li><a href="#B.18">  B.18 Input/output &lt;stdio.h&gt;</a>
326 <li><a href="#B.19">  B.19 General utilities &lt;stdlib.h&gt;</a>
327 <li><a href="#B.20">  B.20 String handling &lt;string.h&gt;</a>
328 <li><a href="#B.21">  B.21 Type-generic math &lt;tgmath.h&gt;</a>
329 <li><a href="#B.22">  B.22 Date and time &lt;time.h&gt;</a>
330 <li><a href="#B.23">  B.23 Extended multibyte/wide character utilities &lt;wchar.h&gt;</a>
331 <li><a href="#B.24">  B.24 Wide character classification and mapping utilities &lt;wctype.h&gt;</a>
332 </ul>
333 <li><a href="#C">Annex C (informative) Sequence points</a>
334 <li><a href="#D">Annex D (normative) Universal character names for identifiers</a>
335 <li><a href="#E">Annex E (informative) Implementation limits</a>
336 <li><a href="#F">Annex F (normative) IEC 60559 floating-point arithmetic</a>
337 <ul>
338 <li><a href="#F.1">  F.1 Introduction</a>
339 <li><a href="#F.2">  F.2 Types</a>
340 <li><a href="#F.3">  F.3 Operators and functions</a>
341 <!--page 7 -->
342 <li><a href="#F.4">   F.4   Floating to integer conversion</a>
343 <li><a href="#F.5">   F.5   Binary-decimal conversion</a>
344 <li><a href="#F.6">   F.6   Contracted expressions</a>
345 <li><a href="#F.7">   F.7   Floating-point environment</a>
346 <li><a href="#F.8">   F.8   Optimization</a>
347 <li><a href="#F.9">   F.9   Mathematics &lt;math.h&gt;</a>
348 </ul>
349 <li><a href="#G">Annex G (informative) IEC 60559-compatible complex arithmetic</a>
350 <ul>
351 <li><a href="#G.1">  G.1 Introduction</a>
352 <li><a href="#G.2">  G.2 Types</a>
353 <li><a href="#G.3">  G.3 Conventions</a>
354 <li><a href="#G.4">  G.4 Conversions</a>
355 <li><a href="#G.5">  G.5 Binary operators</a>
356 <li><a href="#G.6">  G.6 Complex arithmetic &lt;complex.h&gt;</a>
357 <li><a href="#G.7">  G.7 Type-generic math &lt;tgmath.h&gt;</a>
358 </ul>
359 <li><a href="#H">Annex H (informative) Language independent arithmetic</a>
360 <ul>
361 <li><a href="#H.1">  H.1 Introduction</a>
362 <li><a href="#H.2">  H.2 Types</a>
363 <li><a href="#H.3">  H.3 Notification</a>
364 </ul>
365 <li><a href="#I">Annex I (informative) Common warnings</a>
366 <li><a href="#J">Annex J (informative) Portability issues</a>
367 <ul>
368 <li><a href="#J.1">  J.1 Unspecified behavior</a>
369 <li><a href="#J.2">  J.2 Undefined behavior</a>
370 <li><a href="#J.3">  J.3 Implementation-defined behavior</a>
371 <li><a href="#J.4">  J.4 Locale-specific behavior</a>
372 <li><a href="#J.5">  J.5 Common extensions</a>
373 </ul>
374 <li><a href="#Bibliography">Bibliography</a>
375 <li><a href="#Index">Index</a>
376 <!--page 8 -->
377 <!--page 9 -->
378 </ul>
379
380 <h2><a name="Foreword" href="#Foreword">Foreword</a></h2>
381 <p><!--para 1 -->
382  ISO (the International Organization for Standardization) and IEC (the International
383  Electrotechnical Commission) form the specialized system for worldwide
384  standardization. National bodies that are member of ISO or IEC participate in the
385  development of International Standards through technical committees established by the
386  respective organization to deal with particular fields of technical activity. ISO and IEC
387  technical committees collaborate in fields of mutual interest. Other international
388  organizations, governmental and non-governmental, in liaison with ISO and IEC, also
389  take part in the work.
390 <p><!--para 2 -->
391  International Standards are drafted in accordance with the rules given in the ISO/IEC
392  Directives, Part 3.
393 <p><!--para 3 -->
394  In the field of information technology, ISO and IEC have established a joint technical
395  committee, ISO/IEC JTC 1. Draft International Standards adopted by the joint technical
396  committee are circulated to national bodies for voting. Publication as an International
397  Standard requires approval by at least 75% of the national bodies casting a vote.
398 <p><!--para 4 -->
399  International Standard ISO/IEC 9899 was prepared by Joint Technical Committee
400  ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages,
401  their environments and system software interfaces. The Working Group responsible for
402  this standard (WG 14) maintains a site on the World Wide Web at
403  http://www.open-std.org/JTC1/SC22/WG14/                        containing      additional
404  information relevant to this standard such as a Rationale for many of the decisions made
405  during its preparation and a log of Defect Reports and Responses.
406 <p><!--para 5 -->
407  This second edition cancels and replaces the first edition, ISO/IEC 9899:1990, as
408  amended and corrected by ISO/IEC 9899/COR1:1994, ISO/IEC 9899/AMD1:1995, and
409  ISO/IEC 9899/COR2:1996. Major changes from the previous edition include:
410 <ul>
411 <li>  restricted character set support via digraphs and <a href="#7.9">&lt;iso646.h&gt;</a> (originally specified
412  in AMD1)
413 <li>  wide character library support in <a href="#7.24">&lt;wchar.h&gt;</a> and <a href="#7.25">&lt;wctype.h&gt;</a> (originally
414  specified in AMD1)
415 <li>  more precise aliasing rules via effective type
416 <li>  restricted pointers
417 <li>  variable length arrays
418 <li>  flexible array members
419 <li>  static and type qualifiers in parameter array declarators
420 <li>  complex (and imaginary) support in <a href="#7.3">&lt;complex.h&gt;</a>
421 <li>  type-generic math macros in <a href="#7.22">&lt;tgmath.h&gt;</a>
422 <li>  the long long int type and library functions
423 <!--page 10 -->
424 <li>  increased minimum translation limits
425 <li>  additional floating-point characteristics in <a href="#7.7">&lt;float.h&gt;</a>
426 <li>  remove implicit int
427 <li>  reliable integer division
428 <li>  universal character names (\u and \U)
429 <li>  extended identifiers
430 <li>  hexadecimal floating-point constants and %a and %A printf/scanf conversion
431  specifiers
432 <li>  compound literals
433 <li>  designated initializers
434 <li>  // comments
435 <li>  extended integer types and library functions in <a href="#7.8">&lt;inttypes.h&gt;</a> and <a href="#7.18">&lt;stdint.h&gt;</a>
436 <li>  remove implicit function declaration
437 <li>  preprocessor arithmetic done in intmax_t/uintmax_t
438 <li>  mixed declarations and code
439 <li>  new block scopes for selection and iteration statements
440 <li>  integer constant type rules
441 <li>  integer promotion rules
442 <li>  macros with a variable number of arguments
443 <li>  the vscanf family of functions in <a href="#7.19">&lt;stdio.h&gt;</a> and <a href="#7.24">&lt;wchar.h&gt;</a>
444 <li>  additional math library functions in <a href="#7.12">&lt;math.h&gt;</a>
445 <li>  treatment of error conditions by math library functions (math_errhandling)
446 <li>  floating-point environment access in <a href="#7.6">&lt;fenv.h&gt;</a>
447 <li>  IEC 60559 (also known as IEC 559 or IEEE arithmetic) support
448 <li>  trailing comma allowed in enum declaration
449 <li>  %lf conversion specifier allowed in printf
450 <li>  inline functions
451 <li>  the snprintf family of functions in <a href="#7.19">&lt;stdio.h&gt;</a>
452 <li>  boolean type in <a href="#7.16">&lt;stdbool.h&gt;</a>
453 <li>  idempotent type qualifiers
454 <li>  empty macro arguments
455 <!--page 11 -->
456 <li>  new structure type compatibility rules (tag compatibility)
457 <li>  additional predefined macro names
458 <li>  _Pragma preprocessing operator
459 <li>  standard pragmas
460 <li>  __func__ predefined identifier
461 <li>  va_copy macro
462 <li>  additional strftime conversion specifiers
463 <li>  LIA compatibility annex
464 <li>  deprecate ungetc at the beginning of a binary file
465 <li>  remove deprecation of aliased array parameters
466 <li>  conversion of array to pointer not limited to lvalues
467 <li>  relaxed constraints on aggregate and union initialization
468 <li>  relaxed restrictions on portable header names
469 <li>  return without expression not permitted in function that returns a value (and vice
470  versa)
471 </ul>
472 <p><!--para 6 -->
473  Annexes D and F form a normative part of this standard; annexes A, B, C, E, G, H, I, J,
474  the bibliography, and the index are for information only. In accordance with Part 3 of the
475  ISO/IEC Directives, this foreword, the introduction, notes, footnotes, and examples are
476  also for information only.
477 <!--page 12 -->
478
479 <h2><a name="Introduction" href="#Introduction">Introduction</a></h2>
480 <p><!--para 1 -->
481  With the introduction of new devices and extended character sets, new features may be
482  added to this International Standard. Subclauses in the language and library clauses warn
483  implementors and programmers of usages which, though valid in themselves, may
484  conflict with future additions.
485 <p><!--para 2 -->
486  Certain features are obsolescent, which means that they may be considered for
487  withdrawal in future revisions of this International Standard. They are retained because
488  of their widespread use, but their use in new implementations (for implementation
489  features) or new programs (for language [<a href="#6.11">6.11</a>] or library features [<a href="#7.26">7.26</a>]) is discouraged.
490 <p><!--para 3 -->
491  This International Standard is divided into four major subdivisions:
492 <ul>
493 <li>  preliminary elements (clauses 1-4);
494 <li>  the characteristics of environments that translate and execute C programs (clause 5);
495 <li>  the language syntax, constraints, and semantics (clause 6);
496 <li>  the library facilities (clause 7).
497 </ul>
498 <p><!--para 4 -->
499  Examples are provided to illustrate possible forms of the constructions described.
500  Footnotes are provided to emphasize consequences of the rules described in that
501  subclause or elsewhere in this International Standard. References are used to refer to
502  other related subclauses. Recommendations are provided to give advice or guidance to
503  implementors. Annexes provide additional information and summarize the information
504  contained in this International Standard. A bibliography lists documents that were
505  referred to during the preparation of the standard.
506 <p><!--para 5 -->
507  The language clause (clause 6) is derived from ''The C Reference Manual''.
508 <p><!--para 6 -->
509  The library clause (clause 7) is based on the 1984 /usr/group Standard.
510 <!--page 13 -->
511
512 <h1>Programming languages -- C</h1>
513  
514  
515  
516  
517
518 <h2><a name="1" href="#1">1. Scope</a></h2>
519 <p><!--para 1 -->
520  This International Standard specifies the form and establishes the interpretation of
521  programs written in the C programming language.<sup><a href="#note1"><b>1)</b></a></sup> It specifies
522 <ul>
523 <li>  the representation of C programs;
524 <li>  the syntax and constraints of the C language;
525 <li>  the semantic rules for interpreting C programs;
526 <li>  the representation of input data to be processed by C programs;
527 <li>  the representation of output data produced by C programs;
528 <li>  the restrictions and limits imposed by a conforming implementation of C.
529 </ul>
530 <p><!--para 2 -->
531  This International Standard does not specify
532 <ul>
533 <li>  the mechanism by which C programs are transformed for use by a data-processing
534  system;
535 <li>  the mechanism by which C programs are invoked for use by a data-processing
536  system;
537 <li>  the mechanism by which input data are transformed for use by a C program;
538 <li>  the mechanism by which output data are transformed after being produced by a C
539  program;
540 <li>  the size or complexity of a program and its data that will exceed the capacity of any
541  specific data-processing system or the capacity of a particular processor;
542  
543  
544 <!--page 14 -->
545 <li>  all minimal requirements of a data-processing system that is capable of supporting a
546  conforming implementation.
547  
548 </ul>
549
550 <h6>footnotes</h6>
551 <p><small><a name="note1" href="#note1">1)</a> This International Standard is designed to promote the portability of C programs among a variety of
552  data-processing systems. It is intended for use by implementors and programmers.
553 </small>
554
555 <h2><a name="2" href="#2">2. Normative references</a></h2>
556 <p><!--para 1 -->
557  The following normative documents contain provisions which, through reference in this
558  text, constitute provisions of this International Standard. For dated references,
559  subsequent amendments to, or revisions of, any of these publications do not apply.
560  However, parties to agreements based on this International Standard are encouraged to
561  investigate the possibility of applying the most recent editions of the normative
562  documents indicated below. For undated references, the latest edition of the normative
563  document referred to applies. Members of ISO and IEC maintain registers of currently
564  valid International Standards.
565 <p><!--para 2 -->
566  ISO 31-11:1992, Quantities and units -- Part 11: Mathematical signs and symbols for
567  use in the physical sciences and technology.
568 <p><!--para 3 -->
569  ISO/IEC 646, Information technology -- ISO 7-bit coded character set for information
570  interchange.
571 <p><!--para 4 -->
572  ISO/IEC 2382-1:1993, Information technology -- Vocabulary -- Part 1: Fundamental
573  terms.
574 <p><!--para 5 -->
575  ISO 4217, Codes for the representation of currencies and funds.
576 <p><!--para 6 -->
577  ISO 8601, Data elements and interchange formats -- Information interchange --
578  Representation of dates and times.
579 <p><!--para 7 -->
580  ISO/IEC 10646 (all parts), Information technology -- Universal Multiple-Octet Coded
581  Character Set (UCS).
582 <p><!--para 8 -->
583  IEC 60559:1989, Binary floating-point arithmetic for microprocessor systems (previously
584  designated IEC 559:1989).
585 <!--page 15 -->
586
587 <h2><a name="3" href="#3">3. Terms, definitions, and symbols</a></h2>
588 <p><!--para 1 -->
589  For the purposes of this International Standard, the following definitions apply. Other
590  terms are defined where they appear in italic type or on the left side of a syntax rule.
591  Terms explicitly defined in this International Standard are not to be presumed to refer
592  implicitly to similar terms defined elsewhere. Terms not defined in this International
593  Standard are to be interpreted according to ISO/IEC 2382-1. Mathematical symbols not
594  defined in this International Standard are to be interpreted according to ISO 31-11.
595
596 <h3><a name="3.1" href="#3.1">3.1</a></h3>
597 <p><!--para 1 -->
598 <b> access</b><br>
599  &lt;execution-time action&gt; to read or modify the value of an object
600 <p><!--para 2 -->
601  NOTE 1   Where only one of these two actions is meant, ''read'' or ''modify'' is used.
602  
603 <p><!--para 3 -->
604  NOTE 2   "Modify'' includes the case where the new value being stored is the same as the previous value.
605  
606 <p><!--para 4 -->
607  NOTE 3   Expressions that are not evaluated do not access objects.
608  
609
610 <h3><a name="3.2" href="#3.2">3.2</a></h3>
611 <p><!--para 1 -->
612 <b> alignment</b><br>
613  requirement that objects of a particular type be located on storage boundaries with
614  addresses that are particular multiples of a byte address
615
616 <h3><a name="3.3" href="#3.3">3.3</a></h3>
617 <p><!--para 1 -->
618 <b> argument</b><br>
619  actual argument<br>
620  actual parameter (deprecated)<br>
621  expression in the comma-separated list bounded by the parentheses in a function call
622  expression, or a sequence of preprocessing tokens in the comma-separated list bounded
623  by the parentheses in a function-like macro invocation
624
625 <h3><a name="3.4" href="#3.4">3.4</a></h3>
626 <p><!--para 1 -->
627 <b> behavior</b><br>
628  external appearance or action
629
630 <h4><a name="3.4.1" href="#3.4.1">3.4.1</a></h4>
631 <p><!--para 1 -->
632 <b> implementation-defined behavior</b><br>
633  unspecified behavior where each implementation documents how the choice is made
634 <p><!--para 2 -->
635  EXAMPLE An example of implementation-defined behavior is the propagation of the high-order bit
636  when a signed integer is shifted right.
637  
638
639 <h4><a name="3.4.2" href="#3.4.2">3.4.2</a></h4>
640 <p><!--para 1 -->
641 <b> locale-specific behavior</b><br>
642  behavior that depends on local conventions of nationality, culture, and language that each
643  implementation documents
644 <!--page 16 -->
645 <p><!--para 2 -->
646  EXAMPLE An example of locale-specific behavior is whether the islower function returns true for
647  characters other than the 26 lowercase Latin letters.
648  
649
650 <h4><a name="3.4.3" href="#3.4.3">3.4.3</a></h4>
651 <p><!--para 1 -->
652 <b> undefined behavior</b><br>
653  behavior, upon use of a nonportable or erroneous program construct or of erroneous data,
654  for which this International Standard imposes no requirements
655 <p><!--para 2 -->
656  NOTE Possible undefined behavior ranges from ignoring the situation completely with unpredictable
657  results, to behaving during translation or program execution in a documented manner characteristic of the
658  environment (with or without the issuance of a diagnostic message), to terminating a translation or
659  execution (with the issuance of a diagnostic message).
660  
661 <p><!--para 3 -->
662  EXAMPLE        An example of undefined behavior is the behavior on integer overflow.
663  
664
665 <h4><a name="3.4.4" href="#3.4.4">3.4.4</a></h4>
666 <p><!--para 1 -->
667 <b> unspecified behavior</b><br>
668  use of an unspecified value, or other behavior where this International Standard provides
669  two or more possibilities and imposes no further requirements on which is chosen in any
670  instance
671 <p><!--para 2 -->
672  EXAMPLE        An example of unspecified behavior is the order in which the arguments to a function are
673  evaluated.
674  
675
676 <h3><a name="3.5" href="#3.5">3.5</a></h3>
677 <p><!--para 1 -->
678 <b> bit</b><br>
679  unit of data storage in the execution environment large enough to hold an object that may
680  have one of two values
681 <p><!--para 2 -->
682  NOTE     It need not be possible to express the address of each individual bit of an object.
683  
684
685 <h3><a name="3.6" href="#3.6">3.6</a></h3>
686 <p><!--para 1 -->
687 <b> byte</b><br>
688  addressable unit of data storage large enough to hold any member of the basic character
689  set of the execution environment
690 <p><!--para 2 -->
691  NOTE 1 It is possible to express the address of each individual byte of an object uniquely.
692  
693 <p><!--para 3 -->
694  NOTE 2 A byte is composed of a contiguous sequence of bits, the number of which is implementation-
695  defined. The least significant bit is called the low-order bit; the most significant bit is called the high-order
696  bit.
697  
698
699 <h3><a name="3.7" href="#3.7">3.7</a></h3>
700 <p><!--para 1 -->
701 <b> character</b><br>
702  &lt;abstract&gt; member of a set of elements used for the organization, control, or
703  representation of data
704
705 <h4><a name="3.7.1" href="#3.7.1">3.7.1</a></h4>
706 <p><!--para 1 -->
707 <b> character</b><br>
708  single-byte character
709  &lt;C&gt; bit representation that fits in a byte
710 <!--page 17 -->
711
712 <h4><a name="3.7.2" href="#3.7.2">3.7.2</a></h4>
713 <p><!--para 1 -->
714 <b> multibyte character</b><br>
715  sequence of one or more bytes representing a member of the extended character set of
716  either the source or the execution environment
717 <p><!--para 2 -->
718  NOTE    The extended character set is a superset of the basic character set.
719  
720
721 <h4><a name="3.7.3" href="#3.7.3">3.7.3</a></h4>
722 <p><!--para 1 -->
723 <b> wide character</b><br>
724  bit representation that fits in an object of type wchar_t, capable of representing any
725  character in the current locale
726
727 <h3><a name="3.8" href="#3.8">3.8</a></h3>
728 <p><!--para 1 -->
729 <b> constraint</b><br>
730  restriction, either syntactic or semantic, by which the exposition of language elements is
731  to be interpreted
732
733 <h3><a name="3.9" href="#3.9">3.9</a></h3>
734 <p><!--para 1 -->
735 <b> correctly rounded result</b><br>
736  representation in the result format that is nearest in value, subject to the current rounding
737  mode, to what the result would be given unlimited range and precision
738
739 <h3><a name="3.10" href="#3.10">3.10</a></h3>
740 <p><!--para 1 -->
741 <b> diagnostic message</b><br>
742  message belonging to an implementation-defined subset of the implementation's message
743  output
744
745 <h3><a name="3.11" href="#3.11">3.11</a></h3>
746 <p><!--para 1 -->
747 <b> forward reference</b><br>
748  reference to a later subclause of this International Standard that contains additional
749  information relevant to this subclause
750
751 <h3><a name="3.12" href="#3.12">3.12</a></h3>
752 <p><!--para 1 -->
753 <b> implementation</b><br>
754  particular set of software, running in a particular translation environment under particular
755  control options, that performs translation of programs for, and supports execution of
756  functions in, a particular execution environment
757
758 <h3><a name="3.13" href="#3.13">3.13</a></h3>
759 <p><!--para 1 -->
760 <b> implementation limit</b><br>
761  restriction imposed upon programs by the implementation
762
763 <h3><a name="3.14" href="#3.14">3.14</a></h3>
764 <p><!--para 1 -->
765 <b> object</b><br>
766  region of data storage in the execution environment, the contents of which can represent
767  values
768 <!--page 18 -->
769 <p><!--para 2 -->
770  NOTE     When referenced, an object may be interpreted as having a particular type; see <a href="#6.3.2.1">6.3.2.1</a>.
771  
772
773 <h3><a name="3.15" href="#3.15">3.15</a></h3>
774 <p><!--para 1 -->
775 <b> parameter</b><br>
776  formal parameter
777  formal argument (deprecated)
778  object declared as part of a function declaration or definition that acquires a value on
779  entry to the function, or an identifier from the comma-separated list bounded by the
780  parentheses immediately following the macro name in a function-like macro definition
781
782 <h3><a name="3.16" href="#3.16">3.16</a></h3>
783 <p><!--para 1 -->
784 <b> recommended practice</b><br>
785  specification that is strongly recommended as being in keeping with the intent of the
786  standard, but that may be impractical for some implementations
787
788 <h3><a name="3.17" href="#3.17">3.17</a></h3>
789 <p><!--para 1 -->
790 <b> value</b><br>
791  precise meaning of the contents of an object when interpreted as having a specific type
792
793 <h4><a name="3.17.1" href="#3.17.1">3.17.1</a></h4>
794 <p><!--para 1 -->
795 <b> implementation-defined value</b><br>
796  unspecified value where each implementation documents how the choice is made
797
798 <h4><a name="3.17.2" href="#3.17.2">3.17.2</a></h4>
799 <p><!--para 1 -->
800 <b> indeterminate value</b><br>
801  either an unspecified value or a trap representation
802
803 <h4><a name="3.17.3" href="#3.17.3">3.17.3</a></h4>
804 <p><!--para 1 -->
805 <b> unspecified value</b><br>
806  valid value of the relevant type where this International Standard imposes no
807  requirements on which value is chosen in any instance
808 <p><!--para 2 -->
809  NOTE     An unspecified value cannot be a trap representation.
810  
811
812 <h3><a name="3.18" href="#3.18">3.18</a></h3>
813 <p><!--para 1 -->
814 <b> [^ x ^]</b><br>
815  ceiling of x: the least integer greater than or equal to x
816 <p><!--para 2 -->
817  EXAMPLE       [^2.4^] is 3, [^-2.4^] is -2.
818  
819
820 <h3><a name="3.19" href="#3.19">3.19</a></h3>
821 <p><!--para 1 -->
822 <b> [_ x _]</b><br>
823  floor of x: the greatest integer less than or equal to x
824 <p><!--para 2 -->
825  EXAMPLE       [_2.4_] is 2, [_-2.4_] is -3.
826 <!--page 19 -->
827
828 <h2><a name="4" href="#4">4. Conformance</a></h2>
829 <p><!--para 1 -->
830  In this International Standard, ''shall'' is to be interpreted as a requirement on an
831  implementation or on a program; conversely, ''shall not'' is to be interpreted as a
832  prohibition.
833 <p><!--para 2 -->
834  If a ''shall'' or ''shall not'' requirement that appears outside of a constraint is violated, the
835  behavior is undefined. Undefined behavior is otherwise indicated in this International
836  Standard by the words ''undefined behavior'' or by the omission of any explicit definition
837  of behavior. There is no difference in emphasis among these three; they all describe
838  ''behavior that is undefined''.
839 <p><!--para 3 -->
840  A program that is correct in all other aspects, operating on correct data, containing
841  unspecified behavior shall be a correct program and act in accordance with <a href="#5.1.2.3">5.1.2.3</a>.
842 <p><!--para 4 -->
843  The implementation shall not successfully translate a preprocessing translation unit
844  containing a #error preprocessing directive unless it is part of a group skipped by
845  conditional inclusion.
846 <p><!--para 5 -->
847  A strictly conforming program shall use only those features of the language and library
848  specified in this International Standard.<sup><a href="#note2"><b>2)</b></a></sup> It shall not produce output dependent on any
849  unspecified, undefined, or implementation-defined behavior, and shall not exceed any
850  minimum implementation limit.
851 <p><!--para 6 -->
852  The two forms of conforming implementation are hosted and freestanding. A conforming
853  hosted implementation shall accept any strictly conforming program. A conforming
854  freestanding implementation shall accept any strictly conforming program that does not
855  use complex types and in which the use of the features specified in the library clause
856  (clause 7) is confined to the contents of the standard headers <a href="#7.7">&lt;float.h&gt;</a>,
857  <a href="#7.9">&lt;iso646.h&gt;</a>, <a href="#7.10">&lt;limits.h&gt;</a>, <a href="#7.15">&lt;stdarg.h&gt;</a>, <a href="#7.16">&lt;stdbool.h&gt;</a>, <a href="#7.17">&lt;stddef.h&gt;</a>, and
858  <a href="#7.18">&lt;stdint.h&gt;</a>. A conforming implementation may have extensions (including additional
859  library functions), provided they do not alter the behavior of any strictly conforming
860  program.<sup><a href="#note3"><b>3)</b></a></sup>
861  
862  
863  
864 <!--page 20 -->
865 <p><!--para 7 -->
866  A conforming program is one that is acceptable to a conforming implementation.<sup><a href="#note4"><b>4)</b></a></sup>
867 <p><!--para 8 -->
868  An implementation shall be accompanied by a document that defines all implementation-
869  defined and locale-specific characteristics and all extensions.
870 <p><b> Forward references</b>: conditional inclusion (<a href="#6.10.1">6.10.1</a>), error directive (<a href="#6.10.5">6.10.5</a>),
871  characteristics of floating types <a href="#7.7">&lt;float.h&gt;</a> (<a href="#7.7">7.7</a>), alternative spellings <a href="#7.9">&lt;iso646.h&gt;</a>
872  (<a href="#7.9">7.9</a>), sizes of integer types <a href="#7.10">&lt;limits.h&gt;</a> (<a href="#7.10">7.10</a>), variable arguments <a href="#7.15">&lt;stdarg.h&gt;</a>
873  (<a href="#7.15">7.15</a>), boolean type and values <a href="#7.16">&lt;stdbool.h&gt;</a> (<a href="#7.16">7.16</a>), common definitions
874  <a href="#7.17">&lt;stddef.h&gt;</a> (<a href="#7.17">7.17</a>), integer types <a href="#7.18">&lt;stdint.h&gt;</a> (<a href="#7.18">7.18</a>).
875  
876  
877  
878  
879 <!--page 21 -->
880
881 <h6>footnotes</h6>
882 <p><small><a name="note2" href="#note2">2)</a> A strictly conforming program can use conditional features (such as those in <a href="#F">annex F</a>) provided the
883  use is guarded by a #ifdef directive with the appropriate macro. For example:
884
885 <pre>
886          #ifdef __STDC_IEC_559__ /* FE_UPWARD defined */
887             /* ... */
888             fesetround(FE_UPWARD);
889             /* ... */
890          #endif</pre>
891  
892 </small>
893 <p><small><a name="note3" href="#note3">3)</a> This implies that a conforming implementation reserves no identifiers other than those explicitly
894  reserved in this International Standard.
895 </small>
896 <p><small><a name="note4" href="#note4">4)</a> Strictly conforming programs are intended to be maximally portable among conforming
897  implementations. Conforming programs may depend upon nonportable features of a conforming
898  implementation.
899 </small>
900
901 <h2><a name="5" href="#5">5. Environment</a></h2>
902 <p><!--para 1 -->
903  An implementation translates C source files and executes C programs in two data-
904  processing-system environments, which will be called the translation environment and
905  the execution environment in this International Standard. Their characteristics define and
906  constrain the results of executing conforming C programs constructed according to the
907  syntactic and semantic rules for conforming implementations.
908 <p><b> Forward references</b>: In this clause, only a few of many possible forward references
909  have been noted.
910
911 <h3><a name="5.1" href="#5.1">5.1 Conceptual models</a></h3>
912
913 <h4><a name="5.1.1" href="#5.1.1">5.1.1 Translation environment</a></h4>
914
915 <h5><a name="5.1.1.1" href="#5.1.1.1">5.1.1.1 Program structure</a></h5>
916 <p><!--para 1 -->
917  A C program need not all be translated at the same time. The text of the program is kept
918  in units called source files, (or preprocessing files) in this International Standard. A
919  source file together with all the headers and source files included via the preprocessing
920  directive #include is known as a preprocessing translation unit. After preprocessing, a
921  preprocessing translation unit is called a translation unit. Previously translated translation
922  units may be preserved individually or in libraries. The separate translation units of a
923  program communicate by (for example) calls to functions whose identifiers have external
924  linkage, manipulation of objects whose identifiers have external linkage, or manipulation
925  of data files. Translation units may be separately translated and then later linked to
926  produce an executable program.
927 <p><b> Forward references</b>: linkages of identifiers (<a href="#6.2.2">6.2.2</a>), external definitions (<a href="#6.9">6.9</a>),
928  preprocessing directives (<a href="#6.10">6.10</a>).
929
930 <h5><a name="5.1.1.2" href="#5.1.1.2">5.1.1.2 Translation phases</a></h5>
931 <p><!--para 1 -->
932  The precedence among the syntax rules of translation is specified by the following
933  phases.<sup><a href="#note5"><b>5)</b></a></sup>
934 <ol>
935 <li>  Physical source file multibyte characters are mapped, in an implementation-
936  defined manner, to the source character set (introducing new-line characters for
937  end-of-line indicators) if necessary. Trigraph sequences are replaced by
938  corresponding single-character internal representations.
939  
940  
941  
942 <!--page 22 -->
943 <li>  Each instance of a backslash character (\) immediately followed by a new-line
944  character is deleted, splicing physical source lines to form logical source lines.
945  Only the last backslash on any physical source line shall be eligible for being part
946  of such a splice. A source file that is not empty shall end in a new-line character,
947  which shall not be immediately preceded by a backslash character before any such
948  splicing takes place.
949 <li>  The source file is decomposed into preprocessing tokens<sup><a href="#note6"><b>6)</b></a></sup> and sequences of
950  white-space characters (including comments). A source file shall not end in a
951  partial preprocessing token or in a partial comment. Each comment is replaced by
952  one space character. New-line characters are retained. Whether each nonempty
953  sequence of white-space characters other than new-line is retained or replaced by
954  one space character is implementation-defined.
955 <li>  Preprocessing directives are executed, macro invocations are expanded, and
956  _Pragma unary operator expressions are executed. If a character sequence that
957  matches the syntax of a universal character name is produced by token
958  concatenation (<a href="#6.10.3.3">6.10.3.3</a>), the behavior is undefined. A #include preprocessing
959  directive causes the named header or source file to be processed from phase 1
960  through phase 4, recursively. All preprocessing directives are then deleted.
961 <li>  Each source character set member and escape sequence in character constants and
962  string literals is converted to the corresponding member of the execution character
963  set; if there is no corresponding member, it is converted to an implementation-
964  defined member other than the null (wide) character.<sup><a href="#note7"><b>7)</b></a></sup>
965 <li>  Adjacent string literal tokens are concatenated.
966 <li>  White-space characters separating tokens are no longer significant. Each
967  preprocessing token is converted into a token. The resulting tokens are
968  syntactically and semantically analyzed and translated as a translation unit.
969 <li>  All external object and function references are resolved. Library components are
970  linked to satisfy external references to functions and objects not defined in the
971  current translation. All such translator output is collected into a program image
972  which contains information needed for execution in its execution environment.
973 </ol>
974 <p><b> Forward references</b>: universal character names (<a href="#6.4.3">6.4.3</a>), lexical elements (<a href="#6.4">6.4</a>),
975  preprocessing directives (<a href="#6.10">6.10</a>), trigraph sequences (<a href="#5.2.1.1">5.2.1.1</a>), external definitions (<a href="#6.9">6.9</a>).
976  
977  
978  
979 <!--page 23 -->
980
981 <h6>footnotes</h6>
982 <p><small><a name="note5" href="#note5">5)</a> Implementations shall behave as if these separate phases occur, even though many are typically folded
983  together in practice. Source files, translation units, and translated translation units need not
984  necessarily be stored as files, nor need there be any one-to-one correspondence between these entities
985  and any external representation. The description is conceptual only, and does not specify any
986  particular implementation.
987 </small>
988 <p><small><a name="note6" href="#note6">6)</a> As described in <a href="#6.4">6.4</a>, the process of dividing a source file's characters into preprocessing tokens is
989  context-dependent. For example, see the handling of &lt; within a #include preprocessing directive.
990 </small>
991 <p><small><a name="note7" href="#note7">7)</a> An implementation need not convert all non-corresponding source characters to the same execution
992  character.
993 </small>
994
995 <h5><a name="5.1.1.3" href="#5.1.1.3">5.1.1.3 Diagnostics</a></h5>
996 <p><!--para 1 -->
997  A conforming implementation shall produce at least one diagnostic message (identified in
998  an implementation-defined manner) if a preprocessing translation unit or translation unit
999  contains a violation of any syntax rule or constraint, even if the behavior is also explicitly
1000  specified as undefined or implementation-defined. Diagnostic messages need not be
1001  produced in other circumstances.<sup><a href="#note8"><b>8)</b></a></sup>
1002 <p><!--para 2 -->
1003  EXAMPLE        An implementation shall issue a diagnostic for the translation unit:
1004 <pre>
1005           char i;
1006           int i;</pre>
1007  because in those cases where wording in this International Standard describes the behavior for a construct
1008  as being both a constraint error and resulting in undefined behavior, the constraint error shall be diagnosed.
1009  
1010
1011 <h6>footnotes</h6>
1012 <p><small><a name="note8" href="#note8">8)</a> The intent is that an implementation should identify the nature of, and where possible localize, each
1013  violation. Of course, an implementation is free to produce any number of diagnostics as long as a
1014  valid program is still correctly translated. It may also successfully translate an invalid program.
1015 </small>
1016
1017 <h4><a name="5.1.2" href="#5.1.2">5.1.2 Execution environments</a></h4>
1018 <p><!--para 1 -->
1019  Two execution environments are defined: freestanding and hosted. In both cases,
1020  program startup occurs when a designated C function is called by the execution
1021  environment. All objects with static storage duration shall be initialized (set to their
1022  initial values) before program startup. The manner and timing of such initialization are
1023  otherwise unspecified. Program termination returns control to the execution
1024  environment.
1025 <p><b> Forward references</b>: storage durations of objects (<a href="#6.2.4">6.2.4</a>), initialization (<a href="#6.7.8">6.7.8</a>).
1026
1027 <h5><a name="5.1.2.1" href="#5.1.2.1">5.1.2.1 Freestanding environment</a></h5>
1028 <p><!--para 1 -->
1029  In a freestanding environment (in which C program execution may take place without any
1030  benefit of an operating system), the name and type of the function called at program
1031  startup are implementation-defined. Any library facilities available to a freestanding
1032  program, other than the minimal set required by clause 4, are implementation-defined.
1033 <p><!--para 2 -->
1034  The effect of program termination in a freestanding environment is implementation-
1035  defined.
1036
1037 <h5><a name="5.1.2.2" href="#5.1.2.2">5.1.2.2 Hosted environment</a></h5>
1038 <p><!--para 1 -->
1039  A hosted environment need not be provided, but shall conform to the following
1040  specifications if present.
1041  
1042  
1043  
1044  
1045 <!--page 24 -->
1046
1047 <h5><a name="5.1.2.2.1" href="#5.1.2.2.1">5.1.2.2.1 Program startup</a></h5>
1048 <p><!--para 1 -->
1049  The function called at program startup is named main. The implementation declares no
1050  prototype for this function. It shall be defined with a return type of int and with no
1051  parameters:
1052 <pre>
1053          int main(void) { /* ... */ }</pre>
1054  or with two parameters (referred to here as argc and argv, though any names may be
1055  used, as they are local to the function in which they are declared):
1056 <pre>
1057          int main(int argc, char *argv[]) { /* ... */ }</pre>
1058  or equivalent;<sup><a href="#note9"><b>9)</b></a></sup> or in some other implementation-defined manner.
1059 <p><!--para 2 -->
1060  If they are declared, the parameters to the main function shall obey the following
1061  constraints:
1062 <ul>
1063 <li>  The value of argc shall be nonnegative.
1064 <li>  argv[argc] shall be a null pointer.
1065 <li>  If the value of argc is greater than zero, the array members argv[0] through
1066  argv[argc-1] inclusive shall contain pointers to strings, which are given
1067  implementation-defined values by the host environment prior to program startup. The
1068  intent is to supply to the program information determined prior to program startup
1069  from elsewhere in the hosted environment. If the host environment is not capable of
1070  supplying strings with letters in both uppercase and lowercase, the implementation
1071  shall ensure that the strings are received in lowercase.
1072 <li>  If the value of argc is greater than zero, the string pointed to by argv[0]
1073  represents the program name; argv[0][0] shall be the null character if the
1074  program name is not available from the host environment. If the value of argc is
1075  greater than one, the strings pointed to by argv[1] through argv[argc-1]
1076  represent the program parameters.
1077 <li>  The parameters argc and argv and the strings pointed to by the argv array shall
1078  be modifiable by the program, and retain their last-stored values between program
1079  startup and program termination.
1080 </ul>
1081
1082 <h6>footnotes</h6>
1083 <p><small><a name="note9" href="#note9">9)</a> Thus, int can be replaced by a typedef name defined as int, or the type of argv can be written as
1084  char ** argv, and so on.
1085 </small>
1086
1087 <h5><a name="5.1.2.2.2" href="#5.1.2.2.2">5.1.2.2.2 Program execution</a></h5>
1088 <p><!--para 1 -->
1089  In a hosted environment, a program may use all the functions, macros, type definitions,
1090  and objects described in the library clause (clause 7).
1091  
1092  
1093  
1094 <!--page 25 -->
1095
1096 <h5><a name="5.1.2.2.3" href="#5.1.2.2.3">5.1.2.2.3 Program termination</a></h5>
1097 <p><!--para 1 -->
1098  If the return type of the main function is a type compatible with int, a return from the
1099  initial call to the main function is equivalent to calling the exit function with the value
1100  returned by the main function as its argument;<sup><a href="#note10"><b>10)</b></a></sup> reaching the } that terminates the
1101  main function returns a value of 0. If the return type is not compatible with int, the
1102  termination status returned to the host environment is unspecified.
1103 <p><b> Forward references</b>: definition of terms (<a href="#7.1.1">7.1.1</a>), the exit function (<a href="#7.20.4.3">7.20.4.3</a>).
1104
1105 <h6>footnotes</h6>
1106 <p><small><a name="note10" href="#note10">10)</a> In accordance with <a href="#6.2.4">6.2.4</a>, the lifetimes of objects with automatic storage duration declared in main
1107  will have ended in the former case, even where they would not have in the latter.
1108 </small>
1109
1110 <h5><a name="5.1.2.3" href="#5.1.2.3">5.1.2.3 Program execution</a></h5>
1111 <p><!--para 1 -->
1112  The semantic descriptions in this International Standard describe the behavior of an
1113  abstract machine in which issues of optimization are irrelevant.
1114 <p><!--para 2 -->
1115  Accessing a volatile object, modifying an object, modifying a file, or calling a function
1116  that does any of those operations are all side effects,<sup><a href="#note11"><b>11)</b></a></sup> which are changes in the state of
1117  the execution environment. Evaluation of an expression may produce side effects. At
1118  certain specified points in the execution sequence called sequence points, all side effects
1119  of previous evaluations shall be complete and no side effects of subsequent evaluations
1120  shall have taken place. (A summary of the sequence points is given in <a href="#C">annex C</a>.)
1121 <p><!--para 3 -->
1122  In the abstract machine, all expressions are evaluated as specified by the semantics. An
1123  actual implementation need not evaluate part of an expression if it can deduce that its
1124  value is not used and that no needed side effects are produced (including any caused by
1125  calling a function or accessing a volatile object).
1126 <p><!--para 4 -->
1127  When the processing of the abstract machine is interrupted by receipt of a signal, only the
1128  values of objects as of the previous sequence point may be relied on. Objects that may be
1129  modified between the previous sequence point and the next sequence point need not have
1130  received their correct values yet.
1131 <p><!--para 5 -->
1132  The least requirements on a conforming implementation are:
1133 <ul>
1134 <li>  At sequence points, volatile objects are stable in the sense that previous accesses are
1135  complete and subsequent accesses have not yet occurred.
1136  
1137  
1138  
1139  
1140 <!--page 26 -->
1141 <li>  At program termination, all data written into files shall be identical to the result that
1142  execution of the program according to the abstract semantics would have produced.
1143 <li>  The input and output dynamics of interactive devices shall take place as specified in
1144  <a href="#7.19.3">7.19.3</a>. The intent of these requirements is that unbuffered or line-buffered output
1145  appear as soon as possible, to ensure that prompting messages actually appear prior to
1146  a program waiting for input.
1147 </ul>
1148 <p><!--para 6 -->
1149  What constitutes an interactive device is implementation-defined.
1150 <p><!--para 7 -->
1151  More stringent correspondences between abstract and actual semantics may be defined by
1152  each implementation.
1153 <p><!--para 8 -->
1154  EXAMPLE 1 An implementation might define a one-to-one correspondence between abstract and actual
1155  semantics: at every sequence point, the values of the actual objects would agree with those specified by the
1156  abstract semantics. The keyword volatile would then be redundant.
1157 <p><!--para 9 -->
1158  Alternatively, an implementation might perform various optimizations within each translation unit, such
1159  that the actual semantics would agree with the abstract semantics only when making function calls across
1160  translation unit boundaries. In such an implementation, at the time of each function entry and function
1161  return where the calling function and the called function are in different translation units, the values of all
1162  externally linked objects and of all objects accessible via pointers therein would agree with the abstract
1163  semantics. Furthermore, at the time of each such function entry the values of the parameters of the called
1164  function and of all objects accessible via pointers therein would agree with the abstract semantics. In this
1165  type of implementation, objects referred to by interrupt service routines activated by the signal function
1166  would require explicit specification of volatile storage, as well as other implementation-defined
1167  restrictions.
1168  
1169 <p><!--para 10 -->
1170  EXAMPLE 2       In executing the fragment
1171 <pre>
1172           char c1, c2;
1173           /* ... */
1174           c1 = c1 + c2;</pre>
1175  the ''integer promotions'' require that the abstract machine promote the value of each variable to int size
1176  and then add the two ints and truncate the sum. Provided the addition of two chars can be done without
1177  overflow, or with overflow wrapping silently to produce the correct result, the actual execution need only
1178  produce the same result, possibly omitting the promotions.
1179  
1180 <p><!--para 11 -->
1181  EXAMPLE 3       Similarly, in the fragment
1182 <pre>
1183           float f1, f2;
1184           double d;
1185           /* ... */
1186           f1 = f2 * d;</pre>
1187  the multiplication may be executed using single-precision arithmetic if the implementation can ascertain
1188  that the result would be the same as if it were executed using double-precision arithmetic (for example, if d
1189  were replaced by the constant 2.0, which has type double).
1190 <!--page 27 -->
1191 <p><!--para 12 -->
1192  EXAMPLE 4 Implementations employing wide registers have to take care to honor appropriate
1193  semantics. Values are independent of whether they are represented in a register or in memory. For
1194  example, an implicit spilling of a register is not permitted to alter the value. Also, an explicit store and load
1195  is required to round to the precision of the storage type. In particular, casts and assignments are required to
1196  perform their specified conversion. For the fragment
1197 <pre>
1198           double d1, d2;
1199           float f;
1200           d1 = f = expression;
1201           d2 = (float) expression;</pre>
1202  the values assigned to d1 and d2 are required to have been converted to float.
1203  
1204 <p><!--para 13 -->
1205  EXAMPLE 5 Rearrangement for floating-point expressions is often restricted because of limitations in
1206  precision as well as range. The implementation cannot generally apply the mathematical associative rules
1207  for addition or multiplication, nor the distributive rule, because of roundoff error, even in the absence of
1208  overflow and underflow. Likewise, implementations cannot generally replace decimal constants in order to
1209  rearrange expressions. In the following fragment, rearrangements suggested by mathematical rules for real
1210  numbers are often not valid (see <a href="#F.8">F.8</a>).
1211 <pre>
1212           double x, y, z;
1213           /* ... */
1214           x = (x * y) * z;            //   not equivalent to x   *= y * z;
1215           z = (x - y) + y ;           //   not equivalent to z   = x;
1216           z = x + x * y;              //   not equivalent to z   = x * (1.0 + y);
1217           y = x / 5.0;                //   not equivalent to y   = x * 0.2;</pre>
1218  
1219 <p><!--para 14 -->
1220  EXAMPLE 6 To illustrate the grouping behavior of expressions, in the following fragment
1221 <pre>
1222           int a, b;
1223           /* ... */
1224           a = a + 32760 + b + 5;</pre>
1225  the expression statement behaves exactly the same as
1226 <pre>
1227           a = (((a + 32760) + b) + 5);</pre>
1228  due to the associativity and precedence of these operators. Thus, the result of the sum (a + 32760) is
1229  next added to b, and that result is then added to 5 which results in the value assigned to a. On a machine in
1230  which overflows produce an explicit trap and in which the range of values representable by an int is
1231  [-32768, +32767], the implementation cannot rewrite this expression as
1232 <pre>
1233           a = ((a + b) + 32765);</pre>
1234  since if the values for a and b were, respectively, -32754 and -15, the sum a + b would produce a trap
1235  while the original expression would not; nor can the expression be rewritten either as
1236 <pre>
1237           a = ((a + 32765) + b);</pre>
1238  or
1239 <pre>
1240           a = (a + (b + 32765));</pre>
1241  since the values for a and b might have been, respectively, 4 and -8 or -17 and 12. However, on a machine
1242  in which overflow silently generates some value and where positive and negative overflows cancel, the
1243  above expression statement can be rewritten by the implementation in any of the above ways because the
1244  same result will occur.
1245 <!--page 28 -->
1246 <p><!--para 15 -->
1247  EXAMPLE 7 The grouping of an expression does not completely determine its evaluation. In the
1248  following fragment
1249 <pre>
1250           #include <a href="#7.19">&lt;stdio.h&gt;</a>
1251           int sum;
1252           char *p;
1253           /* ... */
1254           sum = sum * 10 - '0' + (*p++ = getchar());</pre>
1255  the expression statement is grouped as if it were written as
1256 <pre>
1257           sum = (((sum * 10) - '0') + ((*(p++)) = (getchar())));</pre>
1258  but the actual increment of p can occur at any time between the previous sequence point and the next
1259  sequence point (the ;), and the call to getchar can occur at any point prior to the need of its returned
1260  value.
1261  
1262 <p><b> Forward references</b>: expressions (<a href="#6.5">6.5</a>), type qualifiers (<a href="#6.7.3">6.7.3</a>), statements (<a href="#6.8">6.8</a>), the
1263  signal function (<a href="#7.14">7.14</a>), files (<a href="#7.19.3">7.19.3</a>).
1264 <!--page 29 -->
1265
1266 <h6>footnotes</h6>
1267 <p><small><a name="note11" href="#note11">11)</a> The IEC 60559 standard for binary floating-point arithmetic requires certain user-accessible status
1268  flags and control modes. Floating-point operations implicitly set the status flags; modes affect result
1269  values of floating-point operations. Implementations that support such floating-point state are
1270  required to regard changes to it as side effects -- see <a href="#F">annex F</a> for details. The floating-point
1271  environment library <a href="#7.6">&lt;fenv.h&gt;</a> provides a programming facility for indicating when these side
1272  effects matter, freeing the implementations in other cases.
1273 </small>
1274
1275 <h3><a name="5.2" href="#5.2">5.2 Environmental considerations</a></h3>
1276
1277 <h4><a name="5.2.1" href="#5.2.1">5.2.1 Character sets</a></h4>
1278 <p><!--para 1 -->
1279  Two sets of characters and their associated collating sequences shall be defined: the set in
1280  which source files are written (the source character set), and the set interpreted in the
1281  execution environment (the execution character set). Each set is further divided into a
1282  basic character set, whose contents are given by this subclause, and a set of zero or more
1283  locale-specific members (which are not members of the basic character set) called
1284  extended characters. The combined set is also called the extended character set. The
1285  values of the members of the execution character set are implementation-defined.
1286 <p><!--para 2 -->
1287  In a character constant or string literal, members of the execution character set shall be
1288  represented by corresponding members of the source character set or by escape
1289  sequences consisting of the backslash \ followed by one or more characters. A byte with
1290  all bits set to 0, called the null character, shall exist in the basic execution character set; it
1291  is used to terminate a character string.
1292 <p><!--para 3 -->
1293  Both the basic source and basic execution character sets shall have the following
1294  members: the 26 uppercase letters of the Latin alphabet
1295 <pre>
1296           A   B   C      D   E   F    G    H    I    J    K    L   M
1297           N   O   P      Q   R   S    T    U    V    W    X    Y   Z</pre>
1298  the 26 lowercase letters of the Latin alphabet
1299 <pre>
1300           a   b   c      d   e   f    g    h    i    j    k    l   m
1301           n   o   p      q   r   s    t    u    v    w    x    y   z</pre>
1302  the 10 decimal digits
1303 <pre>
1304           0   1   2      3   4   5    6    7    8    9</pre>
1305  the following 29 graphic characters
1306 <pre>
1307           !   "   #      %   &amp;   '    (    )    *    +    ,    -   .    /    :
1308           ;   &lt;   =      &gt;   ?   [    \    ]    ^    _    {    |   }    ~</pre>
1309  the space character, and control characters representing horizontal tab, vertical tab, and
1310  form feed. The representation of each member of the source and execution basic
1311  character sets shall fit in a byte. In both the source and execution basic character sets, the
1312  value of each character after 0 in the above list of decimal digits shall be one greater than
1313  the value of the previous. In source files, there shall be some way of indicating the end of
1314  each line of text; this International Standard treats such an end-of-line indicator as if it
1315  were a single new-line character. In the basic execution character set, there shall be
1316  control characters representing alert, backspace, carriage return, and new line. If any
1317  other characters are encountered in a source file (except in an identifier, a character
1318  constant, a string literal, a header name, a comment, or a preprocessing token that is never
1319 <!--page 30 -->
1320  converted to a token), the behavior is undefined.
1321 <p><!--para 4 -->
1322  A letter is an uppercase letter or a lowercase letter as defined above; in this International
1323  Standard the term does not include other characters that are letters in other alphabets.
1324 <p><!--para 5 -->
1325  The universal character name construct provides a way to name other characters.
1326 <p><b> Forward references</b>: universal character names (<a href="#6.4.3">6.4.3</a>), character constants (<a href="#6.4.4.4">6.4.4.4</a>),
1327  preprocessing directives (<a href="#6.10">6.10</a>), string literals (<a href="#6.4.5">6.4.5</a>), comments (<a href="#6.4.9">6.4.9</a>), string (<a href="#7.1.1">7.1.1</a>).
1328
1329 <h5><a name="5.2.1.1" href="#5.2.1.1">5.2.1.1 Trigraph sequences</a></h5>
1330 <p><!--para 1 -->
1331  Before any other processing takes place, each occurrence of one of the following
1332  sequences of three characters (called trigraph sequences<sup><a href="#note12"><b>12)</b></a></sup>) is replaced with the
1333  corresponding single character.
1334 <pre>
1335         ??=      #                       ??)      ]                       ??!     |
1336         ??(      [                       ??'      ^                       ??&gt;     }
1337         ??/      \                       ??&lt;      {                       ??-     ~</pre>
1338  No other trigraph sequences exist. Each ? that does not begin one of the trigraphs listed
1339  above is not changed.
1340 <p><!--para 2 -->
1341  EXAMPLE 1
1342 <pre>
1343            ??=define arraycheck(a, b) a??(b??) ??!??! b??(a??)</pre>
1344  becomes
1345 <pre>
1346            #define arraycheck(a, b) a[b] || b[a]</pre>
1347  
1348 <p><!--para 3 -->
1349  EXAMPLE 2      The following source line
1350 <pre>
1351            printf("Eh???/n");</pre>
1352  becomes (after replacement of the trigraph sequence ??/)
1353 <pre>
1354            printf("Eh?\n");</pre>
1355  
1356
1357 <h6>footnotes</h6>
1358 <p><small><a name="note12" href="#note12">12)</a> The trigraph sequences enable the input of characters that are not defined in the Invariant Code Set as
1359  described in ISO/IEC 646, which is a subset of the seven-bit US ASCII code set.
1360 </small>
1361
1362 <h5><a name="5.2.1.2" href="#5.2.1.2">5.2.1.2 Multibyte characters</a></h5>
1363 <p><!--para 1 -->
1364  The source character set may contain multibyte characters, used to represent members of
1365  the extended character set. The execution character set may also contain multibyte
1366  characters, which need not have the same encoding as for the source character set. For
1367  both character sets, the following shall hold:
1368 <ul>
1369 <li>  The basic character set shall be present and each character shall be encoded as a
1370  single byte.
1371 <li>  The presence, meaning, and representation of any additional members is locale-
1372  specific.
1373  
1374 <!--page 31 -->
1375 <li>  A multibyte character set may have a state-dependent encoding, wherein each
1376  sequence of multibyte characters begins in an initial shift state and enters other
1377  locale-specific shift states when specific multibyte characters are encountered in the
1378  sequence. While in the initial shift state, all single-byte characters retain their usual
1379  interpretation and do not alter the shift state. The interpretation for subsequent bytes
1380  in the sequence is a function of the current shift state.
1381 <li>  A byte with all bits zero shall be interpreted as a null character independent of shift
1382  state. Such a byte shall not occur as part of any other multibyte character.
1383 </ul>
1384 <p><!--para 2 -->
1385  For source files, the following shall hold:
1386 <ul>
1387 <li>  An identifier, comment, string literal, character constant, or header name shall begin
1388  and end in the initial shift state.
1389 <li>  An identifier, comment, string literal, character constant, or header name shall consist
1390  of a sequence of valid multibyte characters.
1391 </ul>
1392
1393 <h4><a name="5.2.2" href="#5.2.2">5.2.2 Character display semantics</a></h4>
1394 <p><!--para 1 -->
1395  The active position is that location on a display device where the next character output by
1396  the fputc function would appear. The intent of writing a printing character (as defined
1397  by the isprint function) to a display device is to display a graphic representation of
1398  that character at the active position and then advance the active position to the next
1399  position on the current line. The direction of writing is locale-specific. If the active
1400  position is at the final position of a line (if there is one), the behavior of the display device
1401  is unspecified.
1402 <p><!--para 2 -->
1403  Alphabetic escape sequences representing nongraphic characters in the execution
1404  character set are intended to produce actions on display devices as follows:
1405 <dl>
1406 <dt> \a <dd>(alert) Produces an audible or visible alert without changing the active position.
1407 <dt> \b <dd>(backspace) Moves the active position to the previous position on the current line. If
1408     the active position is at the initial position of a line, the behavior of the display
1409     device is unspecified.
1410 <dt> \f <dd>( form feed) Moves the active position to the initial position at the start of the next
1411     logical page.
1412 <dt> \n <dd>(new line) Moves the active position to the initial position of the next line.
1413 <dt> \r <dd>(carriage return) Moves the active position to the initial position of the current line.
1414 <dt> \t <dd>(horizontal tab) Moves the active position to the next horizontal tabulation position
1415     on the current line. If the active position is at or past the last defined horizontal
1416     tabulation position, the behavior of the display device is unspecified.
1417 <dt> \v <dd>(vertical tab) Moves the active position to the initial position of the next vertical
1418 <!--page 32 -->
1419      tabulation position. If the active position is at or past the last defined vertical
1420       tabulation position, the behavior of the display device is unspecified.
1421 </dl>
1422 <p><!--para 3 -->
1423  Each of these escape sequences shall produce a unique implementation-defined value
1424  which can be stored in a single char object. The external representations in a text file
1425  need not be identical to the internal representations, and are outside the scope of this
1426  International Standard.
1427 <p><b> Forward references</b>: the isprint function (<a href="#7.4.1.8">7.4.1.8</a>), the fputc function (<a href="#7.19.7.3">7.19.7.3</a>).
1428
1429 <h4><a name="5.2.3" href="#5.2.3">5.2.3 Signals and interrupts</a></h4>
1430 <p><!--para 1 -->
1431  Functions shall be implemented such that they may be interrupted at any time by a signal,
1432  or may be called by a signal handler, or both, with no alteration to earlier, but still active,
1433  invocations' control flow (after the interruption), function return values, or objects with
1434  automatic storage duration. All such objects shall be maintained outside the function
1435  image (the instructions that compose the executable representation of a function) on a
1436  per-invocation basis.
1437
1438 <h4><a name="5.2.4" href="#5.2.4">5.2.4 Environmental limits</a></h4>
1439 <p><!--para 1 -->
1440  Both the translation and execution environments constrain the implementation of
1441  language translators and libraries. The following summarizes the language-related
1442  environmental limits on a conforming implementation; the library-related limits are
1443  discussed in clause 7.
1444
1445 <h5><a name="5.2.4.1" href="#5.2.4.1">5.2.4.1 Translation limits</a></h5>
1446 <p><!--para 1 -->
1447  The implementation shall be able to translate and execute at least one program that
1448  contains at least one instance of every one of the following limits:<sup><a href="#note13"><b>13)</b></a></sup>
1449 <ul>
1450 <li>  127 nesting levels of blocks
1451 <li>  63 nesting levels of conditional inclusion
1452 <li>  12 pointer, array, and function declarators (in any combinations) modifying an
1453  arithmetic, structure, union, or incomplete type in a declaration
1454 <li>  63 nesting levels of parenthesized declarators within a full declarator
1455 <li>  63 nesting levels of parenthesized expressions within a full expression
1456 <li>  63 significant initial characters in an internal identifier or a macro name (each
1457  universal character name or extended source character is considered a single
1458  character)
1459 <li>  31 significant initial characters in an external identifier (each universal character name
1460  specifying a short identifier of 0000FFFF or less is considered 6 characters, each
1461  
1462  
1463 <!--page 33 -->
1464    universal character name specifying a short identifier of 00010000 or more is
1465    considered 10 characters, and each extended source character is considered the same
1466    number of characters as the corresponding universal character name, if any)<sup><a href="#note14"><b>14)</b></a></sup>
1467 <li>  4095 external identifiers in one translation unit
1468 <li>  511 identifiers with block scope declared in one block
1469 <li>  4095 macro identifiers simultaneously defined in one preprocessing translation unit
1470 <li>  127 parameters in one function definition
1471 <li>  127 arguments in one function call
1472 <li>  127 parameters in one macro definition
1473 <li>  127 arguments in one macro invocation
1474 <li>  4095 characters in a logical source line
1475 <li>  4095 characters in a character string literal or wide string literal (after concatenation)
1476 <li>  65535 bytes in an object (in a hosted environment only)
1477 <li>  15 nesting levels for #included files
1478 <li>  1023 case labels for a switch statement (excluding those for any nested switch
1479  statements)
1480 <li>  1023 members in a single structure or union
1481 <li>  1023 enumeration constants in a single enumeration
1482 <li>  63 levels of nested structure or union definitions in a single struct-declaration-list
1483 </ul>
1484
1485 <h6>footnotes</h6>
1486 <p><small><a name="note13" href="#note13">13)</a> Implementations should avoid imposing fixed translation limits whenever possible.
1487 </small>
1488 <p><small><a name="note14" href="#note14">14)</a> See ''future language directions'' (<a href="#6.11.3">6.11.3</a>).
1489 </small>
1490
1491 <h5><a name="5.2.4.2" href="#5.2.4.2">5.2.4.2 Numerical limits</a></h5>
1492 <p><!--para 1 -->
1493  An implementation is required to document all the limits specified in this subclause,
1494  which are specified in the headers <a href="#7.10">&lt;limits.h&gt;</a> and <a href="#7.7">&lt;float.h&gt;</a>. Additional limits are
1495  specified in <a href="#7.18">&lt;stdint.h&gt;</a>.
1496 <p><b> Forward references</b>: integer types <a href="#7.18">&lt;stdint.h&gt;</a> (<a href="#7.18">7.18</a>).
1497
1498 <h5><a name="5.2.4.2.1" href="#5.2.4.2.1">5.2.4.2.1 Sizes of integer types <limits.h></a></h5>
1499 <p><!--para 1 -->
1500  The values given below shall be replaced by constant expressions suitable for use in #if
1501  preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX, the
1502  following shall be replaced by expressions that have the same type as would an
1503  expression that is an object of the corresponding type converted according to the integer
1504  promotions. Their implementation-defined values shall be equal or greater in magnitude
1505  
1506  
1507 <!--page 34 -->
1508  (absolute value) to those shown, with the same sign.
1509 <ul>
1510 <li>  number of bits for smallest object that is not a bit-field (byte)
1511 <pre> CHAR_BIT                                            8</pre>
1512 <li>  minimum value for an object of type signed char
1513 <pre> SCHAR_MIN                                -127 // -(2<sup>7</sup> - 1)</pre>
1514 <li>  maximum value for an object of type signed char
1515 <pre> SCHAR_MAX                                +127 // 2<sup>7</sup> - 1</pre>
1516 <li>  maximum value for an object of type unsigned char
1517 <pre> UCHAR_MAX                                 255 // 2<sup>8</sup> - 1</pre>
1518 <li>  minimum value for an object of type char
1519 <pre> CHAR_MIN                               see below</pre>
1520 <li>  maximum value for an object of type char
1521 <pre> CHAR_MAX                              see below</pre>
1522 <li>  maximum number of bytes in a multibyte character, for any supported locale
1523 <pre> MB_LEN_MAX                                    1</pre>
1524 <li>  minimum value for an object of type short int
1525 <pre> SHRT_MIN                               -32767 // -(2<sup>15</sup> - 1)</pre>
1526 <li>  maximum value for an object of type short int
1527 <pre> SHRT_MAX                               +32767 // 2<sup>15</sup> - 1</pre>
1528 <li>  maximum value for an object of type unsigned short int
1529 <pre> USHRT_MAX                               65535 // 2<sup>16</sup> - 1</pre>
1530 <li>  minimum value for an object of type int
1531 <pre> INT_MIN                                 -32767 // -(2<sup>15</sup> - 1)</pre>
1532 <li>  maximum value for an object of type int
1533 <pre> INT_MAX                                +32767 // 2<sup>15</sup> - 1</pre>
1534 <li>  maximum value for an object of type unsigned int
1535 <pre> UINT_MAX                                65535 // 2<sup>16</sup> - 1</pre>
1536 <li>  minimum value for an object of type long int
1537 <pre> LONG_MIN                         -2147483647 // -(2<sup>31</sup> - 1)</pre>
1538 <li>  maximum value for an object of type long int
1539 <pre> LONG_MAX                         +2147483647 // 2<sup>31</sup> - 1</pre>
1540 <li>  maximum value for an object of type unsigned long int
1541 <pre> ULONG_MAX                         4294967295 // 2<sup>32</sup> - 1</pre>
1542 <!--page 35 -->
1543 <li>  minimum value for an object of type long long int
1544 <pre> LLONG_MIN          -9223372036854775807 // -(2<sup>63</sup> - 1)</pre>
1545 <li>  maximum value for an object of type long long int
1546 <pre> LLONG_MAX          +9223372036854775807 // 2<sup>63</sup> - 1</pre>
1547 <li>  maximum value for an object of type unsigned long long int
1548 <pre> ULLONG_MAX         18446744073709551615 // 2<sup>64</sup> - 1</pre>
1549 </ul>
1550 <p><!--para 2 -->
1551  If the value of an object of type char is treated as a signed integer when used in an
1552  expression, the value of CHAR_MIN shall be the same as that of SCHAR_MIN and the
1553  value of CHAR_MAX shall be the same as that of SCHAR_MAX. Otherwise, the value of
1554  CHAR_MIN shall be 0 and the value of CHAR_MAX shall be the same as that of
1555  UCHAR_MAX.<sup><a href="#note15"><b>15)</b></a></sup> The value UCHAR_MAX shall equal 2<sup>CHAR_BIT</sup> - 1.
1556 <p><b> Forward references</b>: representations of types (<a href="#6.2.6">6.2.6</a>), conditional inclusion (<a href="#6.10.1">6.10.1</a>).
1557
1558 <h6>footnotes</h6>
1559 <p><small><a name="note15" href="#note15">15)</a> See <a href="#6.2.5">6.2.5</a>.
1560 </small>
1561
1562 <h5><a name="5.2.4.2.2" href="#5.2.4.2.2">5.2.4.2.2 Characteristics of floating types <float.h></a></h5>
1563 <p><!--para 1 -->
1564  The characteristics of floating types are defined in terms of a model that describes a
1565  representation of floating-point numbers and values that provide information about an
1566  implementation's floating-point arithmetic.<sup><a href="#note16"><b>16)</b></a></sup> The following parameters are used to
1567  define the model for each floating-point type:
1568 <p><!--para 2 -->
1569 <pre>
1570         s          sign ((+-)1)
1571         b          base or radix of exponent representation (an integer &gt; 1)
1572         e          exponent (an integer between a minimum emin and a maximum emax )
1573         p          precision (the number of base-b digits in the significand)
1574         f<sub>k</sub>         nonnegative integers less than b (the significand digits)</pre>
1575  A floating-point number (x) is defined by the following model:
1576 <pre>
1577                     p
1578         x = s b<sup>e</sup>  (Sum) f<sub>k</sub> b<sup>-k</sup> ,   emin &lt;= e &lt;= emax
1579                    k=1</pre>
1580  
1581 <p><!--para 3 -->
1582  In addition to normalized floating-point numbers ( f<sub>1</sub> &gt; 0 if x != 0), floating types may be
1583  able to contain other kinds of floating-point numbers, such as subnormal floating-point
1584  numbers (x != 0, e = emin , f<sub>1</sub> = 0) and unnormalized floating-point numbers (x != 0,
1585  e &gt; emin , f<sub>1</sub> = 0), and values that are not floating-point numbers, such as infinities and
1586  NaNs. A NaN is an encoding signifying Not-a-Number. A quiet NaN propagates
1587  through almost every arithmetic operation without raising a floating-point exception; a
1588  signaling NaN generally raises a floating-point exception when occurring as an
1589  
1590  
1591 <!--page 36 -->
1592  arithmetic operand.<sup><a href="#note17"><b>17)</b></a></sup>
1593 <p><!--para 4 -->
1594  An implementation may give zero and non-numeric values (such as infinities and NaNs) a
1595  sign or may leave them unsigned. Wherever such values are unsigned, any requirement
1596  in this International Standard to retrieve the sign shall produce an unspecified sign, and
1597  any requirement to set the sign shall be ignored.
1598 <p><!--para 5 -->
1599  The accuracy of the floating-point operations (+, -, *, /) and of the library functions in
1600  <a href="#7.12">&lt;math.h&gt;</a> and <a href="#7.3">&lt;complex.h&gt;</a> that return floating-point results is implementation-
1601  defined, as is the accuracy of the conversion between floating-point internal
1602  representations and string representations performed by the library functions in
1603  <a href="#7.19">&lt;stdio.h&gt;</a>, <a href="#7.20">&lt;stdlib.h&gt;</a>, and <a href="#7.24">&lt;wchar.h&gt;</a>. The implementation may state that the
1604  accuracy is unknown.
1605 <p><!--para 6 -->
1606  All integer values in the <a href="#7.7">&lt;float.h&gt;</a> header, except FLT_ROUNDS, shall be constant
1607  expressions suitable for use in #if preprocessing directives; all floating values shall be
1608  constant expressions. All except DECIMAL_DIG, FLT_EVAL_METHOD, FLT_RADIX,
1609  and FLT_ROUNDS have separate names for all three floating-point types. The floating-point
1610  model representation is provided for all values except FLT_EVAL_METHOD and
1611  FLT_ROUNDS.
1612 <p><!--para 7 -->
1613  The rounding mode for floating-point addition is characterized by the implementation-
1614  defined value of FLT_ROUNDS:<sup><a href="#note18"><b>18)</b></a></sup>
1615 <pre>
1616        -1      indeterminable
1617         0      toward zero
1618         1      to nearest
1619         2      toward positive infinity
1620         3      toward negative infinity</pre>
1621  All other values for FLT_ROUNDS characterize implementation-defined rounding
1622  behavior.
1623 <p><!--para 8 -->
1624  Except for assignment and cast (which remove all extra range and precision), the values
1625  of operations with floating operands and values subject to the usual arithmetic
1626  conversions and of floating constants are evaluated to a format whose range and precision
1627  may be greater than required by the type. The use of evaluation formats is characterized
1628  by the implementation-defined value of FLT_EVAL_METHOD:<sup><a href="#note19"><b>19)</b></a></sup>
1629  
1630  
1631  
1632 <!--page 37 -->
1633 <pre>
1634         -1        indeterminable;
1635          0        evaluate all operations and constants just to the range and precision of the
1636                   type;
1637          1        evaluate operations and constants of type float and double to the
1638                   range and precision of the double type, evaluate long double
1639                   operations and constants to the range and precision of the long double
1640                   type;
1641          2        evaluate all operations and constants to the range and precision of the
1642                   long double type.</pre>
1643  All other negative values for FLT_EVAL_METHOD characterize implementation-defined
1644  behavior.
1645 <p><!--para 9 -->
1646  The values given in the following list shall be replaced by constant expressions with
1647  implementation-defined values that are greater or equal in magnitude (absolute value) to
1648  those shown, with the same sign:
1649 <ul>
1650 <li>  radix of exponent representation, b
1651 <pre> FLT_RADIX                                                 2</pre>
1652 <li>  number of base-FLT_RADIX digits in the floating-point significand, p
1653 <pre>   FLT_MANT_DIG
1654    DBL_MANT_DIG
1655    LDBL_MANT_DIG</pre>
1656 <li>  number of decimal digits, n, such that any floating-point number in the widest
1657  supported floating type with pmax radix b digits can be rounded to a floating-point
1658  number with n decimal digits and back again without change to the value,
1659 <pre>
1660       { pmax log10 b       if b is a power of 10
1661       {
1662       { [^1 + pmax log10 b^] otherwise</pre>
1663 <pre>   DECIMAL_DIG                                            10</pre>
1664 <li>  number of decimal digits, q, such that any floating-point number with q decimal digits
1665  can be rounded into a floating-point number with p radix b digits and back again
1666  without change to the q decimal digits,
1667  
1668  
1669  
1670  
1671 <!--page 38 -->
1672 <pre>
1673       { p log10 b          if b is a power of 10
1674       {
1675       { [_( p - 1) log10 b_] otherwise</pre>
1676 <pre>  FLT_DIG                                         6
1677   DBL_DIG                                        10
1678   LDBL_DIG                                       10</pre>
1679 <li>  minimum negative integer such that FLT_RADIX raised to one less than that power is
1680  a normalized floating-point number, emin
1681 <pre>  FLT_MIN_EXP
1682   DBL_MIN_EXP
1683   LDBL_MIN_EXP</pre>
1684 <li>  minimum negative integer such that 10 raised to that power is in the range of
1685  normalized floating-point numbers, [^log10 b<sup>emin -1</sup>^]
1686 <pre> FLT_MIN_10_EXP                                 -37
1687  DBL_MIN_10_EXP                                 -37
1688  LDBL_MIN_10_EXP                                -37</pre>
1689 <li>  maximum integer such that FLT_RADIX raised to one less than that power is a
1690  representable finite floating-point number, emax
1691 <pre>  FLT_MAX_EXP
1692   DBL_MAX_EXP
1693   LDBL_MAX_EXP</pre>
1694 <li>  maximum integer such that 10 raised to that power is in the range of representable
1695  finite floating-point numbers, [_log10 ((1 - b<sup>-p</sup>)b<sup>emax</sup>)_]
1696 <pre>  FLT_MAX_10_EXP                                 +37
1697   DBL_MAX_10_EXP                                 +37
1698   LDBL_MAX_10_EXP                                +37</pre>
1699 </ul>
1700 <p><!--para 10 -->
1701  The values given in the following list shall be replaced by constant expressions with
1702  implementation-defined values that are greater than or equal to those shown:
1703 <ul>
1704 <li>  maximum representable finite floating-point number, (1 - b<sup>-p</sup>)b<sup>emax</sup>
1705 <pre>  FLT_MAX                                     1E+37
1706   DBL_MAX                                     1E+37
1707   LDBL_MAX                                    1E+37</pre>
1708 </ul>
1709 <p><!--para 11 -->
1710  The values given in the following list shall be replaced by constant expressions with
1711  implementation-defined (positive) values that are less than or equal to those shown:
1712 <ul>
1713 <li>  the difference between 1 and the least value greater than 1 that is representable in the
1714   given floating point type, b<sup>1-p</sup>
1715 <!--page 39 -->
1716 <pre>   FLT_EPSILON                                         1E-5
1717    DBL_EPSILON                                         1E-9
1718    LDBL_EPSILON                                        1E-9</pre>
1719 <li>  minimum normalized positive floating-point number, b<sup>emin -1</sup>
1720 <pre>   FLT_MIN                                            1E-37
1721    DBL_MIN                                            1E-37
1722    LDBL_MIN                                           1E-37</pre>
1723 </ul>
1724 <h6> Recommended practice</h6>
1725 <p><!--para 12 -->
1726  Conversion from (at least) double to decimal with DECIMAL_DIG digits and back
1727  should be the identity function.
1728 <p><!--para 13 -->
1729  EXAMPLE 1 The following describes an artificial floating-point representation that meets the minimum
1730  requirements of this International Standard, and the appropriate values in a <a href="#7.7">&lt;float.h&gt;</a> header for type
1731  float:
1732 <pre>
1733                     6
1734        x = s 16<sup>e</sup>   (Sum) f<sub>k</sub> 16<sup>-k</sup> ,   -31 &lt;= e &lt;= +32
1735                    k=1</pre>
1736  
1737 <pre>
1738          FLT_RADIX                                  16
1739          FLT_MANT_DIG                                6
1740          FLT_EPSILON                   9.53674316E-07F
1741          FLT_DIG                                     6
1742          FLT_MIN_EXP                               -31
1743          FLT_MIN                       2.93873588E-39F
1744          FLT_MIN_10_EXP                            -38
1745          FLT_MAX_EXP                               +32
1746          FLT_MAX                       3.40282347E+38F
1747          FLT_MAX_10_EXP                            +38</pre>
1748  
1749 <p><!--para 14 -->
1750  EXAMPLE 2 The following describes floating-point representations that also meet the requirements for
1751  single-precision and double-precision normalized numbers in IEC 60559,<sup><a href="#note20"><b>20)</b></a></sup> and the appropriate values in a
1752  <a href="#7.7">&lt;float.h&gt;</a> header for types float and double:
1753 <pre>
1754                    24
1755        xf = s 2<sup>e</sup>  (Sum) f<sub>k</sub> 2<sup>-k</sup> ,   -125 &lt;= e &lt;= +128
1756                    k=1</pre>
1757  
1758 <pre>
1759                    53
1760        xd = s 2<sup>e</sup>  (Sum) f<sub>k</sub> 2<sup>-k</sup> ,   -1021 &lt;= e &lt;= +1024
1761                    k=1</pre>
1762
1763  
1764 <pre>
1765          FLT_RADIX                                   2
1766          DECIMAL_DIG                                17
1767          FLT_MANT_DIG                               24
1768          FLT_EPSILON                   1.19209290E-07F // decimal constant
1769          FLT_EPSILON                          0X1P-23F // hex constant</pre>
1770  
1771  
1772 <!--page 40 -->
1773 <pre>
1774          FLT_DIG                           6
1775          FLT_MIN_EXP                    -125
1776          FLT_MIN             1.17549435E-38F               // decimal constant
1777          FLT_MIN                   0X1P-126F               // hex constant
1778          FLT_MIN_10_EXP                  -37
1779          FLT_MAX_EXP                    +128
1780          FLT_MAX             3.40282347E+38F               // decimal constant
1781          FLT_MAX             0X1.fffffeP127F               // hex constant
1782          FLT_MAX_10_EXP                  +38
1783          DBL_MANT_DIG                     53
1784          DBL_EPSILON 2.2204460492503131E-16                // decimal constant
1785          DBL_EPSILON                 0X1P-52               // hex constant
1786          DBL_DIG                          15
1787          DBL_MIN_EXP                   -1021
1788          DBL_MIN     2.2250738585072014E-308               // decimal constant
1789          DBL_MIN                   0X1P-1022               // hex constant
1790          DBL_MIN_10_EXP                 -307
1791          DBL_MAX_EXP                   +1024
1792          DBL_MAX     1.7976931348623157E+308               // decimal constant
1793          DBL_MAX      0X1.fffffffffffffP1023               // hex constant
1794          DBL_MAX_10_EXP                 +308</pre>
1795  If a type wider than double were supported, then DECIMAL_DIG would be greater than 17. For
1796  example, if the widest type were to use the minimal-width IEC 60559 double-extended format (64 bits of
1797  precision), then DECIMAL_DIG would be 21.
1798  
1799 <p><b> Forward references</b>:        conditional inclusion (<a href="#6.10.1">6.10.1</a>), complex arithmetic
1800  <a href="#7.3">&lt;complex.h&gt;</a> (<a href="#7.3">7.3</a>), extended multibyte and wide character utilities <a href="#7.24">&lt;wchar.h&gt;</a>
1801  (<a href="#7.24">7.24</a>), floating-point environment <a href="#7.6">&lt;fenv.h&gt;</a> (<a href="#7.6">7.6</a>), general utilities <a href="#7.20">&lt;stdlib.h&gt;</a>
1802  (<a href="#7.20">7.20</a>), input/output <a href="#7.19">&lt;stdio.h&gt;</a> (<a href="#7.19">7.19</a>), mathematics <a href="#7.12">&lt;math.h&gt;</a> (<a href="#7.12">7.12</a>).
1803 <!--page 41 -->
1804
1805 <h6>footnotes</h6>
1806 <p><small><a name="note16" href="#note16">16)</a> The floating-point model is intended to clarify the description of each floating-point characteristic and
1807  does not require the floating-point arithmetic of the implementation to be identical.
1808 </small>
1809 <p><small><a name="note17" href="#note17">17)</a> IEC 60559:1989 specifies quiet and signaling NaNs. For implementations that do not support
1810  IEC 60559:1989, the terms quiet NaN and signaling NaN are intended to apply to encodings with
1811  similar behavior.
1812 </small>
1813 <p><small><a name="note18" href="#note18">18)</a> Evaluation of FLT_ROUNDS correctly reflects any execution-time change of rounding mode through
1814  the function fesetround in <a href="#7.6">&lt;fenv.h&gt;</a>.
1815 </small>
1816 <p><small><a name="note19" href="#note19">19)</a> The evaluation method determines evaluation formats of expressions involving all floating types, not
1817  just real types. For example, if FLT_EVAL_METHOD is 1, then the product of two float
1818  _Complex operands is represented in the double _Complex format, and its parts are evaluated to
1819  double.
1820 </small>
1821 <p><small><a name="note20" href="#note20">20)</a> The floating-point model in that standard sums powers of b from zero, so the values of the exponent
1822  limits are one less than shown here.
1823 </small>
1824
1825 <h2><a name="6" href="#6">6. Language</a></h2>
1826
1827 <h3><a name="6.1" href="#6.1">6.1 Notation</a></h3>
1828 <p><!--para 1 -->
1829  In the syntax notation used in this clause, syntactic categories (nonterminals) are
1830  indicated by italic type, and literal words and character set members (terminals) by bold
1831  type. A colon (:) following a nonterminal introduces its definition. Alternative
1832  definitions are listed on separate lines, except when prefaced by the words ''one of''. An
1833  optional symbol is indicated by the subscript ''opt'', so that
1834 <pre>
1835           { expression<sub>opt</sub> }</pre>
1836  indicates an optional expression enclosed in braces.
1837 <p><!--para 2 -->
1838  When syntactic categories are referred to in the main text, they are not italicized and
1839  words are separated by spaces instead of hyphens.
1840 <p><!--para 3 -->
1841  A summary of the language syntax is given in <a href="#A">annex A</a>.
1842
1843 <h3><a name="6.2" href="#6.2">6.2 Concepts</a></h3>
1844
1845 <h4><a name="6.2.1" href="#6.2.1">6.2.1 Scopes of identifiers</a></h4>
1846 <p><!--para 1 -->
1847  An identifier can denote an object; a function; a tag or a member of a structure, union, or
1848  enumeration; a typedef name; a label name; a macro name; or a macro parameter. The
1849  same identifier can denote different entities at different points in the program. A member
1850  of an enumeration is called an enumeration constant. Macro names and macro
1851  parameters are not considered further here, because prior to the semantic phase of
1852  program translation any occurrences of macro names in the source file are replaced by the
1853  preprocessing token sequences that constitute their macro definitions.
1854 <p><!--para 2 -->
1855  For each different entity that an identifier designates, the identifier is visible (i.e., can be
1856  used) only within a region of program text called its scope. Different entities designated
1857  by the same identifier either have different scopes, or are in different name spaces. There
1858  are four kinds of scopes: function, file, block, and function prototype. (A function
1859  prototype is a declaration of a function that declares the types of its parameters.)
1860 <p><!--para 3 -->
1861  A label name is the only kind of identifier that has function scope. It can be used (in a
1862  goto statement) anywhere in the function in which it appears, and is declared implicitly
1863  by its syntactic appearance (followed by a : and a statement).
1864 <p><!--para 4 -->
1865  Every other identifier has scope determined by the placement of its declaration (in a
1866  declarator or type specifier). If the declarator or type specifier that declares the identifier
1867  appears outside of any block or list of parameters, the identifier has file scope, which
1868  terminates at the end of the translation unit. If the declarator or type specifier that
1869  declares the identifier appears inside a block or within the list of parameter declarations in
1870  a function definition, the identifier has block scope, which terminates at the end of the
1871  associated block. If the declarator or type specifier that declares the identifier appears
1872 <!--page 42 -->
1873  within the list of parameter declarations in a function prototype (not part of a function
1874  definition), the identifier has function prototype scope, which terminates at the end of the
1875  function declarator. If an identifier designates two different entities in the same name
1876  space, the scopes might overlap. If so, the scope of one entity (the inner scope) will be a
1877  strict subset of the scope of the other entity (the outer scope). Within the inner scope, the
1878  identifier designates the entity declared in the inner scope; the entity declared in the outer
1879  scope is hidden (and not visible) within the inner scope.
1880 <p><!--para 5 -->
1881  Unless explicitly stated otherwise, where this International Standard uses the term
1882  ''identifier'' to refer to some entity (as opposed to the syntactic construct), it refers to the
1883  entity in the relevant name space whose declaration is visible at the point the identifier
1884  occurs.
1885 <p><!--para 6 -->
1886  Two identifiers have the same scope if and only if their scopes terminate at the same
1887  point.
1888 <p><!--para 7 -->
1889  Structure, union, and enumeration tags have scope that begins just after the appearance of
1890  the tag in a type specifier that declares the tag. Each enumeration constant has scope that
1891  begins just after the appearance of its defining enumerator in an enumerator list. Any
1892  other identifier has scope that begins just after the completion of its declarator.
1893 <p><b> Forward references</b>: declarations (<a href="#6.7">6.7</a>), function calls (<a href="#6.5.2.2">6.5.2.2</a>), function definitions
1894  (<a href="#6.9.1">6.9.1</a>), identifiers (<a href="#6.4.2">6.4.2</a>), name spaces of identifiers (<a href="#6.2.3">6.2.3</a>), macro replacement (<a href="#6.10.3">6.10.3</a>),
1895  source file inclusion (<a href="#6.10.2">6.10.2</a>), statements (<a href="#6.8">6.8</a>).
1896
1897 <h4><a name="6.2.2" href="#6.2.2">6.2.2 Linkages of identifiers</a></h4>
1898 <p><!--para 1 -->
1899  An identifier declared in different scopes or in the same scope more than once can be
1900  made to refer to the same object or function by a process called linkage.<sup><a href="#note21"><b>21)</b></a></sup> There are
1901  three kinds of linkage: external, internal, and none.
1902 <p><!--para 2 -->
1903  In the set of translation units and libraries that constitutes an entire program, each
1904  declaration of a particular identifier with external linkage denotes the same object or
1905  function. Within one translation unit, each declaration of an identifier with internal
1906  linkage denotes the same object or function. Each declaration of an identifier with no
1907  linkage denotes a unique entity.
1908 <p><!--para 3 -->
1909  If the declaration of a file scope identifier for an object or a function contains the storage-
1910  class specifier static, the identifier has internal linkage.<sup><a href="#note22"><b>22)</b></a></sup>
1911 <p><!--para 4 -->
1912  For an identifier declared with the storage-class specifier extern in a scope in which a
1913  
1914  
1915  
1916 <!--page 43 -->
1917  prior declaration of that identifier is visible,<sup><a href="#note23"><b>23)</b></a></sup> if the prior declaration specifies internal or
1918  external linkage, the linkage of the identifier at the later declaration is the same as the
1919  linkage specified at the prior declaration. If no prior declaration is visible, or if the prior
1920  declaration specifies no linkage, then the identifier has external linkage.
1921 <p><!--para 5 -->
1922  If the declaration of an identifier for a function has no storage-class specifier, its linkage
1923  is determined exactly as if it were declared with the storage-class specifier extern. If
1924  the declaration of an identifier for an object has file scope and no storage-class specifier,
1925  its linkage is external.
1926 <p><!--para 6 -->
1927  The following identifiers have no linkage: an identifier declared to be anything other than
1928  an object or a function; an identifier declared to be a function parameter; a block scope
1929  identifier for an object declared without the storage-class specifier extern.
1930 <p><!--para 7 -->
1931  If, within a translation unit, the same identifier appears with both internal and external
1932  linkage, the behavior is undefined.
1933 <p><b> Forward references</b>: declarations (<a href="#6.7">6.7</a>), expressions (<a href="#6.5">6.5</a>), external definitions (<a href="#6.9">6.9</a>),
1934  statements (<a href="#6.8">6.8</a>).
1935
1936 <h6>footnotes</h6>
1937 <p><small><a name="note21" href="#note21">21)</a> There is no linkage between different identifiers.
1938 </small>
1939 <p><small><a name="note22" href="#note22">22)</a> A function declaration can contain the storage-class specifier static only if it is at file scope; see
1940  <a href="#6.7.1">6.7.1</a>.
1941 </small>
1942 <p><small><a name="note23" href="#note23">23)</a> As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
1943 </small>
1944
1945 <h4><a name="6.2.3" href="#6.2.3">6.2.3 Name spaces of identifiers</a></h4>
1946 <p><!--para 1 -->
1947  If more than one declaration of a particular identifier is visible at any point in a
1948  translation unit, the syntactic context disambiguates uses that refer to different entities.
1949  Thus, there are separate name spaces for various categories of identifiers, as follows:
1950 <ul>
1951 <li>  label names (disambiguated by the syntax of the label declaration and use);
1952 <li>  the tags of structures, unions, and enumerations (disambiguated by following any<sup><a href="#note24"><b>24)</b></a></sup>
1953  of the keywords struct, union, or enum);
1954 <li>  the members of structures or unions; each structure or union has a separate name
1955  space for its members (disambiguated by the type of the expression used to access the
1956  member via the . or -&gt; operator);
1957 <li>  all other identifiers, called ordinary identifiers (declared in ordinary declarators or as
1958  enumeration constants).
1959 </ul>
1960 <p><b> Forward references</b>: enumeration specifiers (<a href="#6.7.2.2">6.7.2.2</a>), labeled statements (<a href="#6.8.1">6.8.1</a>),
1961  structure and union specifiers (<a href="#6.7.2.1">6.7.2.1</a>), structure and union members (<a href="#6.5.2.3">6.5.2.3</a>), tags
1962  (<a href="#6.7.2.3">6.7.2.3</a>), the goto statement (<a href="#6.8.6.1">6.8.6.1</a>).
1963  
1964  
1965  
1966  
1967 <!--page 44 -->
1968
1969 <h6>footnotes</h6>
1970 <p><small><a name="note24" href="#note24">24)</a> There is only one name space for tags even though three are possible.
1971 </small>
1972
1973 <h4><a name="6.2.4" href="#6.2.4">6.2.4 Storage durations of objects</a></h4>
1974 <p><!--para 1 -->
1975  An object has a storage duration that determines its lifetime. There are three storage
1976  durations: static, automatic, and allocated. Allocated storage is described in <a href="#7.20.3">7.20.3</a>.
1977 <p><!--para 2 -->
1978  The lifetime of an object is the portion of program execution during which storage is
1979  guaranteed to be reserved for it. An object exists, has a constant address,<sup><a href="#note25"><b>25)</b></a></sup> and retains
1980  its last-stored value throughout its lifetime.<sup><a href="#note26"><b>26)</b></a></sup> If an object is referred to outside of its
1981  lifetime, the behavior is undefined. The value of a pointer becomes indeterminate when
1982  the object it points to reaches the end of its lifetime.
1983 <p><!--para 3 -->
1984  An object whose identifier is declared with external or internal linkage, or with the
1985  storage-class specifier static has static storage duration. Its lifetime is the entire
1986  execution of the program and its stored value is initialized only once, prior to program
1987  startup.
1988 <p><!--para 4 -->
1989  An object whose identifier is declared with no linkage and without the storage-class
1990  specifier static has automatic storage duration.
1991 <p><!--para 5 -->
1992  For such an object that does not have a variable length array type, its lifetime extends
1993  from entry into the block with which it is associated until execution of that block ends in
1994  any way. (Entering an enclosed block or calling a function suspends, but does not end,
1995  execution of the current block.) If the block is entered recursively, a new instance of the
1996  object is created each time. The initial value of the object is indeterminate. If an
1997  initialization is specified for the object, it is performed each time the declaration is
1998  reached in the execution of the block; otherwise, the value becomes indeterminate each
1999  time the declaration is reached.
2000 <p><!--para 6 -->
2001  For such an object that does have a variable length array type, its lifetime extends from
2002  the declaration of the object until execution of the program leaves the scope of the
2003  declaration.<sup><a href="#note27"><b>27)</b></a></sup> If the scope is entered recursively, a new instance of the object is created
2004  each time. The initial value of the object is indeterminate.
2005 <p><b> Forward references</b>: statements (<a href="#6.8">6.8</a>), function calls (<a href="#6.5.2.2">6.5.2.2</a>), declarators (<a href="#6.7.5">6.7.5</a>), array
2006  declarators (<a href="#6.7.5.2">6.7.5.2</a>), initialization (<a href="#6.7.8">6.7.8</a>).
2007  
2008  
2009  
2010  
2011 <!--page 45 -->
2012
2013 <h6>footnotes</h6>
2014 <p><small><a name="note25" href="#note25">25)</a> The term ''constant address'' means that two pointers to the object constructed at possibly different
2015  times will compare equal. The address may be different during two different executions of the same
2016  program.
2017 </small>
2018 <p><small><a name="note26" href="#note26">26)</a> In the case of a volatile object, the last store need not be explicit in the program.
2019 </small>
2020 <p><small><a name="note27" href="#note27">27)</a> Leaving the innermost block containing the declaration, or jumping to a point in that block or an
2021  embedded block prior to the declaration, leaves the scope of the declaration.
2022 </small>
2023
2024 <h4><a name="6.2.5" href="#6.2.5">6.2.5 Types</a></h4>
2025 <p><!--para 1 -->
2026  The meaning of a value stored in an object or returned by a function is determined by the
2027  type of the expression used to access it. (An identifier declared to be an object is the
2028  simplest such expression; the type is specified in the declaration of the identifier.) Types
2029  are partitioned into object types (types that fully describe objects), function types (types
2030  that describe functions), and incomplete types (types that describe objects but lack
2031  information needed to determine their sizes).
2032 <p><!--para 2 -->
2033  An object declared as type _Bool is large enough to store the values 0 and 1.
2034 <p><!--para 3 -->
2035  An object declared as type char is large enough to store any member of the basic
2036  execution character set. If a member of the basic execution character set is stored in a
2037  char object, its value is guaranteed to be nonnegative. If any other character is stored in
2038  a char object, the resulting value is implementation-defined but shall be within the range
2039  of values that can be represented in that type.
2040 <p><!--para 4 -->
2041  There are five standard signed integer types, designated as signed char, short
2042  int, int, long int, and long long int. (These and other types may be
2043  designated in several additional ways, as described in <a href="#6.7.2">6.7.2</a>.) There may also be
2044  implementation-defined extended signed integer types.<sup><a href="#note28"><b>28)</b></a></sup> The standard and extended
2045  signed integer types are collectively called signed integer types.<sup><a href="#note29"><b>29)</b></a></sup>
2046 <p><!--para 5 -->
2047  An object declared as type signed char occupies the same amount of storage as a
2048  ''plain'' char object. A ''plain'' int object has the natural size suggested by the
2049  architecture of the execution environment (large enough to contain any value in the range
2050  INT_MIN to INT_MAX as defined in the header <a href="#7.10">&lt;limits.h&gt;</a>).
2051 <p><!--para 6 -->
2052  For each of the signed integer types, there is a corresponding (but different) unsigned
2053  integer type (designated with the keyword unsigned) that uses the same amount of
2054  storage (including sign information) and has the same alignment requirements. The type
2055  _Bool and the unsigned integer types that correspond to the standard signed integer
2056  types are the standard unsigned integer types. The unsigned integer types that
2057  correspond to the extended signed integer types are the extended unsigned integer types.
2058  The standard and extended unsigned integer types are collectively called unsigned integer
2059  types.<sup><a href="#note30"><b>30)</b></a></sup>
2060  
2061  
2062  
2063 <!--page 46 -->
2064 <p><!--para 7 -->
2065  The standard signed integer types and standard unsigned integer types are collectively
2066  called the standard integer types, the extended signed integer types and extended
2067  unsigned integer types are collectively called the extended integer types.
2068 <p><!--para 8 -->
2069  For any two integer types with the same signedness and different integer conversion rank
2070  (see <a href="#6.3.1.1">6.3.1.1</a>), the range of values of the type with smaller integer conversion rank is a
2071  subrange of the values of the other type.
2072 <p><!--para 9 -->
2073  The range of nonnegative values of a signed integer type is a subrange of the
2074  corresponding unsigned integer type, and the representation of the same value in each
2075  type is the same.<sup><a href="#note31"><b>31)</b></a></sup> A computation involving unsigned operands can never overflow,
2076  because a result that cannot be represented by the resulting unsigned integer type is
2077  reduced modulo the number that is one greater than the largest value that can be
2078  represented by the resulting type.
2079 <p><!--para 10 -->
2080  There are three real floating types, designated as float, double, and long
2081  double.<sup><a href="#note32"><b>32)</b></a></sup> The set of values of the type float is a subset of the set of values of the
2082  type double; the set of values of the type double is a subset of the set of values of the
2083  type long double.
2084 <p><!--para 11 -->
2085  There are three complex types, designated as float _Complex, double
2086  _Complex, and long double _Complex.<sup><a href="#note33"><b>33)</b></a></sup> The real floating and complex types
2087  are collectively called the floating types.
2088 <p><!--para 12 -->
2089  For each floating type there is a corresponding real type, which is always a real floating
2090  type. For real floating types, it is the same type. For complex types, it is the type given
2091  by deleting the keyword _Complex from the type name.
2092 <p><!--para 13 -->
2093  Each complex type has the same representation and alignment requirements as an array
2094  type containing exactly two elements of the corresponding real type; the first element is
2095  equal to the real part, and the second element to the imaginary part, of the complex
2096  number.
2097 <p><!--para 14 -->
2098  The type char, the signed and unsigned integer types, and the floating types are
2099  collectively called the basic types. Even if the implementation defines two or more basic
2100  types to have the same representation, they are nevertheless different types.<sup><a href="#note34"><b>34)</b></a></sup>
2101  
2102 <!--page 47 -->
2103 <p><!--para 15 -->
2104  The three types char, signed char, and unsigned char are collectively called
2105  the character types. The implementation shall define char to have the same range,
2106  representation, and behavior as either signed char or unsigned char.<sup><a href="#note35"><b>35)</b></a></sup>
2107 <p><!--para 16 -->
2108  An enumeration comprises a set of named integer constant values. Each distinct
2109  enumeration constitutes a different enumerated type.
2110 <p><!--para 17 -->
2111  The type char, the signed and unsigned integer types, and the enumerated types are
2112  collectively called integer types. The integer and real floating types are collectively called
2113  real types.
2114 <p><!--para 18 -->
2115  Integer and floating types are collectively called arithmetic types. Each arithmetic type
2116  belongs to one type domain: the real type domain comprises the real types, the complex
2117  type domain comprises the complex types.
2118 <p><!--para 19 -->
2119  The void type comprises an empty set of values; it is an incomplete type that cannot be
2120  completed.
2121 <p><!--para 20 -->
2122  Any number of derived types can be constructed from the object, function, and
2123  incomplete types, as follows:
2124 <ul>
2125 <li>  An array type describes a contiguously allocated nonempty set of objects with a
2126  particular member object type, called the element type.<sup><a href="#note36"><b>36)</b></a></sup> Array types are
2127  characterized by their element type and by the number of elements in the array. An
2128  array type is said to be derived from its element type, and if its element type is T , the
2129  array type is sometimes called ''array of T ''. The construction of an array type from
2130  an element type is called ''array type derivation''.
2131 <li>  A structure type describes a sequentially allocated nonempty set of member objects
2132  (and, in certain circumstances, an incomplete array), each of which has an optionally
2133  specified name and possibly distinct type.
2134 <li>  A union type describes an overlapping nonempty set of member objects, each of
2135  which has an optionally specified name and possibly distinct type.
2136 <li>  A function type describes a function with specified return type. A function type is
2137  characterized by its return type and the number and types of its parameters. A
2138  function type is said to be derived from its return type, and if its return type is T , the
2139  function type is sometimes called ''function returning T ''. The construction of a
2140  function type from a return type is called ''function type derivation''.
2141  
2142  
2143  
2144 <!--page 48 -->
2145 <li>  A pointer type may be derived from a function type, an object type, or an incomplete
2146  type, called the referenced type. A pointer type describes an object whose value
2147  provides a reference to an entity of the referenced type. A pointer type derived from
2148  the referenced type T is sometimes called ''pointer to T ''. The construction of a
2149  pointer type from a referenced type is called ''pointer type derivation''.
2150 </ul>
2151  These methods of constructing derived types can be applied recursively.
2152 <p><!--para 21 -->
2153  Arithmetic types and pointer types are collectively called scalar types. Array and
2154  structure types are collectively called aggregate types.<sup><a href="#note37"><b>37)</b></a></sup>
2155 <p><!--para 22 -->
2156  An array type of unknown size is an incomplete type. It is completed, for an identifier of
2157  that type, by specifying the size in a later declaration (with internal or external linkage).
2158  A structure or union type of unknown content (as described in <a href="#6.7.2.3">6.7.2.3</a>) is an incomplete
2159  type. It is completed, for all declarations of that type, by declaring the same structure or
2160  union tag with its defining content later in the same scope.
2161 <p><!--para 23 -->
2162  A type has known constant size if the type is not incomplete and is not a variable length
2163  array type.
2164 <p><!--para 24 -->
2165  Array, function, and pointer types are collectively called derived declarator types. A
2166  declarator type derivation from a type T is the construction of a derived declarator type
2167  from T by the application of an array-type, a function-type, or a pointer-type derivation to
2168  T.
2169 <p><!--para 25 -->
2170  A type is characterized by its type category, which is either the outermost derivation of a
2171  derived type (as noted above in the construction of derived types), or the type itself if the
2172  type consists of no derived types.
2173 <p><!--para 26 -->
2174  Any type so far mentioned is an unqualified type. Each unqualified type has several
2175  qualified versions of its type,<sup><a href="#note38"><b>38)</b></a></sup> corresponding to the combinations of one, two, or all
2176  three of the const, volatile, and restrict qualifiers. The qualified or unqualified
2177  versions of a type are distinct types that belong to the same type category and have the
2178  same representation and alignment requirements.<sup><a href="#note39"><b>39)</b></a></sup> A derived type is not qualified by the
2179  qualifiers (if any) of the type from which it is derived.
2180 <p><!--para 27 -->
2181  A pointer to void shall have the same representation and alignment requirements as a
2182  pointer to a character type.39) Similarly, pointers to qualified or unqualified versions of
2183  compatible types shall have the same representation and alignment requirements. All
2184  
2185  
2186 <!--page 49 -->
2187  pointers to structure types shall have the same representation and alignment requirements
2188  as each other. All pointers to union types shall have the same representation and
2189  alignment requirements as each other. Pointers to other types need not have the same
2190  representation or alignment requirements.
2191 <p><!--para 28 -->
2192  EXAMPLE 1 The type designated as ''float *'' has type ''pointer to float''. Its type category is
2193  pointer, not a floating type. The const-qualified version of this type is designated as ''float * const''
2194  whereas the type designated as ''const float *'' is not a qualified type -- its type is ''pointer to const-
2195  qualified float'' and is a pointer to a qualified type.
2196  
2197 <p><!--para 29 -->
2198  EXAMPLE 2 The type designated as ''struct tag (*[5])(float)'' has type ''array of pointer to
2199  function returning struct tag''. The array has length five and the function has a single parameter of type
2200  float. Its type category is array.
2201  
2202 <p><b> Forward references</b>: compatible type and composite type (<a href="#6.2.7">6.2.7</a>), declarations (<a href="#6.7">6.7</a>).
2203
2204 <h6>footnotes</h6>
2205 <p><small><a name="note28" href="#note28">28)</a> Implementation-defined keywords shall have the form of an identifier reserved for any use as
2206  described in <a href="#7.1.3">7.1.3</a>.
2207 </small>
2208 <p><small><a name="note29" href="#note29">29)</a> Therefore, any statement in this Standard about signed integer types also applies to the extended
2209  signed integer types.
2210 </small>
2211 <p><small><a name="note30" href="#note30">30)</a> Therefore, any statement in this Standard about unsigned integer types also applies to the extended
2212  unsigned integer types.
2213 </small>
2214 <p><small><a name="note31" href="#note31">31)</a> The same representation and alignment requirements are meant to imply interchangeability as
2215  arguments to functions, return values from functions, and members of unions.
2216 </small>
2217 <p><small><a name="note32" href="#note32">32)</a> See ''future language directions'' (<a href="#6.11.1">6.11.1</a>).
2218 </small>
2219 <p><small><a name="note33" href="#note33">33)</a> A specification for imaginary types is in informative <a href="#G">annex G</a>.
2220 </small>
2221 <p><small><a name="note34" href="#note34">34)</a> An implementation may define new keywords that provide alternative ways to designate a basic (or
2222  any other) type; this does not violate the requirement that all basic types be different.
2223  Implementation-defined keywords shall have the form of an identifier reserved for any use as
2224  described in <a href="#7.1.3">7.1.3</a>.
2225 </small>
2226 <p><small><a name="note35" href="#note35">35)</a> CHAR_MIN, defined in <a href="#7.10">&lt;limits.h&gt;</a>, will have one of the values 0 or SCHAR_MIN, and this can be
2227  used to distinguish the two options. Irrespective of the choice made, char is a separate type from the
2228  other two and is not compatible with either.
2229 </small>
2230 <p><small><a name="note36" href="#note36">36)</a> Since object types do not include incomplete types, an array of incomplete type cannot be constructed.
2231 </small>
2232 <p><small><a name="note37" href="#note37">37)</a> Note that aggregate type does not include union type because an object with union type can only
2233  contain one member at a time.
2234 </small>
2235 <p><small><a name="note38" href="#note38">38)</a> See <a href="#6.7.3">6.7.3</a> regarding qualified array and function types.
2236 </small>
2237 <p><small><a name="note39" href="#note39">39)</a> The same representation and alignment requirements are meant to imply interchangeability as
2238  arguments to functions, return values from functions, and members of unions.
2239 </small>
2240
2241 <h4><a name="6.2.6" href="#6.2.6">6.2.6 Representations of types</a></h4>
2242
2243 <h5><a name="6.2.6.1" href="#6.2.6.1">6.2.6.1 General</a></h5>
2244 <p><!--para 1 -->
2245  The representations of all types are unspecified except as stated in this subclause.
2246 <p><!--para 2 -->
2247  Except for bit-fields, objects are composed of contiguous sequences of one or more bytes,
2248  the number, order, and encoding of which are either explicitly specified or
2249  implementation-defined.
2250 <p><!--para 3 -->
2251  Values stored in unsigned bit-fields and objects of type unsigned char shall be
2252  represented using a pure binary notation.<sup><a href="#note40"><b>40)</b></a></sup>
2253 <p><!--para 4 -->
2254  Values stored in non-bit-field objects of any other object type consist of n x CHAR_BIT
2255  bits, where n is the size of an object of that type, in bytes. The value may be copied into
2256  an object of type unsigned char [n] (e.g., by memcpy); the resulting set of bytes is
2257  called the object representation of the value. Values stored in bit-fields consist of m bits,
2258  where m is the size specified for the bit-field. The object representation is the set of m
2259  bits the bit-field comprises in the addressable storage unit holding it. Two values (other
2260  than NaNs) with the same object representation compare equal, but values that compare
2261  equal may have different object representations.
2262 <p><!--para 5 -->
2263  Certain object representations need not represent a value of the object type. If the stored
2264  value of an object has such a representation and is read by an lvalue expression that does
2265  not have character type, the behavior is undefined. If such a representation is produced
2266  by a side effect that modifies all or any part of the object by an lvalue expression that
2267  does not have character type, the behavior is undefined.<sup><a href="#note41"><b>41)</b></a></sup> Such a representation is called
2268  
2269 <!--page 50 -->
2270  a trap representation.
2271 <p><!--para 6 -->
2272  When a value is stored in an object of structure or union type, including in a member
2273  object, the bytes of the object representation that correspond to any padding bytes take
2274  unspecified values.<sup><a href="#note42"><b>42)</b></a></sup> The value of a structure or union object is never a trap
2275  representation, even though the value of a member of the structure or union object may be
2276  a trap representation.
2277 <p><!--para 7 -->
2278  When a value is stored in a member of an object of union type, the bytes of the object
2279  representation that do not correspond to that member but do correspond to other members
2280  take unspecified values.
2281 <p><!--para 8 -->
2282  Where an operator is applied to a value that has more than one object representation,
2283  which object representation is used shall not affect the value of the result.<sup><a href="#note43"><b>43)</b></a></sup> Where a
2284  value is stored in an object using a type that has more than one object representation for
2285  that value, it is unspecified which representation is used, but a trap representation shall
2286  not be generated.
2287 <p><b> Forward references</b>: declarations (<a href="#6.7">6.7</a>), expressions (<a href="#6.5">6.5</a>), lvalues, arrays, and function
2288  designators (<a href="#6.3.2.1">6.3.2.1</a>).
2289
2290 <h6>footnotes</h6>
2291 <p><small><a name="note40" href="#note40">40)</a> A positional representation for integers that uses the binary digits 0 and 1, in which the values
2292  represented by successive bits are additive, begin with 1, and are multiplied by successive integral
2293  powers of 2, except perhaps the bit with the highest position. (Adapted from the American National
2294  Dictionary for Information Processing Systems.) A byte contains CHAR_BIT bits, and the values of
2295  type unsigned char range from 0 to 2<sup>CHAR_BIT</sup>- 1.
2296 </small>
2297 <p><small><a name="note41" href="#note41">41)</a> Thus, an automatic variable can be initialized to a trap representation without causing undefined
2298  behavior, but the value of the variable cannot be used until a proper value is stored in it.
2299 </small>
2300 <p><small><a name="note42" href="#note42">42)</a> Thus, for example, structure assignment need not copy any padding bits.
2301 </small>
2302 <p><small><a name="note43" href="#note43">43)</a> It is possible for objects x and y with the same effective type T to have the same value when they are
2303  accessed as objects of type T, but to have different values in other contexts. In particular, if == is
2304  defined for type T, then x == y does not imply that memcmp(&amp;x, &amp;y, sizeof (T)) == 0.
2305  Furthermore, x == y does not necessarily imply that x and y have the same value; other operations
2306  on values of type T may distinguish between them.
2307 </small>
2308
2309 <h5><a name="6.2.6.2" href="#6.2.6.2">6.2.6.2 Integer types</a></h5>
2310 <p><!--para 1 -->
2311  For unsigned integer types other than unsigned char, the bits of the object
2312  representation shall be divided into two groups: value bits and padding bits (there need
2313  not be any of the latter). If there are N value bits, each bit shall represent a different
2314  power of 2 between 1 and 2<sup>N-1</sup> , so that objects of that type shall be capable of
2315  representing values from 0 to 2<sup>N</sup> - 1 using a pure binary representation; this shall be
2316  known as the value representation. The values of any padding bits are unspecified.<sup><a href="#note44"><b>44)</b></a></sup>
2317 <p><!--para 2 -->
2318  For signed integer types, the bits of the object representation shall be divided into three
2319  groups: value bits, padding bits, and the sign bit. There need not be any padding bits;
2320  
2321 <!--page 51 -->
2322  there shall be exactly one sign bit. Each bit that is a value bit shall have the same value as
2323  the same bit in the object representation of the corresponding unsigned type (if there are
2324  M value bits in the signed type and N in the unsigned type, then M &lt;= N ). If the sign bit
2325  is zero, it shall not affect the resulting value. If the sign bit is one, the value shall be
2326  modified in one of the following ways:
2327 <ul>
2328 <li>  the corresponding value with sign bit 0 is negated (sign and magnitude);
2329 <li>  the sign bit has the value -(2<sup>N</sup> ) (two's complement);
2330 <li>  the sign bit has the value -(2<sup>N</sup> - 1) (ones' complement ).
2331 </ul>
2332  Which of these applies is implementation-defined, as is whether the value with sign bit 1
2333  and all value bits zero (for the first two), or with sign bit and all value bits 1 (for ones'
2334  complement), is a trap representation or a normal value. In the case of sign and
2335  magnitude and ones' complement, if this representation is a normal value it is called a
2336  negative zero.
2337 <p><!--para 3 -->
2338  If the implementation supports negative zeros, they shall be generated only by:
2339 <ul>
2340 <li>  the &amp;, |, ^, ~, &lt;&lt;, and &gt;&gt; operators with arguments that produce such a value;
2341 <li>  the +, -, *, /, and % operators where one argument is a negative zero and the result is
2342  zero;
2343 <li>  compound assignment operators based on the above cases.
2344 </ul>
2345  It is unspecified whether these cases actually generate a negative zero or a normal zero,
2346  and whether a negative zero becomes a normal zero when stored in an object.
2347 <p><!--para 4 -->
2348  If the implementation does not support negative zeros, the behavior of the &amp;, |, ^, ~, &lt;&lt;,
2349  and &gt;&gt; operators with arguments that would produce such a value is undefined.
2350 <p><!--para 5 -->
2351  The values of any padding bits are unspecified.<sup><a href="#note45"><b>45)</b></a></sup> A valid (non-trap) object representation
2352  of a signed integer type where the sign bit is zero is a valid object representation of the
2353  corresponding unsigned type, and shall represent the same value. For any integer type,
2354  the object representation where all the bits are zero shall be a representation of the value
2355  zero in that type.
2356 <p><!--para 6 -->
2357  The precision of an integer type is the number of bits it uses to represent values,
2358  excluding any sign and padding bits. The width of an integer type is the same but
2359  including any sign bit; thus for unsigned integer types the two values are the same, while
2360  
2361  
2362 <!--page 52 -->
2363  for signed integer types the width is one greater than the precision.
2364
2365 <h6>footnotes</h6>
2366 <p><small><a name="note44" href="#note44">44)</a> Some combinations of padding bits might generate trap representations, for example, if one padding
2367  bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap
2368  representation other than as part of an exceptional condition such as an overflow, and this cannot occur
2369  with unsigned types. All other combinations of padding bits are alternative object representations of
2370  the value specified by the value bits.
2371 </small>
2372 <p><small><a name="note45" href="#note45">45)</a> Some combinations of padding bits might generate trap representations, for example, if one padding
2373  bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap
2374  representation other than as part of an exceptional condition such as an overflow. All other
2375  combinations of padding bits are alternative object representations of the value specified by the value
2376  bits.
2377 </small>
2378
2379 <h4><a name="6.2.7" href="#6.2.7">6.2.7 Compatible type and composite type</a></h4>
2380 <p><!--para 1 -->
2381  Two types have compatible type if their types are the same. Additional rules for
2382  determining whether two types are compatible are described in <a href="#6.7.2">6.7.2</a> for type specifiers,
2383  in <a href="#6.7.3">6.7.3</a> for type qualifiers, and in <a href="#6.7.5">6.7.5</a> for declarators.<sup><a href="#note46"><b>46)</b></a></sup> Moreover, two structure,
2384  union, or enumerated types declared in separate translation units are compatible if their
2385  tags and members satisfy the following requirements: If one is declared with a tag, the
2386  other shall be declared with the same tag. If both are complete types, then the following
2387  additional requirements apply: there shall be a one-to-one correspondence between their
2388  members such that each pair of corresponding members are declared with compatible
2389  types, and such that if one member of a corresponding pair is declared with a name, the
2390  other member is declared with the same name. For two structures, corresponding
2391  members shall be declared in the same order. For two structures or unions, corresponding
2392  bit-fields shall have the same widths. For two enumerations, corresponding members
2393  shall have the same values.
2394 <p><!--para 2 -->
2395  All declarations that refer to the same object or function shall have compatible type;
2396  otherwise, the behavior is undefined.
2397 <p><!--para 3 -->
2398  A composite type can be constructed from two types that are compatible; it is a type that
2399  is compatible with both of the two types and satisfies the following conditions:
2400 <ul>
2401 <li>  If one type is an array of known constant size, the composite type is an array of that
2402  size; otherwise, if one type is a variable length array, the composite type is that type.
2403 <li>  If only one type is a function type with a parameter type list (a function prototype),
2404  the composite type is a function prototype with the parameter type list.
2405 <li>  If both types are function types with parameter type lists, the type of each parameter
2406  in the composite parameter type list is the composite type of the corresponding
2407  parameters.
2408 </ul>
2409  These rules apply recursively to the types from which the two types are derived.
2410 <p><!--para 4 -->
2411  For an identifier with internal or external linkage declared in a scope in which a prior
2412  declaration of that identifier is visible,<sup><a href="#note47"><b>47)</b></a></sup> if the prior declaration specifies internal or
2413  external linkage, the type of the identifier at the later declaration becomes the composite
2414  type.
2415  
2416  
2417  
2418  
2419 <!--page 53 -->
2420 <p><!--para 5 -->
2421  EXAMPLE        Given the following two file scope declarations:
2422 <pre>
2423           int f(int (*)(), double (*)[3]);
2424           int f(int (*)(char *), double (*)[]);</pre>
2425  The resulting composite type for the function is:
2426 <!--page 54 -->
2427 <pre>
2428           int f(int (*)(char *), double (*)[3]);</pre>
2429
2430 <h6>footnotes</h6>
2431 <p><small><a name="note46" href="#note46">46)</a> Two types need not be identical to be compatible.
2432 </small>
2433 <p><small><a name="note47" href="#note47">47)</a> As specified in <a href="#6.2.1">6.2.1</a>, the later declaration might hide the prior declaration.
2434 </small>
2435
2436 <h3><a name="6.3" href="#6.3">6.3 Conversions</a></h3>
2437 <p><!--para 1 -->
2438  Several operators convert operand values from one type to another automatically. This
2439  subclause specifies the result required from such an implicit conversion, as well as those
2440  that result from a cast operation (an explicit conversion). The list in <a href="#6.3.1.8">6.3.1.8</a> summarizes
2441  the conversions performed by most ordinary operators; it is supplemented as required by
2442  the discussion of each operator in <a href="#6.5">6.5</a>.
2443 <p><!--para 2 -->
2444  Conversion of an operand value to a compatible type causes no change to the value or the
2445  representation.
2446 <p><b> Forward references</b>: cast operators (<a href="#6.5.4">6.5.4</a>).
2447
2448 <h4><a name="6.3.1" href="#6.3.1">6.3.1 Arithmetic operands</a></h4>
2449
2450 <h5><a name="6.3.1.1" href="#6.3.1.1">6.3.1.1 Boolean, characters, and integers</a></h5>
2451 <p><!--para 1 -->
2452  Every integer type has an integer conversion rank defined as follows:
2453 <ul>
2454 <li>  No two signed integer types shall have the same rank, even if they have the same
2455  representation.
2456 <li>  The rank of a signed integer type shall be greater than the rank of any signed integer
2457  type with less precision.
2458 <li>  The rank of long long int shall be greater than the rank of long int, which
2459  shall be greater than the rank of int, which shall be greater than the rank of short
2460  int, which shall be greater than the rank of signed char.
2461 <li>  The rank of any unsigned integer type shall equal the rank of the corresponding
2462  signed integer type, if any.
2463 <li>  The rank of any standard integer type shall be greater than the rank of any extended
2464  integer type with the same width.
2465 <li>  The rank of char shall equal the rank of signed char and unsigned char.
2466 <li>  The rank of _Bool shall be less than the rank of all other standard integer types.
2467 <li>  The rank of any enumerated type shall equal the rank of the compatible integer type
2468  (see <a href="#6.7.2.2">6.7.2.2</a>).
2469 <li>  The rank of any extended signed integer type relative to another extended signed
2470  integer type with the same precision is implementation-defined, but still subject to the
2471  other rules for determining the integer conversion rank.
2472 <li>  For all integer types T1, T2, and T3, if T1 has greater rank than T2 and T2 has
2473  greater rank than T3, then T1 has greater rank than T3.
2474 </ul>
2475 <p><!--para 2 -->
2476  The following may be used in an expression wherever an int or unsigned int may
2477  be used:
2478 <!--page 55 -->
2479 <ul>
2480 <li>  An object or expression with an integer type whose integer conversion rank is less
2481  than or equal to the rank of int and unsigned int.
2482 <li>  A bit-field of type _Bool, int, signed int, or unsigned int.
2483 </ul>
2484  If an int can represent all values of the original type, the value is converted to an int;
2485  otherwise, it is converted to an unsigned int. These are called the integer
2486  promotions.<sup><a href="#note48"><b>48)</b></a></sup> All other types are unchanged by the integer promotions.
2487 <p><!--para 3 -->
2488  The integer promotions preserve value including sign. As discussed earlier, whether a
2489  ''plain'' char is treated as signed is implementation-defined.
2490 <p><b> Forward references</b>: enumeration specifiers (<a href="#6.7.2.2">6.7.2.2</a>), structure and union specifiers
2491  (<a href="#6.7.2.1">6.7.2.1</a>).
2492
2493 <h6>footnotes</h6>
2494 <p><small><a name="note48" href="#note48">48)</a> The integer promotions are applied only: as part of the usual arithmetic conversions, to certain
2495  argument expressions, to the operands of the unary +, -, and ~ operators, and to both operands of the
2496  shift operators, as specified by their respective subclauses.
2497 </small>
2498
2499 <h5><a name="6.3.1.2" href="#6.3.1.2">6.3.1.2 Boolean type</a></h5>
2500 <p><!--para 1 -->
2501  When any scalar value is converted to _Bool, the result is 0 if the value compares equal
2502  to 0; otherwise, the result is 1.
2503
2504 <h5><a name="6.3.1.3" href="#6.3.1.3">6.3.1.3 Signed and unsigned integers</a></h5>
2505 <p><!--para 1 -->
2506  When a value with integer type is converted to another integer type other than _Bool, if
2507  the value can be represented by the new type, it is unchanged.
2508 <p><!--para 2 -->
2509  Otherwise, if the new type is unsigned, the value is converted by repeatedly adding or
2510  subtracting one more than the maximum value that can be represented in the new type
2511  until the value is in the range of the new type.<sup><a href="#note49"><b>49)</b></a></sup>
2512 <p><!--para 3 -->
2513  Otherwise, the new type is signed and the value cannot be represented in it; either the
2514  result is implementation-defined or an implementation-defined signal is raised.
2515
2516 <h6>footnotes</h6>
2517 <p><small><a name="note49" href="#note49">49)</a> The rules describe arithmetic on the mathematical value, not the value of a given type of expression.
2518 </small>
2519
2520 <h5><a name="6.3.1.4" href="#6.3.1.4">6.3.1.4 Real floating and integer</a></h5>
2521 <p><!--para 1 -->
2522  When a finite value of real floating type is converted to an integer type other than _Bool,
2523  the fractional part is discarded (i.e., the value is truncated toward zero). If the value of
2524  the integral part cannot be represented by the integer type, the behavior is undefined.<sup><a href="#note50"><b>50)</b></a></sup>
2525 <p><!--para 2 -->
2526  When a value of integer type is converted to a real floating type, if the value being
2527  converted can be represented exactly in the new type, it is unchanged. If the value being
2528  converted is in the range of values that can be represented but cannot be represented
2529  
2530 <!--page 56 -->
2531  exactly, the result is either the nearest higher or nearest lower representable value, chosen
2532  in an implementation-defined manner. If the value being converted is outside the range of
2533  values that can be represented, the behavior is undefined.
2534
2535 <h6>footnotes</h6>
2536 <p><small><a name="note50" href="#note50">50)</a> The remaindering operation performed when a value of integer type is converted to unsigned type
2537  need not be performed when a value of real floating type is converted to unsigned type. Thus, the
2538  range of portable real floating values is (-1, Utype_MAX+1).
2539 </small>
2540
2541 <h5><a name="6.3.1.5" href="#6.3.1.5">6.3.1.5 Real floating types</a></h5>
2542 <p><!--para 1 -->
2543  When a float is promoted to double or long double, or a double is promoted
2544  to long double, its value is unchanged (if the source value is represented in the
2545  precision and range of its type).
2546 <p><!--para 2 -->
2547  When a double is demoted to float, a long double is demoted to double or
2548  float, or a value being represented in greater precision and range than required by its
2549  semantic type (see <a href="#6.3.1.8">6.3.1.8</a>) is explicitly converted (including to its own type), if the value
2550  being converted can be represented exactly in the new type, it is unchanged. If the value
2551  being converted is in the range of values that can be represented but cannot be
2552  represented exactly, the result is either the nearest higher or nearest lower representable
2553  value, chosen in an implementation-defined manner. If the value being converted is
2554  outside the range of values that can be represented, the behavior is undefined.
2555
2556 <h5><a name="6.3.1.6" href="#6.3.1.6">6.3.1.6 Complex types</a></h5>
2557 <p><!--para 1 -->
2558  When a value of complex type is converted to another complex type, both the real and
2559  imaginary parts follow the conversion rules for the corresponding real types.
2560
2561 <h5><a name="6.3.1.7" href="#6.3.1.7">6.3.1.7 Real and complex</a></h5>
2562 <p><!--para 1 -->
2563  When a value of real type is converted to a complex type, the real part of the complex
2564  result value is determined by the rules of conversion to the corresponding real type and
2565  the imaginary part of the complex result value is a positive zero or an unsigned zero.
2566 <p><!--para 2 -->
2567  When a value of complex type is converted to a real type, the imaginary part of the
2568  complex value is discarded and the value of the real part is converted according to the
2569  conversion rules for the corresponding real type.
2570
2571 <h5><a name="6.3.1.8" href="#6.3.1.8">6.3.1.8 Usual arithmetic conversions</a></h5>
2572 <p><!--para 1 -->
2573  Many operators that expect operands of arithmetic type cause conversions and yield result
2574  types in a similar way. The purpose is to determine a common real type for the operands
2575  and result. For the specified operands, each operand is converted, without change of type
2576  domain, to a type whose corresponding real type is the common real type. Unless
2577  explicitly stated otherwise, the common real type is also the corresponding real type of
2578  the result, whose type domain is the type domain of the operands if they are the same,
2579  and complex otherwise. This pattern is called the usual arithmetic conversions:
2580 <!--page 57 -->
2581 <p><!--para 2 -->
2582 <ul>
2583 <li>       First, if the corresponding real type of either operand is long double, the other
2584        operand is converted, without change of type domain, to a type whose
2585        corresponding real type is long double.
2586 <li>       Otherwise, if the corresponding real type of either operand is double, the other
2587        operand is converted, without change of type domain, to a type whose
2588        corresponding real type is double.
2589 <li>       Otherwise, if the corresponding real type of either operand is float, the other
2590        operand is converted, without change of type domain, to a type whose
2591        corresponding real type is float.<sup><a href="#note51"><b>51)</b></a></sup>
2592 <li>       Otherwise, the integer promotions are performed on both operands. Then the
2593        following rules are applied to the promoted operands:
2594 <ul>
2595 <li>              If both operands have the same type, then no further conversion is needed.
2596 <li>              Otherwise, if both operands have signed integer types or both have unsigned
2597               integer types, the operand with the type of lesser integer conversion rank is
2598               converted to the type of the operand with greater rank.
2599 <li>              Otherwise, if the operand that has unsigned integer type has rank greater or
2600               equal to the rank of the type of the other operand, then the operand with
2601               signed integer type is converted to the type of the operand with unsigned
2602               integer type.
2603 <li>              Otherwise, if the type of the operand with signed integer type can represent
2604               all of the values of the type of the operand with unsigned integer type, then
2605               the operand with unsigned integer type is converted to the type of the
2606               operand with signed integer type.
2607 <li>              Otherwise, both operands are converted to the unsigned integer type
2608               corresponding to the type of the operand with signed integer type.
2609 </ul>
2610 </ul>
2611  The values of floating operands and of the results of floating expressions may be
2612  represented in greater precision and range than that required by the type; the types are not
2613  changed thereby.<sup><a href="#note52"><b>52)</b></a></sup>
2614  
2615  
2616  
2617  
2618 <!--page 58 -->
2619
2620 <h6>footnotes</h6>
2621 <p><small><a name="note51" href="#note51">51)</a> For example, addition of a double _Complex and a float entails just the conversion of the
2622  float operand to double (and yields a double _Complex result).
2623 </small>
2624 <p><small><a name="note52" href="#note52">52)</a> The cast and assignment operators are still required to perform their specified conversions as
2625  described in <a href="#6.3.1.4">6.3.1.4</a> and <a href="#6.3.1.5">6.3.1.5</a>.
2626 </small>
2627
2628 <h4><a name="6.3.2" href="#6.3.2">6.3.2 Other operands</a></h4>
2629
2630 <h5><a name="6.3.2.1" href="#6.3.2.1">6.3.2.1 Lvalues, arrays, and function designators</a></h5>
2631 <p><!--para 1 -->
2632  An lvalue is an expression with an object type or an incomplete type other than void;<sup><a href="#note53"><b>53)</b></a></sup>
2633  if an lvalue does not designate an object when it is evaluated, the behavior is undefined.
2634  When an object is said to have a particular type, the type is specified by the lvalue used to
2635  designate the object. A modifiable lvalue is an lvalue that does not have array type, does
2636  not have an incomplete type, does not have a const-qualified type, and if it is a structure
2637  or union, does not have any member (including, recursively, any member or element of
2638  all contained aggregates or unions) with a const-qualified type.
2639 <p><!--para 2 -->
2640  Except when it is the operand of the sizeof operator, the unary &amp; operator, the ++
2641  operator, the -- operator, or the left operand of the . operator or an assignment operator,
2642  an lvalue that does not have array type is converted to the value stored in the designated
2643  object (and is no longer an lvalue). If the lvalue has qualified type, the value has the
2644  unqualified version of the type of the lvalue; otherwise, the value has the type of the
2645  lvalue. If the lvalue has an incomplete type and does not have array type, the behavior is
2646  undefined.
2647 <p><!--para 3 -->
2648  Except when it is the operand of the sizeof operator or the unary &amp; operator, or is a
2649  string literal used to initialize an array, an expression that has type ''array of type'' is
2650  converted to an expression with type ''pointer to type'' that points to the initial element of
2651  the array object and is not an lvalue. If the array object has register storage class, the
2652  behavior is undefined.
2653 <p><!--para 4 -->
2654  A function designator is an expression that has function type. Except when it is the
2655  operand of the sizeof operator<sup><a href="#note54"><b>54)</b></a></sup> or the unary &amp; operator, a function designator with
2656  type ''function returning type'' is converted to an expression that has type ''pointer to
2657  function returning type''.
2658 <p><b> Forward references</b>: address and indirection operators (<a href="#6.5.3.2">6.5.3.2</a>), assignment operators
2659  (<a href="#6.5.16">6.5.16</a>), common definitions <a href="#7.17">&lt;stddef.h&gt;</a> (<a href="#7.17">7.17</a>), initialization (<a href="#6.7.8">6.7.8</a>), postfix
2660  increment and decrement operators (<a href="#6.5.2.4">6.5.2.4</a>), prefix increment and decrement operators
2661  (<a href="#6.5.3.1">6.5.3.1</a>), the sizeof operator (<a href="#6.5.3.4">6.5.3.4</a>), structure and union members (<a href="#6.5.2.3">6.5.2.3</a>).
2662  
2663  
2664 <!--page 59 -->
2665
2666 <h6>footnotes</h6>
2667 <p><small><a name="note53" href="#note53">53)</a> The name ''lvalue'' comes originally from the assignment expression E1 = E2, in which the left
2668  operand E1 is required to be a (modifiable) lvalue. It is perhaps better considered as representing an
2669  object ''locator value''. What is sometimes called ''rvalue'' is in this International Standard described
2670  as the ''value of an expression''.
2671   An obvious example of an lvalue is an identifier of an object. As a further example, if E is a unary
2672   expression that is a pointer to an object, *E is an lvalue that designates the object to which E points.
2673 </small>
2674 <p><small><a name="note54" href="#note54">54)</a> Because this conversion does not occur, the operand of the sizeof operator remains a function
2675  designator and violates the constraint in <a href="#6.5.3.4">6.5.3.4</a>.
2676 </small>
2677
2678 <h5><a name="6.3.2.2" href="#6.3.2.2">6.3.2.2 void</a></h5>
2679 <p><!--para 1 -->
2680  The (nonexistent) value of a void expression (an expression that has type void) shall not
2681  be used in any way, and implicit or explicit conversions (except to void) shall not be
2682  applied to such an expression. If an expression of any other type is evaluated as a void
2683  expression, its value or designator is discarded. (A void expression is evaluated for its
2684  side effects.)
2685
2686 <h5><a name="6.3.2.3" href="#6.3.2.3">6.3.2.3 Pointers</a></h5>
2687 <p><!--para 1 -->
2688  A pointer to void may be converted to or from a pointer to any incomplete or object
2689  type. A pointer to any incomplete or object type may be converted to a pointer to void
2690  and back again; the result shall compare equal to the original pointer.
2691 <p><!--para 2 -->
2692  For any qualifier q, a pointer to a non-q-qualified type may be converted to a pointer to
2693  the q-qualified version of the type; the values stored in the original and converted pointers
2694  shall compare equal.
2695 <p><!--para 3 -->
2696  An integer constant expression with the value 0, or such an expression cast to type
2697  void *, is called a null pointer constant.<sup><a href="#note55"><b>55)</b></a></sup> If a null pointer constant is converted to a
2698  pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal
2699  to a pointer to any object or function.
2700 <p><!--para 4 -->
2701  Conversion of a null pointer to another pointer type yields a null pointer of that type.
2702  Any two null pointers shall compare equal.
2703 <p><!--para 5 -->
2704  An integer may be converted to any pointer type. Except as previously specified, the
2705  result is implementation-defined, might not be correctly aligned, might not point to an
2706  entity of the referenced type, and might be a trap representation.<sup><a href="#note56"><b>56)</b></a></sup>
2707 <p><!--para 6 -->
2708  Any pointer type may be converted to an integer type. Except as previously specified, the
2709  result is implementation-defined. If the result cannot be represented in the integer type,
2710  the behavior is undefined. The result need not be in the range of values of any integer
2711  type.
2712 <p><!--para 7 -->
2713  A pointer to an object or incomplete type may be converted to a pointer to a different
2714  object or incomplete type. If the resulting pointer is not correctly aligned<sup><a href="#note57"><b>57)</b></a></sup> for the
2715  pointed-to type, the behavior is undefined. Otherwise, when converted back again, the
2716  result shall compare equal to the original pointer. When a pointer to an object is
2717  
2718  
2719 <!--page 60 -->
2720  converted to a pointer to a character type, the result points to the lowest addressed byte of
2721  the object. Successive increments of the result, up to the size of the object, yield pointers
2722  to the remaining bytes of the object.
2723 <p><!--para 8 -->
2724  A pointer to a function of one type may be converted to a pointer to a function of another
2725  type and back again; the result shall compare equal to the original pointer. If a converted
2726  pointer is used to call a function whose type is not compatible with the pointed-to type,
2727  the behavior is undefined.
2728 <p><b> Forward references</b>: cast operators (<a href="#6.5.4">6.5.4</a>), equality operators (<a href="#6.5.9">6.5.9</a>), integer types
2729  capable of holding object pointers (<a href="#7.18.1.4">7.18.1.4</a>), simple assignment (<a href="#6.5.16.1">6.5.16.1</a>).
2730 <!--page 61 -->
2731
2732 <h6>footnotes</h6>
2733 <p><small><a name="note55" href="#note55">55)</a> The macro NULL is defined in <a href="#7.17">&lt;stddef.h&gt;</a> (and other headers) as a null pointer constant; see <a href="#7.17">7.17</a>.
2734 </small>
2735 <p><small><a name="note56" href="#note56">56)</a> The mapping functions for converting a pointer to an integer or an integer to a pointer are intended to
2736  be consistent with the addressing structure of the execution environment.
2737 </small>
2738 <p><small><a name="note57" href="#note57">57)</a> In general, the concept ''correctly aligned'' is transitive: if a pointer to type A is correctly aligned for a
2739  pointer to type B, which in turn is correctly aligned for a pointer to type C, then a pointer to type A is
2740  correctly aligned for a pointer to type C.
2741 </small>
2742
2743 <h3><a name="6.4" href="#6.4">6.4 Lexical elements</a></h3>
2744 <h6>Syntax</h6>
2745 <p><!--para 1 -->
2746 <pre>
2747           token:
2748                    keyword
2749                    identifier
2750                    constant
2751                    string-literal
2752                    punctuator
2753           preprocessing-token:
2754                  header-name
2755                  identifier
2756                  pp-number
2757                  character-constant
2758                  string-literal
2759                  punctuator
2760                  each non-white-space character that cannot be one of the above</pre>
2761 <h6>Constraints</h6>
2762 <p><!--para 2 -->
2763  Each preprocessing token that is converted to a token shall have the lexical form of a
2764  keyword, an identifier, a constant, a string literal, or a punctuator.
2765 <h6>Semantics</h6>
2766 <p><!--para 3 -->
2767  A token is the minimal lexical element of the language in translation phases 7 and 8. The
2768  categories of tokens are: keywords, identifiers, constants, string literals, and punctuators.
2769  A preprocessing token is the minimal lexical element of the language in translation
2770  phases 3 through 6. The categories of preprocessing tokens are: header names,
2771  identifiers, preprocessing numbers, character constants, string literals, punctuators, and
2772  single non-white-space characters that do not lexically match the other preprocessing
2773  token categories.<sup><a href="#note58"><b>58)</b></a></sup> If a ' or a " character matches the last category, the behavior is
2774  undefined. Preprocessing tokens can be separated by white space; this consists of
2775  comments (described later), or white-space characters (space, horizontal tab, new-line,
2776  vertical tab, and form-feed), or both. As described in <a href="#6.10">6.10</a>, in certain circumstances
2777  during translation phase 4, white space (or the absence thereof) serves as more than
2778  preprocessing token separation. White space may appear within a preprocessing token
2779  only as part of a header name or between the quotation characters in a character constant
2780  or string literal.
2781  
2782  
2783  
2784 <!--page 62 -->
2785 <p><!--para 4 -->
2786  If the input stream has been parsed into preprocessing tokens up to a given character, the
2787  next preprocessing token is the longest sequence of characters that could constitute a
2788  preprocessing token. There is one exception to this rule: header name preprocessing
2789  tokens are recognized only within #include preprocessing directives and in
2790  implementation-defined locations within #pragma directives. In such contexts, a
2791  sequence of characters that could be either a header name or a string literal is recognized
2792  as the former.
2793 <p><!--para 5 -->
2794  EXAMPLE 1 The program fragment 1Ex is parsed as a preprocessing number token (one that is not a
2795  valid floating or integer constant token), even though a parse as the pair of preprocessing tokens 1 and Ex
2796  might produce a valid expression (for example, if Ex were a macro defined as +1). Similarly, the program
2797  fragment 1E1 is parsed as a preprocessing number (one that is a valid floating constant token), whether or
2798  not E is a macro name.
2799  
2800 <p><!--para 6 -->
2801  EXAMPLE 2 The program fragment x+++++y is parsed as x ++ ++ + y, which violates a constraint on
2802  increment operators, even though the parse x ++ + ++ y might yield a correct expression.
2803  
2804 <p><b> Forward references</b>: character constants (<a href="#6.4.4.4">6.4.4.4</a>), comments (<a href="#6.4.9">6.4.9</a>), expressions (<a href="#6.5">6.5</a>),
2805  floating constants (<a href="#6.4.4.2">6.4.4.2</a>), header names (<a href="#6.4.7">6.4.7</a>), macro replacement (<a href="#6.10.3">6.10.3</a>), postfix
2806  increment and decrement operators (<a href="#6.5.2.4">6.5.2.4</a>), prefix increment and decrement operators
2807  (<a href="#6.5.3.1">6.5.3.1</a>), preprocessing directives (<a href="#6.10">6.10</a>), preprocessing numbers (<a href="#6.4.8">6.4.8</a>), string literals
2808  (<a href="#6.4.5">6.4.5</a>).
2809
2810 <h6>footnotes</h6>
2811 <p><small><a name="note58" href="#note58">58)</a> An additional category, placemarkers, is used internally in translation phase 4 (see <a href="#6.10.3.3">6.10.3.3</a>); it cannot
2812  occur in source files.
2813 </small>
2814
2815 <h4><a name="6.4.1" href="#6.4.1">6.4.1 Keywords</a></h4>
2816 <h6>Syntax</h6>
2817 <p><!--para 1 -->
2818 <pre>
2819           keyword: one of
2820                 auto                    enum                  restrict              unsigned
2821                 break                   extern                return                void
2822                 case                    float                 short                 volatile
2823                 char                    for                   signed                while
2824                 const                   goto                  sizeof                _Bool
2825                 continue                if                    static                _Complex
2826                 default                 inline                struct                _Imaginary
2827                 do                      int                   switch
2828                 double                  long                  typedef
2829                 else                    register              union</pre>
2830 <h6>Semantics</h6>
2831 <p><!--para 2 -->
2832  The above tokens (case sensitive) are reserved (in translation phases 7 and 8) for use as
2833  keywords, and shall not be used otherwise. The keyword _Imaginary is reserved for
2834  specifying imaginary types.<sup><a href="#note59"><b>59)</b></a></sup>
2835  
2836  
2837  
2838 <!--page 63 -->
2839
2840 <h6>footnotes</h6>
2841 <p><small><a name="note59" href="#note59">59)</a> One possible specification for imaginary types appears in <a href="#G">annex G</a>.
2842 </small>
2843
2844 <h4><a name="6.4.2" href="#6.4.2">6.4.2 Identifiers</a></h4>
2845
2846 <h5><a name="6.4.2.1" href="#6.4.2.1">6.4.2.1 General</a></h5>
2847 <h6>Syntax</h6>
2848 <p><!--para 1 -->
2849 <pre>
2850           identifier:
2851                  identifier-nondigit
2852                   identifier identifier-nondigit
2853                  identifier digit
2854           identifier-nondigit:
2855                   nondigit
2856                   universal-character-name
2857                  other implementation-defined characters
2858           nondigit: one of
2859                  _ a b            c    d    e    f     g    h    i    j     k    l    m
2860                      n o          p    q    r    s     t    u    v    w     x    y    z
2861                      A B          C    D    E    F     G    H    I    J     K    L    M
2862                      N O          P    Q    R    S     T    U    V    W     X    Y    Z
2863           digit: one of
2864                  0 1        2     3    4    5    6     7    8    9</pre>
2865 <h6>Semantics</h6>
2866 <p><!--para 2 -->
2867  An identifier is a sequence of nondigit characters (including the underscore _, the
2868  lowercase and uppercase Latin letters, and other characters) and digits, which designates
2869  one or more entities as described in <a href="#6.2.1">6.2.1</a>. Lowercase and uppercase letters are distinct.
2870  There is no specific limit on the maximum length of an identifier.
2871 <p><!--para 3 -->
2872  Each universal character name in an identifier shall designate a character whose encoding
2873  in ISO/IEC 10646 falls into one of the ranges specified in <a href="#D">annex D</a>.<sup><a href="#note60"><b>60)</b></a></sup> The initial
2874  character shall not be a universal character name designating a digit. An implementation
2875  may allow multibyte characters that are not part of the basic source character set to
2876  appear in identifiers; which characters and their correspondence to universal character
2877  names is implementation-defined.
2878 <p><!--para 4 -->
2879  When preprocessing tokens are converted to tokens during translation phase 7, if a
2880  preprocessing token could be converted to either a keyword or an identifier, it is converted
2881  to a keyword.
2882  
2883  
2884 <!--page 64 -->
2885 <h6> Implementation limits</h6>
2886 <p><!--para 5 -->
2887  As discussed in <a href="#5.2.4.1">5.2.4.1</a>, an implementation may limit the number of significant initial
2888  characters in an identifier; the limit for an external name (an identifier that has external
2889  linkage) may be more restrictive than that for an internal name (a macro name or an
2890  identifier that does not have external linkage). The number of significant characters in an
2891  identifier is implementation-defined.
2892 <p><!--para 6 -->
2893  Any identifiers that differ in a significant character are different identifiers. If two
2894  identifiers differ only in nonsignificant characters, the behavior is undefined.
2895 <p><b> Forward references</b>: universal character names (<a href="#6.4.3">6.4.3</a>), macro replacement (<a href="#6.10.3">6.10.3</a>).
2896
2897 <h6>footnotes</h6>
2898 <p><small><a name="note60" href="#note60">60)</a> On systems in which linkers cannot accept extended characters, an encoding of the universal character
2899  name may be used in forming valid external identifiers. For example, some otherwise unused
2900  character or sequence of characters may be used to encode the \u in a universal character name.
2901  Extended characters may produce a long external identifier.
2902 </small>
2903
2904 <h5><a name="6.4.2.2" href="#6.4.2.2">6.4.2.2 Predefined identifiers</a></h5>
2905 <h6>Semantics</h6>
2906 <p><!--para 1 -->
2907  The identifier __func__ shall be implicitly declared by the translator as if,
2908  immediately following the opening brace of each function definition, the declaration
2909 <pre>
2910           static const char __func__[] = "function-name";</pre>
2911  appeared, where function-name is the name of the lexically-enclosing function.<sup><a href="#note61"><b>61)</b></a></sup>
2912 <p><!--para 2 -->
2913  This name is encoded as if the implicit declaration had been written in the source
2914  character set and then translated into the execution character set as indicated in translation
2915  phase 5.
2916 <p><!--para 3 -->
2917  EXAMPLE        Consider the code fragment:
2918 <pre>
2919           #include <a href="#7.19">&lt;stdio.h&gt;</a>
2920           void myfunc(void)
2921           {
2922                 printf("%s\n", __func__);
2923                 /* ... */
2924           }</pre>
2925  Each time the function is called, it will print to the standard output stream:
2926 <pre>
2927           myfunc</pre>
2928  
2929 <p><b> Forward references</b>: function definitions (<a href="#6.9.1">6.9.1</a>).
2930  
2931  
2932  
2933  
2934 <!--page 65 -->
2935
2936 <h6>footnotes</h6>
2937 <p><small><a name="note61" href="#note61">61)</a> Since the name __func__ is reserved for any use by the implementation (<a href="#7.1.3">7.1.3</a>), if any other
2938  identifier is explicitly declared using the name __func__, the behavior is undefined.
2939 </small>
2940
2941 <h4><a name="6.4.3" href="#6.4.3">6.4.3 Universal character names</a></h4>
2942 <h6>Syntax</h6>
2943 <p><!--para 1 -->
2944 <pre>
2945           universal-character-name:
2946                  \u hex-quad
2947                  \U hex-quad hex-quad
2948           hex-quad:
2949                  hexadecimal-digit hexadecimal-digit
2950                               hexadecimal-digit hexadecimal-digit</pre>
2951 <h6>Constraints</h6>
2952 <p><!--para 2 -->
2953  A universal character name shall not specify a character whose short identifier is less than
2954  00A0 other than 0024 ($), 0040 (@), or 0060 ('), nor one in the range D800 through
2955  DFFF inclusive.<sup><a href="#note62"><b>62)</b></a></sup>
2956 <h6>Description</h6>
2957 <p><!--para 3 -->
2958  Universal character names may be used in identifiers, character constants, and string
2959  literals to designate characters that are not in the basic character set.
2960 <h6>Semantics</h6>
2961 <p><!--para 4 -->
2962  The universal character name \Unnnnnnnn designates the character whose eight-digit
2963  short identifier (as specified by ISO/IEC 10646) is nnnnnnnn.<sup><a href="#note63"><b>63)</b></a></sup> Similarly, the universal
2964  character name \unnnn designates the character whose four-digit short identifier is nnnn
2965  (and whose eight-digit short identifier is 0000nnnn).
2966  
2967  
2968  
2969  
2970 <!--page 66 -->
2971
2972 <h6>footnotes</h6>
2973 <p><small><a name="note62" href="#note62">62)</a> The disallowed characters are the characters in the basic character set and the code positions reserved
2974  by ISO/IEC 10646 for control characters, the character DELETE, and the S-zone (reserved for use by
2975  UTF-16).
2976 </small>
2977 <p><small><a name="note63" href="#note63">63)</a> Short identifiers for characters were first specified in ISO/IEC 10646-1/AMD9:1997.
2978 </small>
2979
2980 <h4><a name="6.4.4" href="#6.4.4">6.4.4 Constants</a></h4>
2981 <h6>Syntax</h6>
2982 <p><!--para 1 -->
2983 <pre>
2984           constant:
2985                  integer-constant
2986                  floating-constant
2987                  enumeration-constant
2988                  character-constant</pre>
2989 <h6>Constraints</h6>
2990 <p><!--para 2 -->
2991  Each constant shall have a type and the value of a constant shall be in the range of
2992  representable values for its type.
2993 <h6>Semantics</h6>
2994 <p><!--para 3 -->
2995  Each constant has a type, determined by its form and value, as detailed later.
2996
2997 <h5><a name="6.4.4.1" href="#6.4.4.1">6.4.4.1 Integer constants</a></h5>
2998 <h6>Syntax</h6>
2999 <p><!--para 1 -->
3000 <!--page 67 -->
3001 <pre>
3002           integer-constant:
3003                   decimal-constant integer-suffix<sub>opt</sub>
3004                   octal-constant integer-suffix<sub>opt</sub>
3005                   hexadecimal-constant integer-suffix<sub>opt</sub>
3006           decimal-constant:
3007                 nonzero-digit
3008                 decimal-constant digit
3009           octal-constant:
3010                  0
3011                  octal-constant octal-digit
3012           hexadecimal-constant:
3013                 hexadecimal-prefix hexadecimal-digit
3014                 hexadecimal-constant hexadecimal-digit
3015           hexadecimal-prefix: one of
3016                 0x 0X
3017           nonzero-digit: one of
3018                  1 2 3 4          5     6     7   8    9
3019           octal-digit: one of
3020                   0 1 2 3         4     5     6   7
3021         hexadecimal-digit:   one of
3022               0 1 2           3 4      5    6   7     8   9
3023               a b c           d e      f
3024               A B C           D E      F
3025         integer-suffix:
3026                 unsigned-suffix long-suffix<sub>opt</sub>
3027                 unsigned-suffix long-long-suffix
3028                 long-suffix unsigned-suffix<sub>opt</sub>
3029                 long-long-suffix unsigned-suffix<sub>opt</sub>
3030         unsigned-suffix: one of
3031                u U
3032         long-suffix: one of
3033                l L
3034         long-long-suffix: one of
3035                ll LL</pre>
3036 <h6>Description</h6>
3037 <p><!--para 2 -->
3038  An integer constant begins with a digit, but has no period or exponent part. It may have a
3039  prefix that specifies its base and a suffix that specifies its type.
3040 <p><!--para 3 -->
3041  A decimal constant begins with a nonzero digit and consists of a sequence of decimal
3042  digits. An octal constant consists of the prefix 0 optionally followed by a sequence of the
3043  digits 0 through 7 only. A hexadecimal constant consists of the prefix 0x or 0X followed
3044  by a sequence of the decimal digits and the letters a (or A) through f (or F) with values
3045  10 through 15 respectively.
3046 <h6>Semantics</h6>
3047 <p><!--para 4 -->
3048  The value of a decimal constant is computed base 10; that of an octal constant, base 8;
3049  that of a hexadecimal constant, base 16. The lexically first digit is the most significant.
3050 <p><!--para 5 -->
3051  The type of an integer constant is the first of the corresponding list in which its value can
3052  be represented.
3053 <!--page 68 -->
3054 <table border=1>
3055 <tr><th> Suffix           <th>Decimal Constant           <th>Octal or Hexadecimal Constant
3056 <tr><td> none
3057 <td><pre>int
3058 long int
3059 long long int</pre>
3060 <td><pre>int
3061 unsigned int
3062 long int
3063 unsigned long int
3064 long long int
3065 unsigned long long int</pre>
3066 <tr><td> u or U
3067 <td><pre>unsigned int
3068 unsigned long int
3069 unsigned long long int</pre>
3070 <td><pre>unsigned int
3071 unsigned long int
3072 unsigned long long int</pre>
3073 <tr><td> l or L
3074 <td><pre>long int
3075 long long int</pre>
3076 <td><pre>long int
3077 unsigned long int
3078 long long int
3079 unsigned long long int</pre>
3080 <tr><td> Both u or U and l or L
3081 <td><pre>unsigned long int
3082 unsigned long long int</pre>
3083 <td><pre>unsigned long int
3084 unsigned long long int</pre>
3085 <tr><td> ll or LL
3086 <td><pre>long long int</pre>
3087 <td><pre>long long int
3088 unsigned long long int</pre>
3089 <tr><td> Both u or U and ll or LL
3090 <td><pre>unsigned long long int</pre>
3091 <td><pre>unsigned long long int</pre>
3092 </table>
3093 <p><!--para 6 -->
3094  If an integer constant cannot be represented by any type in its list, it may have an
3095  extended integer type, if the extended integer type can represent its value. If all of the
3096  types in the list for the constant are signed, the extended integer type shall be signed. If
3097  all of the types in the list for the constant are unsigned, the extended integer type shall be
3098  unsigned. If the list contains both signed and unsigned types, the extended integer type
3099  may be signed or unsigned. If an integer constant cannot be represented by any type in
3100  its list and has no extended integer type, then the integer constant has no type.
3101 <!--page 69 -->
3102
3103 <h5><a name="6.4.4.2" href="#6.4.4.2">6.4.4.2 Floating constants</a></h5>
3104 <h6>Syntax</h6>
3105 <p><!--para 1 -->
3106 <!--page 70 -->
3107 <pre>
3108           floating-constant:
3109                  decimal-floating-constant
3110                  hexadecimal-floating-constant
3111           decimal-floating-constant:
3112                 fractional-constant exponent-part<sub>opt</sub> floating-suffix<sub>opt</sub>
3113                 digit-sequence exponent-part floating-suffix<sub>opt</sub>
3114           hexadecimal-floating-constant:
3115                 hexadecimal-prefix hexadecimal-fractional-constant
3116                                binary-exponent-part floating-suffix<sub>opt</sub>
3117                 hexadecimal-prefix hexadecimal-digit-sequence
3118                                binary-exponent-part floating-suffix<sub>opt</sub>
3119           fractional-constant:
3120                   digit-sequence<sub>opt</sub> . digit-sequence
3121                   digit-sequence .
3122           exponent-part:
3123                 e sign<sub>opt</sub> digit-sequence
3124                 E sign<sub>opt</sub> digit-sequence
3125           sign: one of
3126                  + -
3127           digit-sequence:
3128                   digit
3129                   digit-sequence digit
3130           hexadecimal-fractional-constant:
3131                 hexadecimal-digit-sequence<sub>opt</sub> .
3132                                hexadecimal-digit-sequence
3133                 hexadecimal-digit-sequence .
3134           binary-exponent-part:
3135                  p sign<sub>opt</sub> digit-sequence
3136                  P sign<sub>opt</sub> digit-sequence
3137           hexadecimal-digit-sequence:
3138                 hexadecimal-digit
3139                 hexadecimal-digit-sequence hexadecimal-digit
3140           floating-suffix: one of
3141                  f l F L</pre>
3142 <h6>Description</h6>
3143 <p><!--para 2 -->
3144  A floating constant has a significand part that may be followed by an exponent part and a
3145  suffix that specifies its type. The components of the significand part may include a digit
3146  sequence representing the whole-number part, followed by a period (.), followed by a
3147  digit sequence representing the fraction part. The components of the exponent part are an
3148  e, E, p, or P followed by an exponent consisting of an optionally signed digit sequence.
3149  Either the whole-number part or the fraction part has to be present; for decimal floating
3150  constants, either the period or the exponent part has to be present.
3151 <h6>Semantics</h6>
3152 <p><!--para 3 -->
3153  The significand part is interpreted as a (decimal or hexadecimal) rational number; the
3154  digit sequence in the exponent part is interpreted as a decimal integer. For decimal
3155  floating constants, the exponent indicates the power of 10 by which the significand part is
3156  to be scaled. For hexadecimal floating constants, the exponent indicates the power of 2
3157  by which the significand part is to be scaled. For decimal floating constants, and also for
3158  hexadecimal floating constants when FLT_RADIX is not a power of 2, the result is either
3159  the nearest representable value, or the larger or smaller representable value immediately
3160  adjacent to the nearest representable value, chosen in an implementation-defined manner.
3161  For hexadecimal floating constants when FLT_RADIX is a power of 2, the result is
3162  correctly rounded.
3163 <p><!--para 4 -->
3164  An unsuffixed floating constant has type double. If suffixed by the letter f or F, it has
3165  type float. If suffixed by the letter l or L, it has type long double.
3166 <p><!--para 5 -->
3167  Floating constants are converted to internal format as if at translation-time. The
3168  conversion of a floating constant shall not raise an exceptional condition or a floating-
3169  point exception at execution time.
3170 <h6>Recommended practice</h6>
3171 <p><!--para 6 -->
3172  The implementation should produce a diagnostic message if a hexadecimal constant
3173  cannot be represented exactly in its evaluation format; the implementation should then
3174  proceed with the translation of the program.
3175 <p><!--para 7 -->
3176  The translation-time conversion of floating constants should match the execution-time
3177  conversion of character strings by library functions, such as strtod, given matching
3178  inputs suitable for both conversions, the same result format, and default execution-time
3179  rounding.<sup><a href="#note64"><b>64)</b></a></sup>
3180  
3181  
3182  
3183  
3184 <!--page 71 -->
3185
3186 <h6>footnotes</h6>
3187 <p><small><a name="note64" href="#note64">64)</a> The specification for the library functions recommends more accurate conversion than required for
3188  floating constants (see <a href="#7.20.1.3">7.20.1.3</a>).
3189 </small>
3190
3191 <h5><a name="6.4.4.3" href="#6.4.4.3">6.4.4.3 Enumeration constants</a></h5>
3192 <h6>Syntax</h6>
3193 <p><!--para 1 -->
3194 <pre>
3195           enumeration-constant:
3196                 identifier</pre>
3197 <h6>Semantics</h6>
3198 <p><!--para 2 -->
3199  An identifier declared as an enumeration constant has type int.
3200 <p><b> Forward references</b>: enumeration specifiers (<a href="#6.7.2.2">6.7.2.2</a>).
3201
3202 <h5><a name="6.4.4.4" href="#6.4.4.4">6.4.4.4 Character constants</a></h5>
3203 <h6>Syntax</h6>
3204 <p><!--para 1 -->
3205 <!--page 72 -->
3206 <pre>
3207           character-constant:
3208                  ' c-char-sequence '
3209                  L' c-char-sequence '
3210           c-char-sequence:
3211                  c-char
3212                  c-char-sequence c-char
3213           c-char:
3214                     any member of the source character set except
3215                                  the single-quote ', backslash \, or new-line character
3216                     escape-sequence
3217           escape-sequence:
3218                  simple-escape-sequence
3219                  octal-escape-sequence
3220                  hexadecimal-escape-sequence
3221                  universal-character-name
3222           simple-escape-sequence: one of
3223                  \' \" \? \\
3224                  \a \b \f \n \r                  \t    \v
3225           octal-escape-sequence:
3226                   \ octal-digit
3227                   \ octal-digit octal-digit
3228                   \ octal-digit octal-digit octal-digit
3229           hexadecimal-escape-sequence:
3230                 \x hexadecimal-digit
3231                 hexadecimal-escape-sequence hexadecimal-digit</pre>
3232 <h6>Description</h6>
3233 <p><!--para 2 -->
3234  An integer character constant is a sequence of one or more multibyte characters enclosed
3235  in single-quotes, as in 'x'. A wide character constant is the same, except prefixed by the
3236  letter L. With a few exceptions detailed later, the elements of the sequence are any
3237  members of the source character set; they are mapped in an implementation-defined
3238  manner to members of the execution character set.
3239 <p><!--para 3 -->
3240  The single-quote ', the double-quote ", the question-mark ?, the backslash \, and
3241  arbitrary integer values are representable according to the following table of escape
3242  sequences:
3243 <p><!--para 4 -->
3244 <pre>
3245         single quote '                 \'
3246         double quote "                 \"
3247         question mark ?                \?
3248         backslash \                    \\
3249         octal character                \octal digits
3250         hexadecimal character          \x hexadecimal digits</pre>
3251  The double-quote " and question-mark ? are representable either by themselves or by the
3252  escape sequences \" and \?, respectively, but the single-quote ' and the backslash \
3253  shall be represented, respectively, by the escape sequences \' and \\.
3254 <p><!--para 5 -->
3255  The octal digits that follow the backslash in an octal escape sequence are taken to be part
3256  of the construction of a single character for an integer character constant or of a single
3257  wide character for a wide character constant. The numerical value of the octal integer so
3258  formed specifies the value of the desired character or wide character.
3259 <p><!--para 6 -->
3260  The hexadecimal digits that follow the backslash and the letter x in a hexadecimal escape
3261  sequence are taken to be part of the construction of a single character for an integer
3262  character constant or of a single wide character for a wide character constant. The
3263  numerical value of the hexadecimal integer so formed specifies the value of the desired
3264  character or wide character.
3265 <p><!--para 7 -->
3266  Each octal or hexadecimal escape sequence is the longest sequence of characters that can
3267  constitute the escape sequence.
3268 <p><!--para 8 -->
3269  In addition, characters not in the basic character set are representable by universal
3270  character names and certain nongraphic characters are representable by escape sequences
3271  consisting of the backslash \ followed by a lowercase letter: \a, \b, \f, \n, \r, \t,
3272  and \v.<sup><a href="#note65"><b>65)</b></a></sup>
3273  
3274  
3275  
3276  
3277 <!--page 73 -->
3278 <h6>Constraints</h6>
3279 <p><!--para 9 -->
3280  The value of an octal or hexadecimal escape sequence shall be in the range of
3281  representable values for the type unsigned char for an integer character constant, or
3282  the unsigned type corresponding to wchar_t for a wide character constant.
3283 <h6>Semantics</h6>
3284 <p><!--para 10 -->
3285  An integer character constant has type int. The value of an integer character constant
3286  containing a single character that maps to a single-byte execution character is the
3287  numerical value of the representation of the mapped character interpreted as an integer.
3288  The value of an integer character constant containing more than one character (e.g.,
3289  'ab'), or containing a character or escape sequence that does not map to a single-byte
3290  execution character, is implementation-defined. If an integer character constant contains
3291  a single character or escape sequence, its value is the one that results when an object with
3292  type char whose value is that of the single character or escape sequence is converted to
3293  type int.
3294 <p><!--para 11 -->
3295  A wide character constant has type wchar_t, an integer type defined in the
3296  <a href="#7.17">&lt;stddef.h&gt;</a> header. The value of a wide character constant containing a single
3297  multibyte character that maps to a member of the extended execution character set is the
3298  wide character corresponding to that multibyte character, as defined by the mbtowc
3299  function, with an implementation-defined current locale. The value of a wide character
3300  constant containing more than one multibyte character, or containing a multibyte
3301  character or escape sequence not represented in the extended execution character set, is
3302  implementation-defined.
3303 <p><!--para 12 -->
3304  EXAMPLE 1      The construction '\0' is commonly used to represent the null character.
3305  
3306 <p><!--para 13 -->
3307  EXAMPLE 2 Consider implementations that use two's-complement representation for integers and eight
3308  bits for objects that have type char. In an implementation in which type char has the same range of
3309  values as signed char, the integer character constant '\xFF' has the value -1; if type char has the
3310  same range of values as unsigned char, the character constant '\xFF' has the value +255.
3311  
3312 <p><!--para 14 -->
3313  EXAMPLE 3 Even if eight bits are used for objects that have type char, the construction '\x123'
3314  specifies an integer character constant containing only one character, since a hexadecimal escape sequence
3315  is terminated only by a non-hexadecimal character. To specify an integer character constant containing the
3316  two characters whose values are '\x12' and '3', the construction '\0223' may be used, since an octal
3317  escape sequence is terminated after three octal digits. (The value of this two-character integer character
3318  constant is implementation-defined.)
3319  
3320 <p><!--para 15 -->
3321  EXAMPLE 4 Even if 12 or more bits are used for objects that have type wchar_t, the construction
3322  L'\1234' specifies the implementation-defined value that results from the combination of the values
3323  0123 and '4'.
3324  
3325 <p><b> Forward references</b>: common definitions <a href="#7.17">&lt;stddef.h&gt;</a> (<a href="#7.17">7.17</a>), the mbtowc function
3326  (<a href="#7.20.7.2">7.20.7.2</a>).
3327 <!--page 74 -->
3328
3329 <h6>footnotes</h6>
3330 <p><small><a name="note65" href="#note65">65)</a> The semantics of these characters were discussed in <a href="#5.2.2">5.2.2</a>. If any other character follows a backslash,
3331  the result is not a token and a diagnostic is required. See ''future language directions'' (<a href="#6.11.4">6.11.4</a>).
3332 </small>
3333
3334 <h4><a name="6.4.5" href="#6.4.5">6.4.5 String literals</a></h4>
3335 <h6>Syntax</h6>
3336 <p><!--para 1 -->
3337 <pre>
3338           string-literal:
3339                   " s-char-sequence<sub>opt</sub> "
3340                   L" s-char-sequence<sub>opt</sub> "
3341           s-char-sequence:
3342                  s-char
3343                  s-char-sequence s-char
3344           s-char:
3345                     any member of the source character set except
3346                                  the double-quote ", backslash \, or new-line character
3347                     escape-sequence</pre>
3348 <h6>Description</h6>
3349 <p><!--para 2 -->
3350  A character string literal is a sequence of zero or more multibyte characters enclosed in
3351  double-quotes, as in "xyz". A wide string literal is the same, except prefixed by the
3352  letter L.
3353 <p><!--para 3 -->
3354  The same considerations apply to each element of the sequence in a character string
3355  literal or a wide string literal as if it were in an integer character constant or a wide
3356  character constant, except that the single-quote ' is representable either by itself or by the
3357  escape sequence \', but the double-quote " shall be represented by the escape sequence
3358  \".
3359 <h6>Semantics</h6>
3360 <p><!--para 4 -->
3361  In translation phase 6, the multibyte character sequences specified by any sequence of
3362  adjacent character and wide string literal tokens are concatenated into a single multibyte
3363  character sequence. If any of the tokens are wide string literal tokens, the resulting
3364  multibyte character sequence is treated as a wide string literal; otherwise, it is treated as a
3365  character string literal.
3366 <p><!--para 5 -->
3367  In translation phase 7, a byte or code of value zero is appended to each multibyte
3368  character sequence that results from a string literal or literals.<sup><a href="#note66"><b>66)</b></a></sup> The multibyte character
3369  sequence is then used to initialize an array of static storage duration and length just
3370  sufficient to contain the sequence. For character string literals, the array elements have
3371  type char, and are initialized with the individual bytes of the multibyte character
3372  sequence; for wide string literals, the array elements have type wchar_t, and are
3373  initialized with the sequence of wide characters corresponding to the multibyte character
3374  
3375 <!--page 75 -->
3376  sequence, as defined by the mbstowcs function with an implementation-defined current
3377  locale. The value of a string literal containing a multibyte character or escape sequence
3378  not represented in the execution character set is implementation-defined.
3379 <p><!--para 6 -->
3380  It is unspecified whether these arrays are distinct provided their elements have the
3381  appropriate values. If the program attempts to modify such an array, the behavior is
3382  undefined.
3383 <p><!--para 7 -->
3384  EXAMPLE       This pair of adjacent character string literals
3385 <pre>
3386           "\x12" "3"</pre>
3387  produces a single character string literal containing the two characters whose values are '\x12' and '3',
3388  because escape sequences are converted into single members of the execution character set just prior to
3389  adjacent string literal concatenation.
3390  
3391 <p><b> Forward references</b>: common definitions <a href="#7.17">&lt;stddef.h&gt;</a> (<a href="#7.17">7.17</a>), the mbstowcs
3392  function (<a href="#7.20.8.1">7.20.8.1</a>).
3393
3394 <h6>footnotes</h6>
3395 <p><small><a name="note66" href="#note66">66)</a> A character string literal need not be a string (see <a href="#7.1.1">7.1.1</a>), because a null character may be embedded in
3396  it by a \0 escape sequence.
3397 </small>
3398
3399 <h4><a name="6.4.6" href="#6.4.6">6.4.6 Punctuators</a></h4>
3400 <h6>Syntax</h6>
3401 <p><!--para 1 -->
3402 <pre>
3403           punctuator: one of
3404                  [ ] ( ) { } . -&gt;
3405                  ++ -- &amp; * + - ~ !
3406                  / % &lt;&lt; &gt;&gt; &lt; &gt; &lt;= &gt;=                               ==     !=     ^    |     &amp;&amp;     ||
3407                  ? : ; ...
3408                  = *= /= %= += -= &lt;&lt;=                              &gt;&gt;=      &amp;=       ^=   |=
3409                  , # ##
3410                  &lt;: :&gt; &lt;% %&gt; %: %:%:</pre>
3411 <h6>Semantics</h6>
3412 <p><!--para 2 -->
3413  A punctuator is a symbol that has independent syntactic and semantic significance.
3414  Depending on context, it may specify an operation to be performed (which in turn may
3415  yield a value or a function designator, produce a side effect, or some combination thereof)
3416  in which case it is known as an operator (other forms of operator also exist in some
3417  contexts). An operand is an entity on which an operator acts.
3418 <!--page 76 -->
3419 <p><!--para 3 -->
3420  In all aspects of the language, the six tokens<sup><a href="#note67"><b>67)</b></a></sup>
3421 <pre>
3422           &lt;:    :&gt;      &lt;%    %&gt;     %:     %:%:</pre>
3423  behave, respectively, the same as the six tokens
3424 <pre>
3425           [     ]       {     }      #      ##</pre>
3426  except for their spelling.<sup><a href="#note68"><b>68)</b></a></sup>
3427 <p><b> Forward references</b>: expressions (<a href="#6.5">6.5</a>), declarations (<a href="#6.7">6.7</a>), preprocessing directives
3428  (<a href="#6.10">6.10</a>), statements (<a href="#6.8">6.8</a>).
3429
3430 <h6>footnotes</h6>
3431 <p><small><a name="note67" href="#note67">67)</a> These tokens are sometimes called ''digraphs''.
3432 </small>
3433 <p><small><a name="note68" href="#note68">68)</a> Thus [ and &lt;: behave differently when ''stringized'' (see <a href="#6.10.3.2">6.10.3.2</a>), but can otherwise be freely
3434  interchanged.
3435 </small>
3436
3437 <h4><a name="6.4.7" href="#6.4.7">6.4.7 Header names</a></h4>
3438 <h6>Syntax</h6>
3439 <p><!--para 1 -->
3440 <pre>
3441           header-name:
3442                  &lt; h-char-sequence &gt;
3443                  " q-char-sequence "
3444           h-char-sequence:
3445                  h-char
3446                  h-char-sequence h-char
3447           h-char:
3448                     any member of the source character set except
3449                                  the new-line character and &gt;
3450           q-char-sequence:
3451                  q-char
3452                  q-char-sequence q-char
3453           q-char:
3454                     any member of the source character set except
3455                                  the new-line character and "</pre>
3456 <h6>Semantics</h6>
3457 <p><!--para 2 -->
3458  The sequences in both forms of header names are mapped in an implementation-defined
3459  manner to headers or external source file names as specified in <a href="#6.10.2">6.10.2</a>.
3460 <p><!--para 3 -->
3461  If the characters ', \, ", //, or /* occur in the sequence between the &lt; and &gt; delimiters,
3462  the behavior is undefined. Similarly, if the characters ', \, //, or /* occur in the
3463  
3464  
3465  
3466  
3467 <!--page 77 -->
3468  sequence between the " delimiters, the behavior is undefined.<sup><a href="#note69"><b>69)</b></a></sup> Header name
3469  preprocessing tokens are recognized only within #include preprocessing directives and
3470  in implementation-defined locations within #pragma directives.<sup><a href="#note70"><b>70)</b></a></sup>
3471 <p><!--para 4 -->
3472  EXAMPLE       The following sequence of characters:
3473 <pre>
3474           0x3&lt;1/a.h&gt;1e2
3475           #include &lt;1/a.h&gt;
3476           #define const.member@$</pre>
3477  forms the following sequence of preprocessing tokens (with each individual preprocessing token delimited
3478  by a { on the left and a } on the right).
3479 <pre>
3480           {0x3}{&lt;}{1}{/}{a}{.}{h}{&gt;}{1e2}
3481           {#}{include} {&lt;1/a.h&gt;}
3482           {#}{define} {const}{.}{member}{@}{$}</pre>
3483  
3484 <p><b> Forward references</b>: source file inclusion (<a href="#6.10.2">6.10.2</a>).
3485
3486 <h6>footnotes</h6>
3487 <p><small><a name="note69" href="#note69">69)</a> Thus, sequences of characters that resemble escape sequences cause undefined behavior.
3488 </small>
3489 <p><small><a name="note70" href="#note70">70)</a> For an example of a header name preprocessing token used in a #pragma directive, see <a href="#6.10.9">6.10.9</a>.
3490 </small>
3491
3492 <h4><a name="6.4.8" href="#6.4.8">6.4.8 Preprocessing numbers</a></h4>
3493 <h6>Syntax</h6>
3494 <p><!--para 1 -->
3495 <pre>
3496           pp-number:
3497                 digit
3498                 . digit
3499                 pp-number       digit
3500                 pp-number       identifier-nondigit
3501                 pp-number       e sign
3502                 pp-number       E sign
3503                 pp-number       p sign
3504                 pp-number       P sign
3505                 pp-number       .</pre>
3506 <h6>Description</h6>
3507 <p><!--para 2 -->
3508  A preprocessing number begins with a digit optionally preceded by a period (.) and may
3509  be followed by valid identifier characters and the character sequences e+, e-, E+, E-,
3510  p+, p-, P+, or P-.
3511 <p><!--para 3 -->
3512  Preprocessing number tokens lexically include all floating and integer constant tokens.
3513 <h6>Semantics</h6>
3514 <p><!--para 4 -->
3515  A preprocessing number does not have type or a value; it acquires both after a successful
3516  conversion (as part of translation phase 7) to a floating constant token or an integer
3517  constant token.
3518  
3519  
3520 <!--page 78 -->
3521
3522 <h4><a name="6.4.9" href="#6.4.9">6.4.9 Comments</a></h4>
3523 <p><!--para 1 -->
3524  Except within a character constant, a string literal, or a comment, the characters /*
3525  introduce a comment. The contents of such a comment are examined only to identify
3526  multibyte characters and to find the characters */ that terminate it.<sup><a href="#note71"><b>71)</b></a></sup>
3527 <p><!--para 2 -->
3528  Except within a character constant, a string literal, or a comment, the characters //
3529  introduce a comment that includes all multibyte characters up to, but not including, the
3530  next new-line character. The contents of such a comment are examined only to identify
3531  multibyte characters and to find the terminating new-line character.
3532 <p><!--para 3 -->
3533  EXAMPLE
3534 <pre>
3535          "a//b"                              //   four-character string literal
3536          #include "//e"                      //   undefined behavior
3537          // */                               //   comment, not syntax error
3538          f = g/**//h;                        //   equivalent to f = g / h;
3539          //\
3540          i();                                // part of a two-line comment
3541          /\
3542          / j();                              // part of a two-line comment
3543          #define glue(x,y) x##y
3544          glue(/,/) k();                      // syntax error, not comment
3545          /*//*/ l();                         // equivalent to l();
3546          m = n//**/o
3547             + p;                             // equivalent to m = n + p;</pre>
3548  
3549  
3550  
3551  
3552 <!--page 79 -->
3553
3554 <h6>footnotes</h6>
3555 <p><small><a name="note71" href="#note71">71)</a> Thus, /* ... */ comments do not nest.
3556 </small>
3557
3558 <h3><a name="6.5" href="#6.5">6.5 Expressions</a></h3>
3559 <p><!--para 1 -->
3560  An expression is a sequence of operators and operands that specifies computation of a
3561  value, or that designates an object or a function, or that generates side effects, or that
3562  performs a combination thereof.
3563 <p><!--para 2 -->
3564  Between the previous and next sequence point an object shall have its stored value
3565  modified at most once by the evaluation of an expression.<sup><a href="#note72"><b>72)</b></a></sup> Furthermore, the prior value
3566  shall be read only to determine the value to be stored.<sup><a href="#note73"><b>73)</b></a></sup>
3567 <p><!--para 3 -->
3568  The grouping of operators and operands is indicated by the syntax.<sup><a href="#note74"><b>74)</b></a></sup> Except as specified
3569  later (for the function-call (), &amp;&amp;, ||, ?:, and comma operators), the order of evaluation
3570  of subexpressions and the order in which side effects take place are both unspecified.
3571 <p><!--para 4 -->
3572  Some operators (the unary operator ~, and the binary operators &lt;&lt;, &gt;&gt;, &amp;, ^, and |,
3573  collectively described as bitwise operators) are required to have operands that have
3574  integer type. These operators yield values that depend on the internal representations of
3575  integers, and have implementation-defined and undefined aspects for signed types.
3576 <p><!--para 5 -->
3577  If an exceptional condition occurs during the evaluation of an expression (that is, if the
3578  result is not mathematically defined or not in the range of representable values for its
3579  type), the behavior is undefined.
3580 <p><!--para 6 -->
3581  The effective type of an object for an access to its stored value is the declared type of the
3582  object, if any.<sup><a href="#note75"><b>75)</b></a></sup> If a value is stored into an object having no declared type through an
3583  lvalue having a type that is not a character type, then the type of the lvalue becomes the
3584  
3585  
3586 <!--page 80 -->
3587  effective type of the object for that access and for subsequent accesses that do not modify
3588  the stored value. If a value is copied into an object having no declared type using
3589  memcpy or memmove, or is copied as an array of character type, then the effective type
3590  of the modified object for that access and for subsequent accesses that do not modify the
3591  value is the effective type of the object from which the value is copied, if it has one. For
3592  all other accesses to an object having no declared type, the effective type of the object is
3593  simply the type of the lvalue used for the access.
3594 <p><!--para 7 -->
3595  An object shall have its stored value accessed only by an lvalue expression that has one of
3596  the following types:<sup><a href="#note76"><b>76)</b></a></sup>
3597 <ul>
3598 <li>  a type compatible with the effective type of the object,
3599 <li>  a qualified version of a type compatible with the effective type of the object,
3600 <li>  a type that is the signed or unsigned type corresponding to the effective type of the
3601  object,
3602 <li>  a type that is the signed or unsigned type corresponding to a qualified version of the
3603  effective type of the object,
3604 <li>  an aggregate or union type that includes one of the aforementioned types among its
3605  members (including, recursively, a member of a subaggregate or contained union), or
3606 <li>  a character type.
3607 </ul>
3608 <p><!--para 8 -->
3609  A floating expression may be contracted, that is, evaluated as though it were an atomic
3610  operation, thereby omitting rounding errors implied by the source code and the
3611  expression evaluation method.<sup><a href="#note77"><b>77)</b></a></sup> The FP_CONTRACT pragma in <a href="#7.12">&lt;math.h&gt;</a> provides a
3612  way to disallow contracted expressions. Otherwise, whether and how expressions are
3613  contracted is implementation-defined.<sup><a href="#note78"><b>78)</b></a></sup>
3614 <p><b> Forward references</b>: the FP_CONTRACT pragma (<a href="#7.12.2">7.12.2</a>), copying functions (<a href="#7.21.2">7.21.2</a>).
3615  
3616  
3617  
3618  
3619 <!--page 81 -->
3620
3621 <h6>footnotes</h6>
3622 <p><small><a name="note72" href="#note72">72)</a> A floating-point status flag is not an object and can be set more than once within an expression.
3623 </small>
3624 <p><small><a name="note73" href="#note73">73)</a> This paragraph renders undefined statement expressions such as
3625
3626 <pre>
3627             i = ++i + 1;
3628             a[i++] = i;</pre>
3629     while allowing
3630 <pre>
3631             i = i + 1;
3632             a[i] = i;</pre>
3633  
3634 </small>
3635 <p><small><a name="note74" href="#note74">74)</a> The syntax specifies the precedence of operators in the evaluation of an expression, which is the same
3636  as the order of the major subclauses of this subclause, highest precedence first. Thus, for example, the
3637  expressions allowed as the operands of the binary + operator (<a href="#6.5.6">6.5.6</a>) are those expressions defined in
3638  <a href="#6.5.1">6.5.1</a> through <a href="#6.5.6">6.5.6</a>. The exceptions are cast expressions (<a href="#6.5.4">6.5.4</a>) as operands of unary operators
3639  (<a href="#6.5.3">6.5.3</a>), and an operand contained between any of the following pairs of operators: grouping
3640  parentheses () (<a href="#6.5.1">6.5.1</a>), subscripting brackets [] (<a href="#6.5.2.1">6.5.2.1</a>), function-call parentheses () (<a href="#6.5.2.2">6.5.2.2</a>), and
3641  the conditional operator ?: (<a href="#6.5.15">6.5.15</a>).
3642
3643  Within each major subclause, the operators have the same precedence. Left- or right-associativity is
3644  indicated in each subclause by the syntax for the expressions discussed therein.
3645 </small>
3646 <p><small><a name="note75" href="#note75">75)</a> Allocated objects have no declared type.
3647 </small>
3648 <p><small><a name="note76" href="#note76">76)</a> The intent of this list is to specify those circumstances in which an object may or may not be aliased.
3649 </small>
3650 <p><small><a name="note77" href="#note77">77)</a> A contracted expression might also omit the raising of floating-point exceptions.
3651 </small>
3652 <p><small><a name="note78" href="#note78">78)</a> This license is specifically intended to allow implementations to exploit fast machine instructions that
3653  combine multiple C operators. As contractions potentially undermine predictability, and can even
3654  decrease accuracy for containing expressions, their use needs to be well-defined and clearly
3655  documented.
3656 </small>
3657
3658 <h4><a name="6.5.1" href="#6.5.1">6.5.1 Primary expressions</a></h4>
3659 <h6>Syntax</h6>
3660 <p><!--para 1 -->
3661 <pre>
3662           primary-expression:
3663                  identifier
3664                  constant
3665                  string-literal
3666                  ( expression )</pre>
3667 <h6>Semantics</h6>
3668 <p><!--para 2 -->
3669  An identifier is a primary expression, provided it has been declared as designating an
3670  object (in which case it is an lvalue) or a function (in which case it is a function
3671  designator).<sup><a href="#note79"><b>79)</b></a></sup>
3672 <p><!--para 3 -->
3673  A constant is a primary expression. Its type depends on its form and value, as detailed in
3674  <a href="#6.4.4">6.4.4</a>.
3675 <p><!--para 4 -->
3676  A string literal is a primary expression. It is an lvalue with type as detailed in <a href="#6.4.5">6.4.5</a>.
3677 <p><!--para 5 -->
3678  A parenthesized expression is a primary expression. Its type and value are identical to
3679  those of the unparenthesized expression. It is an lvalue, a function designator, or a void
3680  expression if the unparenthesized expression is, respectively, an lvalue, a function
3681  designator, or a void expression.
3682 <p><b> Forward references</b>: declarations (<a href="#6.7">6.7</a>).
3683
3684 <h6>footnotes</h6>
3685 <p><small><a name="note79" href="#note79">79)</a> Thus, an undeclared identifier is a violation of the syntax.
3686 </small>
3687
3688 <h4><a name="6.5.2" href="#6.5.2">6.5.2 Postfix operators</a></h4>
3689 <h6>Syntax</h6>
3690 <p><!--para 1 -->
3691 <pre>
3692           postfix-expression:
3693                  primary-expression
3694                  postfix-expression [ expression ]
3695                  postfix-expression ( argument-expression-listopt )
3696                  postfix-expression . identifier
3697                  postfix-expression -&gt; identifier
3698                  postfix-expression ++
3699                  postfix-expression --
3700                  ( type-name ) { initializer-list }
3701                  ( type-name ) { initializer-list , }</pre>
3702  
3703  
3704  
3705  
3706 <!--page 82 -->
3707 <pre>
3708           argument-expression-list:
3709                 assignment-expression
3710                 argument-expression-list , assignment-expression</pre>
3711
3712 <h5><a name="6.5.2.1" href="#6.5.2.1">6.5.2.1 Array subscripting</a></h5>
3713 <h6>Constraints</h6>
3714 <p><!--para 1 -->
3715  One of the expressions shall have type ''pointer to object type'', the other expression shall
3716  have integer type, and the result has type ''type''.
3717 <h6>Semantics</h6>
3718 <p><!--para 2 -->
3719  A postfix expression followed by an expression in square brackets [] is a subscripted
3720  designation of an element of an array object. The definition of the subscript operator []
3721  is that E1[E2] is identical to (*((E1)+(E2))). Because of the conversion rules that
3722  apply to the binary + operator, if E1 is an array object (equivalently, a pointer to the
3723  initial element of an array object) and E2 is an integer, E1[E2] designates the E2-th
3724  element of E1 (counting from zero).
3725 <p><!--para 3 -->
3726  Successive subscript operators designate an element of a multidimensional array object.
3727  If E is an n-dimensional array (n &gt;= 2) with dimensions i x j x . . . x k, then E (used as
3728  other than an lvalue) is converted to a pointer to an (n - 1)-dimensional array with
3729  dimensions j x . . . x k. If the unary * operator is applied to this pointer explicitly, or
3730  implicitly as a result of subscripting, the result is the pointed-to (n - 1)-dimensional array,
3731  which itself is converted into a pointer if used as other than an lvalue. It follows from this
3732  that arrays are stored in row-major order (last subscript varies fastest).
3733 <p><!--para 4 -->
3734  EXAMPLE        Consider the array object defined by the declaration
3735 <pre>
3736           int x[3][5];</pre>
3737  Here x is a 3 x 5 array of ints; more precisely, x is an array of three element objects, each of which is an
3738  array of five ints. In the expression x[i], which is equivalent to (*((x)+(i))), x is first converted to
3739  a pointer to the initial array of five ints. Then i is adjusted according to the type of x, which conceptually
3740  entails multiplying i by the size of the object to which the pointer points, namely an array of five int
3741  objects. The results are added and indirection is applied to yield an array of five ints. When used in the
3742  expression x[i][j], that array is in turn converted to a pointer to the first of the ints, so x[i][j]
3743  yields an int.
3744  
3745 <p><b> Forward references</b>: additive operators (<a href="#6.5.6">6.5.6</a>), address and indirection operators
3746  (<a href="#6.5.3.2">6.5.3.2</a>), array declarators (<a href="#6.7.5.2">6.7.5.2</a>).
3747 <!--page 83 -->
3748
3749 <h5><a name="6.5.2.2" href="#6.5.2.2">6.5.2.2 Function calls</a></h5>
3750 <h6>Constraints</h6>
3751 <p><!--para 1 -->
3752  The expression that denotes the called function<sup><a href="#note80"><b>80)</b></a></sup> shall have type pointer to function
3753  returning void or returning an object type other than an array type.
3754 <p><!--para 2 -->
3755  If the expression that denotes the called function has a type that includes a prototype, the
3756  number of arguments shall agree with the number of parameters. Each argument shall
3757  have a type such that its value may be assigned to an object with the unqualified version
3758  of the type of its corresponding parameter.
3759 <h6>Semantics</h6>
3760 <p><!--para 3 -->
3761  A postfix expression followed by parentheses () containing a possibly empty, comma-
3762  separated list of expressions is a function call. The postfix expression denotes the called
3763  function. The list of expressions specifies the arguments to the function.
3764 <p><!--para 4 -->
3765  An argument may be an expression of any object type. In preparing for the call to a
3766  function, the arguments are evaluated, and each parameter is assigned the value of the
3767  corresponding argument.<sup><a href="#note81"><b>81)</b></a></sup>
3768 <p><!--para 5 -->
3769  If the expression that denotes the called function has type pointer to function returning an
3770  object type, the function call expression has the same type as that object type, and has the
3771  value determined as specified in <a href="#6.8.6.4">6.8.6.4</a>. Otherwise, the function call has type void. If
3772  an attempt is made to modify the result of a function call or to access it after the next
3773  sequence point, the behavior is undefined.
3774 <p><!--para 6 -->
3775  If the expression that denotes the called function has a type that does not include a
3776  prototype, the integer promotions are performed on each argument, and arguments that
3777  have type float are promoted to double. These are called the default argument
3778  promotions. If the number of arguments does not equal the number of parameters, the
3779  behavior is undefined. If the function is defined with a type that includes a prototype, and
3780  either the prototype ends with an ellipsis (, ...) or the types of the arguments after
3781  promotion are not compatible with the types of the parameters, the behavior is undefined.
3782  If the function is defined with a type that does not include a prototype, and the types of
3783  the arguments after promotion are not compatible with those of the parameters after
3784  promotion, the behavior is undefined, except for the following cases:
3785  
3786  
3787  
3788  
3789 <!--page 84 -->
3790 <ul>
3791 <li>  one promoted type is a signed integer type, the other promoted type is the
3792  corresponding unsigned integer type, and the value is representable in both types;
3793 <li>  both types are pointers to qualified or unqualified versions of a character type or
3794  void.
3795 </ul>
3796 <p><!--para 7 -->
3797  If the expression that denotes the called function has a type that does include a prototype,
3798  the arguments are implicitly converted, as if by assignment, to the types of the
3799  corresponding parameters, taking the type of each parameter to be the unqualified version
3800  of its declared type. The ellipsis notation in a function prototype declarator causes
3801  argument type conversion to stop after the last declared parameter. The default argument
3802  promotions are performed on trailing arguments.
3803 <p><!--para 8 -->
3804  No other conversions are performed implicitly; in particular, the number and types of
3805  arguments are not compared with those of the parameters in a function definition that
3806  does not include a function prototype declarator.
3807 <p><!--para 9 -->
3808  If the function is defined with a type that is not compatible with the type (of the
3809  expression) pointed to by the expression that denotes the called function, the behavior is
3810  undefined.
3811 <p><!--para 10 -->
3812  The order of evaluation of the function designator, the actual arguments, and
3813  subexpressions within the actual arguments is unspecified, but there is a sequence point
3814  before the actual call.
3815 <p><!--para 11 -->
3816  Recursive function calls shall be permitted, both directly and indirectly through any chain
3817  of other functions.
3818 <p><!--para 12 -->
3819  EXAMPLE       In the function call
3820 <pre>
3821          (*pf[f1()]) (f2(), f3() + f4())</pre>
3822  the functions f1, f2, f3, and f4 may be called in any order. All side effects have to be completed before
3823  the function pointed to by pf[f1()] is called.
3824  
3825 <p><b> Forward references</b>: function declarators (including prototypes) (<a href="#6.7.5.3">6.7.5.3</a>), function
3826  definitions (<a href="#6.9.1">6.9.1</a>), the return statement (<a href="#6.8.6.4">6.8.6.4</a>), simple assignment (<a href="#6.5.16.1">6.5.16.1</a>).
3827
3828 <h6>footnotes</h6>
3829 <p><small><a name="note80" href="#note80">80)</a> Most often, this is the result of converting an identifier that is a function designator.
3830 </small>
3831 <p><small><a name="note81" href="#note81">81)</a> A function may change the values of its parameters, but these changes cannot affect the values of the
3832  arguments. On the other hand, it is possible to pass a pointer to an object, and the function may
3833  change the value of the object pointed to. A parameter declared to have array or function type is
3834  adjusted to have a pointer type as described in <a href="#6.9.1">6.9.1</a>.
3835 </small>
3836
3837 <h5><a name="6.5.2.3" href="#6.5.2.3">6.5.2.3 Structure and union members</a></h5>
3838 <h6>Constraints</h6>
3839 <p><!--para 1 -->
3840  The first operand of the . operator shall have a qualified or unqualified structure or union
3841  type, and the second operand shall name a member of that type.
3842 <p><!--para 2 -->
3843  The first operand of the -&gt; operator shall have type ''pointer to qualified or unqualified
3844  structure'' or ''pointer to qualified or unqualified union'', and the second operand shall
3845  name a member of the type pointed to.
3846 <!--page 85 -->
3847 <h6>Semantics</h6>
3848 <p><!--para 3 -->
3849  A postfix expression followed by the . operator and an identifier designates a member of
3850  a structure or union object. The value is that of the named member,<sup><a href="#note82"><b>82)</b></a></sup> and is an lvalue if
3851  the first expression is an lvalue. If the first expression has qualified type, the result has
3852  the so-qualified version of the type of the designated member.
3853 <p><!--para 4 -->
3854  A postfix expression followed by the -&gt; operator and an identifier designates a member
3855  of a structure or union object. The value is that of the named member of the object to
3856  which the first expression points, and is an lvalue.<sup><a href="#note83"><b>83)</b></a></sup> If the first expression is a pointer to
3857  a qualified type, the result has the so-qualified version of the type of the designated
3858  member.
3859 <p><!--para 5 -->
3860  One special guarantee is made in order to simplify the use of unions: if a union contains
3861  several structures that share a common initial sequence (see below), and if the union
3862  object currently contains one of these structures, it is permitted to inspect the common
3863  initial part of any of them anywhere that a declaration of the complete type of the union is
3864  visible. Two structures share a common initial sequence if corresponding members have
3865  compatible types (and, for bit-fields, the same widths) for a sequence of one or more
3866  initial members.
3867 <p><!--para 6 -->
3868  EXAMPLE 1 If f is a function returning a structure or union, and x is a member of that structure or
3869  union, f().x is a valid postfix expression but is not an lvalue.
3870  
3871 <p><!--para 7 -->
3872  EXAMPLE 2 In:
3873 <pre>
3874           struct s { int i; const int ci; };
3875           struct s s;
3876           const struct s cs;
3877           volatile struct s vs;</pre>
3878  the various members have the types:
3879 <pre>
3880           s.i        int
3881           s.ci       const int
3882           cs.i       const int
3883           cs.ci      const int
3884           vs.i       volatile int
3885           vs.ci      volatile const int</pre>
3886  
3887  
3888  
3889  
3890 <!--page 86 -->
3891 <p><!--para 8 -->
3892  EXAMPLE 3       The following is a valid fragment:
3893 <pre>
3894           union {
3895                   struct {
3896                         int      alltypes;
3897                   } n;
3898                   struct {
3899                         int      type;
3900                         int      intnode;
3901                   } ni;
3902                   struct {
3903                         int      type;
3904                         double doublenode;
3905                   } nf;
3906           } u;
3907           u.nf.type = 1;
3908           u.nf.doublenode = <a href="#3.14">3.14</a>;
3909           /* ... */
3910           if (u.n.alltypes == 1)
3911                   if (sin(u.nf.doublenode) == 0.0)
3912                         /* ... */</pre>
3913  The following is not a valid fragment (because the union type is not visible within function f):
3914 <pre>
3915           struct t1 { int m; };
3916           struct t2 { int m; };
3917           int f(struct t1 *p1, struct t2 *p2)
3918           {
3919                 if (p1-&gt;m &lt; 0)
3920                         p2-&gt;m = -p2-&gt;m;
3921                 return p1-&gt;m;
3922           }
3923           int g()
3924           {
3925                 union {
3926                         struct t1 s1;
3927                         struct t2 s2;
3928                 } u;
3929                 /* ... */
3930                 return f(&amp;u.s1, &amp;u.s2);
3931           }</pre>
3932  
3933 <p><b> Forward references</b>: address and indirection operators (<a href="#6.5.3.2">6.5.3.2</a>), structure and union
3934  specifiers (<a href="#6.7.2.1">6.7.2.1</a>).
3935 <!--page 87 -->
3936
3937 <h6>footnotes</h6>
3938 <p><small><a name="note82" href="#note82">82)</a> If the member used to access the contents of a union object is not the same as the member last used to
3939  store a value in the object, the appropriate part of the object representation of the value is reinterpreted
3940  as an object representation in the new type as described in <a href="#6.2.6">6.2.6</a> (a process sometimes called "type
3941  punning"). This might be a trap representation.
3942 </small>
3943 <p><small><a name="note83" href="#note83">83)</a> If &amp;E is a valid pointer expression (where &amp; is the ''address-of '' operator, which generates a pointer to
3944  its operand), the expression (&amp;E)-&gt;MOS is the same as E.MOS.
3945 </small>
3946
3947 <h5><a name="6.5.2.4" href="#6.5.2.4">6.5.2.4 Postfix increment and decrement operators</a></h5>
3948 <h6>Constraints</h6>
3949 <p><!--para 1 -->
3950  The operand of the postfix increment or decrement operator shall have qualified or
3951  unqualified real or pointer type and shall be a modifiable lvalue.
3952 <h6>Semantics</h6>
3953 <p><!--para 2 -->
3954  The result of the postfix ++ operator is the value of the operand. After the result is
3955  obtained, the value of the operand is incremented. (That is, the value 1 of the appropriate
3956  type is added to it.) See the discussions of additive operators and compound assignment
3957  for information on constraints, types, and conversions and the effects of operations on
3958  pointers. The side effect of updating the stored value of the operand shall occur between
3959  the previous and the next sequence point.
3960 <p><!--para 3 -->
3961  The postfix -- operator is analogous to the postfix ++ operator, except that the value of
3962  the operand is decremented (that is, the value 1 of the appropriate type is subtracted from
3963  it).
3964 <p><b> Forward references</b>: additive operators (<a href="#6.5.6">6.5.6</a>), compound assignment (<a href="#6.5.16.2">6.5.16.2</a>).
3965
3966 <h5><a name="6.5.2.5" href="#6.5.2.5">6.5.2.5 Compound literals</a></h5>
3967 <h6>Constraints</h6>
3968 <p><!--para 1 -->
3969  The type name shall specify an object type or an array of unknown size, but not a variable
3970  length array type.
3971 <p><!--para 2 -->
3972  No initializer shall attempt to provide a value for an object not contained within the entire
3973  unnamed object specified by the compound literal.
3974 <p><!--para 3 -->
3975  If the compound literal occurs outside the body of a function, the initializer list shall
3976  consist of constant expressions.
3977 <h6>Semantics</h6>
3978 <p><!--para 4 -->
3979  A postfix expression that consists of a parenthesized type name followed by a brace-
3980  enclosed list of initializers is a compound literal. It provides an unnamed object whose
3981  value is given by the initializer list.<sup><a href="#note84"><b>84)</b></a></sup>
3982 <p><!--para 5 -->
3983  If the type name specifies an array of unknown size, the size is determined by the
3984  initializer list as specified in <a href="#6.7.8">6.7.8</a>, and the type of the compound literal is that of the
3985  completed array type. Otherwise (when the type name specifies an object type), the type
3986  of the compound literal is that specified by the type name. In either case, the result is an
3987  lvalue.
3988  
3989  
3990 <!--page 88 -->
3991 <p><!--para 6 -->
3992  The value of the compound literal is that of an unnamed object initialized by the
3993  initializer list. If the compound literal occurs outside the body of a function, the object
3994  has static storage duration; otherwise, it has automatic storage duration associated with
3995  the enclosing block.
3996 <p><!--para 7 -->
3997  All the semantic rules and constraints for initializer lists in <a href="#6.7.8">6.7.8</a> are applicable to
3998  compound literals.<sup><a href="#note85"><b>85)</b></a></sup>
3999 <p><!--para 8 -->
4000  String literals, and compound literals with const-qualified types, need not designate
4001  distinct objects.<sup><a href="#note86"><b>86)</b></a></sup>
4002 <p><!--para 9 -->
4003  EXAMPLE 1       The file scope definition
4004 <pre>
4005           int *p = (int []){2, 4};</pre>
4006  initializes p to point to the first element of an array of two ints, the first having the value two and the
4007  second, four. The expressions in this compound literal are required to be constant. The unnamed object
4008  has static storage duration.
4009  
4010 <p><!--para 10 -->
4011  EXAMPLE 2       In contrast, in
4012 <pre>
4013           void f(void)
4014           {
4015                 int *p;
4016                 /*...*/
4017                 p = (int [2]){*p};
4018                 /*...*/
4019           }</pre>
4020  p is assigned the address of the first element of an array of two ints, the first having the value previously
4021  pointed to by p and the second, zero. The expressions in this compound literal need not be constant. The
4022  unnamed object has automatic storage duration.
4023  
4024 <p><!--para 11 -->
4025  EXAMPLE 3 Initializers with designations can be combined with compound literals. Structure objects
4026  created using compound literals can be passed to functions without depending on member order:
4027 <pre>
4028           drawline((struct point){.x=1, .y=1},
4029                 (struct point){.x=3, .y=4});</pre>
4030  Or, if drawline instead expected pointers to struct point:
4031 <pre>
4032           drawline(&amp;(struct point){.x=1, .y=1},
4033                 &amp;(struct point){.x=3, .y=4});</pre>
4034  
4035 <p><!--para 12 -->
4036  EXAMPLE 4       A read-only compound literal can be specified through constructions like:
4037 <pre>
4038           (const float []){1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6}</pre>
4039  
4040  
4041  
4042  
4043 <!--page 89 -->
4044 <p><!--para 13 -->
4045  EXAMPLE 5        The following three expressions have different meanings:
4046 <pre>
4047           "/tmp/fileXXXXXX"
4048           (char []){"/tmp/fileXXXXXX"}
4049           (const char []){"/tmp/fileXXXXXX"}</pre>
4050  The first always has static storage duration and has type array of char, but need not be modifiable; the last
4051  two have automatic storage duration when they occur within the body of a function, and the first of these
4052  two is modifiable.
4053  
4054 <p><!--para 14 -->
4055  EXAMPLE 6 Like string literals, const-qualified compound literals can be placed into read-only memory
4056  and can even be shared. For example,
4057 <pre>
4058           (const char []){"abc"} == "abc"</pre>
4059  might yield 1 if the literals' storage is shared.
4060  
4061 <p><!--para 15 -->
4062  EXAMPLE 7 Since compound literals are unnamed, a single compound literal cannot specify a circularly
4063  linked object. For example, there is no way to write a self-referential compound literal that could be used
4064  as the function argument in place of the named object endless_zeros below:
4065 <pre>
4066           struct int_list { int car; struct int_list *cdr; };
4067           struct int_list endless_zeros = {0, &amp;endless_zeros};
4068           eval(endless_zeros);</pre>
4069  
4070 <p><!--para 16 -->
4071  EXAMPLE 8        Each compound literal creates only a single object in a given scope:
4072 <pre>
4073           struct s { int i; };
4074           int f (void)
4075           {
4076                 struct s *p = 0, *q;
4077                 int j = 0;
4078           again:
4079                 q = p, p = &amp;((struct s){ j++ });
4080                 if (j &lt; 2) goto again;
4081                     return p == q &amp;&amp; q-&gt;i == 1;
4082           }</pre>
4083  The function f() always returns the value 1.
4084 <p><!--para 17 -->
4085  Note that if an iteration statement were used instead of an explicit goto and a labeled statement, the
4086  lifetime of the unnamed object would be the body of the loop only, and on entry next time around p would
4087  have an indeterminate value, which would result in undefined behavior.
4088  
4089 <p><b> Forward references</b>: type names (<a href="#6.7.6">6.7.6</a>), initialization (<a href="#6.7.8">6.7.8</a>).
4090 <!--page 90 -->
4091
4092 <h6>footnotes</h6>
4093 <p><small><a name="note84" href="#note84">84)</a> Note that this differs from a cast expression. For example, a cast specifies a conversion to scalar types
4094  or void only, and the result of a cast expression is not an lvalue.
4095 </small>
4096 <p><small><a name="note85" href="#note85">85)</a> For example, subobjects without explicit initializers are initialized to zero.
4097 </small>
4098 <p><small><a name="note86" href="#note86">86)</a> This allows implementations to share storage for string literals and constant compound literals with
4099  the same or overlapping representations.
4100 </small>
4101
4102 <h4><a name="6.5.3" href="#6.5.3">6.5.3 Unary operators</a></h4>
4103 <h6>Syntax</h6>
4104 <p><!--para 1 -->
4105 <pre>
4106           unary-expression:
4107                  postfix-expression
4108                  ++ unary-expression
4109                  -- unary-expression
4110                  unary-operator cast-expression
4111                  sizeof unary-expression
4112                  sizeof ( type-name )
4113           unary-operator: one of
4114                  &amp; * + - ~             !</pre>
4115
4116 <h5><a name="6.5.3.1" href="#6.5.3.1">6.5.3.1 Prefix increment and decrement operators</a></h5>
4117 <h6>Constraints</h6>
4118 <p><!--para 1 -->
4119  The operand of the prefix increment or decrement operator shall have qualified or
4120  unqualified real or pointer type and shall be a modifiable lvalue.
4121 <h6>Semantics</h6>
4122 <p><!--para 2 -->
4123  The value of the operand of the prefix ++ operator is incremented. The result is the new
4124  value of the operand after incrementation. The expression ++E is equivalent to (E+=1).
4125  See the discussions of additive operators and compound assignment for information on
4126  constraints, types, side effects, and conversions and the effects of operations on pointers.
4127 <p><!--para 3 -->
4128  The prefix -- operator is analogous to the prefix ++ operator, except that the value of the
4129  operand is decremented.
4130 <p><b> Forward references</b>: additive operators (<a href="#6.5.6">6.5.6</a>), compound assignment (<a href="#6.5.16.2">6.5.16.2</a>).
4131
4132 <h5><a name="6.5.3.2" href="#6.5.3.2">6.5.3.2 Address and indirection operators</a></h5>
4133 <h6>Constraints</h6>
4134 <p><!--para 1 -->
4135  The operand of the unary &amp; operator shall be either a function designator, the result of a
4136  [] or unary * operator, or an lvalue that designates an object that is not a bit-field and is
4137  not declared with the register storage-class specifier.
4138 <p><!--para 2 -->
4139  The operand of the unary * operator shall have pointer type.
4140 <h6>Semantics</h6>
4141 <p><!--para 3 -->
4142  The unary &amp; operator yields the address of its operand. If the operand has type ''type'',
4143  the result has type ''pointer to type''. If the operand is the result of a unary * operator,
4144  neither that operator nor the &amp; operator is evaluated and the result is as if both were
4145  omitted, except that the constraints on the operators still apply and the result is not an
4146  lvalue. Similarly, if the operand is the result of a [] operator, neither the &amp; operator nor
4147 <!--page 91 -->
4148  the unary * that is implied by the [] is evaluated and the result is as if the &amp; operator
4149  were removed and the [] operator were changed to a + operator. Otherwise, the result is
4150  a pointer to the object or function designated by its operand.
4151 <p><!--para 4 -->
4152  The unary * operator denotes indirection. If the operand points to a function, the result is
4153  a function designator; if it points to an object, the result is an lvalue designating the
4154  object. If the operand has type ''pointer to type'', the result has type ''type''. If an
4155  invalid value has been assigned to the pointer, the behavior of the unary * operator is
4156  undefined.<sup><a href="#note87"><b>87)</b></a></sup>
4157 <p><b> Forward references</b>: storage-class specifiers (<a href="#6.7.1">6.7.1</a>), structure and union specifiers
4158  (<a href="#6.7.2.1">6.7.2.1</a>).
4159
4160 <h6>footnotes</h6>
4161 <p><small><a name="note87" href="#note87">87)</a> Thus, &amp;*E is equivalent to E (even if E is a null pointer), and &amp;(E1[E2]) to ((E1)+(E2)). It is
4162  always true that if E is a function designator or an lvalue that is a valid operand of the unary &amp;
4163  operator, *&amp;E is a function designator or an lvalue equal to E. If *P is an lvalue and T is the name of
4164  an object pointer type, *(T)P is an lvalue that has a type compatible with that to which T points.
4165   Among the invalid values for dereferencing a pointer by the unary * operator are a null pointer, an
4166   address inappropriately aligned for the type of object pointed to, and the address of an object after the
4167   end of its lifetime.
4168 </small>
4169
4170 <h5><a name="6.5.3.3" href="#6.5.3.3">6.5.3.3 Unary arithmetic operators</a></h5>
4171 <h6>Constraints</h6>
4172 <p><!--para 1 -->
4173  The operand of the unary + or - operator shall have arithmetic type; of the ~ operator,
4174  integer type; of the ! operator, scalar type.
4175 <h6>Semantics</h6>
4176 <p><!--para 2 -->
4177  The result of the unary + operator is the value of its (promoted) operand. The integer
4178  promotions are performed on the operand, and the result has the promoted type.
4179 <p><!--para 3 -->
4180  The result of the unary - operator is the negative of its (promoted) operand. The integer
4181  promotions are performed on the operand, and the result has the promoted type.
4182 <p><!--para 4 -->
4183  The result of the ~ operator is the bitwise complement of its (promoted) operand (that is,
4184  each bit in the result is set if and only if the corresponding bit in the converted operand is
4185  not set). The integer promotions are performed on the operand, and the result has the
4186  promoted type. If the promoted type is an unsigned type, the expression ~E is equivalent
4187  to the maximum value representable in that type minus E.
4188 <p><!--para 5 -->
4189  The result of the logical negation operator ! is 0 if the value of its operand compares
4190  unequal to 0, 1 if the value of its operand compares equal to 0. The result has type int.
4191  The expression !E is equivalent to (0==E).
4192  
4193  
4194  
4195  
4196 <!--page 92 -->
4197
4198 <h5><a name="6.5.3.4" href="#6.5.3.4">6.5.3.4 The sizeof operator</a></h5>
4199 <h6>Constraints</h6>
4200 <p><!--para 1 -->
4201  The sizeof operator shall not be applied to an expression that has function type or an
4202  incomplete type, to the parenthesized name of such a type, or to an expression that
4203  designates a bit-field member.
4204 <h6>Semantics</h6>
4205 <p><!--para 2 -->
4206  The sizeof operator yields the size (in bytes) of its operand, which may be an
4207  expression or the parenthesized name of a type. The size is determined from the type of
4208  the operand. The result is an integer. If the type of the operand is a variable length array
4209  type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an
4210  integer constant.
4211 <p><!--para 3 -->
4212  When applied to an operand that has type char, unsigned char, or signed char,
4213  (or a qualified version thereof) the result is 1. When applied to an operand that has array
4214  type, the result is the total number of bytes in the array.<sup><a href="#note88"><b>88)</b></a></sup> When applied to an operand
4215  that has structure or union type, the result is the total number of bytes in such an object,
4216  including internal and trailing padding.
4217 <p><!--para 4 -->
4218  The value of the result is implementation-defined, and its type (an unsigned integer type)
4219  is size_t, defined in <a href="#7.17">&lt;stddef.h&gt;</a> (and other headers).
4220 <p><!--para 5 -->
4221  EXAMPLE 1 A principal use of the sizeof operator is in communication with routines such as storage
4222  allocators and I/O systems. A storage-allocation function might accept a size (in bytes) of an object to
4223  allocate and return a pointer to void. For example:
4224 <pre>
4225          extern void *alloc(size_t);
4226          double *dp = alloc(sizeof *dp);</pre>
4227  The implementation of the alloc function should ensure that its return value is aligned suitably for
4228  conversion to a pointer to double.
4229  
4230 <p><!--para 6 -->
4231  EXAMPLE 2      Another use of the sizeof operator is to compute the number of elements in an array:
4232 <pre>
4233          sizeof array / sizeof array[0]</pre>
4234  
4235 <p><!--para 7 -->
4236  EXAMPLE 3      In this example, the size of a variable length array is computed and returned from a
4237  function:
4238 <pre>
4239          #include <a href="#7.17">&lt;stddef.h&gt;</a>
4240          size_t fsize3(int n)
4241          {
4242                char b[n+3];                  // variable length array
4243                return sizeof b;              // execution time sizeof
4244          }</pre>
4245  
4246  
4247  
4248 <!--page 93 -->
4249 <pre>
4250           int main()
4251           {
4252                 size_t size;
4253                 size = fsize3(10); // fsize3 returns 13
4254                 return 0;
4255           }</pre>
4256  
4257 <p><b> Forward references</b>: common definitions <a href="#7.17">&lt;stddef.h&gt;</a> (<a href="#7.17">7.17</a>), declarations (<a href="#6.7">6.7</a>),
4258  structure and union specifiers (<a href="#6.7.2.1">6.7.2.1</a>), type names (<a href="#6.7.6">6.7.6</a>), array declarators (<a href="#6.7.5.2">6.7.5.2</a>).
4259
4260 <h6>footnotes</h6>
4261 <p><small><a name="note88" href="#note88">88)</a> When applied to a parameter declared to have array or function type, the sizeof operator yields the
4262  size of the adjusted (pointer) type (see <a href="#6.9.1">6.9.1</a>).
4263 </small>
4264
4265 <h4><a name="6.5.4" href="#6.5.4">6.5.4 Cast operators</a></h4>
4266 <h6>Syntax</h6>
4267 <p><!--para 1 -->
4268 <pre>
4269           cast-expression:
4270                  unary-expression
4271                  ( type-name ) cast-expression</pre>
4272 <h6>Constraints</h6>
4273 <p><!--para 2 -->
4274  Unless the type name specifies a void type, the type name shall specify qualified or
4275  unqualified scalar type and the operand shall have scalar type.
4276 <p><!--para 3 -->
4277  Conversions that involve pointers, other than where permitted by the constraints of
4278  <a href="#6.5.16.1">6.5.16.1</a>, shall be specified by means of an explicit cast.
4279 <h6>Semantics</h6>
4280 <p><!--para 4 -->
4281  Preceding an expression by a parenthesized type name converts the value of the
4282  expression to the named type. This construction is called a cast.<sup><a href="#note89"><b>89)</b></a></sup> A cast that specifies
4283  no conversion has no effect on the type or value of an expression.
4284 <p><!--para 5 -->
4285  If the value of the expression is represented with greater precision or range than required
4286  by the type named by the cast (<a href="#6.3.1.8">6.3.1.8</a>), then the cast specifies a conversion even if the
4287  type of the expression is the same as the named type.
4288 <p><b> Forward references</b>: equality operators (<a href="#6.5.9">6.5.9</a>), function declarators (including
4289  prototypes) (<a href="#6.7.5.3">6.7.5.3</a>), simple assignment (<a href="#6.5.16.1">6.5.16.1</a>), type names (<a href="#6.7.6">6.7.6</a>).
4290  
4291  
4292  
4293  
4294 <!--page 94 -->
4295
4296 <h6>footnotes</h6>
4297 <p><small><a name="note89" href="#note89">89)</a> A cast does not yield an lvalue. Thus, a cast to a qualified type has the same effect as a cast to the
4298  unqualified version of the type.
4299 </small>
4300
4301 <h4><a name="6.5.5" href="#6.5.5">6.5.5 Multiplicative operators</a></h4>
4302 <h6>Syntax</h6>
4303 <p><!--para 1 -->
4304 <pre>
4305           multiplicative-expression:
4306                   cast-expression
4307                   multiplicative-expression * cast-expression
4308                   multiplicative-expression / cast-expression
4309                   multiplicative-expression % cast-expression</pre>
4310 <h6>Constraints</h6>
4311 <p><!--para 2 -->
4312  Each of the operands shall have arithmetic type. The operands of the % operator shall
4313  have integer type.
4314 <h6>Semantics</h6>
4315 <p><!--para 3 -->
4316  The usual arithmetic conversions are performed on the operands.
4317 <p><!--para 4 -->
4318  The result of the binary * operator is the product of the operands.
4319 <p><!--para 5 -->
4320  The result of the / operator is the quotient from the division of the first operand by the
4321  second; the result of the % operator is the remainder. In both operations, if the value of
4322  the second operand is zero, the behavior is undefined.
4323 <p><!--para 6 -->
4324  When integers are divided, the result of the / operator is the algebraic quotient with any
4325  fractional part discarded.<sup><a href="#note90"><b>90)</b></a></sup> If the quotient a/b is representable, the expression
4326  (a/b)*b + a%b shall equal a.
4327
4328 <h6>footnotes</h6>
4329 <p><small><a name="note90" href="#note90">90)</a> This is often called ''truncation toward zero''.
4330 </small>
4331
4332 <h4><a name="6.5.6" href="#6.5.6">6.5.6 Additive operators</a></h4>
4333 <h6>Syntax</h6>
4334 <p><!--para 1 -->
4335 <pre>
4336           additive-expression:
4337                   multiplicative-expression
4338                   additive-expression + multiplicative-expression
4339                   additive-expression - multiplicative-expression</pre>
4340 <h6>Constraints</h6>
4341 <p><!--para 2 -->
4342  For addition, either both operands shall have arithmetic type, or one operand shall be a
4343  pointer to an object type and the other shall have integer type. (Incrementing is
4344  equivalent to adding 1.)
4345 <p><!--para 3 -->
4346  For subtraction, one of the following shall hold:
4347 <ul>
4348 <li>  both operands have arithmetic type;
4349  
4350  
4351  
4352 <!--page 95 -->
4353 <li>  both operands are pointers to qualified or unqualified versions of compatible object
4354  types; or
4355 <li>  the left operand is a pointer to an object type and the right operand has integer type.
4356 </ul>
4357  (Decrementing is equivalent to subtracting 1.)
4358 <h6>Semantics</h6>
4359 <p><!--para 4 -->
4360  If both operands have arithmetic type, the usual arithmetic conversions are performed on
4361  them.
4362 <p><!--para 5 -->
4363  The result of the binary + operator is the sum of the operands.
4364 <p><!--para 6 -->
4365  The result of the binary - operator is the difference resulting from the subtraction of the
4366  second operand from the first.
4367 <p><!--para 7 -->
4368  For the purposes of these operators, a pointer to an object that is not an element of an
4369  array behaves the same as a pointer to the first element of an array of length one with the
4370  type of the object as its element type.
4371 <p><!--para 8 -->
4372  When an expression that has integer type is added to or subtracted from a pointer, the
4373  result has the type of the pointer operand. If the pointer operand points to an element of
4374  an array object, and the array is large enough, the result points to an element offset from
4375  the original element such that the difference of the subscripts of the resulting and original
4376  array elements equals the integer expression. In other words, if the expression P points to
4377  the i-th element of an array object, the expressions (P)+N (equivalently, N+(P)) and
4378  (P)-N (where N has the value n) point to, respectively, the i+n-th and i-n-th elements of
4379  the array object, provided they exist. Moreover, if the expression P points to the last
4380  element of an array object, the expression (P)+1 points one past the last element of the
4381  array object, and if the expression Q points one past the last element of an array object,
4382  the expression (Q)-1 points to the last element of the array object. If both the pointer
4383  operand and the result point to elements of the same array object, or one past the last
4384  element of the array object, the evaluation shall not produce an overflow; otherwise, the
4385  behavior is undefined. If the result points one past the last element of the array object, it
4386  shall not be used as the operand of a unary * operator that is evaluated.
4387 <p><!--para 9 -->
4388  When two pointers are subtracted, both shall point to elements of the same array object,
4389  or one past the last element of the array object; the result is the difference of the
4390  subscripts of the two array elements. The size of the result is implementation-defined,
4391  and its type (a signed integer type) is ptrdiff_t defined in the <a href="#7.17">&lt;stddef.h&gt;</a> header.
4392  If the result is not representable in an object of that type, the behavior is undefined. In
4393  other words, if the expressions P and Q point to, respectively, the i-th and j-th elements of
4394  an array object, the expression (P)-(Q) has the value i-j provided the value fits in an
4395  object of type ptrdiff_t. Moreover, if the expression P points either to an element of
4396  an array object or one past the last element of an array object, and the expression Q points
4397  to the last element of the same array object, the expression ((Q)+1)-(P) has the same
4398 <!--page 96 -->
4399  value as ((Q)-(P))+1 and as -((P)-((Q)+1)), and has the value zero if the
4400  expression P points one past the last element of the array object, even though the
4401  expression (Q)+1 does not point to an element of the array object.<sup><a href="#note91"><b>91)</b></a></sup>
4402 <p><!--para 10 -->
4403  EXAMPLE        Pointer arithmetic is well defined with pointers to variable length array types.
4404 <p><!--para 11 -->
4405 <pre>
4406           {
4407                    int n = 4, m = 3;
4408                    int a[n][m];
4409                    int (*p)[m] = a;            //   p == &amp;a[0]
4410                    p += 1;                     //   p == &amp;a[1]
4411                    (*p)[2] = 99;               //   a[1][2] == 99
4412                    n = p - a;                  //   n == 1
4413           }</pre>
4414  If array a in the above example were declared to be an array of known constant size, and pointer p were
4415  declared to be a pointer to an array of the same known constant size (pointing to a), the results would be
4416  the same.
4417  
4418 <p><b> Forward references</b>: array declarators (<a href="#6.7.5.2">6.7.5.2</a>), common definitions <a href="#7.17">&lt;stddef.h&gt;</a>
4419  (<a href="#7.17">7.17</a>).
4420
4421 <h6>footnotes</h6>
4422 <p><small><a name="note91" href="#note91">91)</a> Another way to approach pointer arithmetic is first to convert the pointer(s) to character pointer(s): In
4423  this scheme the integer expression added to or subtracted from the converted pointer is first multiplied
4424  by the size of the object originally pointed to, and the resulting pointer is converted back to the
4425  original type. For pointer subtraction, the result of the difference between the character pointers is
4426  similarly divided by the size of the object originally pointed to.
4427   When viewed in this way, an implementation need only provide one extra byte (which may overlap
4428   another object in the program) just after the end of the object in order to satisfy the ''one past the last
4429   element'' requirements.
4430 </small>
4431
4432 <h4><a name="6.5.7" href="#6.5.7">6.5.7 Bitwise shift operators</a></h4>
4433 <h6>Syntax</h6>
4434 <p><!--para 1 -->
4435 <pre>
4436           shift-expression:
4437                   additive-expression
4438                   shift-expression &lt;&lt; additive-expression
4439                   shift-expression &gt;&gt; additive-expression</pre>
4440 <h6>Constraints</h6>
4441 <p><!--para 2 -->
4442  Each of the operands shall have integer type.
4443 <h6>Semantics</h6>
4444 <p><!--para 3 -->
4445  The integer promotions are performed on each of the operands. The type of the result is
4446  that of the promoted left operand. If the value of the right operand is negative or is
4447  greater than or equal to the width of the promoted left operand, the behavior is undefined.
4448  
4449  
4450  
4451  
4452 <!--page 97 -->
4453 <p><!--para 4 -->
4454  The result of E1 &lt;&lt; E2 is E1 left-shifted E2 bit positions; vacated bits are filled with
4455  zeros. If E1 has an unsigned type, the value of the result is E1 x 2E2 , reduced modulo
4456  one more than the maximum value representable in the result type. If E1 has a signed
4457  type and nonnegative value, and E1 x 2E2 is representable in the result type, then that is
4458  the resulting value; otherwise, the behavior is undefined.
4459 <p><!--para 5 -->
4460  The result of E1 &gt;&gt; E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type
4461  or if E1 has a signed type and a nonnegative value, the value of the result is the integral
4462  part of the quotient of E1 / 2E2 . If E1 has a signed type and a negative value, the
4463  resulting value is implementation-defined.
4464
4465 <h4><a name="6.5.8" href="#6.5.8">6.5.8 Relational operators</a></h4>
4466 <h6>Syntax</h6>
4467 <p><!--para 1 -->
4468 <pre>
4469           relational-expression:
4470                   shift-expression
4471                   relational-expression   &lt;    shift-expression
4472                   relational-expression   &gt;    shift-expression
4473                   relational-expression   &lt;=   shift-expression
4474                   relational-expression   &gt;=   shift-expression</pre>
4475 <h6>Constraints</h6>
4476 <p><!--para 2 -->
4477  One of the following shall hold:
4478 <ul>
4479 <li>  both operands have real type;
4480 <li>  both operands are pointers to qualified or unqualified versions of compatible object
4481  types; or
4482 <li>  both operands are pointers to qualified or unqualified versions of compatible
4483  incomplete types.
4484 </ul>
4485 <h6>Semantics</h6>
4486 <p><!--para 3 -->
4487  If both of the operands have arithmetic type, the usual arithmetic conversions are
4488  performed.
4489 <p><!--para 4 -->
4490  For the purposes of these operators, a pointer to an object that is not an element of an
4491  array behaves the same as a pointer to the first element of an array of length one with the
4492  type of the object as its element type.
4493 <p><!--para 5 -->
4494  When two pointers are compared, the result depends on the relative locations in the
4495  address space of the objects pointed to. If two pointers to object or incomplete types both
4496  point to the same object, or both point one past the last element of the same array object,
4497  they compare equal. If the objects pointed to are members of the same aggregate object,
4498  pointers to structure members declared later compare greater than pointers to members
4499  declared earlier in the structure, and pointers to array elements with larger subscript
4500 <!--page 98 -->
4501  values compare greater than pointers to elements of the same array with lower subscript
4502  values. All pointers to members of the same union object compare equal. If the
4503  expression P points to an element of an array object and the expression Q points to the
4504  last element of the same array object, the pointer expression Q+1 compares greater than
4505  P. In all other cases, the behavior is undefined.
4506 <p><!--para 6 -->
4507  Each of the operators &lt; (less than), &gt; (greater than), &lt;= (less than or equal to), and &gt;=
4508  (greater than or equal to) shall yield 1 if the specified relation is true and 0 if it is false.<sup><a href="#note92"><b>92)</b></a></sup>
4509  The result has type int.
4510
4511 <h6>footnotes</h6>
4512 <p><small><a name="note92" href="#note92">92)</a> The expression a&lt;b&lt;c is not interpreted as in ordinary mathematics. As the syntax indicates, it
4513  means (a&lt;b)&lt;c; in other words, ''if a is less than b, compare 1 to c; otherwise, compare 0 to c''.
4514 </small>
4515
4516 <h4><a name="6.5.9" href="#6.5.9">6.5.9 Equality operators</a></h4>
4517 <h6>Syntax</h6>
4518 <p><!--para 1 -->
4519 <pre>
4520           equality-expression:
4521                   relational-expression
4522                  equality-expression == relational-expression
4523                  equality-expression != relational-expression</pre>
4524 <h6>Constraints</h6>
4525 <p><!--para 2 -->
4526  One of the following shall hold:
4527 <ul>
4528 <li>  both operands have arithmetic type;
4529 <li>  both operands are pointers to qualified or unqualified versions of compatible types;
4530 <li>  one operand is a pointer to an object or incomplete type and the other is a pointer to a
4531  qualified or unqualified version of void; or
4532 <li>  one operand is a pointer and the other is a null pointer constant.
4533 </ul>
4534 <h6>Semantics</h6>
4535 <p><!--para 3 -->
4536  The == (equal to) and != (not equal to) operators are analogous to the relational
4537  operators except for their lower precedence.<sup><a href="#note93"><b>93)</b></a></sup> Each of the operators yields 1 if the
4538  specified relation is true and 0 if it is false. The result has type int. For any pair of
4539  operands, exactly one of the relations is true.
4540 <p><!--para 4 -->
4541  If both of the operands have arithmetic type, the usual arithmetic conversions are
4542  performed. Values of complex types are equal if and only if both their real parts are equal
4543  and also their imaginary parts are equal. Any two values of arithmetic types from
4544  different type domains are equal if and only if the results of their conversions to the
4545  (complex) result type determined by the usual arithmetic conversions are equal.
4546  
4547  
4548 <!--page 99 -->
4549 <p><!--para 5 -->
4550  Otherwise, at least one operand is a pointer. If one operand is a pointer and the other is a
4551  null pointer constant, the null pointer constant is converted to the type of the pointer. If
4552  one operand is a pointer to an object or incomplete type and the other is a pointer to a
4553  qualified or unqualified version of void, the former is converted to the type of the latter.
4554 <p><!--para 6 -->
4555  Two pointers compare equal if and only if both are null pointers, both are pointers to the
4556  same object (including a pointer to an object and a subobject at its beginning) or function,
4557  both are pointers to one past the last element of the same array object, or one is a pointer
4558  to one past the end of one array object and the other is a pointer to the start of a different
4559  array object that happens to immediately follow the first array object in the address
4560  space.<sup><a href="#note94"><b>94)</b></a></sup>
4561 <p><!--para 7 -->
4562  For the purposes of these operators, a pointer to an object that is not an element of an
4563  array behaves the same as a pointer to the first element of an array of length one with the
4564  type of the object as its element type.
4565
4566 <h6>footnotes</h6>
4567 <p><small><a name="note93" href="#note93">93)</a> Because of the precedences, a&lt;b == c&lt;d is 1 whenever a&lt;b and c&lt;d have the same truth-value.
4568 </small>
4569 <p><small><a name="note94" href="#note94">94)</a> Two objects may be adjacent in memory because they are adjacent elements of a larger array or
4570  adjacent members of a structure with no padding between them, or because the implementation chose
4571  to place them so, even though they are unrelated. If prior invalid pointer operations (such as accesses
4572  outside array bounds) produced undefined behavior, subsequent comparisons also produce undefined
4573  behavior.
4574 </small>
4575
4576 <h4><a name="6.5.10" href="#6.5.10">6.5.10 Bitwise AND operator</a></h4>
4577 <h6>Syntax</h6>
4578 <p><!--para 1 -->
4579 <pre>
4580           AND-expression:
4581                 equality-expression
4582                 AND-expression &amp; equality-expression</pre>
4583 <h6>Constraints</h6>
4584 <p><!--para 2 -->
4585  Each of the operands shall have integer type.
4586 <h6>Semantics</h6>
4587 <p><!--para 3 -->
4588  The usual arithmetic conversions are performed on the operands.
4589 <p><!--para 4 -->
4590  The result of the binary &amp; operator is the bitwise AND of the operands (that is, each bit in
4591  the result is set if and only if each of the corresponding bits in the converted operands is
4592  set).
4593  
4594  
4595  
4596  
4597 <!--page 100 -->
4598
4599 <h4><a name="6.5.11" href="#6.5.11">6.5.11 Bitwise exclusive OR operator</a></h4>
4600 <h6>Syntax</h6>
4601 <p><!--para 1 -->
4602 <pre>
4603           exclusive-OR-expression:
4604                   AND-expression
4605                   exclusive-OR-expression ^ AND-expression</pre>
4606 <h6>Constraints</h6>
4607 <p><!--para 2 -->
4608  Each of the operands shall have integer type.
4609 <h6>Semantics</h6>
4610 <p><!--para 3 -->
4611  The usual arithmetic conversions are performed on the operands.
4612 <p><!--para 4 -->
4613  The result of the ^ operator is the bitwise exclusive OR of the operands (that is, each bit
4614  in the result is set if and only if exactly one of the corresponding bits in the converted
4615  operands is set).
4616
4617 <h4><a name="6.5.12" href="#6.5.12">6.5.12 Bitwise inclusive OR operator</a></h4>
4618 <h6>Syntax</h6>
4619 <p><!--para 1 -->
4620 <pre>
4621           inclusive-OR-expression:
4622                   exclusive-OR-expression
4623                   inclusive-OR-expression | exclusive-OR-expression</pre>
4624 <h6>Constraints</h6>
4625 <p><!--para 2 -->
4626  Each of the operands shall have integer type.
4627 <h6>Semantics</h6>
4628 <p><!--para 3 -->
4629  The usual arithmetic conversions are performed on the operands.
4630 <p><!--para 4 -->
4631  The result of the | operator is the bitwise inclusive OR of the operands (that is, each bit in
4632  the result is set if and only if at least one of the corresponding bits in the converted
4633  operands is set).
4634 <!--page 101 -->
4635
4636 <h4><a name="6.5.13" href="#6.5.13">6.5.13 Logical AND operator</a></h4>
4637 <h6>Syntax</h6>
4638 <p><!--para 1 -->
4639 <pre>
4640            logical-AND-expression:
4641                    inclusive-OR-expression
4642                    logical-AND-expression &amp;&amp; inclusive-OR-expression</pre>
4643 <h6>Constraints</h6>
4644 <p><!--para 2 -->
4645  Each of the operands shall have scalar type.
4646 <h6>Semantics</h6>
4647 <p><!--para 3 -->
4648  The &amp;&amp; operator shall yield 1 if both of its operands compare unequal to 0; otherwise, it
4649  yields 0. The result has type int.
4650 <p><!--para 4 -->
4651  Unlike the bitwise binary &amp; operator, the &amp;&amp; operator guarantees left-to-right evaluation;
4652  there is a sequence point after the evaluation of the first operand. If the first operand
4653  compares equal to 0, the second operand is not evaluated.
4654
4655 <h4><a name="6.5.14" href="#6.5.14">6.5.14 Logical OR operator</a></h4>
4656 <h6>Syntax</h6>
4657 <p><!--para 1 -->
4658 <pre>
4659            logical-OR-expression:
4660                    logical-AND-expression
4661                    logical-OR-expression || logical-AND-expression</pre>
4662 <h6>Constraints</h6>
4663 <p><!--para 2 -->
4664  Each of the operands shall have scalar type.
4665 <h6>Semantics</h6>
4666 <p><!--para 3 -->
4667  The || operator shall yield 1 if either of its operands compare unequal to 0; otherwise, it
4668  yields 0. The result has type int.
4669 <p><!--para 4 -->
4670  Unlike the bitwise | operator, the || operator guarantees left-to-right evaluation; there is
4671  a sequence point after the evaluation of the first operand. If the first operand compares
4672  unequal to 0, the second operand is not evaluated.
4673 <!--page 102 -->
4674
4675 <h4><a name="6.5.15" href="#6.5.15">6.5.15 Conditional operator</a></h4>
4676 <h6>Syntax</h6>
4677 <p><!--para 1 -->
4678 <pre>
4679           conditional-expression:
4680                  logical-OR-expression
4681                  logical-OR-expression ? expression : conditional-expression</pre>
4682 <h6>Constraints</h6>
4683 <p><!--para 2 -->
4684  The first operand shall have scalar type.
4685 <p><!--para 3 -->
4686  One of the following shall hold for the second and third operands:
4687 <ul>
4688 <li>  both operands have arithmetic type;
4689 <li>  both operands have the same structure or union type;
4690 <li>  both operands have void type;
4691 <li>  both operands are pointers to qualified or unqualified versions of compatible types;
4692 <li>  one operand is a pointer and the other is a null pointer constant; or
4693 <li>  one operand is a pointer to an object or incomplete type and the other is a pointer to a
4694  qualified or unqualified version of void.
4695 </ul>
4696 <h6>Semantics</h6>
4697 <p><!--para 4 -->
4698  The first operand is evaluated; there is a sequence point after its evaluation. The second
4699  operand is evaluated only if the first compares unequal to 0; the third operand is evaluated
4700  only if the first compares equal to 0; the result is the value of the second or third operand
4701  (whichever is evaluated), converted to the type described below.<sup><a href="#note95"><b>95)</b></a></sup> If an attempt is made
4702  to modify the result of a conditional operator or to access it after the next sequence point,
4703  the behavior is undefined.
4704 <p><!--para 5 -->
4705  If both the second and third operands have arithmetic type, the result type that would be
4706  determined by the usual arithmetic conversions, were they applied to those two operands,
4707  is the type of the result. If both the operands have structure or union type, the result has
4708  that type. If both operands have void type, the result has void type.
4709 <p><!--para 6 -->
4710  If both the second and third operands are pointers or one is a null pointer constant and the
4711  other is a pointer, the result type is a pointer to a type qualified with all the type qualifiers
4712  of the types pointed-to by both operands. Furthermore, if both operands are pointers to
4713  compatible types or to differently qualified versions of compatible types, the result type is
4714  a pointer to an appropriately qualified version of the composite type; if one operand is a
4715  null pointer constant, the result has the type of the other operand; otherwise, one operand
4716  is a pointer to void or a qualified version of void, in which case the result type is a
4717  
4718 <!--page 103 -->
4719  pointer to an appropriately qualified version of void.
4720 <p><!--para 7 -->
4721  EXAMPLE The common type that results when the second and third operands are pointers is determined
4722  in two independent stages. The appropriate qualifiers, for example, do not depend on whether the two
4723  pointers have compatible types.
4724 <p><!--para 8 -->
4725  Given the declarations
4726 <pre>
4727           const void *c_vp;
4728           void *vp;
4729           const int *c_ip;
4730           volatile int *v_ip;
4731           int *ip;
4732           const char *c_cp;</pre>
4733  the third column in the following table is the common type that is the result of a conditional expression in
4734  which the first two columns are the second and third operands (in either order):
4735 <pre>
4736           c_vp     c_ip      const void *
4737           v_ip     0         volatile int *
4738           c_ip     v_ip      const volatile int *
4739           vp       c_cp      const void *
4740           ip       c_ip      const int *
4741           vp       ip        void *</pre>
4742  
4743
4744 <h6>footnotes</h6>
4745 <p><small><a name="note95" href="#note95">95)</a> A conditional expression does not yield an lvalue.
4746 </small>
4747
4748 <h4><a name="6.5.16" href="#6.5.16">6.5.16 Assignment operators</a></h4>
4749 <h6>Syntax</h6>
4750 <p><!--para 1 -->
4751 <pre>
4752           assignment-expression:
4753                  conditional-expression
4754                  unary-expression assignment-operator assignment-expression
4755           assignment-operator: one of
4756                  = *= /= %= +=                       -=     &lt;&lt;=      &gt;&gt;=      &amp;=     ^=     |=</pre>
4757 <h6>Constraints</h6>
4758 <p><!--para 2 -->
4759  An assignment operator shall have a modifiable lvalue as its left operand.
4760 <h6>Semantics</h6>
4761 <p><!--para 3 -->
4762  An assignment operator stores a value in the object designated by the left operand. An
4763  assignment expression has the value of the left operand after the assignment, but is not an
4764  lvalue. The type of an assignment expression is the type of the left operand unless the
4765  left operand has qualified type, in which case it is the unqualified version of the type of
4766  the left operand. The side effect of updating the stored value of the left operand shall
4767  occur between the previous and the next sequence point.
4768 <p><!--para 4 -->
4769  The order of evaluation of the operands is unspecified. If an attempt is made to modify
4770  the result of an assignment operator or to access it after the next sequence point, the
4771  behavior is undefined.
4772 <!--page 104 -->
4773
4774 <h5><a name="6.5.16.1" href="#6.5.16.1">6.5.16.1 Simple assignment</a></h5>
4775 <h6>Constraints</h6>
4776 <p><!--para 1 -->
4777  One of the following shall hold:<sup><a href="#note96"><b>96)</b></a></sup>
4778 <ul>
4779 <li>  the left operand has qualified or unqualified arithmetic type and the right has
4780  arithmetic type;
4781 <li>  the left operand has a qualified or unqualified version of a structure or union type
4782  compatible with the type of the right;
4783 <li>  both operands are pointers to qualified or unqualified versions of compatible types,
4784  and the type pointed to by the left has all the qualifiers of the type pointed to by the
4785  right;
4786 <li>  one operand is a pointer to an object or incomplete type and the other is a pointer to a
4787  qualified or unqualified version of void, and the type pointed to by the left has all
4788  the qualifiers of the type pointed to by the right;
4789 <li>  the left operand is a pointer and the right is a null pointer constant; or
4790 <li>  the left operand has type _Bool and the right is a pointer.
4791 </ul>
4792 <h6>Semantics</h6>
4793 <p><!--para 2 -->
4794  In simple assignment (=), the value of the right operand is converted to the type of the
4795  assignment expression and replaces the value stored in the object designated by the left
4796  operand.
4797 <p><!--para 3 -->
4798  If the value being stored in an object is read from another object that overlaps in any way
4799  the storage of the first object, then the overlap shall be exact and the two objects shall
4800  have qualified or unqualified versions of a compatible type; otherwise, the behavior is
4801  undefined.
4802 <p><!--para 4 -->
4803  EXAMPLE 1       In the program fragment
4804 <pre>
4805          int f(void);
4806          char c;
4807          /* ... */
4808          if ((c = f()) == -1)
4809                  /* ... */</pre>
4810  the int value returned by the function may be truncated when stored in the char, and then converted back
4811  to int width prior to the comparison. In an implementation in which ''plain'' char has the same range of
4812  values as unsigned char (and char is narrower than int), the result of the conversion cannot be
4813  
4814  
4815  
4816 <!--page 105 -->
4817  negative, so the operands of the comparison can never compare equal. Therefore, for full portability, the
4818  variable c should be declared as int.
4819  
4820 <p><!--para 5 -->
4821  EXAMPLE 2       In the fragment:
4822 <pre>
4823          char c;
4824          int i;
4825          long l;
4826          l = (c = i);</pre>
4827  the value of i is converted to the type of the assignment expression c = i, that is, char type. The value
4828  of the expression enclosed in parentheses is then converted to the type of the outer assignment expression,
4829  that is, long int type.
4830  
4831 <p><!--para 6 -->
4832  EXAMPLE 3       Consider the fragment:
4833 <pre>
4834          const char **cpp;
4835          char *p;
4836          const char c = 'A';
4837          cpp = &amp;p;                  // constraint violation
4838          *cpp = &amp;c;                 // valid
4839          *p = 0;                    // valid</pre>
4840  The first assignment is unsafe because it would allow the following valid code to attempt to change the
4841  value of the const object c.
4842  
4843
4844 <h6>footnotes</h6>
4845 <p><small><a name="note96" href="#note96">96)</a> The asymmetric appearance of these constraints with respect to type qualifiers is due to the conversion
4846  (specified in <a href="#6.3.2.1">6.3.2.1</a>) that changes lvalues to ''the value of the expression'' and thus removes any type
4847  qualifiers that were applied to the type category of the expression (for example, it removes const but
4848  not volatile from the type int volatile * const).
4849 </small>
4850
4851 <h5><a name="6.5.16.2" href="#6.5.16.2">6.5.16.2 Compound assignment</a></h5>
4852 <h6>Constraints</h6>
4853 <p><!--para 1 -->
4854  For the operators += and -= only, either the left operand shall be a pointer to an object
4855  type and the right shall have integer type, or the left operand shall have qualified or
4856  unqualified arithmetic type and the right shall have arithmetic type.
4857 <p><!--para 2 -->
4858  For the other operators, each operand shall have arithmetic type consistent with those
4859  allowed by the corresponding binary operator.
4860 <h6>Semantics</h6>
4861 <p><!--para 3 -->
4862  A compound assignment of the form E1 op = E2 differs from the simple assignment
4863  expression E1 = E1 op (E2) only in that the lvalue E1 is evaluated only once.
4864 <!--page 106 -->
4865
4866 <h4><a name="6.5.17" href="#6.5.17">6.5.17 Comma operator</a></h4>
4867 <h6>Syntax</h6>
4868 <p><!--para 1 -->
4869 <pre>
4870           expression:
4871                  assignment-expression
4872                  expression , assignment-expression</pre>
4873 <h6>Semantics</h6>
4874 <p><!--para 2 -->
4875  The left operand of a comma operator is evaluated as a void expression; there is a
4876  sequence point after its evaluation. Then the right operand is evaluated; the result has its
4877  type and value.<sup><a href="#note97"><b>97)</b></a></sup> If an attempt is made to modify the result of a comma operator or to
4878  access it after the next sequence point, the behavior is undefined.
4879 <p><!--para 3 -->
4880  EXAMPLE As indicated by the syntax, the comma operator (as described in this subclause) cannot
4881  appear in contexts where a comma is used to separate items in a list (such as arguments to functions or lists
4882  of initializers). On the other hand, it can be used within a parenthesized expression or within the second
4883  expression of a conditional operator in such contexts. In the function call
4884 <pre>
4885           f(a, (t=3, t+2), c)</pre>
4886  the function has three arguments, the second of which has the value 5.
4887  
4888 <p><b> Forward references</b>: initialization (<a href="#6.7.8">6.7.8</a>).
4889  
4890  
4891  
4892  
4893 <!--page 107 -->
4894
4895 <h6>footnotes</h6>
4896 <p><small><a name="note97" href="#note97">97)</a> A comma operator does not yield an lvalue.
4897 </small>
4898
4899 <h3><a name="6.6" href="#6.6">6.6 Constant expressions</a></h3>
4900 <h6>Syntax</h6>
4901 <p><!--para 1 -->
4902 <pre>
4903           constant-expression:
4904                  conditional-expression</pre>
4905 <h6>Description</h6>
4906 <p><!--para 2 -->
4907  A constant expression can be evaluated during translation rather than runtime, and
4908  accordingly may be used in any place that a constant may be.
4909 <h6>Constraints</h6>
4910 <p><!--para 3 -->
4911  Constant expressions shall not contain assignment, increment, decrement, function-call,
4912  or comma operators, except when they are contained within a subexpression that is not
4913  evaluated.<sup><a href="#note98"><b>98)</b></a></sup>
4914 <p><!--para 4 -->
4915  Each constant expression shall evaluate to a constant that is in the range of representable
4916  values for its type.
4917 <h6>Semantics</h6>
4918 <p><!--para 5 -->
4919  An expression that evaluates to a constant is required in several contexts. If a floating
4920  expression is evaluated in the translation environment, the arithmetic precision and range
4921  shall be at least as great as if the expression were being evaluated in the execution
4922  environment.
4923 <p><!--para 6 -->
4924  An integer constant expression<sup><a href="#note99"><b>99)</b></a></sup> shall have integer type and shall only have operands
4925  that are integer constants, enumeration constants, character constants, sizeof
4926  expressions whose results are integer constants, and floating constants that are the
4927  immediate operands of casts. Cast operators in an integer constant expression shall only
4928  convert arithmetic types to integer types, except as part of an operand to the sizeof
4929  operator.
4930 <p><!--para 7 -->
4931  More latitude is permitted for constant expressions in initializers. Such a constant
4932  expression shall be, or evaluate to, one of the following:
4933 <ul>
4934 <li>  an arithmetic constant expression,
4935 <li>  a null pointer constant,
4936  
4937  
4938  
4939  
4940 <!--page 108 -->
4941 <li>  an address constant, or
4942 <li>  an address constant for an object type plus or minus an integer constant expression.
4943 </ul>
4944 <p><!--para 8 -->
4945  An arithmetic constant expression shall have arithmetic type and shall only have
4946  operands that are integer constants, floating constants, enumeration constants, character
4947  constants, and sizeof expressions. Cast operators in an arithmetic constant expression
4948  shall only convert arithmetic types to arithmetic types, except as part of an operand to a
4949  sizeof operator whose result is an integer constant.
4950 <p><!--para 9 -->
4951  An address constant is a null pointer, a pointer to an lvalue designating an object of static
4952  storage duration, or a pointer to a function designator; it shall be created explicitly using
4953  the unary &amp; operator or an integer constant cast to pointer type, or implicitly by the use of
4954  an expression of array or function type. The array-subscript [] and member-access .
4955  and -&gt; operators, the address &amp; and indirection * unary operators, and pointer casts may
4956  be used in the creation of an address constant, but the value of an object shall not be
4957  accessed by use of these operators.
4958 <p><!--para 10 -->
4959  An implementation may accept other forms of constant expressions.
4960 <p><!--para 11 -->
4961  The semantic rules for the evaluation of a constant expression are the same as for
4962  nonconstant expressions.<sup><a href="#note100"><b>100)</b></a></sup>
4963 <p><b> Forward references</b>: array declarators (<a href="#6.7.5.2">6.7.5.2</a>), initialization (<a href="#6.7.8">6.7.8</a>).
4964  
4965  
4966  
4967  
4968 <!--page 109 -->
4969
4970 <h6>footnotes</h6>
4971 <p><small><a name="note98" href="#note98">98)</a> The operand of a sizeof operator is usually not evaluated (<a href="#6.5.3.4">6.5.3.4</a>).
4972 </small>
4973 <p><small><a name="note99" href="#note99">99)</a> An integer constant expression is used to specify the size of a bit-field member of a structure, the
4974  value of an enumeration constant, the size of an array, or the value of a case constant. Further
4975  constraints that apply to the integer constant expressions used in conditional-inclusion preprocessing
4976  directives are discussed in <a href="#6.10.1">6.10.1</a>.
4977 </small>
4978 <p><small><a name="note100" href="#note100">100)</a> Thus, in the following initialization,
4979
4980 <pre>
4981           static int i = 2 || 1 / 0;</pre>
4982  the expression is a valid integer constant expression with value one.
4983 </small>
4984
4985 <h3><a name="6.7" href="#6.7">6.7 Declarations</a></h3>
4986 <h6>Syntax</h6>
4987 <p><!--para 1 -->
4988 <pre>
4989           declaration:
4990                  declaration-specifiers init-declarator-list<sub>opt</sub> ;
4991           declaration-specifiers:
4992                  storage-class-specifier declaration-specifiers<sub>opt</sub>
4993                  type-specifier declaration-specifiers<sub>opt</sub>
4994                  type-qualifier declaration-specifiers<sub>opt</sub>
4995                  function-specifier declaration-specifiers<sub>opt</sub>
4996           init-declarator-list:
4997                   init-declarator
4998                   init-declarator-list , init-declarator
4999           init-declarator:
5000                   declarator
5001                   declarator = initializer</pre>
5002 <h6>Constraints</h6>
5003 <p><!--para 2 -->
5004  A declaration shall declare at least a declarator (other than the parameters of a function or
5005  the members of a structure or union), a tag, or the members of an enumeration.
5006 <p><!--para 3 -->
5007  If an identifier has no linkage, there shall be no more than one declaration of the identifier
5008  (in a declarator or type specifier) with the same scope and in the same name space, except
5009  for tags as specified in <a href="#6.7.2.3">6.7.2.3</a>.
5010 <p><!--para 4 -->
5011  All declarations in the same scope that refer to the same object or function shall specify
5012  compatible types.
5013 <h6>Semantics</h6>
5014 <p><!--para 5 -->
5015  A declaration specifies the interpretation and attributes of a set of identifiers. A definition
5016  of an identifier is a declaration for that identifier that:
5017 <ul>
5018 <li>  for an object, causes storage to be reserved for that object;
5019 <li>  for a function, includes the function body;<sup><a href="#note101"><b>101)</b></a></sup>
5020 <li>  for an enumeration constant or typedef name, is the (only) declaration of the
5021  identifier.
5022 </ul>
5023 <p><!--para 6 -->
5024  The declaration specifiers consist of a sequence of specifiers that indicate the linkage,
5025  storage duration, and part of the type of the entities that the declarators denote. The init-
5026  declarator-list is a comma-separated sequence of declarators, each of which may have
5027  
5028 <!--page 110 -->
5029  additional type information, or an initializer, or both. The declarators contain the
5030  identifiers (if any) being declared.
5031 <p><!--para 7 -->
5032  If an identifier for an object is declared with no linkage, the type for the object shall be
5033  complete by the end of its declarator, or by the end of its init-declarator if it has an
5034  initializer; in the case of function parameters (including in prototypes), it is the adjusted
5035  type (see <a href="#6.7.5.3">6.7.5.3</a>) that is required to be complete.
5036 <p><b> Forward references</b>: declarators (<a href="#6.7.5">6.7.5</a>), enumeration specifiers (<a href="#6.7.2.2">6.7.2.2</a>), initialization
5037  (<a href="#6.7.8">6.7.8</a>).
5038
5039 <h6>footnotes</h6>
5040 <p><small><a name="note101" href="#note101">101)</a> Function definitions have a different syntax, described in <a href="#6.9.1">6.9.1</a>.
5041 </small>
5042
5043 <h4><a name="6.7.1" href="#6.7.1">6.7.1 Storage-class specifiers</a></h4>
5044 <h6>Syntax</h6>
5045 <p><!--para 1 -->
5046 <pre>
5047           storage-class-specifier:
5048                  typedef
5049                  extern
5050                  static
5051                  auto
5052                  register</pre>
5053 <h6>Constraints</h6>
5054 <p><!--para 2 -->
5055  At most, one storage-class specifier may be given in the declaration specifiers in a
5056  declaration.<sup><a href="#note102"><b>102)</b></a></sup>
5057 <h6>Semantics</h6>
5058 <p><!--para 3 -->
5059  The typedef specifier is called a ''storage-class specifier'' for syntactic convenience
5060  only; it is discussed in <a href="#6.7.7">6.7.7</a>. The meanings of the various linkages and storage durations
5061  were discussed in <a href="#6.2.2">6.2.2</a> and <a href="#6.2.4">6.2.4</a>.
5062 <p><!--para 4 -->
5063  A declaration of an identifier for an object with storage-class specifier register
5064  suggests that access to the object be as fast as possible. The extent to which such
5065  suggestions are effective is implementation-defined.<sup><a href="#note103"><b>103)</b></a></sup>
5066 <p><!--para 5 -->
5067  The declaration of an identifier for a function that has block scope shall have no explicit
5068  storage-class specifier other than extern.
5069  
5070  
5071  
5072 <!--page 111 -->
5073 <p><!--para 6 -->
5074  If an aggregate or union object is declared with a storage-class specifier other than
5075  typedef, the properties resulting from the storage-class specifier, except with respect to
5076  linkage, also apply to the members of the object, and so on recursively for any aggregate
5077  or union member objects.
5078 <p><b> Forward references</b>: type definitions (<a href="#6.7.7">6.7.7</a>).
5079
5080 <h6>footnotes</h6>
5081 <p><small><a name="note102" href="#note102">102)</a> See ''future language directions'' (<a href="#6.11.5">6.11.5</a>).
5082 </small>
5083 <p><small><a name="note103" href="#note103">103)</a> The implementation may treat any register declaration simply as an auto declaration. However,
5084  whether or not addressable storage is actually used, the address of any part of an object declared with
5085  storage-class specifier register cannot be computed, either explicitly (by use of the unary &amp;
5086  operator as discussed in <a href="#6.5.3.2">6.5.3.2</a>) or implicitly (by converting an array name to a pointer as discussed in
5087  <a href="#6.3.2.1">6.3.2.1</a>). Thus, the only operator that can be applied to an array declared with storage-class specifier
5088  register is sizeof.
5089 </small>
5090
5091 <h4><a name="6.7.2" href="#6.7.2">6.7.2 Type specifiers</a></h4>
5092 <h6>Syntax</h6>
5093 <p><!--para 1 -->
5094 <pre>
5095           type-specifier:
5096                  void
5097                  char
5098                  short
5099                  int
5100                  long
5101                  float
5102                  double
5103                  signed
5104                  unsigned
5105                  _Bool
5106                  _Complex
5107                  struct-or-union-specifier                                                      *
5108                  enum-specifier
5109                  typedef-name</pre>
5110 <h6>Constraints</h6>
5111 <p><!--para 2 -->
5112  At least one type specifier shall be given in the declaration specifiers in each declaration,
5113  and in the specifier-qualifier list in each struct declaration and type name. Each list of
5114  type specifiers shall be one of the following sets (delimited by commas, when there is
5115  more than one set on a line); the type specifiers may occur in any order, possibly
5116  intermixed with the other declaration specifiers.
5117 <ul>
5118 <li>  void
5119 <li>  char
5120 <li>  signed char
5121 <li>  unsigned char
5122 <li>  short, signed short, short int, or signed short int
5123 <li>  unsigned short, or unsigned short int
5124 <li>  int, signed, or signed int
5125 <!--page 112 -->
5126 <li>  unsigned, or unsigned int
5127 <li>  long, signed long, long int, or signed long int
5128 <li>  unsigned long, or unsigned long int
5129 <li>  long long, signed long long, long long int, or
5130  signed long long int
5131 <li>  unsigned long long, or unsigned long long int
5132 <li>  float
5133 <li>  double
5134 <li>  long double
5135 <li>  _Bool
5136 <li>  float _Complex
5137 <li>  double _Complex
5138 <li>  long double _Complex
5139 <li>  struct or union specifier                                                                    *
5140 <li>  enum specifier
5141 <li>  typedef name
5142 </ul>
5143 <p><!--para 3 -->
5144  The type specifier _Complex shall not be used if the implementation does not provide
5145  complex types.<sup><a href="#note104"><b>104)</b></a></sup>
5146 <h6>Semantics</h6>
5147 <p><!--para 4 -->
5148  Specifiers for structures, unions, and enumerations are discussed in <a href="#6.7.2.1">6.7.2.1</a> through
5149  <a href="#6.7.2.3">6.7.2.3</a>. Declarations of typedef names are discussed in <a href="#6.7.7">6.7.7</a>. The characteristics of the
5150  other types are discussed in <a href="#6.2.5">6.2.5</a>.
5151 <p><!--para 5 -->
5152  Each of the comma-separated sets designates the same type, except that for bit-fields, it is
5153  implementation-defined whether the specifier int designates the same type as signed
5154  int or the same type as unsigned int.
5155 <p><b> Forward references</b>: enumeration specifiers (<a href="#6.7.2.2">6.7.2.2</a>), structure and union specifiers
5156  (<a href="#6.7.2.1">6.7.2.1</a>), tags (<a href="#6.7.2.3">6.7.2.3</a>), type definitions (<a href="#6.7.7">6.7.7</a>).
5157  
5158  
5159  
5160  
5161 <!--page 113 -->
5162
5163 <h6>footnotes</h6>
5164 <p><small><a name="note104" href="#note104">104)</a> Freestanding implementations are not required to provide complex types.                  *
5165 </small>
5166
5167 <h5><a name="6.7.2.1" href="#6.7.2.1">6.7.2.1 Structure and union specifiers</a></h5>
5168 <h6>Syntax</h6>
5169 <p><!--para 1 -->
5170 <pre>
5171           struct-or-union-specifier:
5172                   struct-or-union identifier<sub>opt</sub> { struct-declaration-list }
5173                   struct-or-union identifier
5174           struct-or-union:
5175                   struct
5176                   union
5177           struct-declaration-list:
5178                   struct-declaration
5179                   struct-declaration-list struct-declaration
5180           struct-declaration:
5181                   specifier-qualifier-list struct-declarator-list ;
5182           specifier-qualifier-list:
5183                  type-specifier specifier-qualifier-list<sub>opt</sub>
5184                  type-qualifier specifier-qualifier-list<sub>opt</sub>
5185           struct-declarator-list:
5186                   struct-declarator
5187                   struct-declarator-list , struct-declarator
5188           struct-declarator:
5189                   declarator
5190                   declarator<sub>opt</sub> : constant-expression</pre>
5191 <h6>Constraints</h6>
5192 <p><!--para 2 -->
5193  A structure or union shall not contain a member with incomplete or function type (hence,
5194  a structure shall not contain an instance of itself, but may contain a pointer to an instance
5195  of itself), except that the last member of a structure with more than one named member
5196  may have incomplete array type; such a structure (and any union containing, possibly
5197  recursively, a member that is such a structure) shall not be a member of a structure or an
5198  element of an array.
5199 <p><!--para 3 -->
5200  The expression that specifies the width of a bit-field shall be an integer constant
5201  expression with a nonnegative value that does not exceed the width of an object of the
5202  type that would be specified were the colon and expression omitted. If the value is zero,
5203  the declaration shall have no declarator.
5204 <p><!--para 4 -->
5205  A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed
5206  int, unsigned int, or some other implementation-defined type.
5207 <!--page 114 -->
5208 <h6>Semantics</h6>
5209 <p><!--para 5 -->
5210  As discussed in <a href="#6.2.5">6.2.5</a>, a structure is a type consisting of a sequence of members, whose
5211  storage is allocated in an ordered sequence, and a union is a type consisting of a sequence
5212  of members whose storage overlap.
5213 <p><!--para 6 -->
5214  Structure and union specifiers have the same form. The keywords struct and union
5215  indicate that the type being specified is, respectively, a structure type or a union type.
5216 <p><!--para 7 -->
5217  The presence of a struct-declaration-list in a struct-or-union-specifier declares a new type,
5218  within a translation unit. The struct-declaration-list is a sequence of declarations for the
5219  members of the structure or union. If the struct-declaration-list contains no named
5220  members, the behavior is undefined. The type is incomplete until after the } that
5221  terminates the list.
5222 <p><!--para 8 -->
5223  A member of a structure or union may have any object type other than a variably
5224  modified type.<sup><a href="#note105"><b>105)</b></a></sup> In addition, a member may be declared to consist of a specified
5225  number of bits (including a sign bit, if any). Such a member is called a bit-field;<sup><a href="#note106"><b>106)</b></a></sup> its
5226  width is preceded by a colon.
5227 <p><!--para 9 -->
5228  A bit-field is interpreted as a signed or unsigned integer type consisting of the specified
5229  number of bits.<sup><a href="#note107"><b>107)</b></a></sup> If the value 0 or 1 is stored into a nonzero-width bit-field of type
5230  _Bool, the value of the bit-field shall compare equal to the value stored.
5231 <p><!--para 10 -->
5232  An implementation may allocate any addressable storage unit large enough to hold a bit-
5233  field. If enough space remains, a bit-field that immediately follows another bit-field in a
5234  structure shall be packed into adjacent bits of the same unit. If insufficient space remains,
5235  whether a bit-field that does not fit is put into the next unit or overlaps adjacent units is
5236  implementation-defined. The order of allocation of bit-fields within a unit (high-order to
5237  low-order or low-order to high-order) is implementation-defined. The alignment of the
5238  addressable storage unit is unspecified.
5239 <p><!--para 11 -->
5240  A bit-field declaration with no declarator, but only a colon and a width, indicates an
5241  unnamed bit-field.<sup><a href="#note108"><b>108)</b></a></sup> As a special case, a bit-field structure member with a width of 0
5242  indicates that no further bit-field is to be packed into the unit in which the previous bit-
5243  field, if any, was placed.
5244  
5245  
5246 <!--page 115 -->
5247 <p><!--para 12 -->
5248  Each non-bit-field member of a structure or union object is aligned in an implementation-
5249  defined manner appropriate to its type.
5250 <p><!--para 13 -->
5251  Within a structure object, the non-bit-field members and the units in which bit-fields
5252  reside have addresses that increase in the order in which they are declared. A pointer to a
5253  structure object, suitably converted, points to its initial member (or if that member is a
5254  bit-field, then to the unit in which it resides), and vice versa. There may be unnamed
5255  padding within a structure object, but not at its beginning.
5256 <p><!--para 14 -->
5257  The size of a union is sufficient to contain the largest of its members. The value of at
5258  most one of the members can be stored in a union object at any time. A pointer to a
5259  union object, suitably converted, points to each of its members (or if a member is a bit-
5260  field, then to the unit in which it resides), and vice versa.
5261 <p><!--para 15 -->
5262  There may be unnamed padding at the end of a structure or union.
5263 <p><!--para 16 -->
5264  As a special case, the last element of a structure with more than one named member may
5265  have an incomplete array type; this is called a flexible array member. In most situations,
5266  the flexible array member is ignored. In particular, the size of the structure is as if the
5267  flexible array member were omitted except that it may have more trailing padding than
5268  the omission would imply. However, when a . (or -&gt;) operator has a left operand that is
5269  (a pointer to) a structure with a flexible array member and the right operand names that
5270  member, it behaves as if that member were replaced with the longest array (with the same
5271  element type) that would not make the structure larger than the object being accessed; the
5272  offset of the array shall remain that of the flexible array member, even if this would differ
5273  from that of the replacement array. If this array would have no elements, it behaves as if
5274  it had one element but the behavior is undefined if any attempt is made to access that
5275  element or to generate a pointer one past it.
5276 <p><!--para 17 -->
5277  EXAMPLE       After the declaration:
5278 <pre>
5279          struct s { int n; double d[]; };</pre>
5280  the structure struct s has a flexible array member d. A typical way to use this is:
5281 <pre>
5282          int m = /* some value */;
5283          struct s *p = malloc(sizeof (struct s) + sizeof (double [m]));</pre>
5284  and assuming that the call to malloc succeeds, the object pointed to by p behaves, for most purposes, as if
5285  p had been declared as:
5286 <pre>
5287          struct { int n; double d[m]; } *p;</pre>
5288  (there are circumstances in which this equivalence is broken; in particular, the offsets of member d might
5289  not be the same).
5290 <p><!--para 18 -->
5291  Following the above declaration:
5292 <!--page 116 -->
5293 <pre>
5294           struct s t1 = { 0 };                        //   valid
5295           struct s t2 = { 1, { <a href="#4.2">4.2</a> }};                //   invalid
5296           t1.n = 4;                                   //   valid
5297           t1.d[0] = <a href="#4.2">4.2</a>;                              //   might be undefined behavior</pre>
5298  The initialization of t2 is invalid (and violates a constraint) because struct s is treated as if it did not
5299  contain member d. The assignment to t1.d[0] is probably undefined behavior, but it is possible that
5300 <pre>
5301           sizeof (struct s) &gt;= offsetof(struct s, d) + sizeof (double)</pre>
5302  in which case the assignment would be legitimate. Nevertheless, it cannot appear in strictly conforming
5303  code.
5304 <p><!--para 19 -->
5305  After the further declaration:
5306 <pre>
5307           struct ss { int n; };</pre>
5308  the expressions:
5309 <pre>
5310           sizeof (struct s) &gt;= sizeof (struct ss)
5311           sizeof (struct s) &gt;= offsetof(struct s, d)</pre>
5312  are always equal to 1.
5313 <p><!--para 20 -->
5314  If sizeof (double) is 8, then after the following code is executed:
5315 <pre>
5316           struct s *s1;
5317           struct s *s2;
5318           s1 = malloc(sizeof (struct s) + 64);
5319           s2 = malloc(sizeof (struct s) + 46);</pre>
5320  and assuming that the calls to malloc succeed, the objects pointed to by s1 and s2 behave, for most
5321  purposes, as if the identifiers had been declared as:
5322 <p><!--para 21 -->
5323 <pre>
5324           struct { int n; double d[8]; } *s1;
5325           struct { int n; double d[5]; } *s2;</pre>
5326  Following the further successful assignments:
5327 <pre>
5328           s1 = malloc(sizeof (struct s) + 10);
5329           s2 = malloc(sizeof (struct s) + 6);</pre>
5330  they then behave as if the declarations were:
5331 <pre>
5332           struct { int n; double d[1]; } *s1, *s2;</pre>
5333  and:
5334 <p><!--para 22 -->
5335 <pre>
5336           double *dp;
5337           dp = &amp;(s1-&gt;d[0]);           //   valid
5338           *dp = 42;                   //   valid
5339           dp = &amp;(s2-&gt;d[0]);           //   valid
5340           *dp = 42;                   //   undefined behavior</pre>
5341  The assignment:
5342 <pre>
5343           *s1 = *s2;</pre>
5344  only copies the member n; if any of the array elements are within the first sizeof (struct s) bytes
5345  of the structure, they might be copied or simply overwritten with indeterminate values.
5346  
5347 <p><b> Forward references</b>: tags (<a href="#6.7.2.3">6.7.2.3</a>).
5348 <!--page 117 -->
5349
5350 <h6>footnotes</h6>
5351 <p><small><a name="note105" href="#note105">105)</a> A structure or union can not contain a member with a variably modified type because member names
5352  are not ordinary identifiers as defined in <a href="#6.2.3">6.2.3</a>.
5353 </small>
5354 <p><small><a name="note106" href="#note106">106)</a> The unary &amp; (address-of) operator cannot be applied to a bit-field object; thus, there are no pointers to
5355  or arrays of bit-field objects.
5356 </small>
5357 <p><small><a name="note107" href="#note107">107)</a> As specified in <a href="#6.7.2">6.7.2</a> above, if the actual type specifier used is int or a typedef-name defined as int,
5358  then it is implementation-defined whether the bit-field is signed or unsigned.
5359 </small>
5360 <p><small><a name="note108" href="#note108">108)</a> An unnamed bit-field structure member is useful for padding to conform to externally imposed
5361  layouts.
5362 </small>
5363
5364 <h5><a name="6.7.2.2" href="#6.7.2.2">6.7.2.2 Enumeration specifiers</a></h5>
5365 <h6>Syntax</h6>
5366 <p><!--para 1 -->
5367 <pre>
5368           enum-specifier:
5369                 enum identifier<sub>opt</sub> { enumerator-list }
5370                 enum identifier<sub>opt</sub> { enumerator-list , }
5371                 enum identifier
5372           enumerator-list:
5373                 enumerator
5374                 enumerator-list , enumerator
5375           enumerator:
5376                 enumeration-constant
5377                 enumeration-constant = constant-expression</pre>
5378 <h6>Constraints</h6>
5379 <p><!--para 2 -->
5380  The expression that defines the value of an enumeration constant shall be an integer
5381  constant expression that has a value representable as an int.
5382 <h6>Semantics</h6>
5383 <p><!--para 3 -->
5384  The identifiers in an enumerator list are declared as constants that have type int and
5385  may appear wherever such are permitted.<sup><a href="#note109"><b>109)</b></a></sup> An enumerator with = defines its
5386  enumeration constant as the value of the constant expression. If the first enumerator has
5387  no =, the value of its enumeration constant is 0. Each subsequent enumerator with no =
5388  defines its enumeration constant as the value of the constant expression obtained by
5389  adding 1 to the value of the previous enumeration constant. (The use of enumerators with
5390  = may produce enumeration constants with values that duplicate other values in the same
5391  enumeration.) The enumerators of an enumeration are also known as its members.
5392 <p><!--para 4 -->
5393  Each enumerated type shall be compatible with char, a signed integer type, or an
5394  unsigned integer type. The choice of type is implementation-defined,<sup><a href="#note110"><b>110)</b></a></sup> but shall be
5395  capable of representing the values of all the members of the enumeration. The
5396  enumerated type is incomplete until after the } that terminates the list of enumerator
5397  declarations.
5398  
5399  
5400  
5401  
5402 <!--page 118 -->
5403 <p><!--para 5 -->
5404  EXAMPLE       The following fragment:
5405 <pre>
5406          enum hue { chartreuse, burgundy, claret=20, winedark };
5407          enum hue col, *cp;
5408          col = claret;
5409          cp = &amp;col;
5410          if (*cp != burgundy)
5411                /* ... */</pre>
5412  makes hue the tag of an enumeration, and then declares col as an object that has that type and cp as a
5413  pointer to an object that has that type. The enumerated values are in the set { 0, 1, 20, 21 }.
5414  
5415 <p><b> Forward references</b>: tags (<a href="#6.7.2.3">6.7.2.3</a>).
5416
5417 <h6>footnotes</h6>
5418 <p><small><a name="note109" href="#note109">109)</a> Thus, the identifiers of enumeration constants declared in the same scope shall all be distinct from
5419  each other and from other identifiers declared in ordinary declarators.
5420 </small>
5421 <p><small><a name="note110" href="#note110">110)</a> An implementation may delay the choice of which integer type until all enumeration constants have
5422  been seen.
5423 </small>
5424
5425 <h5><a name="6.7.2.3" href="#6.7.2.3">6.7.2.3 Tags</a></h5>
5426 <h6>Constraints</h6>
5427 <p><!--para 1 -->
5428  A specific type shall have its content defined at most once.
5429 <p><!--para 2 -->
5430  Where two declarations that use the same tag declare the same type, they shall both use
5431  the same choice of struct, union, or enum.
5432 <p><!--para 3 -->
5433  A type specifier of the form
5434 <pre>
5435          enum identifier</pre>
5436  without an enumerator list shall only appear after the type it specifies is complete.
5437 <h6>Semantics</h6>
5438 <p><!--para 4 -->
5439  All declarations of structure, union, or enumerated types that have the same scope and
5440  use the same tag declare the same type. The type is incomplete<sup><a href="#note111"><b>111)</b></a></sup> until the closing brace
5441  of the list defining the content, and complete thereafter.
5442 <p><!--para 5 -->
5443  Two declarations of structure, union, or enumerated types which are in different scopes or
5444  use different tags declare distinct types. Each declaration of a structure, union, or
5445  enumerated type which does not include a tag declares a distinct type.
5446 <p><!--para 6 -->
5447  A type specifier of the form
5448 <pre>
5449          struct-or-union identifier<sub>opt</sub> { struct-declaration-list }</pre>
5450  or
5451 <pre>
5452          enum identifier { enumerator-list }</pre>
5453  or
5454 <pre>
5455          enum identifier { enumerator-list , }</pre>
5456  declares a structure, union, or enumerated type. The list defines the structure content,
5457  
5458 <!--page 119 -->
5459  union content, or enumeration content. If an identifier is provided,<sup><a href="#note112"><b>112)</b></a></sup> the type specifier
5460  also declares the identifier to be the tag of that type.
5461 <p><!--para 7 -->
5462  A declaration of the form
5463 <pre>
5464           struct-or-union identifier ;</pre>
5465  specifies a structure or union type and declares the identifier as a tag of that type.<sup><a href="#note113"><b>113)</b></a></sup>
5466 <p><!--para 8 -->
5467  If a type specifier of the form
5468 <pre>
5469           struct-or-union identifier</pre>
5470  occurs other than as part of one of the above forms, and no other declaration of the
5471  identifier as a tag is visible, then it declares an incomplete structure or union type, and
5472  declares the identifier as the tag of that type.113)
5473 <p><!--para 9 -->
5474  If a type specifier of the form
5475 <pre>
5476           struct-or-union identifier</pre>
5477  or
5478 <pre>
5479           enum identifier</pre>
5480  occurs other than as part of one of the above forms, and a declaration of the identifier as a
5481  tag is visible, then it specifies the same type as that other declaration, and does not
5482  redeclare the tag.
5483 <p><!--para 10 -->
5484  EXAMPLE 1       This mechanism allows declaration of a self-referential structure.
5485 <pre>
5486           struct tnode {
5487                 int count;
5488                 struct tnode *left, *right;
5489           };</pre>
5490  specifies a structure that contains an integer and two pointers to objects of the same type. Once this
5491  declaration has been given, the declaration
5492 <pre>
5493           struct tnode s, *sp;</pre>
5494  declares s to be an object of the given type and sp to be a pointer to an object of the given type. With
5495  these declarations, the expression sp-&gt;left refers to the left struct tnode pointer of the object to
5496  which sp points; the expression s.right-&gt;count designates the count member of the right struct
5497  tnode pointed to from s.
5498 <p><!--para 11 -->
5499  The following alternative formulation uses the typedef mechanism:
5500  
5501  
5502  
5503  
5504 <!--page 120 -->
5505 <pre>
5506           typedef struct tnode TNODE;
5507           struct tnode {
5508                 int count;
5509                 TNODE *left, *right;
5510           };
5511           TNODE s, *sp;</pre>
5512  
5513 <p><!--para 12 -->
5514  EXAMPLE 2 To illustrate the use of prior declaration of a tag to specify a pair of mutually referential
5515  structures, the declarations
5516 <pre>
5517           struct s1 { struct s2 *s2p; /* ... */ }; // D1
5518           struct s2 { struct s1 *s1p; /* ... */ }; // D2</pre>
5519  specify a pair of structures that contain pointers to each other. Note, however, that if s2 were already
5520  declared as a tag in an enclosing scope, the declaration D1 would refer to it, not to the tag s2 declared in
5521  D2. To eliminate this context sensitivity, the declaration
5522 <pre>
5523           struct s2;</pre>
5524  may be inserted ahead of D1. This declares a new tag s2 in the inner scope; the declaration D2 then
5525  completes the specification of the new type.
5526  
5527 <p><b> Forward references</b>: declarators (<a href="#6.7.5">6.7.5</a>), array declarators (<a href="#6.7.5.2">6.7.5.2</a>), type definitions
5528  (<a href="#6.7.7">6.7.7</a>).
5529
5530 <h6>footnotes</h6>
5531 <p><small><a name="note111" href="#note111">111)</a> An incomplete type may only by used when the size of an object of that type is not needed. It is not
5532  needed, for example, when a typedef name is declared to be a specifier for a structure or union, or
5533  when a pointer to or a function returning a structure or union is being declared. (See incomplete types
5534  in <a href="#6.2.5">6.2.5</a>.) The specification has to be complete before such a function is called or defined.
5535 </small>
5536 <p><small><a name="note112" href="#note112">112)</a> If there is no identifier, the type can, within the translation unit, only be referred to by the declaration
5537  of which it is a part. Of course, when the declaration is of a typedef name, subsequent declarations
5538  can make use of that typedef name to declare objects having the specified structure, union, or
5539  enumerated type.
5540 </small>
5541 <p><small><a name="note113" href="#note113">113)</a> A similar construction with enum does not exist.
5542 </small>
5543
5544 <h4><a name="6.7.3" href="#6.7.3">6.7.3 Type qualifiers</a></h4>
5545 <h6>Syntax</h6>
5546 <p><!--para 1 -->
5547 <pre>
5548           type-qualifier:
5549                  const
5550                  restrict
5551                  volatile</pre>
5552 <h6>Constraints</h6>
5553 <p><!--para 2 -->
5554  Types other than pointer types derived from object or incomplete types shall not be
5555  restrict-qualified.
5556 <h6>Semantics</h6>
5557 <p><!--para 3 -->
5558  The properties associated with qualified types are meaningful only for expressions that
5559  are lvalues.<sup><a href="#note114"><b>114)</b></a></sup>
5560 <p><!--para 4 -->
5561  If the same qualifier appears more than once in the same specifier-qualifier-list, either
5562  directly or via one or more typedefs, the behavior is the same as if it appeared only
5563  once.
5564  
5565  
5566  
5567  
5568 <!--page 121 -->
5569 <p><!--para 5 -->
5570  If an attempt is made to modify an object defined with a const-qualified type through use
5571  of an lvalue with non-const-qualified type, the behavior is undefined. If an attempt is
5572  made to refer to an object defined with a volatile-qualified type through use of an lvalue
5573  with non-volatile-qualified type, the behavior is undefined.<sup><a href="#note115"><b>115)</b></a></sup>
5574 <p><!--para 6 -->
5575  An object that has volatile-qualified type may be modified in ways unknown to the
5576  implementation or have other unknown side effects. Therefore any expression referring
5577  to such an object shall be evaluated strictly according to the rules of the abstract machine,
5578  as described in <a href="#5.1.2.3">5.1.2.3</a>. Furthermore, at every sequence point the value last stored in the
5579  object shall agree with that prescribed by the abstract machine, except as modified by the
5580  unknown factors mentioned previously.<sup><a href="#note116"><b>116)</b></a></sup> What constitutes an access to an object that
5581  has volatile-qualified type is implementation-defined.
5582 <p><!--para 7 -->
5583  An object that is accessed through a restrict-qualified pointer has a special association
5584  with that pointer. This association, defined in <a href="#6.7.3.1">6.7.3.1</a> below, requires that all accesses to
5585  that object use, directly or indirectly, the value of that particular pointer.<sup><a href="#note117"><b>117)</b></a></sup> The intended
5586  use of the restrict qualifier (like the register storage class) is to promote
5587  optimization, and deleting all instances of the qualifier from all preprocessing translation
5588  units composing a conforming program does not change its meaning (i.e., observable
5589  behavior).
5590 <p><!--para 8 -->
5591  If the specification of an array type includes any type qualifiers, the element type is so-
5592  qualified, not the array type. If the specification of a function type includes any type
5593  qualifiers, the behavior is undefined.<sup><a href="#note118"><b>118)</b></a></sup>
5594 <p><!--para 9 -->
5595  For two qualified types to be compatible, both shall have the identically qualified version
5596  of a compatible type; the order of type qualifiers within a list of specifiers or qualifiers
5597  does not affect the specified type.
5598 <p><!--para 10 -->
5599  EXAMPLE 1       An object declared
5600 <pre>
5601           extern const volatile int real_time_clock;</pre>
5602  may be modifiable by hardware, but cannot be assigned to, incremented, or decremented.
5603  
5604  
5605  
5606  
5607 <!--page 122 -->
5608 <p><!--para 11 -->
5609  EXAMPLE 2 The following declarations and expressions illustrate the behavior when type qualifiers
5610  modify an aggregate type:
5611 <pre>
5612          const struct s { int mem; } cs = { 1 };
5613          struct s ncs; // the object ncs is modifiable
5614          typedef int A[2][3];
5615          const A a = {{4, 5, 6}, {7, 8, 9}}; // array of array of const int
5616          int *pi;
5617          const int *pci;
5618          ncs = cs;             //   valid
5619          cs = ncs;             //   violates modifiable lvalue constraint for =
5620          pi = &amp;ncs.mem;        //   valid
5621          pi = &amp;cs.mem;         //   violates type constraints for =
5622          pci = &amp;cs.mem;        //   valid
5623          pi = a[0];            //   invalid: a[0] has type ''const int *''</pre>
5624  
5625
5626 <h6>footnotes</h6>
5627 <p><small><a name="note114" href="#note114">114)</a> The implementation may place a const object that is not volatile in a read-only region of
5628  storage. Moreover, the implementation need not allocate storage for such an object if its address is
5629  never used.
5630 </small>
5631 <p><small><a name="note115" href="#note115">115)</a> This applies to those objects that behave as if they were defined with qualified types, even if they are
5632  never actually defined as objects in the program (such as an object at a memory-mapped input/output
5633  address).
5634 </small>
5635 <p><small><a name="note116" href="#note116">116)</a> A volatile declaration may be used to describe an object corresponding to a memory-mapped
5636  input/output port or an object accessed by an asynchronously interrupting function. Actions on
5637  objects so declared shall not be ''optimized out'' by an implementation or reordered except as
5638  permitted by the rules for evaluating expressions.
5639 </small>
5640 <p><small><a name="note117" href="#note117">117)</a> For example, a statement that assigns a value returned by malloc to a single pointer establishes this
5641  association between the allocated object and the pointer.
5642 </small>
5643 <p><small><a name="note118" href="#note118">118)</a> Both of these can occur through the use of typedefs.
5644 </small>
5645
5646 <h5><a name="6.7.3.1" href="#6.7.3.1">6.7.3.1 Formal definition of restrict</a></h5>
5647 <p><!--para 1 -->
5648  Let D be a declaration of an ordinary identifier that provides a means of designating an
5649  object P as a restrict-qualified pointer to type T.
5650 <p><!--para 2 -->
5651  If D appears inside a block and does not have storage class extern, let B denote the
5652  block. If D appears in the list of parameter declarations of a function definition, let B
5653  denote the associated block. Otherwise, let B denote the block of main (or the block of
5654  whatever function is called at program startup in a freestanding environment).
5655 <p><!--para 3 -->
5656  In what follows, a pointer expression E is said to be based on object P if (at some
5657  sequence point in the execution of B prior to the evaluation of E) modifying P to point to
5658  a copy of the array object into which it formerly pointed would change the value of E.<sup><a href="#note119"><b>119)</b></a></sup>
5659  Note that ''based'' is defined only for expressions with pointer types.
5660 <p><!--para 4 -->
5661  During each execution of B, let L be any lvalue that has &amp;L based on P. If L is used to
5662  access the value of the object X that it designates, and X is also modified (by any means),
5663  then the following requirements apply: T shall not be const-qualified. Every other lvalue
5664  used to access the value of X shall also have its address based on P. Every access that
5665  modifies X shall be considered also to modify P, for the purposes of this subclause. If P
5666  is assigned the value of a pointer expression E that is based on another restricted pointer
5667  object P2, associated with block B2, then either the execution of B2 shall begin before
5668  the execution of B, or the execution of B2 shall end prior to the assignment. If these
5669  requirements are not met, then the behavior is undefined.
5670 <p><!--para 5 -->
5671  Here an execution of B means that portion of the execution of the program that would
5672  correspond to the lifetime of an object with scalar type and automatic storage duration
5673  
5674 <!--page 123 -->
5675  associated with B.
5676 <p><!--para 6 -->
5677  A translator is free to ignore any or all aliasing implications of uses of restrict.
5678 <p><!--para 7 -->
5679  EXAMPLE 1       The file scope declarations
5680 <pre>
5681           int * restrict a;
5682           int * restrict b;
5683           extern int c[];</pre>
5684  assert that if an object is accessed using one of a, b, or c, and that object is modified anywhere in the
5685  program, then it is never accessed using either of the other two.
5686  
5687 <p><!--para 8 -->
5688  EXAMPLE 2 The function parameter declarations in the following example
5689 <pre>
5690          void f(int n, int * restrict p, int * restrict q)
5691          {
5692                while (n-- &gt; 0)
5693                      *p++ = *q++;
5694          }</pre>
5695  assert that, during each execution of the function, if an object is accessed through one of the pointer
5696  parameters, then it is not also accessed through the other.
5697 <p><!--para 9 -->
5698  The benefit of the restrict qualifiers is that they enable a translator to make an effective dependence
5699  analysis of function f without examining any of the calls of f in the program. The cost is that the
5700  programmer has to examine all of those calls to ensure that none give undefined behavior. For example, the
5701  second call of f in g has undefined behavior because each of d[1] through d[49] is accessed through
5702  both p and q.
5703 <pre>
5704          void g(void)
5705          {
5706                extern int d[100];
5707                f(50, d + 50, d); // valid
5708                f(50, d + 1, d); // undefined behavior
5709          }</pre>
5710  
5711 <p><!--para 10 -->
5712  EXAMPLE 3       The function parameter declarations
5713 <pre>
5714          void h(int n, int * restrict p, int * restrict q, int * restrict r)
5715          {
5716                int i;
5717                for (i = 0; i &lt; n; i++)
5718                       p[i] = q[i] + r[i];
5719          }</pre>
5720  illustrate how an unmodified object can be aliased through two restricted pointers. In particular, if a and b
5721  are disjoint arrays, a call of the form h(100, a, b, b) has defined behavior, because array b is not
5722  modified within function h.
5723  
5724 <p><!--para 11 -->
5725  EXAMPLE 4 The rule limiting assignments between restricted pointers does not distinguish between a
5726  function call and an equivalent nested block. With one exception, only ''outer-to-inner'' assignments
5727  between restricted pointers declared in nested blocks have defined behavior.
5728 <!--page 124 -->
5729 <p><!--para 12 -->
5730 <pre>
5731           {
5732                    int * restrict p1;
5733                    int * restrict q1;
5734                    p1 = q1; // undefined behavior
5735                    {
5736                          int * restrict p2 = p1; // valid
5737                          int * restrict q2 = q1; // valid
5738                          p1 = q2;                // undefined behavior
5739                          p2 = q2;                // undefined behavior
5740                    }
5741           }</pre>
5742  The one exception allows the value of a restricted pointer to be carried out of the block in which it (or, more
5743  precisely, the ordinary identifier used to designate it) is declared when that block finishes execution. For
5744  example, this permits new_vector to return a vector.
5745 <pre>
5746           typedef struct { int n; float * restrict v; } vector;
5747           vector new_vector(int n)
5748           {
5749                 vector t;
5750                 t.n = n;
5751                 t.v = malloc(n * sizeof (float));
5752                 return t;
5753           }</pre>
5754  
5755
5756 <h6>footnotes</h6>
5757 <p><small><a name="note119" href="#note119">119)</a> In other words, E depends on the value of P itself rather than on the value of an object referenced
5758  indirectly through P. For example, if identifier p has type (int **restrict), then the pointer
5759  expressions p and p+1 are based on the restricted pointer object designated by p, but the pointer
5760  expressions *p and p[1] are not.
5761 </small>
5762
5763 <h4><a name="6.7.4" href="#6.7.4">6.7.4 Function specifiers</a></h4>
5764 <h6>Syntax</h6>
5765 <p><!--para 1 -->
5766 <pre>
5767           function-specifier:
5768                  inline</pre>
5769 <h6>Constraints</h6>
5770 <p><!--para 2 -->
5771  Function specifiers shall be used only in the declaration of an identifier for a function.
5772 <p><!--para 3 -->
5773  An inline definition of a function with external linkage shall not contain a definition of a
5774  modifiable object with static storage duration, and shall not contain a reference to an
5775  identifier with internal linkage.
5776 <p><!--para 4 -->
5777  In a hosted environment, the inline function specifier shall not appear in a declaration
5778  of main.
5779 <h6>Semantics</h6>
5780 <p><!--para 5 -->
5781  A function declared with an inline function specifier is an inline function. The
5782  function specifier may appear more than once; the behavior is the same as if it appeared
5783  only once. Making a function an inline function suggests that calls to the function be as
5784  fast as possible.<sup><a href="#note120"><b>120)</b></a></sup> The extent to which such suggestions are effective is
5785  implementation-defined.<sup><a href="#note121"><b>121)</b></a></sup>
5786 <p><!--para 6 -->
5787  Any function with internal linkage can be an inline function. For a function with external
5788  linkage, the following restrictions apply: If a function is declared with an inline
5789 <!--page 125 -->
5790  function specifier, then it shall also be defined in the same translation unit. If all of the
5791  file scope declarations for a function in a translation unit include the inline function
5792  specifier without extern, then the definition in that translation unit is an inline
5793  definition. An inline definition does not provide an external definition for the function,
5794  and does not forbid an external definition in another translation unit. An inline definition
5795  provides an alternative to an external definition, which a translator may use to implement
5796  any call to the function in the same translation unit. It is unspecified whether a call to the
5797  function uses the inline definition or the external definition.<sup><a href="#note122"><b>122)</b></a></sup>
5798 <p><!--para 7 -->
5799  EXAMPLE The declaration of an inline function with external linkage can result in either an external
5800  definition, or a definition available for use only within the translation unit. A file scope declaration with
5801  extern creates an external definition. The following example shows an entire translation unit.
5802 <p><!--para 8 -->
5803 <pre>
5804           inline double fahr(double t)
5805           {
5806                 return (9.0 * t) / 5.0 + 32.0;
5807           }
5808           inline double cels(double t)
5809           {
5810                 return (5.0 * (t - 32.0)) / 9.0;
5811           }
5812           extern double fahr(double);                  // creates an external definition
5813           double convert(int is_fahr, double temp)
5814           {
5815                 /* A translator may perform inline substitutions */
5816                 return is_fahr ? cels(temp) : fahr(temp);
5817           }</pre>
5818  Note that the definition of fahr is an external definition because fahr is also declared with extern, but
5819  the definition of cels is an inline definition. Because cels has external linkage and is referenced, an
5820  external definition has to appear in another translation unit (see <a href="#6.9">6.9</a>); the inline definition and the external
5821  definition are distinct and either may be used for the call.
5822  
5823 <p><b> Forward references</b>: function definitions (<a href="#6.9.1">6.9.1</a>).
5824  
5825  
5826 <!--page 126 -->
5827
5828 <h6>footnotes</h6>
5829 <p><small><a name="note120" href="#note120">120)</a> By using, for example, an alternative to the usual function call mechanism, such as ''inline
5830  substitution''. Inline substitution is not textual substitution, nor does it create a new function.
5831  Therefore, for example, the expansion of a macro used within the body of the function uses the
5832  definition it had at the point the function body appears, and not where the function is called; and
5833  identifiers refer to the declarations in scope where the body occurs. Likewise, the function has a
5834  single address, regardless of the number of inline definitions that occur in addition to the external
5835  definition.
5836 </small>
5837 <p><small><a name="note121" href="#note121">121)</a> For example, an implementation might never perform inline substitution, or might only perform inline
5838  substitutions to calls in the scope of an inline declaration.
5839 </small>
5840 <p><small><a name="note122" href="#note122">122)</a> Since an inline definition is distinct from the corresponding external definition and from any other
5841  corresponding inline definitions in other translation units, all corresponding objects with static storage
5842  duration are also distinct in each of the definitions.
5843 </small>
5844
5845 <h4><a name="6.7.5" href="#6.7.5">6.7.5 Declarators</a></h4>
5846 <h6>Syntax</h6>
5847 <p><!--para 1 -->
5848 <pre>
5849           declarator:
5850                  pointer<sub>opt</sub> direct-declarator
5851           direct-declarator:
5852                   identifier
5853                   ( declarator )
5854                   direct-declarator [ type-qualifier-list<sub>opt</sub> assignment-expression<sub>opt</sub> ]
5855                   direct-declarator [ static type-qualifier-list<sub>opt</sub> assignment-expression ]
5856                   direct-declarator [ type-qualifier-list static assignment-expression ]
5857                   direct-declarator [ type-qualifier-list<sub>opt</sub> * ]
5858                   direct-declarator ( parameter-type-list )
5859                   direct-declarator ( identifier-list<sub>opt</sub> )
5860           pointer:
5861                  * type-qualifier-list<sub>opt</sub>
5862                  * type-qualifier-list<sub>opt</sub> pointer
5863           type-qualifier-list:
5864                  type-qualifier
5865                  type-qualifier-list type-qualifier
5866           parameter-type-list:
5867                 parameter-list
5868                 parameter-list , ...
5869           parameter-list:
5870                 parameter-declaration
5871                 parameter-list , parameter-declaration
5872           parameter-declaration:
5873                 declaration-specifiers declarator
5874                 declaration-specifiers abstract-declarator<sub>opt</sub>
5875           identifier-list:
5876                   identifier
5877                   identifier-list , identifier</pre>
5878 <h6>Semantics</h6>
5879 <p><!--para 2 -->
5880  Each declarator declares one identifier, and asserts that when an operand of the same
5881  form as the declarator appears in an expression, it designates a function or object with the
5882  scope, storage duration, and type indicated by the declaration specifiers.
5883 <p><!--para 3 -->
5884  A full declarator is a declarator that is not part of another declarator. The end of a full
5885  declarator is a sequence point. If, in the nested sequence of declarators in a full
5886 <!--page 127 -->
5887  declarator, there is a declarator specifying a variable length array type, the type specified
5888  by the full declarator is said to be variably modified. Furthermore, any type derived by
5889  declarator type derivation from a variably modified type is itself variably modified.
5890 <p><!--para 4 -->
5891  In the following subclauses, consider a declaration
5892 <pre>
5893          T D1</pre>
5894  where T contains the declaration specifiers that specify a type T (such as int) and D1 is
5895  a declarator that contains an identifier ident. The type specified for the identifier ident in
5896  the various forms of declarator is described inductively using this notation.
5897 <p><!--para 5 -->
5898  If, in the declaration ''T D1'', D1 has the form
5899 <pre>
5900          identifier</pre>
5901  then the type specified for ident is T .
5902 <p><!--para 6 -->
5903  If, in the declaration ''T D1'', D1 has the form
5904 <pre>
5905          ( D )</pre>
5906  then ident has the type specified by the declaration ''T D''. Thus, a declarator in
5907  parentheses is identical to the unparenthesized declarator, but the binding of complicated
5908  declarators may be altered by parentheses.
5909 <h6> Implementation limits</h6>
5910 <p><!--para 7 -->
5911  As discussed in <a href="#5.2.4.1">5.2.4.1</a>, an implementation may limit the number of pointer, array, and
5912  function declarators that modify an arithmetic, structure, union, or incomplete type, either
5913  directly or via one or more typedefs.
5914 <p><b> Forward references</b>: array declarators (<a href="#6.7.5.2">6.7.5.2</a>), type definitions (<a href="#6.7.7">6.7.7</a>).
5915
5916 <h5><a name="6.7.5.1" href="#6.7.5.1">6.7.5.1 Pointer declarators</a></h5>
5917 <h6>Semantics</h6>
5918 <p><!--para 1 -->
5919  If, in the declaration ''T D1'', D1 has the form
5920 <pre>
5921          * type-qualifier-list<sub>opt</sub> D</pre>
5922  and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list
5923  T '', then the type specified for ident is ''derived-declarator-type-list type-qualifier-list
5924  pointer to T ''. For each type qualifier in the list, ident is a so-qualified pointer.
5925 <p><!--para 2 -->
5926  For two pointer types to be compatible, both shall be identically qualified and both shall
5927  be pointers to compatible types.
5928 <p><!--para 3 -->
5929  EXAMPLE The following pair of declarations demonstrates the difference between a ''variable pointer
5930  to a constant value'' and a ''constant pointer to a variable value''.
5931 <!--page 128 -->
5932 <pre>
5933           const int *ptr_to_constant;
5934           int *const constant_ptr;</pre>
5935  The contents of any object pointed to by ptr_to_constant shall not be modified through that pointer,
5936  but ptr_to_constant itself may be changed to point to another object. Similarly, the contents of the
5937  int pointed to by constant_ptr may be modified, but constant_ptr itself shall always point to the
5938  same location.
5939 <p><!--para 4 -->
5940  The declaration of the constant pointer constant_ptr may be clarified by including a definition for the
5941  type ''pointer to int''.
5942 <pre>
5943           typedef int *int_ptr;
5944           const int_ptr constant_ptr;</pre>
5945  declares constant_ptr as an object that has type ''const-qualified pointer to int''.
5946  
5947
5948 <h5><a name="6.7.5.2" href="#6.7.5.2">6.7.5.2 Array declarators</a></h5>
5949 <h6>Constraints</h6>
5950 <p><!--para 1 -->
5951  In addition to optional type qualifiers and the keyword static, the [ and ] may delimit
5952  an expression or *. If they delimit an expression (which specifies the size of an array), the
5953  expression shall have an integer type. If the expression is a constant expression, it shall
5954  have a value greater than zero. The element type shall not be an incomplete or function
5955  type. The optional type qualifiers and the keyword static shall appear only in a
5956  declaration of a function parameter with an array type, and then only in the outermost
5957  array type derivation.
5958 <p><!--para 2 -->
5959  An ordinary identifier (as defined in <a href="#6.2.3">6.2.3</a>) that has a variably modified type shall have
5960  either block scope and no linkage or function prototype scope. If an identifier is declared
5961  to be an object with static storage duration, it shall not have a variable length array type.
5962 <h6>Semantics</h6>
5963 <p><!--para 3 -->
5964  If, in the declaration ''T D1'', D1 has one of the forms:
5965 <pre>
5966           D[ type-qualifier-list<sub>opt</sub> assignment-expressionopt ]
5967           D[ static type-qualifier-list<sub>opt</sub> assignment-expression ]
5968           D[ type-qualifier-list static assignment-expression ]
5969           D[ type-qualifier-list<sub>opt</sub> * ]</pre>
5970  and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list
5971  T '', then the type specified for ident is ''derived-declarator-type-list array of T ''.<sup><a href="#note123"><b>123)</b></a></sup>
5972  (See <a href="#6.7.5.3">6.7.5.3</a> for the meaning of the optional type qualifiers and the keyword static.)
5973 <p><!--para 4 -->
5974  If the size is not present, the array type is an incomplete type. If the size is * instead of
5975  being an expression, the array type is a variable length array type of unspecified size,
5976  which can only be used in declarations with function prototype scope;<sup><a href="#note124"><b>124)</b></a></sup> such arrays are
5977  nonetheless complete types. If the size is an integer constant expression and the element
5978  
5979 <!--page 129 -->
5980  type has a known constant size, the array type is not a variable length array type;
5981  otherwise, the array type is a variable length array type.
5982 <p><!--para 5 -->
5983  If the size is an expression that is not an integer constant expression: if it occurs in a
5984  declaration at function prototype scope, it is treated as if it were replaced by *; otherwise,
5985  each time it is evaluated it shall have a value greater than zero. The size of each instance
5986  of a variable length array type does not change during its lifetime. Where a size
5987  expression is part of the operand of a sizeof operator and changing the value of the
5988  size expression would not affect the result of the operator, it is unspecified whether or not
5989  the size expression is evaluated.
5990 <p><!--para 6 -->
5991  For two array types to be compatible, both shall have compatible element types, and if
5992  both size specifiers are present, and are integer constant expressions, then both size
5993  specifiers shall have the same constant value. If the two array types are used in a context
5994  which requires them to be compatible, it is undefined behavior if the two size specifiers
5995  evaluate to unequal values.
5996 <p><!--para 7 -->
5997  EXAMPLE 1
5998 <pre>
5999           float fa[11], *afp[17];</pre>
6000  declares an array of float numbers and an array of pointers to float numbers.
6001  
6002 <p><!--para 8 -->
6003  EXAMPLE 2       Note the distinction between the declarations
6004 <pre>
6005           extern int *x;
6006           extern int y[];</pre>
6007  The first declares x to be a pointer to int; the second declares y to be an array of int of unspecified size
6008  (an incomplete type), the storage for which is defined elsewhere.
6009  
6010 <p><!--para 9 -->
6011  EXAMPLE 3       The following declarations demonstrate the compatibility rules for variably modified types.
6012 <pre>
6013           extern int n;
6014           extern int m;
6015           void fcompat(void)
6016           {
6017                 int a[n][6][m];
6018                 int (*p)[4][n+1];
6019                 int c[n][n][6][m];
6020                 int (*r)[n][n][n+1];
6021                 p = a;      // invalid: not compatible because 4 != 6
6022                 r = c;      // compatible, but defined behavior only if
6023                             // n == 6 and m == n+1
6024           }</pre>
6025  
6026  
6027  
6028  
6029 <!--page 130 -->
6030 <p><!--para 10 -->
6031  EXAMPLE 4 All declarations of variably modified (VM) types have to be at either block scope or
6032  function prototype scope. Array objects declared with the static or extern storage-class specifier
6033  cannot have a variable length array (VLA) type. However, an object declared with the static storage-
6034  class specifier can have a VM type (that is, a pointer to a VLA type). Finally, all identifiers declared with a
6035  VM type have to be ordinary identifiers and cannot, therefore, be members of structures or unions.
6036 <pre>
6037           extern int n;
6038           int A[n];                                             // invalid: file scope VLA
6039           extern int (*p2)[n];                                  // invalid: file scope VM
6040           int B[100];                                           // valid: file scope but not VM
6041           void fvla(int m, int C[m][m]);                        // valid: VLA with prototype scope
6042           void fvla(int m, int C[m][m])                         // valid: adjusted to auto pointer to VLA
6043           {
6044                 typedef int VLA[m][m];                          // valid: block scope typedef VLA
6045                    struct tag {
6046                          int (*y)[n];                           // invalid: y not ordinary identifier
6047                          int z[n];                              // invalid: z not ordinary identifier
6048                    };
6049                    int D[m];                                    //   valid: auto VLA
6050                    static int E[m];                             //   invalid: static block scope VLA
6051                    extern int F[m];                             //   invalid: F has linkage and is VLA
6052                    int (*s)[m];                                 //   valid: auto pointer to VLA
6053                    extern int (*r)[m];                          //   invalid: r has linkage and points to VLA
6054                    static int (*q)[m] = &amp;B;                     //   valid: q is a static block pointer to VLA
6055           }</pre>
6056  
6057 <p><b> Forward references</b>:            function declarators (<a href="#6.7.5.3">6.7.5.3</a>), function definitions (<a href="#6.9.1">6.9.1</a>),
6058  initialization (<a href="#6.7.8">6.7.8</a>).
6059
6060 <h6>footnotes</h6>
6061 <p><small><a name="note123" href="#note123">123)</a> When several ''array of'' specifications are adjacent, a multidimensional array is declared.
6062 </small>
6063 <p><small><a name="note124" href="#note124">124)</a> Thus, * can be used only in function declarations that are not definitions (see <a href="#6.7.5.3">6.7.5.3</a>).
6064 </small>
6065
6066 <h5><a name="6.7.5.3" href="#6.7.5.3">6.7.5.3 Function declarators (including prototypes)</a></h5>
6067 <h6>Constraints</h6>
6068 <p><!--para 1 -->
6069  A function declarator shall not specify a return type that is a function type or an array
6070  type.
6071 <p><!--para 2 -->
6072  The only storage-class specifier that shall occur in a parameter declaration is register.
6073 <p><!--para 3 -->
6074  An identifier list in a function declarator that is not part of a definition of that function
6075  shall be empty.
6076 <p><!--para 4 -->
6077  After adjustment, the parameters in a parameter type list in a function declarator that is
6078  part of a definition of that function shall not have incomplete type.
6079 <h6>Semantics</h6>
6080 <p><!--para 5 -->
6081  If, in the declaration ''T D1'', D1 has the form
6082 <pre>
6083           D( parameter-type-list )</pre>
6084  or
6085 <!--page 131 -->
6086 <pre>
6087           D( identifier-list<sub>opt</sub> )</pre>
6088  and the type specified for ident in the declaration ''T D'' is ''derived-declarator-type-list
6089  T '', then the type specified for ident is ''derived-declarator-type-list function returning
6090  T ''.
6091 <p><!--para 6 -->
6092  A parameter type list specifies the types of, and may declare identifiers for, the
6093  parameters of the function.
6094 <p><!--para 7 -->
6095  A declaration of a parameter as ''array of type'' shall be adjusted to ''qualified pointer to
6096  type'', where the type qualifiers (if any) are those specified within the [ and ] of the
6097  array type derivation. If the keyword static also appears within the [ and ] of the
6098  array type derivation, then for each call to the function, the value of the corresponding
6099  actual argument shall provide access to the first element of an array with at least as many
6100  elements as specified by the size expression.
6101 <p><!--para 8 -->
6102  A declaration of a parameter as ''function returning type'' shall be adjusted to ''pointer to
6103  function returning type'', as in <a href="#6.3.2.1">6.3.2.1</a>.
6104 <p><!--para 9 -->
6105  If the list terminates with an ellipsis (, ...), no information about the number or types
6106  of the parameters after the comma is supplied.<sup><a href="#note125"><b>125)</b></a></sup>
6107 <p><!--para 10 -->
6108  The special case of an unnamed parameter of type void as the only item in the list
6109  specifies that the function has no parameters.
6110 <p><!--para 11 -->
6111  If, in a parameter declaration, an identifier can be treated either as a typedef name or as a
6112  parameter name, it shall be taken as a typedef name.
6113 <p><!--para 12 -->
6114  If the function declarator is not part of a definition of that function, parameters may have
6115  incomplete type and may use the [*] notation in their sequences of declarator specifiers
6116  to specify variable length array types.
6117 <p><!--para 13 -->
6118  The storage-class specifier in the declaration specifiers for a parameter declaration, if
6119  present, is ignored unless the declared parameter is one of the members of the parameter
6120  type list for a function definition.
6121 <p><!--para 14 -->
6122  An identifier list declares only the identifiers of the parameters of the function. An empty
6123  list in a function declarator that is part of a definition of that function specifies that the
6124  function has no parameters. The empty list in a function declarator that is not part of a
6125  definition of that function specifies that no information about the number or types of the
6126  parameters is supplied.<sup><a href="#note126"><b>126)</b></a></sup>
6127 <p><!--para 15 -->
6128  For two function types to be compatible, both shall specify compatible return types.<sup><a href="#note127"><b>127)</b></a></sup>
6129  
6130  
6131 <!--page 132 -->
6132  Moreover, the parameter type lists, if both are present, shall agree in the number of
6133  parameters and in use of the ellipsis terminator; corresponding parameters shall have
6134  compatible types. If one type has a parameter type list and the other type is specified by a
6135  function declarator that is not part of a function definition and that contains an empty
6136  identifier list, the parameter list shall not have an ellipsis terminator and the type of each
6137  parameter shall be compatible with the type that results from the application of the
6138  default argument promotions. If one type has a parameter type list and the other type is
6139  specified by a function definition that contains a (possibly empty) identifier list, both shall
6140  agree in the number of parameters, and the type of each prototype parameter shall be
6141  compatible with the type that results from the application of the default argument
6142  promotions to the type of the corresponding identifier. (In the determination of type
6143  compatibility and of a composite type, each parameter declared with function or array
6144  type is taken as having the adjusted type and each parameter declared with qualified type
6145  is taken as having the unqualified version of its declared type.)
6146 <p><!--para 16 -->
6147  EXAMPLE 1       The declaration
6148 <pre>
6149           int f(void), *fip(), (*pfi)();</pre>
6150  declares a function f with no parameters returning an int, a function fip with no parameter specification
6151  returning a pointer to an int, and a pointer pfi to a function with no parameter specification returning an
6152  int. It is especially useful to compare the last two. The binding of *fip() is *(fip()), so that the
6153  declaration suggests, and the same construction in an expression requires, the calling of a function fip,
6154  and then using indirection through the pointer result to yield an int. In the declarator (*pfi)(), the
6155  extra parentheses are necessary to indicate that indirection through a pointer to a function yields a function
6156  designator, which is then used to call the function; it returns an int.
6157 <p><!--para 17 -->
6158  If the declaration occurs outside of any function, the identifiers have file scope and external linkage. If the
6159  declaration occurs inside a function, the identifiers of the functions f and fip have block scope and either
6160  internal or external linkage (depending on what file scope declarations for these identifiers are visible), and
6161  the identifier of the pointer pfi has block scope and no linkage.
6162  
6163 <p><!--para 18 -->
6164  EXAMPLE 2       The declaration
6165 <pre>
6166           int (*apfi[3])(int *x, int *y);</pre>
6167  declares an array apfi of three pointers to functions returning int. Each of these functions has two
6168  parameters that are pointers to int. The identifiers x and y are declared for descriptive purposes only and
6169  go out of scope at the end of the declaration of apfi.
6170  
6171 <p><!--para 19 -->
6172  EXAMPLE 3       The declaration
6173 <pre>
6174           int (*fpfi(int (*)(long), int))(int, ...);</pre>
6175  declares a function fpfi that returns a pointer to a function returning an int. The function fpfi has two
6176  parameters: a pointer to a function returning an int (with one parameter of type long int), and an int.
6177  The pointer returned by fpfi points to a function that has one int parameter and accepts zero or more
6178  additional arguments of any type.
6179 <!--page 133 -->
6180 <p><!--para 20 -->
6181  EXAMPLE 4        The following prototype has a variably modified parameter.
6182 <pre>
6183            void addscalar(int n, int m,
6184                  double a[n][n*m+300], double x);
6185            int main()
6186            {
6187                  double b[4][308];
6188                  addscalar(4, 2, b, <a href="#2.17">2.17</a>);
6189                  return 0;
6190            }
6191            void addscalar(int n, int m,
6192                  double a[n][n*m+300], double x)
6193            {
6194                  for (int i = 0; i &lt; n; i++)
6195                        for (int j = 0, k = n*m+300; j &lt; k; j++)
6196                              // a is a pointer to a VLA with n*m+300 elements
6197                              a[i][j] += x;
6198            }</pre>
6199  
6200 <p><!--para 21 -->
6201  EXAMPLE 5        The following are all compatible function prototype declarators.
6202 <pre>
6203            double    maximum(int       n,   int   m,   double   a[n][m]);
6204            double    maximum(int       n,   int   m,   double   a[*][*]);
6205            double    maximum(int       n,   int   m,   double   a[ ][*]);
6206            double    maximum(int       n,   int   m,   double   a[ ][m]);</pre>
6207  as are:
6208 <pre>
6209            void   f(double     (* restrict a)[5]);
6210            void   f(double     a[restrict][5]);
6211            void   f(double     a[restrict 3][5]);
6212            void   f(double     a[restrict static 3][5]);</pre>
6213  (Note that the last declaration also specifies that the argument corresponding to a in any call to f must be a
6214  non-null pointer to the first of at least three arrays of 5 doubles, which the others do not.)
6215  
6216 <p><b> Forward references</b>: function definitions (<a href="#6.9.1">6.9.1</a>), type names (<a href="#6.7.6">6.7.6</a>).
6217 <!--page 134 -->
6218
6219 <h6>footnotes</h6>
6220 <p><small><a name="note125" href="#note125">125)</a> The macros defined in the <a href="#7.15">&lt;stdarg.h&gt;</a> header (<a href="#7.15">7.15</a>) may be used to access arguments that
6221  correspond to the ellipsis.
6222 </small>
6223 <p><small><a name="note126" href="#note126">126)</a> See ''future language directions'' (<a href="#6.11.6">6.11.6</a>).
6224 </small>
6225 <p><small><a name="note127" href="#note127">127)</a> If both function types are ''old style'', parameter types are not compared.
6226 </small>
6227
6228 <h4><a name="6.7.6" href="#6.7.6">6.7.6 Type names</a></h4>
6229 <h6>Syntax</h6>
6230 <p><!--para 1 -->
6231 <pre>
6232           type-name:
6233                  specifier-qualifier-list abstract-declarator<sub>opt</sub>
6234           abstract-declarator:
6235                  pointer
6236                  pointer<sub>opt</sub> direct-abstract-declarator
6237           direct-abstract-declarator:
6238                   ( abstract-declarator )
6239                   direct-abstract-declarator<sub>opt</sub> [ type-qualifier-list<sub>opt</sub>
6240                                  assignment-expression<sub>opt</sub> ]
6241                   direct-abstract-declarator<sub>opt</sub> [ static type-qualifier-list<sub>opt</sub>
6242                                  assignment-expression ]
6243                   direct-abstract-declarator<sub>opt</sub> [ type-qualifier-list static
6244                                  assignment-expression ]
6245                   direct-abstract-declarator<sub>opt</sub> [ * ]
6246                   direct-abstract-declarator<sub>opt</sub> ( parameter-type-list<sub>opt</sub> )</pre>
6247 <h6>Semantics</h6>
6248 <p><!--para 2 -->
6249  In several contexts, it is necessary to specify a type. This is accomplished using a type
6250  name, which is syntactically a declaration for a function or an object of that type that
6251  omits the identifier.<sup><a href="#note128"><b>128)</b></a></sup>
6252 <p><!--para 3 -->
6253  EXAMPLE        The constructions
6254 <pre>
6255           (a)      int
6256           (b)      int   *
6257           (c)      int   *[3]
6258           (d)      int   (*)[3]
6259           (e)      int   (*)[*]
6260           (f)      int   *()
6261           (g)      int   (*)(void)
6262           (h)      int   (*const [])(unsigned int, ...)</pre>
6263  name respectively the types (a) int, (b) pointer to int, (c) array of three pointers to int, (d) pointer to an
6264  array of three ints, (e) pointer to a variable length array of an unspecified number of ints, (f) function
6265  with no parameter specification returning a pointer to int, (g) pointer to function with no parameters
6266  returning an int, and (h) array of an unspecified number of constant pointers to functions, each with one
6267  parameter that has type unsigned int and an unspecified number of other parameters, returning an
6268  int.
6269  
6270  
6271  
6272  
6273 <!--page 135 -->
6274
6275 <h6>footnotes</h6>
6276 <p><small><a name="note128" href="#note128">128)</a> As indicated by the syntax, empty parentheses in a type name are interpreted as ''function with no
6277  parameter specification'', rather than redundant parentheses around the omitted identifier.
6278 </small>
6279
6280 <h4><a name="6.7.7" href="#6.7.7">6.7.7 Type definitions</a></h4>
6281 <h6>Syntax</h6>
6282 <p><!--para 1 -->
6283 <pre>
6284           typedef-name:
6285                  identifier</pre>
6286 <h6>Constraints</h6>
6287 <p><!--para 2 -->
6288  If a typedef name specifies a variably modified type then it shall have block scope.
6289 <h6>Semantics</h6>
6290 <p><!--para 3 -->
6291  In a declaration whose storage-class specifier is typedef, each declarator defines an
6292  identifier to be a typedef name that denotes the type specified for the identifier in the way
6293  described in <a href="#6.7.5">6.7.5</a>. Any array size expressions associated with variable length array
6294  declarators are evaluated each time the declaration of the typedef name is reached in the
6295  order of execution. A typedef declaration does not introduce a new type, only a
6296  synonym for the type so specified. That is, in the following declarations:
6297 <pre>
6298           typedef T type_ident;
6299           type_ident D;</pre>
6300  type_ident is defined as a typedef name with the type specified by the declaration
6301  specifiers in T (known as T ), and the identifier in D has the type ''derived-declarator-
6302  type-list T '' where the derived-declarator-type-list is specified by the declarators of D. A
6303  typedef name shares the same name space as other identifiers declared in ordinary
6304  declarators.
6305 <p><!--para 4 -->
6306  EXAMPLE 1       After
6307 <pre>
6308           typedef int MILES, KLICKSP();
6309           typedef struct { double hi, lo; } range;</pre>
6310  the constructions
6311 <pre>
6312           MILES distance;
6313           extern KLICKSP *metricp;
6314           range x;
6315           range z, *zp;</pre>
6316  are all valid declarations. The type of distance is int, that of metricp is ''pointer to function with no
6317  parameter specification returning int'', and that of x and z is the specified structure; zp is a pointer to
6318  such a structure. The object distance has a type compatible with any other int object.
6319  
6320 <p><!--para 5 -->
6321  EXAMPLE 2       After the declarations
6322 <pre>
6323           typedef struct s1 { int x; } t1, *tp1;
6324           typedef struct s2 { int x; } t2, *tp2;</pre>
6325  type t1 and the type pointed to by tp1 are compatible. Type t1 is also compatible with type struct
6326  s1, but not compatible with the types struct s2, t2, the type pointed to by tp2, or int.
6327 <!--page 136 -->
6328 <p><!--para 6 -->
6329  EXAMPLE 3       The following obscure constructions
6330 <pre>
6331          typedef signed int t;
6332          typedef int plain;
6333          struct tag {
6334                unsigned t:4;
6335                const t:5;
6336                plain r:5;
6337          };</pre>
6338  declare a typedef name t with type signed int, a typedef name plain with type int, and a structure
6339  with three bit-field members, one named t that contains values in the range [0, 15], an unnamed const-
6340  qualified bit-field which (if it could be accessed) would contain values in either the range [-15, +15] or
6341  [-16, +15], and one named r that contains values in one of the ranges [0, 31], [-15, +15], or [-16, +15].
6342  (The choice of range is implementation-defined.) The first two bit-field declarations differ in that
6343  unsigned is a type specifier (which forces t to be the name of a structure member), while const is a
6344  type qualifier (which modifies t which is still visible as a typedef name). If these declarations are followed
6345  in an inner scope by
6346 <pre>
6347          t f(t (t));
6348          long t;</pre>
6349  then a function f is declared with type ''function returning signed int with one unnamed parameter
6350  with type pointer to function returning signed int with one unnamed parameter with type signed
6351  int'', and an identifier t with type long int.
6352  
6353 <p><!--para 7 -->
6354  EXAMPLE 4 On the other hand, typedef names can be used to improve code readability. All three of the
6355  following declarations of the signal function specify exactly the same type, the first without making use
6356  of any typedef names.
6357 <pre>
6358          typedef void fv(int), (*pfv)(int);
6359          void (*signal(int, void (*)(int)))(int);
6360          fv *signal(int, fv *);
6361          pfv signal(int, pfv);</pre>
6362  
6363 <p><!--para 8 -->
6364  EXAMPLE 5 If a typedef name denotes a variable length array type, the length of the array is fixed at the
6365  time the typedef name is defined, not each time it is used:
6366 <!--page 137 -->
6367 <pre>
6368          void copyt(int n)
6369          {
6370                typedef int B[n];    //               B is n ints, n evaluated now
6371                n += 1;
6372                B a;                //                a is n ints, n without += 1
6373                int b[n];           //                a and b are different sizes
6374                for (int i = 1; i &lt; n;                i++)
6375                      a[i-1] = b[i];
6376          }</pre>
6377
6378 <h4><a name="6.7.8" href="#6.7.8">6.7.8 Initialization</a></h4>
6379 <h6>Syntax</h6>
6380 <p><!--para 1 -->
6381 <pre>
6382           initializer:
6383                    assignment-expression
6384                    { initializer-list }
6385                    { initializer-list , }
6386           initializer-list:
6387                    designationopt initializer
6388                    initializer-list , designation<sub>opt</sub> initializer
6389           designation:
6390                  designator-list =
6391           designator-list:
6392                  designator
6393                  designator-list designator
6394           designator:
6395                  [ constant-expression ]
6396                  . identifier</pre>
6397 <h6>Constraints</h6>
6398 <p><!--para 2 -->
6399  No initializer shall attempt to provide a value for an object not contained within the entity
6400  being initialized.
6401 <p><!--para 3 -->
6402  The type of the entity to be initialized shall be an array of unknown size or an object type
6403  that is not a variable length array type.
6404 <p><!--para 4 -->
6405  All the expressions in an initializer for an object that has static storage duration shall be
6406  constant expressions or string literals.
6407 <p><!--para 5 -->
6408  If the declaration of an identifier has block scope, and the identifier has external or
6409  internal linkage, the declaration shall have no initializer for the identifier.
6410 <p><!--para 6 -->
6411  If a designator has the form
6412 <pre>
6413           [ constant-expression ]</pre>
6414  then the current object (defined below) shall have array type and the expression shall be
6415  an integer constant expression. If the array is of unknown size, any nonnegative value is
6416  valid.
6417 <p><!--para 7 -->
6418  If a designator has the form
6419 <pre>
6420           . identifier</pre>
6421  then the current object (defined below) shall have structure or union type and the
6422  identifier shall be the name of a member of that type.
6423 <!--page 138 -->
6424 <h6>Semantics</h6>
6425 <p><!--para 8 -->
6426  An initializer specifies the initial value stored in an object.
6427 <p><!--para 9 -->
6428  Except where explicitly stated otherwise, for the purposes of this subclause unnamed
6429  members of objects of structure and union type do not participate in initialization.
6430  Unnamed members of structure objects have indeterminate value even after initialization.
6431 <p><!--para 10 -->
6432  If an object that has automatic storage duration is not initialized explicitly, its value is
6433  indeterminate. If an object that has static storage duration is not initialized explicitly,
6434  then:
6435 <ul>
6436 <li>  if it has pointer type, it is initialized to a null pointer;
6437 <li>  if it has arithmetic type, it is initialized to (positive or unsigned) zero;
6438 <li>  if it is an aggregate, every member is initialized (recursively) according to these rules;
6439 <li>  if it is a union, the first named member is initialized (recursively) according to these
6440  rules.
6441 </ul>
6442 <p><!--para 11 -->
6443  The initializer for a scalar shall be a single expression, optionally enclosed in braces. The
6444  initial value of the object is that of the expression (after conversion); the same type
6445  constraints and conversions as for simple assignment apply, taking the type of the scalar
6446  to be the unqualified version of its declared type.
6447 <p><!--para 12 -->
6448  The rest of this subclause deals with initializers for objects that have aggregate or union
6449  type.
6450 <p><!--para 13 -->
6451  The initializer for a structure or union object that has automatic storage duration shall be
6452  either an initializer list as described below, or a single expression that has compatible
6453  structure or union type. In the latter case, the initial value of the object, including
6454  unnamed members, is that of the expression.
6455 <p><!--para 14 -->
6456  An array of character type may be initialized by a character string literal, optionally
6457  enclosed in braces. Successive characters of the character string literal (including the
6458  terminating null character if there is room or if the array is of unknown size) initialize the
6459  elements of the array.
6460 <p><!--para 15 -->
6461  An array with element type compatible with wchar_t may be initialized by a wide
6462  string literal, optionally enclosed in braces. Successive wide characters of the wide string
6463  literal (including the terminating null wide character if there is room or if the array is of
6464  unknown size) initialize the elements of the array.
6465 <p><!--para 16 -->
6466  Otherwise, the initializer for an object that has aggregate or union type shall be a brace-
6467  enclosed list of initializers for the elements or named members.
6468 <p><!--para 17 -->
6469  Each brace-enclosed initializer list has an associated current object. When no
6470  designations are present, subobjects of the current object are initialized in order according
6471  to the type of the current object: array elements in increasing subscript order, structure
6472 <!--page 139 -->
6473  members in declaration order, and the first named member of a union.<sup><a href="#note129"><b>129)</b></a></sup> In contrast, a
6474  designation causes the following initializer to begin initialization of the subobject
6475  described by the designator. Initialization then continues forward in order, beginning
6476  with the next subobject after that described by the designator.<sup><a href="#note130"><b>130)</b></a></sup>
6477 <p><!--para 18 -->
6478  Each designator list begins its description with the current object associated with the
6479  closest surrounding brace pair. Each item in the designator list (in order) specifies a
6480  particular member of its current object and changes the current object for the next
6481  designator (if any) to be that member.<sup><a href="#note131"><b>131)</b></a></sup> The current object that results at the end of the
6482  designator list is the subobject to be initialized by the following initializer.
6483 <p><!--para 19 -->
6484  The initialization shall occur in initializer list order, each initializer provided for a
6485  particular subobject overriding any previously listed initializer for the same subobject;<sup><a href="#note132"><b>132)</b></a></sup>
6486  all subobjects that are not initialized explicitly shall be initialized implicitly the same as
6487  objects that have static storage duration.
6488 <p><!--para 20 -->
6489  If the aggregate or union contains elements or members that are aggregates or unions,
6490  these rules apply recursively to the subaggregates or contained unions. If the initializer of
6491  a subaggregate or contained union begins with a left brace, the initializers enclosed by
6492  that brace and its matching right brace initialize the elements or members of the
6493  subaggregate or the contained union. Otherwise, only enough initializers from the list are
6494  taken to account for the elements or members of the subaggregate or the first member of
6495  the contained union; any remaining initializers are left to initialize the next element or
6496  member of the aggregate of which the current subaggregate or contained union is a part.
6497 <p><!--para 21 -->
6498  If there are fewer initializers in a brace-enclosed list than there are elements or members
6499  of an aggregate, or fewer characters in a string literal used to initialize an array of known
6500  size than there are elements in the array, the remainder of the aggregate shall be
6501  initialized implicitly the same as objects that have static storage duration.
6502 <p><!--para 22 -->
6503  If an array of unknown size is initialized, its size is determined by the largest indexed
6504  element with an explicit initializer. At the end of its initializer list, the array no longer
6505  has incomplete type.
6506  
6507  
6508  
6509 <!--page 140 -->
6510 <p><!--para 23 -->
6511  The order in which any side effects occur among the initialization list expressions is
6512  unspecified.<sup><a href="#note133"><b>133)</b></a></sup>
6513 <p><!--para 24 -->
6514  EXAMPLE 1       Provided that <a href="#7.3">&lt;complex.h&gt;</a> has been #included, the declarations
6515 <pre>
6516           int i = <a href="#3.5">3.5</a>;
6517           double complex c = 5 + 3 * I;</pre>
6518  define and initialize i with the value 3 and c with the value 5.0 + i3.0.
6519  
6520 <p><!--para 25 -->
6521  EXAMPLE 2 The declaration
6522 <pre>
6523           int x[] = { 1, 3, 5 };</pre>
6524  defines and initializes x as a one-dimensional array object that has three elements, as no size was specified
6525  and there are three initializers.
6526  
6527 <p><!--para 26 -->
6528  EXAMPLE 3       The declaration
6529 <pre>
6530           int y[4][3] =         {
6531                 { 1, 3,         5 },
6532                 { 2, 4,         6 },
6533                 { 3, 5,         7 },
6534           };</pre>
6535  is a definition with a fully bracketed initialization: 1, 3, and 5 initialize the first row of y (the array object
6536  y[0]), namely y[0][0], y[0][1], and y[0][2]. Likewise the next two lines initialize y[1] and
6537  y[2]. The initializer ends early, so y[3] is initialized with zeros. Precisely the same effect could have
6538  been achieved by
6539 <pre>
6540           int y[4][3] = {
6541                 1, 3, 5, 2, 4, 6, 3, 5, 7
6542           };</pre>
6543  The initializer for y[0] does not begin with a left brace, so three items from the list are used. Likewise the
6544  next three are taken successively for y[1] and y[2].
6545  
6546 <p><!--para 27 -->
6547  EXAMPLE 4       The declaration
6548 <pre>
6549           int z[4][3] = {
6550                 { 1 }, { 2 }, { 3 }, { 4 }
6551           };</pre>
6552  initializes the first column of z as specified and initializes the rest with zeros.
6553  
6554 <p><!--para 28 -->
6555  EXAMPLE 5       The declaration
6556 <pre>
6557           struct { int a[3], b; } w[] = { { 1 }, 2 };</pre>
6558  is a definition with an inconsistently bracketed initialization. It defines an array with two element
6559  structures: w[0].a[0] is 1 and w[1].a[0] is 2; all the other elements are zero.
6560  
6561  
6562  
6563  
6564 <!--page 141 -->
6565 <p><!--para 29 -->
6566  EXAMPLE 6         The declaration
6567 <pre>
6568            short q[4][3][2] = {
6569                  { 1 },
6570                  { 2, 3 },
6571                  { 4, 5, 6 }
6572            };</pre>
6573  contains an incompletely but consistently bracketed initialization. It defines a three-dimensional array
6574  object: q[0][0][0] is 1, q[1][0][0] is 2, q[1][0][1] is 3, and 4, 5, and 6 initialize
6575  q[2][0][0], q[2][0][1], and q[2][1][0], respectively; all the rest are zero. The initializer for
6576  q[0][0] does not begin with a left brace, so up to six items from the current list may be used. There is
6577  only one, so the values for the remaining five elements are initialized with zero. Likewise, the initializers
6578  for q[1][0] and q[2][0] do not begin with a left brace, so each uses up to six items, initializing their
6579  respective two-dimensional subaggregates. If there had been more than six items in any of the lists, a
6580  diagnostic message would have been issued. The same initialization result could have been achieved by:
6581 <pre>
6582            short q[4][3][2] = {
6583                  1, 0, 0, 0, 0, 0,
6584                  2, 3, 0, 0, 0, 0,
6585                  4, 5, 6
6586            };</pre>
6587  or by:
6588 <pre>
6589            short q[4][3][2] = {
6590                  {
6591                        { 1 },
6592                  },
6593                  {
6594                        { 2, 3 },
6595                  },
6596                  {
6597                        { 4, 5 },
6598                        { 6 },
6599                  }
6600            };</pre>
6601  in a fully bracketed form.
6602 <p><!--para 30 -->
6603  Note that the fully bracketed and minimally bracketed forms of initialization are, in general, less likely to
6604  cause confusion.
6605  
6606 <p><!--para 31 -->
6607  EXAMPLE 7         One form of initialization that completes array types involves typedef names. Given the
6608  declaration
6609 <pre>
6610            typedef int A[];          // OK - declared with block scope</pre>
6611  the declaration
6612 <pre>
6613            A a = { 1, 2 }, b = { 3, 4, 5 };</pre>
6614  is identical to
6615 <pre>
6616            int a[] = { 1, 2 }, b[] = { 3, 4, 5 };</pre>
6617  due to the rules for incomplete types.
6618 <!--page 142 -->
6619 <p><!--para 32 -->
6620  EXAMPLE 8       The declaration
6621 <pre>
6622           char s[] = "abc", t[3] = "abc";</pre>
6623  defines ''plain'' char array objects s and t whose elements are initialized with character string literals.
6624  This declaration is identical to
6625 <pre>
6626           char s[] = { 'a', 'b', 'c', '\0' },
6627                t[] = { 'a', 'b', 'c' };</pre>
6628  The contents of the arrays are modifiable. On the other hand, the declaration
6629 <pre>
6630           char *p = "abc";</pre>
6631  defines p with type ''pointer to char'' and initializes it to point to an object with type ''array of char''
6632  with length 4 whose elements are initialized with a character string literal. If an attempt is made to use p to
6633  modify the contents of the array, the behavior is undefined.
6634  
6635 <p><!--para 33 -->
6636  EXAMPLE 9       Arrays can be initialized to correspond to the elements of an enumeration by using
6637  designators:
6638 <pre>
6639           enum { member_one,           member_two };
6640           const char *nm[] =           {
6641                 [member_two]           = "member two",
6642                 [member_one]           = "member one",
6643           };</pre>
6644  
6645 <p><!--para 34 -->
6646  EXAMPLE 10       Structure members can be initialized to nonzero values without depending on their order:
6647 <pre>
6648           div_t answer = { .quot = 2, .rem = -1 };</pre>
6649  
6650 <p><!--para 35 -->
6651  EXAMPLE 11 Designators can be used to provide explicit initialization when unadorned initializer lists
6652  might be misunderstood:
6653 <pre>
6654           struct { int a[3], b; } w[] =
6655                 { [0].a = {1}, [1].a[0] = 2 };</pre>
6656  
6657 <p><!--para 36 -->
6658  EXAMPLE 12       Space can be ''allocated'' from both ends of an array by using a single designator:
6659 <p><!--para 37 -->
6660 <pre>
6661           int a[MAX] = {
6662                 1, 3, 5, 7, 9, [MAX-5] = 8, 6, 4, 2, 0
6663           };</pre>
6664  In the above, if MAX is greater than ten, there will be some zero-valued elements in the middle; if it is less
6665  than ten, some of the values provided by the first five initializers will be overridden by the second five.
6666  
6667 <p><!--para 38 -->
6668  EXAMPLE 13       Any member of a union can be initialized:
6669 <pre>
6670           union { /* ... */ } u = { .any_member = 42 };</pre>
6671  
6672 <p><b> Forward references</b>: common definitions <a href="#7.17">&lt;stddef.h&gt;</a> (<a href="#7.17">7.17</a>).
6673 <!--page 143 -->
6674
6675 <h6>footnotes</h6>
6676 <p><small><a name="note129" href="#note129">129)</a> If the initializer list for a subaggregate or contained union does not begin with a left brace, its
6677  subobjects are initialized as usual, but the subaggregate or contained union does not become the
6678  current object: current objects are associated only with brace-enclosed initializer lists.
6679 </small>
6680 <p><small><a name="note130" href="#note130">130)</a> After a union member is initialized, the next object is not the next member of the union; instead, it is
6681  the next subobject of an object containing the union.
6682 </small>
6683 <p><small><a name="note131" href="#note131">131)</a> Thus, a designator can only specify a strict subobject of the aggregate or union that is associated with
6684  the surrounding brace pair. Note, too, that each separate designator list is independent.
6685 </small>
6686 <p><small><a name="note132" href="#note132">132)</a> Any initializer for the subobject which is overridden and so not used to initialize that subobject might
6687  not be evaluated at all.
6688 </small>
6689 <p><small><a name="note133" href="#note133">133)</a> In particular, the evaluation order need not be the same as the order of subobject initialization.
6690 </small>
6691
6692 <h3><a name="6.8" href="#6.8">6.8 Statements and blocks</a></h3>
6693 <h6>Syntax</h6>
6694 <p><!--para 1 -->
6695 <pre>
6696           statement:
6697                  labeled-statement
6698                  compound-statement
6699                  expression-statement
6700                  selection-statement
6701                  iteration-statement
6702                  jump-statement</pre>
6703 <h6>Semantics</h6>
6704 <p><!--para 2 -->
6705  A statement specifies an action to be performed. Except as indicated, statements are
6706  executed in sequence.
6707 <p><!--para 3 -->
6708  A block allows a set of declarations and statements to be grouped into one syntactic unit.
6709  The initializers of objects that have automatic storage duration, and the variable length
6710  array declarators of ordinary identifiers with block scope, are evaluated and the values are
6711  stored in the objects (including storing an indeterminate value in objects without an
6712  initializer) each time the declaration is reached in the order of execution, as if it were a
6713  statement, and within each declaration in the order that declarators appear.
6714 <p><!--para 4 -->
6715  A full expression is an expression that is not part of another expression or of a declarator.
6716  Each of the following is a full expression: an initializer; the expression in an expression
6717  statement; the controlling expression of a selection statement (if or switch); the
6718  controlling expression of a while or do statement; each of the (optional) expressions of
6719  a for statement; the (optional) expression in a return statement. The end of a full
6720  expression is a sequence point.
6721 <p><b> Forward references</b>: expression and null statements (<a href="#6.8.3">6.8.3</a>), selection statements
6722  (<a href="#6.8.4">6.8.4</a>), iteration statements (<a href="#6.8.5">6.8.5</a>), the return statement (<a href="#6.8.6.4">6.8.6.4</a>).
6723
6724 <h4><a name="6.8.1" href="#6.8.1">6.8.1 Labeled statements</a></h4>
6725 <h6>Syntax</h6>
6726 <p><!--para 1 -->
6727 <pre>
6728           labeled-statement:
6729                  identifier : statement
6730                  case constant-expression : statement
6731                  default : statement</pre>
6732 <h6>Constraints</h6>
6733 <p><!--para 2 -->
6734  A case or default label shall appear only in a switch statement. Further
6735  constraints on such labels are discussed under the switch statement.
6736 <!--page 144 -->
6737 <p><!--para 3 -->
6738  Label names shall be unique within a function.
6739 <h6>Semantics</h6>
6740 <p><!--para 4 -->
6741  Any statement may be preceded by a prefix that declares an identifier as a label name.
6742  Labels in themselves do not alter the flow of control, which continues unimpeded across
6743  them.
6744 <p><b> Forward references</b>: the goto statement (<a href="#6.8.6.1">6.8.6.1</a>), the switch statement (<a href="#6.8.4.2">6.8.4.2</a>).
6745
6746 <h4><a name="6.8.2" href="#6.8.2">6.8.2 Compound statement</a></h4>
6747 <h6>Syntax</h6>
6748 <p><!--para 1 -->
6749 <pre>
6750           compound-statement:
6751                 { block-item-list<sub>opt</sub> }
6752           block-item-list:
6753                   block-item
6754                   block-item-list block-item
6755           block-item:
6756                   declaration
6757                   statement</pre>
6758 <h6>Semantics</h6>
6759 <p><!--para 2 -->
6760  A compound statement is a block.
6761
6762 <h4><a name="6.8.3" href="#6.8.3">6.8.3 Expression and null statements</a></h4>
6763 <h6>Syntax</h6>
6764 <p><!--para 1 -->
6765 <pre>
6766           expression-statement:
6767                  expression<sub>opt</sub> ;</pre>
6768 <h6>Semantics</h6>
6769 <p><!--para 2 -->
6770  The expression in an expression statement is evaluated as a void expression for its side
6771  effects.<sup><a href="#note134"><b>134)</b></a></sup>
6772 <p><!--para 3 -->
6773  A null statement (consisting of just a semicolon) performs no operations.
6774 <p><!--para 4 -->
6775  EXAMPLE 1 If a function call is evaluated as an expression statement for its side effects only, the
6776  discarding of its value may be made explicit by converting the expression to a void expression by means of
6777  a cast:
6778 <pre>
6779           int p(int);
6780           /* ... */
6781           (void)p(0);</pre>
6782  
6783  
6784  
6785 <!--page 145 -->
6786 <p><!--para 5 -->
6787  EXAMPLE 2       In the program fragment
6788 <pre>
6789           char *s;
6790           /* ... */
6791           while (*s++ != '\0')
6792                   ;</pre>
6793  a null statement is used to supply an empty loop body to the iteration statement.
6794  
6795 <p><!--para 6 -->
6796  EXAMPLE 3       A null statement may also be used to carry a label just before the closing } of a compound
6797  statement.
6798 <pre>
6799           while (loop1) {
6800                 /* ... */
6801                 while (loop2) {
6802                         /* ... */
6803                         if (want_out)
6804                                 goto end_loop1;
6805                         /* ... */
6806                 }
6807                 /* ... */
6808           end_loop1: ;
6809           }</pre>
6810  
6811 <p><b> Forward references</b>: iteration statements (<a href="#6.8.5">6.8.5</a>).
6812
6813 <h6>footnotes</h6>
6814 <p><small><a name="note134" href="#note134">134)</a> Such as assignments, and function calls which have side effects.
6815 </small>
6816
6817 <h4><a name="6.8.4" href="#6.8.4">6.8.4 Selection statements</a></h4>
6818 <h6>Syntax</h6>
6819 <p><!--para 1 -->
6820 <pre>
6821           selection-statement:
6822                   if ( expression ) statement
6823                   if ( expression ) statement else statement
6824                   switch ( expression ) statement</pre>
6825 <h6>Semantics</h6>
6826 <p><!--para 2 -->
6827  A selection statement selects among a set of statements depending on the value of a
6828  controlling expression.
6829 <p><!--para 3 -->
6830  A selection statement is a block whose scope is a strict subset of the scope of its
6831  enclosing block. Each associated substatement is also a block whose scope is a strict
6832  subset of the scope of the selection statement.
6833
6834 <h5><a name="6.8.4.1" href="#6.8.4.1">6.8.4.1 The if statement</a></h5>
6835 <h6>Constraints</h6>
6836 <p><!--para 1 -->
6837  The controlling expression of an if statement shall have scalar type.
6838 <h6>Semantics</h6>
6839 <p><!--para 2 -->
6840  In both forms, the first substatement is executed if the expression compares unequal to 0.
6841  In the else form, the second substatement is executed if the expression compares equal
6842 <!--page 146 -->
6843  to 0. If the first substatement is reached via a label, the second substatement is not
6844  executed.
6845 <p><!--para 3 -->
6846  An else is associated with the lexically nearest preceding if that is allowed by the
6847  syntax.
6848
6849 <h5><a name="6.8.4.2" href="#6.8.4.2">6.8.4.2 The switch statement</a></h5>
6850 <h6>Constraints</h6>
6851 <p><!--para 1 -->
6852  The controlling expression of a switch statement shall have integer type.
6853 <p><!--para 2 -->
6854  If a switch statement has an associated case or default label within the scope of an
6855  identifier with a variably modified type, the entire switch statement shall be within the
6856  scope of that identifier.<sup><a href="#note135"><b>135)</b></a></sup>
6857 <p><!--para 3 -->
6858  The expression of each case label shall be an integer constant expression and no two of
6859  the case constant expressions in the same switch statement shall have the same value
6860  after conversion. There may be at most one default label in a switch statement.
6861  (Any enclosed switch statement may have a default label or case constant
6862  expressions with values that duplicate case constant expressions in the enclosing
6863  switch statement.)
6864 <h6>Semantics</h6>
6865 <p><!--para 4 -->
6866  A switch statement causes control to jump to, into, or past the statement that is the
6867  switch body, depending on the value of a controlling expression, and on the presence of a
6868  default label and the values of any case labels on or in the switch body. A case or
6869  default label is accessible only within the closest enclosing switch statement.
6870 <p><!--para 5 -->
6871  The integer promotions are performed on the controlling expression. The constant
6872  expression in each case label is converted to the promoted type of the controlling
6873  expression. If a converted value matches that of the promoted controlling expression,
6874  control jumps to the statement following the matched case label. Otherwise, if there is
6875  a default label, control jumps to the labeled statement. If no converted case constant
6876  expression matches and there is no default label, no part of the switch body is
6877  executed.
6878 <h6> Implementation limits</h6>
6879 <p><!--para 6 -->
6880  As discussed in <a href="#5.2.4.1">5.2.4.1</a>, the implementation may limit the number of case values in a
6881  switch statement.
6882  
6883  
6884  
6885  
6886 <!--page 147 -->
6887 <p><!--para 7 -->
6888  EXAMPLE        In the artificial program fragment
6889 <pre>
6890           switch (expr)
6891           {
6892                 int i = 4;
6893                 f(i);
6894           case 0:
6895                 i = 17;
6896                 /* falls through into default code */
6897           default:
6898                 printf("%d\n", i);
6899           }</pre>
6900  the object whose identifier is i exists with automatic storage duration (within the block) but is never
6901  initialized, and thus if the controlling expression has a nonzero value, the call to the printf function will
6902  access an indeterminate value. Similarly, the call to the function f cannot be reached.
6903  
6904
6905 <h6>footnotes</h6>
6906 <p><small><a name="note135" href="#note135">135)</a> That is, the declaration either precedes the switch statement, or it follows the last case or
6907  default label associated with the switch that is in the block containing the declaration.
6908 </small>
6909
6910 <h4><a name="6.8.5" href="#6.8.5">6.8.5 Iteration statements</a></h4>
6911 <h6>Syntax</h6>
6912 <p><!--para 1 -->
6913 <pre>
6914           iteration-statement:
6915                   while ( expression ) statement
6916                   do statement while ( expression ) ;
6917                   for ( expression<sub>opt</sub> ; expression<sub>opt</sub> ; expression<sub>opt</sub> ) statement
6918                   for ( declaration expression<sub>opt</sub> ; expression<sub>opt</sub> ) statement</pre>
6919 <h6>Constraints</h6>
6920 <p><!--para 2 -->
6921  The controlling expression of an iteration statement shall have scalar type.
6922 <p><!--para 3 -->
6923  The declaration part of a for statement shall only declare identifiers for objects having
6924  storage class auto or register.
6925 <h6>Semantics</h6>
6926 <p><!--para 4 -->
6927  An iteration statement causes a statement called the loop body to be executed repeatedly
6928  until the controlling expression compares equal to 0. The repetition occurs regardless of
6929  whether the loop body is entered from the iteration statement or by a jump.<sup><a href="#note136"><b>136)</b></a></sup>
6930 <p><!--para 5 -->
6931  An iteration statement is a block whose scope is a strict subset of the scope of its
6932  enclosing block. The loop body is also a block whose scope is a strict subset of the scope
6933  of the iteration statement.
6934  
6935  
6936  
6937  
6938 <!--page 148 -->
6939
6940 <h6>footnotes</h6>
6941 <p><small><a name="note136" href="#note136">136)</a> Code jumped over is not executed. In particular, the controlling expression of a for or while
6942  statement is not evaluated before entering the loop body, nor is clause-1 of a for statement.
6943 </small>
6944
6945 <h5><a name="6.8.5.1" href="#6.8.5.1">6.8.5.1 The while statement</a></h5>
6946 <p><!--para 1 -->
6947  The evaluation of the controlling expression takes place before each execution of the loop
6948  body.
6949
6950 <h5><a name="6.8.5.2" href="#6.8.5.2">6.8.5.2 The do statement</a></h5>
6951 <p><!--para 1 -->
6952  The evaluation of the controlling expression takes place after each execution of the loop
6953  body.
6954
6955 <h5><a name="6.8.5.3" href="#6.8.5.3">6.8.5.3 The for statement</a></h5>
6956 <p><!--para 1 -->
6957  The statement
6958 <pre>
6959           for ( clause-1 ; expression-2 ; expression-3 ) statement</pre>
6960  behaves as follows: The expression expression-2 is the controlling expression that is
6961  evaluated before each execution of the loop body. The expression expression-3 is
6962  evaluated as a void expression after each execution of the loop body. If clause-1 is a
6963  declaration, the scope of any identifiers it declares is the remainder of the declaration and
6964  the entire loop, including the other two expressions; it is reached in the order of execution
6965  before the first evaluation of the controlling expression. If clause-1 is an expression, it is
6966  evaluated as a void expression before the first evaluation of the controlling expression.<sup><a href="#note137"><b>137)</b></a></sup>
6967 <p><!--para 2 -->
6968  Both clause-1 and expression-3 can be omitted. An omitted expression-2 is replaced by a
6969  nonzero constant.
6970
6971 <h6>footnotes</h6>
6972 <p><small><a name="note137" href="#note137">137)</a> Thus, clause-1 specifies initialization for the loop, possibly declaring one or more variables for use in
6973  the loop; the controlling expression, expression-2, specifies an evaluation made before each iteration,
6974  such that execution of the loop continues until the expression compares equal to 0; and expression-3
6975  specifies an operation (such as incrementing) that is performed after each iteration.
6976 </small>
6977
6978 <h4><a name="6.8.6" href="#6.8.6">6.8.6 Jump statements</a></h4>
6979 <h6>Syntax</h6>
6980 <p><!--para 1 -->
6981 <pre>
6982           jump-statement:
6983                  goto identifier ;
6984                  continue ;
6985                  break ;
6986                  return expression<sub>opt</sub> ;</pre>
6987 <h6>Semantics</h6>
6988 <p><!--para 2 -->
6989  A jump statement causes an unconditional jump to another place.
6990  
6991  
6992  
6993  
6994 <!--page 149 -->
6995
6996 <h5><a name="6.8.6.1" href="#6.8.6.1">6.8.6.1 The goto statement</a></h5>
6997 <h6>Constraints</h6>
6998 <p><!--para 1 -->
6999  The identifier in a goto statement shall name a label located somewhere in the enclosing
7000  function. A goto statement shall not jump from outside the scope of an identifier having
7001  a variably modified type to inside the scope of that identifier.
7002 <h6>Semantics</h6>
7003 <p><!--para 2 -->
7004  A goto statement causes an unconditional jump to the statement prefixed by the named
7005  label in the enclosing function.
7006 <p><!--para 3 -->
7007  EXAMPLE 1 It is sometimes convenient to jump into the middle of a complicated set of statements. The
7008  following outline presents one possible approach to a problem based on these three assumptions:
7009 <ol>
7010 <li>  The general initialization code accesses objects only visible to the current function.
7011 <li>  The general initialization code is too large to warrant duplication.
7012 <li>  The code to determine the next operation is at the head of the loop. (To allow it to be reached by
7013  continue statements, for example.)
7014 <pre>
7015   /* ... */
7016   goto first_time;
7017   for (;;) {
7018           // determine next operation
7019           /* ... */
7020           if (need to reinitialize) {
7021                   // reinitialize-only code
7022                   /* ... */
7023           first_time:
7024                   // general initialization code
7025                   /* ... */
7026                   continue;
7027           }
7028           // handle other operations
7029           /* ... */
7030   }</pre>
7031 <!--page 150 -->
7032 </ol>
7033 <p><!--para 4 -->
7034  EXAMPLE 2 A goto statement is not allowed to jump past any declarations of objects with variably
7035  modified types. A jump within the scope, however, is permitted.
7036 <pre>
7037          goto lab3;                         // invalid: going INTO scope of VLA.
7038          {
7039                double a[n];
7040                a[j] = <a href="#4.4">4.4</a>;
7041          lab3:
7042                a[j] = <a href="#3.3">3.3</a>;
7043                goto lab4;                   // valid: going WITHIN scope of VLA.
7044                a[j] = <a href="#5.5">5.5</a>;
7045          lab4:
7046                a[j] = <a href="#6.6">6.6</a>;
7047          }
7048          goto lab4;                         // invalid: going INTO scope of VLA.</pre>
7049  
7050
7051 <h5><a name="6.8.6.2" href="#6.8.6.2">6.8.6.2 The continue statement</a></h5>
7052 <h6>Constraints</h6>
7053 <p><!--para 1 -->
7054  A continue statement shall appear only in or as a loop body.
7055 <h6>Semantics</h6>
7056 <p><!--para 2 -->
7057  A continue statement causes a jump to the loop-continuation portion of the smallest
7058  enclosing iteration statement; that is, to the end of the loop body. More precisely, in each
7059  of the statements
7060 <pre>
7061  while (/* ... */) {                  do {                                 for (/* ... */) {
7062     /* ... */                            /* ... */                            /* ... */
7063     continue;                            continue;                            continue;
7064     /* ... */                            /* ... */                            /* ... */
7065  contin: ;                            contin: ;                            contin: ;
7066  }                                    } while (/* ... */);                 }</pre>
7067  unless the continue statement shown is in an enclosed iteration statement (in which
7068  case it is interpreted within that statement), it is equivalent to goto contin;.<sup><a href="#note138"><b>138)</b></a></sup>
7069
7070 <h6>footnotes</h6>
7071 <p><small><a name="note138" href="#note138">138)</a> Following the contin: label is a null statement.
7072 </small>
7073
7074 <h5><a name="6.8.6.3" href="#6.8.6.3">6.8.6.3 The break statement</a></h5>
7075 <h6>Constraints</h6>
7076 <p><!--para 1 -->
7077  A break statement shall appear only in or as a switch body or loop body.
7078 <h6>Semantics</h6>
7079 <p><!--para 2 -->
7080  A break statement terminates execution of the smallest enclosing switch or iteration
7081  statement.
7082  
7083  
7084  
7085 <!--page 151 -->
7086
7087 <h5><a name="6.8.6.4" href="#6.8.6.4">6.8.6.4 The return statement</a></h5>
7088 <h6>Constraints</h6>
7089 <p><!--para 1 -->
7090  A return statement with an expression shall not appear in a function whose return type
7091  is void. A return statement without an expression shall only appear in a function
7092  whose return type is void.
7093 <h6>Semantics</h6>
7094 <p><!--para 2 -->
7095  A return statement terminates execution of the current function and returns control to
7096  its caller. A function may have any number of return statements.
7097 <p><!--para 3 -->
7098  If a return statement with an expression is executed, the value of the expression is
7099  returned to the caller as the value of the function call expression. If the expression has a
7100  type different from the return type of the function in which it appears, the value is
7101  converted as if by assignment to an object having the return type of the function.<sup><a href="#note139"><b>139)</b></a></sup>
7102 <p><!--para 4 -->
7103  EXAMPLE       In:
7104 <pre>
7105          struct s { double i; } f(void);
7106          union {
7107                struct {
7108                      int f1;
7109                      struct s f2;
7110                } u1;
7111                struct {
7112                      struct s f3;
7113                      int f4;
7114                } u2;
7115          } g;
7116          struct s f(void)
7117          {
7118                return g.u1.f2;
7119          }
7120          /* ... */
7121          g.u2.f3 = f();</pre>
7122  there is no undefined behavior, although there would be if the assignment were done directly (without using
7123  a function call to fetch the value).
7124  
7125  
7126  
7127  
7128 <!--page 152 -->
7129
7130 <h6>footnotes</h6>
7131 <p><small><a name="note139" href="#note139">139)</a> The return statement is not an assignment. The overlap restriction of subclause <a href="#6.5.16.1">6.5.16.1</a> does not
7132  apply to the case of function return. The representation of floating-point values may have wider range
7133  or precision and is determined by FLT_EVAL_METHOD. A cast may be used to remove this extra
7134  range and precision.
7135 </small>
7136
7137 <h3><a name="6.9" href="#6.9">6.9 External definitions</a></h3>
7138 <h6>Syntax</h6>
7139 <p><!--para 1 -->
7140 <pre>
7141           translation-unit:
7142                   external-declaration
7143                   translation-unit external-declaration
7144           external-declaration:
7145                  function-definition
7146                  declaration</pre>
7147 <h6>Constraints</h6>
7148 <p><!--para 2 -->
7149  The storage-class specifiers auto and register shall not appear in the declaration
7150  specifiers in an external declaration.
7151 <p><!--para 3 -->
7152  There shall be no more than one external definition for each identifier declared with
7153  internal linkage in a translation unit. Moreover, if an identifier declared with internal
7154  linkage is used in an expression (other than as a part of the operand of a sizeof
7155  operator whose result is an integer constant), there shall be exactly one external definition
7156  for the identifier in the translation unit.
7157 <h6>Semantics</h6>
7158 <p><!--para 4 -->
7159  As discussed in <a href="#5.1.1.1">5.1.1.1</a>, the unit of program text after preprocessing is a translation unit,
7160  which consists of a sequence of external declarations. These are described as ''external''
7161  because they appear outside any function (and hence have file scope). As discussed in
7162  <a href="#6.7">6.7</a>, a declaration that also causes storage to be reserved for an object or a function named
7163  by the identifier is a definition.
7164 <p><!--para 5 -->
7165  An external definition is an external declaration that is also a definition of a function
7166  (other than an inline definition) or an object. If an identifier declared with external
7167  linkage is used in an expression (other than as part of the operand of a sizeof operator
7168  whose result is an integer constant), somewhere in the entire program there shall be
7169  exactly one external definition for the identifier; otherwise, there shall be no more than
7170  one.<sup><a href="#note140"><b>140)</b></a></sup>
7171  
7172  
7173  
7174  
7175 <!--page 153 -->
7176
7177 <h6>footnotes</h6>
7178 <p><small><a name="note140" href="#note140">140)</a> Thus, if an identifier declared with external linkage is not used in an expression, there need be no
7179  external definition for it.
7180 </small>
7181
7182 <h4><a name="6.9.1" href="#6.9.1">6.9.1 Function definitions</a></h4>
7183 <h6>Syntax</h6>
7184 <p><!--para 1 -->
7185 <pre>
7186           function-definition:
7187                  declaration-specifiers declarator declaration-list<sub>opt</sub> compound-statement
7188           declaration-list:
7189                  declaration
7190                  declaration-list declaration</pre>
7191 <h6>Constraints</h6>
7192 <p><!--para 2 -->
7193  The identifier declared in a function definition (which is the name of the function) shall
7194  have a function type, as specified by the declarator portion of the function definition.<sup><a href="#note141"><b>141)</b></a></sup>
7195 <p><!--para 3 -->
7196  The return type of a function shall be void or an object type other than array type.
7197 <p><!--para 4 -->
7198  The storage-class specifier, if any, in the declaration specifiers shall be either extern or
7199  static.
7200 <p><!--para 5 -->
7201  If the declarator includes a parameter type list, the declaration of each parameter shall
7202  include an identifier, except for the special case of a parameter list consisting of a single
7203  parameter of type void, in which case there shall not be an identifier. No declaration list
7204  shall follow.
7205 <p><!--para 6 -->
7206  If the declarator includes an identifier list, each declaration in the declaration list shall
7207  have at least one declarator, those declarators shall declare only identifiers from the
7208  identifier list, and every identifier in the identifier list shall be declared. An identifier
7209  declared as a typedef name shall not be redeclared as a parameter. The declarations in the
7210  declaration list shall contain no storage-class specifier other than register and no
7211  initializations.
7212  
7213  
7214  
7215  
7216 <!--page 154 -->
7217 <h6>Semantics</h6>
7218 <p><!--para 7 -->
7219  The declarator in a function definition specifies the name of the function being defined
7220  and the identifiers of its parameters. If the declarator includes a parameter type list, the
7221  list also specifies the types of all the parameters; such a declarator also serves as a
7222  function prototype for later calls to the same function in the same translation unit. If the
7223  declarator includes an identifier list,<sup><a href="#note142"><b>142)</b></a></sup> the types of the parameters shall be declared in a
7224  following declaration list. In either case, the type of each parameter is adjusted as
7225  described in <a href="#6.7.5.3">6.7.5.3</a> for a parameter type list; the resulting type shall be an object type.
7226 <p><!--para 8 -->
7227  If a function that accepts a variable number of arguments is defined without a parameter
7228  type list that ends with the ellipsis notation, the behavior is undefined.
7229 <p><!--para 9 -->
7230  Each parameter has automatic storage duration. Its identifier is an lvalue, which is in
7231  effect declared at the head of the compound statement that constitutes the function body
7232  (and therefore cannot be redeclared in the function body except in an enclosed block).
7233  The layout of the storage for parameters is unspecified.
7234 <p><!--para 10 -->
7235  On entry to the function, the size expressions of each variably modified parameter are
7236  evaluated and the value of each argument expression is converted to the type of the
7237  corresponding parameter as if by assignment. (Array expressions and function
7238  designators as arguments were converted to pointers before the call.)
7239 <p><!--para 11 -->
7240  After all parameters have been assigned, the compound statement that constitutes the
7241  body of the function definition is executed.
7242 <p><!--para 12 -->
7243  If the } that terminates a function is reached, and the value of the function call is used by
7244  the caller, the behavior is undefined.
7245 <p><!--para 13 -->
7246  EXAMPLE 1       In the following:
7247 <pre>
7248           extern int max(int a, int b)
7249           {
7250                 return a &gt; b ? a : b;
7251           }</pre>
7252  extern is the storage-class specifier and int is the type specifier; max(int a, int b) is the
7253  function declarator; and
7254 <pre>
7255           { return a &gt; b ? a : b; }</pre>
7256  is the function body. The following similar definition uses the identifier-list form for the parameter
7257  declarations:
7258  
7259  
7260  
7261  
7262 <!--page 155 -->
7263 <pre>
7264           extern int max(a, b)
7265           int a, b;
7266           {
7267                 return a &gt; b ? a : b;
7268           }</pre>
7269  Here int a, b; is the declaration list for the parameters. The difference between these two definitions is
7270  that the first form acts as a prototype declaration that forces conversion of the arguments of subsequent calls
7271  to the function, whereas the second form does not.
7272  
7273 <p><!--para 14 -->
7274  EXAMPLE 2           To pass one function to another, one might say
7275 <pre>
7276                       int f(void);
7277                       /* ... */
7278                       g(f);</pre>
7279  Then the definition of g might read
7280 <pre>
7281           void g(int (*funcp)(void))
7282           {
7283                 /* ... */
7284                 (*funcp)(); /* or funcp(); ...                    */
7285           }</pre>
7286  or, equivalently,
7287 <pre>
7288           void g(int func(void))
7289           {
7290                 /* ... */
7291                 func(); /* or (*func)(); ...                   */
7292           }</pre>
7293  
7294
7295 <h6>footnotes</h6>
7296 <p><small><a name="note141" href="#note141">141)</a> The intent is that the type category in a function definition cannot be inherited from a typedef:
7297
7298 <pre>
7299           typedef int F(void);                          //   type F is ''function with no parameters
7300                                                         //                  returning int''
7301           F f, g;                                       //   f and g both have type compatible with F
7302           F f { /* ... */ }                             //   WRONG: syntax/constraint error
7303           F g() { /* ... */ }                           //   WRONG: declares that g returns a function
7304           int f(void) { /* ... */ }                     //   RIGHT: f has type compatible with F
7305           int g() { /* ... */ }                         //   RIGHT: g has type compatible with F
7306           F *e(void) { /* ... */ }                      //   e returns a pointer to a function
7307           F *((e))(void) { /* ... */ }                  //   same: parentheses irrelevant
7308           int (*fp)(void);                              //   fp points to a function that has type F
7309           F *Fp;                                        //   Fp points to a function that has type F</pre>
7310 </small>
7311 <p><small><a name="note142" href="#note142">142)</a> See ''future language directions'' (<a href="#6.11.7">6.11.7</a>).
7312 </small>
7313
7314 <h4><a name="6.9.2" href="#6.9.2">6.9.2 External object definitions</a></h4>
7315 <h6>Semantics</h6>
7316 <p><!--para 1 -->
7317  If the declaration of an identifier for an object has file scope and an initializer, the
7318  declaration is an external definition for the identifier.
7319 <p><!--para 2 -->
7320  A declaration of an identifier for an object that has file scope without an initializer, and
7321  without a storage-class specifier or with the storage-class specifier static, constitutes a
7322  tentative definition. If a translation unit contains one or more tentative definitions for an
7323  identifier, and the translation unit contains no external definition for that identifier, then
7324  the behavior is exactly as if the translation unit contains a file scope declaration of that
7325  identifier, with the composite type as of the end of the translation unit, with an initializer
7326  equal to 0.
7327 <p><!--para 3 -->
7328  If the declaration of an identifier for an object is a tentative definition and has internal
7329  linkage, the declared type shall not be an incomplete type.
7330 <!--page 156 -->
7331 <p><!--para 4 -->
7332  EXAMPLE 1
7333 <pre>
7334           int i1 = 1;                    // definition, external linkage
7335           static int i2 = 2;             // definition, internal linkage
7336           extern int i3 = 3;             // definition, external linkage
7337           int i4;                        // tentative definition, external linkage
7338           static int i5;                 // tentative definition, internal linkage
7339           int   i1;                      // valid tentative definition, refers to previous
7340           int   i2;                      // <a href="#6.2.2">6.2.2</a> renders undefined, linkage disagreement
7341           int   i3;                      // valid tentative definition, refers to previous
7342           int   i4;                      // valid tentative definition, refers to previous
7343           int   i5;                      // <a href="#6.2.2">6.2.2</a> renders undefined, linkage disagreement
7344           extern    int   i1;            // refers to previous, whose linkage is external
7345           extern    int   i2;            // refers to previous, whose linkage is internal
7346           extern    int   i3;            // refers to previous, whose linkage is external
7347           extern    int   i4;            // refers to previous, whose linkage is external
7348           extern    int   i5;            // refers to previous, whose linkage is internal</pre>
7349  
7350 <p><!--para 5 -->
7351  EXAMPLE 2       If at the end of the translation unit containing
7352 <pre>
7353           int i[];</pre>
7354  the array i still has incomplete type, the implicit initializer causes it to have one element, which is set to
7355  zero on program startup.
7356 <!--page 157 -->
7357
7358 <h3><a name="6.10" href="#6.10">6.10 Preprocessing directives</a></h3>
7359 <h6>Syntax</h6>
7360 <p><!--para 1 -->
7361 <!--page 158 -->
7362 <pre>
7363           preprocessing-file:
7364                  group<sub>opt</sub>
7365           group:
7366                    group-part
7367                    group group-part
7368           group-part:
7369                  if-section
7370                  control-line
7371                  text-line
7372                  # non-directive
7373           if-section:
7374                    if-group elif-groups<sub>opt</sub> else-group<sub>opt</sub> endif-line
7375           if-group:
7376                   # if     constant-expression new-line group<sub>opt</sub>
7377                   # ifdef identifier new-line group<sub>opt</sub>
7378                   # ifndef identifier new-line group<sub>opt</sub>
7379           elif-groups:
7380                   elif-group
7381                   elif-groups elif-group
7382           elif-group:
7383                   # elif       constant-expression new-line group<sub>opt</sub>
7384           else-group:
7385                   # else       new-line group<sub>opt</sub>
7386           endif-line:
7387                   # endif      new-line
7388           control-line:
7389                  # include pp-tokens new-line
7390                  # define identifier replacement-list new-line
7391                  # define identifier lparen identifier-list<sub>opt</sub> )
7392                                                  replacement-list new-line
7393                  # define identifier lparen ... ) replacement-list new-line
7394                  # define identifier lparen identifier-list , ... )
7395                                                  replacement-list new-line
7396                  # undef   identifier new-line
7397                  # line    pp-tokens new-line
7398                  # error   pp-tokens<sub>opt</sub> new-line
7399                  # pragma pp-tokens<sub>opt</sub> new-line
7400                  #         new-line
7401           text-line:
7402                   pp-tokens<sub>opt</sub> new-line
7403           non-directive:
7404                  pp-tokens new-line
7405           lparen:
7406                     a ( character not immediately preceded by white-space
7407           replacement-list:
7408                  pp-tokens<sub>opt</sub>
7409           pp-tokens:
7410                  preprocessing-token
7411                  pp-tokens preprocessing-token
7412           new-line:
7413                  the new-line character</pre>
7414 <h6>Description</h6>
7415 <p><!--para 2 -->
7416  A preprocessing directive consists of a sequence of preprocessing tokens that satisfies the
7417  following constraints: The first token in the sequence is a # preprocessing token that (at
7418  the start of translation phase 4) is either the first character in the source file (optionally
7419  after white space containing no new-line characters) or that follows white space
7420  containing at least one new-line character. The last token in the sequence is the first new-
7421  line character that follows the first token in the sequence.<sup><a href="#note143"><b>143)</b></a></sup> A new-line character ends
7422  the preprocessing directive even if it occurs within what would otherwise be an
7423  
7424 <!--page 159 -->
7425  invocation of a function-like macro.
7426 <p><!--para 3 -->
7427  A text line shall not begin with a # preprocessing token. A non-directive shall not begin
7428  with any of the directive names appearing in the syntax.
7429 <p><!--para 4 -->
7430  When in a group that is skipped (<a href="#6.10.1">6.10.1</a>), the directive syntax is relaxed to allow any
7431  sequence of preprocessing tokens to occur between the directive name and the following
7432  new-line character.
7433 <h6>Constraints</h6>
7434 <p><!--para 5 -->
7435  The only white-space characters that shall appear between preprocessing tokens within a
7436  preprocessing directive (from just after the introducing # preprocessing token through
7437  just before the terminating new-line character) are space and horizontal-tab (including
7438  spaces that have replaced comments or possibly other white-space characters in
7439  translation phase 3).
7440 <h6>Semantics</h6>
7441 <p><!--para 6 -->
7442  The implementation can process and skip sections of source files conditionally, include
7443  other source files, and replace macros. These capabilities are called preprocessing,
7444  because conceptually they occur before translation of the resulting translation unit.
7445 <p><!--para 7 -->
7446  The preprocessing tokens within a preprocessing directive are not subject to macro
7447  expansion unless otherwise stated.
7448 <p><!--para 8 -->
7449  EXAMPLE        In:
7450 <pre>
7451           #define EMPTY
7452           EMPTY # include &lt;file.h&gt;</pre>
7453  the sequence of preprocessing tokens on the second line is not a preprocessing directive, because it does not
7454  begin with a # at the start of translation phase 4, even though it will do so after the macro EMPTY has been
7455  replaced.
7456  
7457
7458 <h6>footnotes</h6>
7459 <p><small><a name="note143" href="#note143">143)</a> Thus, preprocessing directives are commonly called ''lines''. These ''lines'' have no other syntactic
7460  significance, as all white space is equivalent except in certain situations during preprocessing (see the
7461  # character string literal creation operator in <a href="#6.10.3.2">6.10.3.2</a>, for example).
7462 </small>
7463
7464 <h4><a name="6.10.1" href="#6.10.1">6.10.1 Conditional inclusion</a></h4>
7465 <h6>Constraints</h6>
7466 <p><!--para 1 -->
7467  The expression that controls conditional inclusion shall be an integer constant expression
7468  except that: it shall not contain a cast; identifiers (including those lexically identical to
7469  keywords) are interpreted as described below;<sup><a href="#note144"><b>144)</b></a></sup> and it may contain unary operator
7470  expressions of the form
7471  
7472  
7473  
7474  
7475 <!--page 160 -->
7476 <pre>
7477       defined identifier</pre>
7478  or
7479 <pre>
7480       defined ( identifier )</pre>
7481  which evaluate to 1 if the identifier is currently defined as a macro name (that is, if it is
7482  predefined or if it has been the subject of a #define preprocessing directive without an
7483  intervening #undef directive with the same subject identifier), 0 if it is not.
7484 <p><!--para 2 -->
7485  Each preprocessing token that remains (in the list of preprocessing tokens that will
7486  become the controlling expression) after all macro replacements have occurred shall be in
7487  the lexical form of a token (<a href="#6.4">6.4</a>).
7488 <h6>Semantics</h6>
7489 <p><!--para 3 -->
7490  Preprocessing directives of the forms
7491 <pre>
7492       # if   constant-expression new-line group<sub>opt</sub>
7493       # elif constant-expression new-line group<sub>opt</sub></pre>
7494  check whether the controlling constant expression evaluates to nonzero.
7495 <p><!--para 4 -->
7496  Prior to evaluation, macro invocations in the list of preprocessing tokens that will become
7497  the controlling constant expression are replaced (except for those macro names modified
7498  by the defined unary operator), just as in normal text. If the token defined is
7499  generated as a result of this replacement process or use of the defined unary operator
7500  does not match one of the two specified forms prior to macro replacement, the behavior is
7501  undefined. After all replacements due to macro expansion and the defined unary
7502  operator have been performed, all remaining identifiers (including those lexically
7503  identical to keywords) are replaced with the pp-number 0, and then each preprocessing
7504  token is converted into a token. The resulting tokens compose the controlling constant
7505  expression which is evaluated according to the rules of <a href="#6.6">6.6</a>. For the purposes of this
7506  token conversion and evaluation, all signed integer types and all unsigned integer types
7507  act as if they have the same representation as, respectively, the types intmax_t and
7508  uintmax_t defined in the header <a href="#7.18">&lt;stdint.h&gt;</a>.<sup><a href="#note145"><b>145)</b></a></sup> This includes interpreting
7509  character constants, which may involve converting escape sequences into execution
7510  character set members. Whether the numeric value for these character constants matches
7511  the value obtained when an identical character constant occurs in an expression (other
7512  than within a #if or #elif directive) is implementation-defined.<sup><a href="#note146"><b>146)</b></a></sup> Also, whether a
7513  single-character character constant may have a negative value is implementation-defined.
7514 <p><!--para 5 -->
7515  Preprocessing directives of the forms
7516  
7517  
7518  
7519 <!--page 161 -->
7520 <pre>
7521     # ifdef identifier new-line group<sub>opt</sub>
7522     # ifndef identifier new-line group<sub>opt</sub></pre>
7523  check whether the identifier is or is not currently defined as a macro name. Their
7524  conditions are equivalent to #if defined identifier and #if !defined identifier
7525  respectively.
7526 <p><!--para 6 -->
7527  Each directive's condition is checked in order. If it evaluates to false (zero), the group
7528  that it controls is skipped: directives are processed only through the name that determines
7529  the directive in order to keep track of the level of nested conditionals; the rest of the
7530  directives' preprocessing tokens are ignored, as are the other preprocessing tokens in the
7531  group. Only the first group whose control condition evaluates to true (nonzero) is
7532  processed. If none of the conditions evaluates to true, and there is a #else directive, the
7533  group controlled by the #else is processed; lacking a #else directive, all the groups
7534  until the #endif are skipped.<sup><a href="#note147"><b>147)</b></a></sup>
7535 <p><b> Forward references</b>: macro replacement (<a href="#6.10.3">6.10.3</a>), source file inclusion (<a href="#6.10.2">6.10.2</a>), largest
7536  integer types (<a href="#7.18.1.5">7.18.1.5</a>).
7537
7538 <h6>footnotes</h6>
7539 <p><small><a name="note144" href="#note144">144)</a> Because the controlling constant expression is evaluated during translation phase 4, all identifiers
7540  either are or are not macro names -- there simply are no keywords, enumeration constants, etc.
7541 </small>
7542 <p><small><a name="note145" href="#note145">145)</a> Thus, on an implementation where INT_MAX is 0x7FFF and UINT_MAX is 0xFFFF, the constant
7543  0x8000 is signed and positive within a #if expression even though it would be unsigned in
7544  translation phase 7.
7545 </small>
7546 <p><small><a name="note146" href="#note146">146)</a> Thus, the constant expression in the following #if directive and if statement is not guaranteed to
7547  evaluate to the same value in these two contexts.
7548 <pre>
7549    #if 'z' - 'a' == 25
7550    if ('z' - 'a' == 25)</pre>
7551  
7552 </small>
7553 <p><small><a name="note147" href="#note147">147)</a> As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive
7554  before the terminating new-line character. However, comments may appear anywhere in a source file,
7555  including within a preprocessing directive.
7556 </small>
7557
7558 <h4><a name="6.10.2" href="#6.10.2">6.10.2 Source file inclusion</a></h4>
7559 <h6>Constraints</h6>
7560 <p><!--para 1 -->
7561  A #include directive shall identify a header or source file that can be processed by the
7562  implementation.
7563 <h6>Semantics</h6>
7564 <p><!--para 2 -->
7565  A preprocessing directive of the form
7566 <pre>
7567     # include &lt;h-char-sequence&gt; new-line</pre>
7568  searches a sequence of implementation-defined places for a header identified uniquely by
7569  the specified sequence between the &lt; and &gt; delimiters, and causes the replacement of that
7570  directive by the entire contents of the header. How the places are specified or the header
7571  identified is implementation-defined.
7572 <p><!--para 3 -->
7573  A preprocessing directive of the form
7574  
7575  
7576  
7577 <!--page 162 -->
7578 <pre>
7579     # include "q-char-sequence" new-line</pre>
7580  causes the replacement of that directive by the entire contents of the source file identified
7581  by the specified sequence between the " delimiters. The named source file is searched
7582  for in an implementation-defined manner. If this search is not supported, or if the search
7583  fails, the directive is reprocessed as if it read
7584 <pre>
7585     # include &lt;h-char-sequence&gt; new-line</pre>
7586  with the identical contained sequence (including &gt; characters, if any) from the original
7587  directive.
7588 <p><!--para 4 -->
7589  A preprocessing directive of the form
7590 <pre>
7591     # include pp-tokens new-line</pre>
7592  (that does not match one of the two previous forms) is permitted. The preprocessing
7593  tokens after include in the directive are processed just as in normal text. (Each
7594  identifier currently defined as a macro name is replaced by its replacement list of
7595  preprocessing tokens.) The directive resulting after all replacements shall match one of
7596  the two previous forms.<sup><a href="#note148"><b>148)</b></a></sup> The method by which a sequence of preprocessing tokens
7597  between a &lt; and a &gt; preprocessing token pair or a pair of " characters is combined into a
7598  single header name preprocessing token is implementation-defined.
7599 <p><!--para 5 -->
7600  The implementation shall provide unique mappings for sequences consisting of one or
7601  more nondigits or digits (<a href="#6.4.2.1">6.4.2.1</a>) followed by a period (.) and a single nondigit. The
7602  first character shall not be a digit. The implementation may ignore distinctions of
7603  alphabetical case and restrict the mapping to eight significant characters before the
7604  period.
7605 <p><!--para 6 -->
7606  A #include preprocessing directive may appear in a source file that has been read
7607  because of a #include directive in another file, up to an implementation-defined
7608  nesting limit (see <a href="#5.2.4.1">5.2.4.1</a>).
7609 <p><!--para 7 -->
7610  EXAMPLE 1       The most common uses of #include preprocessing directives are as in the following:
7611 <pre>
7612           #include <a href="#7.19">&lt;stdio.h&gt;</a>
7613           #include "myprog.h"</pre>
7614  
7615 <p><!--para 8 -->
7616  EXAMPLE 2       This illustrates macro-replaced #include directives:
7617  
7618  
7619  
7620  
7621 <!--page 163 -->
7622 <pre>
7623         #if VERSION == 1
7624               #define INCFILE        "vers1.h"
7625         #elif VERSION == 2
7626               #define INCFILE        "vers2.h"      // and so on
7627         #else
7628               #define INCFILE        "versN.h"
7629         #endif
7630         #include INCFILE</pre>
7631  
7632 <p><b> Forward references</b>: macro replacement (<a href="#6.10.3">6.10.3</a>).
7633
7634 <h6>footnotes</h6>
7635 <p><small><a name="note148" href="#note148">148)</a> Note that adjacent string literals are not concatenated into a single string literal (see the translation
7636  phases in <a href="#5.1.1.2">5.1.1.2</a>); thus, an expansion that results in two string literals is an invalid directive.
7637 </small>
7638
7639 <h4><a name="6.10.3" href="#6.10.3">6.10.3 Macro replacement</a></h4>
7640 <h6>Constraints</h6>
7641 <p><!--para 1 -->
7642  Two replacement lists are identical if and only if the preprocessing tokens in both have
7643  the same number, ordering, spelling, and white-space separation, where all white-space
7644  separations are considered identical.
7645 <p><!--para 2 -->
7646  An identifier currently defined as an object-like macro shall not be redefined by another
7647  #define preprocessing directive unless the second definition is an object-like macro
7648  definition and the two replacement lists are identical. Likewise, an identifier currently
7649  defined as a function-like macro shall not be redefined by another #define
7650  preprocessing directive unless the second definition is a function-like macro definition
7651  that has the same number and spelling of parameters, and the two replacement lists are
7652  identical.
7653 <p><!--para 3 -->
7654  There shall be white-space between the identifier and the replacement list in the definition
7655  of an object-like macro.
7656 <p><!--para 4 -->
7657  If the identifier-list in the macro definition does not end with an ellipsis, the number of
7658  arguments (including those arguments consisting of no preprocessing tokens) in an
7659  invocation of a function-like macro shall equal the number of parameters in the macro
7660  definition. Otherwise, there shall be more arguments in the invocation than there are
7661  parameters in the macro definition (excluding the ...). There shall exist a )
7662  preprocessing token that terminates the invocation.
7663 <p><!--para 5 -->
7664  The identifier __VA_ARGS__ shall occur only in the replacement-list of a function-like
7665  macro that uses the ellipsis notation in the parameters.
7666 <p><!--para 6 -->
7667  A parameter identifier in a function-like macro shall be uniquely declared within its
7668  scope.
7669 <h6>Semantics</h6>
7670 <p><!--para 7 -->
7671  The identifier immediately following the define is called the macro name. There is one
7672  name space for macro names. Any white-space characters preceding or following the
7673  replacement list of preprocessing tokens are not considered part of the replacement list
7674  for either form of macro.
7675 <!--page 164 -->
7676 <p><!--para 8 -->
7677  If a # preprocessing token, followed by an identifier, occurs lexically at the point at which
7678  a preprocessing directive could begin, the identifier is not subject to macro replacement.
7679 <p><!--para 9 -->
7680  A preprocessing directive of the form
7681 <pre>
7682     # define identifier replacement-list new-line</pre>
7683  defines an object-like macro that causes each subsequent instance of the macro name<sup><a href="#note149"><b>149)</b></a></sup>
7684  to be replaced by the replacement list of preprocessing tokens that constitute the
7685  remainder of the directive. The replacement list is then rescanned for more macro names
7686  as specified below.
7687 <p><!--para 10 -->
7688  A preprocessing directive of the form
7689 <pre>
7690     # define identifier lparen identifier-list<sub>opt</sub> ) replacement-list new-line
7691     # define identifier lparen ... ) replacement-list new-line
7692     # define identifier lparen identifier-list , ... ) replacement-list new-line</pre>
7693  defines a function-like macro with parameters, whose use is similar syntactically to a
7694  function call. The parameters are specified by the optional list of identifiers, whose scope
7695  extends from their declaration in the identifier list until the new-line character that
7696  terminates the #define preprocessing directive. Each subsequent instance of the
7697  function-like macro name followed by a ( as the next preprocessing token introduces the
7698  sequence of preprocessing tokens that is replaced by the replacement list in the definition
7699  (an invocation of the macro). The replaced sequence of preprocessing tokens is
7700  terminated by the matching ) preprocessing token, skipping intervening matched pairs of
7701  left and right parenthesis preprocessing tokens. Within the sequence of preprocessing
7702  tokens making up an invocation of a function-like macro, new-line is considered a normal
7703  white-space character.
7704 <p><!--para 11 -->
7705  The sequence of preprocessing tokens bounded by the outside-most matching parentheses
7706  forms the list of arguments for the function-like macro. The individual arguments within
7707  the list are separated by comma preprocessing tokens, but comma preprocessing tokens
7708  between matching inner parentheses do not separate arguments. If there are sequences of
7709  preprocessing tokens within the list of arguments that would otherwise act as
7710  preprocessing directives,<sup><a href="#note150"><b>150)</b></a></sup> the behavior is undefined.
7711 <p><!--para 12 -->
7712  If there is a ... in the identifier-list in the macro definition, then the trailing arguments,
7713  including any separating comma preprocessing tokens, are merged to form a single item:
7714  the variable arguments. The number of arguments so combined is such that, following
7715  
7716  
7717 <!--page 165 -->
7718  merger, the number of arguments is one more than the number of parameters in the macro
7719  definition (excluding the ...).
7720
7721 <h6>footnotes</h6>
7722 <p><small><a name="note149" href="#note149">149)</a> Since, by macro-replacement time, all character constants and string literals are preprocessing tokens,
7723  not sequences possibly containing identifier-like subsequences (see <a href="#5.1.1.2">5.1.1.2</a>, translation phases), they
7724  are never scanned for macro names or parameters.
7725 </small>
7726 <p><small><a name="note150" href="#note150">150)</a> Despite the name, a non-directive is a preprocessing directive.
7727 </small>
7728
7729 <h5><a name="6.10.3.1" href="#6.10.3.1">6.10.3.1 Argument substitution</a></h5>
7730 <p><!--para 1 -->
7731  After the arguments for the invocation of a function-like macro have been identified,
7732  argument substitution takes place. A parameter in the replacement list, unless preceded
7733  by a # or ## preprocessing token or followed by a ## preprocessing token (see below), is
7734  replaced by the corresponding argument after all macros contained therein have been
7735  expanded. Before being substituted, each argument's preprocessing tokens are
7736  completely macro replaced as if they formed the rest of the preprocessing file; no other
7737  preprocessing tokens are available.
7738 <p><!--para 2 -->
7739  An identifier __VA_ARGS__ that occurs in the replacement list shall be treated as if it
7740  were a parameter, and the variable arguments shall form the preprocessing tokens used to
7741  replace it.
7742
7743 <h5><a name="6.10.3.2" href="#6.10.3.2">6.10.3.2 The # operator</a></h5>
7744 <h6>Constraints</h6>
7745 <p><!--para 1 -->
7746  Each # preprocessing token in the replacement list for a function-like macro shall be
7747  followed by a parameter as the next preprocessing token in the replacement list.
7748 <h6>Semantics</h6>
7749 <p><!--para 2 -->
7750  If, in the replacement list, a parameter is immediately preceded by a # preprocessing
7751  token, both are replaced by a single character string literal preprocessing token that
7752  contains the spelling of the preprocessing token sequence for the corresponding
7753  argument. Each occurrence of white space between the argument's preprocessing tokens
7754  becomes a single space character in the character string literal. White space before the
7755  first preprocessing token and after the last preprocessing token composing the argument
7756  is deleted. Otherwise, the original spelling of each preprocessing token in the argument
7757  is retained in the character string literal, except for special handling for producing the
7758  spelling of string literals and character constants: a \ character is inserted before each "
7759  and \ character of a character constant or string literal (including the delimiting "
7760  characters), except that it is implementation-defined whether a \ character is inserted
7761  before the \ character beginning a universal character name. If the replacement that
7762  results is not a valid character string literal, the behavior is undefined. The character
7763  string literal corresponding to an empty argument is "". The order of evaluation of # and
7764  ## operators is unspecified.
7765 <!--page 166 -->
7766
7767 <h5><a name="6.10.3.3" href="#6.10.3.3">6.10.3.3 The ## operator</a></h5>
7768 <h6>Constraints</h6>
7769 <p><!--para 1 -->
7770  A ## preprocessing token shall not occur at the beginning or at the end of a replacement
7771  list for either form of macro definition.
7772 <h6>Semantics</h6>
7773 <p><!--para 2 -->
7774  If, in the replacement list of a function-like macro, a parameter is immediately preceded
7775  or followed by a ## preprocessing token, the parameter is replaced by the corresponding
7776  argument's preprocessing token sequence; however, if an argument consists of no
7777  preprocessing tokens, the parameter is replaced by a placemarker preprocessing token
7778  instead.<sup><a href="#note151"><b>151)</b></a></sup>
7779 <p><!--para 3 -->
7780  For both object-like and function-like macro invocations, before the replacement list is
7781  reexamined for more macro names to replace, each instance of a ## preprocessing token
7782  in the replacement list (not from an argument) is deleted and the preceding preprocessing
7783  token is concatenated with the following preprocessing token. Placemarker
7784  preprocessing tokens are handled specially: concatenation of two placemarkers results in
7785  a single placemarker preprocessing token, and concatenation of a placemarker with a
7786  non-placemarker preprocessing token results in the non-placemarker preprocessing token.
7787  If the result is not a valid preprocessing token, the behavior is undefined. The resulting
7788  token is available for further macro replacement. The order of evaluation of ## operators
7789  is unspecified.
7790 <p><!--para 4 -->
7791  EXAMPLE       In the following fragment:
7792 <pre>
7793          #define     hash_hash # ## #
7794          #define     mkstr(a) # a
7795          #define     in_between(a) mkstr(a)
7796          #define     join(c, d) in_between(c hash_hash d)
7797          char p[] = join(x, y); // equivalent to
7798                                 // char p[] = "x ## y";</pre>
7799  The expansion produces, at various stages:
7800 <pre>
7801          join(x, y)
7802          in_between(x hash_hash y)
7803          in_between(x ## y)
7804          mkstr(x ## y)
7805          "x ## y"</pre>
7806  In other words, expanding hash_hash produces a new token, consisting of two adjacent sharp signs, but
7807  this new token is not the ## operator.
7808  
7809  
7810 <!--page 167 -->
7811
7812 <h6>footnotes</h6>
7813 <p><small><a name="note151" href="#note151">151)</a> Placemarker preprocessing tokens do not appear in the syntax because they are temporary entities that
7814  exist only within translation phase 4.
7815 </small>
7816
7817 <h5><a name="6.10.3.4" href="#6.10.3.4">6.10.3.4 Rescanning and further replacement</a></h5>
7818 <p><!--para 1 -->
7819  After all parameters in the replacement list have been substituted and # and ##
7820  processing has taken place, all placemarker preprocessing tokens are removed. Then, the
7821  resulting preprocessing token sequence is rescanned, along with all subsequent
7822  preprocessing tokens of the source file, for more macro names to replace.
7823 <p><!--para 2 -->
7824  If the name of the macro being replaced is found during this scan of the replacement list
7825  (not including the rest of the source file's preprocessing tokens), it is not replaced.
7826  Furthermore, if any nested replacements encounter the name of the macro being replaced,
7827  it is not replaced. These nonreplaced macro name preprocessing tokens are no longer
7828  available for further replacement even if they are later (re)examined in contexts in which
7829  that macro name preprocessing token would otherwise have been replaced.
7830 <p><!--para 3 -->
7831  The resulting completely macro-replaced preprocessing token sequence is not processed
7832  as a preprocessing directive even if it resembles one, but all pragma unary operator
7833  expressions within it are then processed as specified in <a href="#6.10.9">6.10.9</a> below.
7834
7835 <h5><a name="6.10.3.5" href="#6.10.3.5">6.10.3.5 Scope of macro definitions</a></h5>
7836 <p><!--para 1 -->
7837  A macro definition lasts (independent of block structure) until a corresponding #undef
7838  directive is encountered or (if none is encountered) until the end of the preprocessing
7839  translation unit. Macro definitions have no significance after translation phase 4.
7840 <p><!--para 2 -->
7841  A preprocessing directive of the form
7842 <pre>
7843     # undef identifier new-line</pre>
7844  causes the specified identifier no longer to be defined as a macro name. It is ignored if
7845  the specified identifier is not currently defined as a macro name.
7846 <p><!--para 3 -->
7847  EXAMPLE 1      The simplest use of this facility is to define a ''manifest constant'', as in
7848 <pre>
7849          #define TABSIZE 100
7850          int table[TABSIZE];</pre>
7851  
7852 <p><!--para 4 -->
7853  EXAMPLE 2 The following defines a function-like macro whose value is the maximum of its arguments.
7854  It has the advantages of working for any compatible types of the arguments and of generating in-line code
7855  without the overhead of function calling. It has the disadvantages of evaluating one or the other of its
7856  arguments a second time (including side effects) and generating more code than a function if invoked
7857  several times. It also cannot have its address taken, as it has none.
7858 <pre>
7859          #define max(a, b) ((a) &gt; (b) ? (a) : (b))</pre>
7860  The parentheses ensure that the arguments and the resulting expression are bound properly.
7861 <!--page 168 -->
7862 <p><!--para 5 -->
7863  EXAMPLE 3     To illustrate the rules for redefinition and reexamination, the sequence
7864 <pre>
7865           #define   x         3
7866           #define   f(a)      f(x * (a))
7867           #undef    x
7868           #define   x         2
7869           #define   g         f
7870           #define   z         z[0]
7871           #define   h         g(~
7872           #define   m(a)      a(w)
7873           #define   w         0,1
7874           #define   t(a)      a
7875           #define   p()       int
7876           #define   q(x)      x
7877           #define   r(x,y)    x ## y
7878           #define   str(x)    # x
7879           f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);
7880           g(x+(3,4)-w) | h 5) &amp; m
7881                 (f)^m(m);
7882           p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };
7883           char c[2][6] = { str(hello), str() };</pre>
7884  results in
7885 <pre>
7886           f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
7887           f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) &amp; f(2 * (0,1))^m(0,1);
7888           int i[] = { 1, 23, 4, 5, };
7889           char c[2][6] = { "hello", "" };</pre>
7890  
7891 <p><!--para 6 -->
7892  EXAMPLE 4     To illustrate the rules for creating character string literals and concatenating tokens, the
7893  sequence
7894 <pre>
7895           #define str(s)      # s
7896           #define xstr(s)     str(s)
7897           #define debug(s, t) printf("x" # s "= %d, x" # t "= %s", \
7898                                   x ## s, x ## t)
7899           #define INCFILE(n) vers ## n
7900           #define glue(a, b) a ## b
7901           #define xglue(a, b) glue(a, b)
7902           #define HIGHLOW     "hello"
7903           #define LOW         LOW ", world"
7904           debug(1, 2);
7905           fputs(str(strncmp("abc\0d", "abc", '\4') // this goes away
7906                 == 0) str(: @\n), s);
7907           #include xstr(INCFILE(2).h)
7908           glue(HIGH, LOW);
7909           xglue(HIGH, LOW)</pre>
7910  results in
7911 <!--page 169 -->
7912 <pre>
7913           printf("x" "1" "= %d, x" "2" "= %s", x1, x2);
7914           fputs(
7915             "strncmp(\"abc\\0d\", \"abc\", '\\4') == 0" ": @\n",
7916             s);
7917           #include "vers2.h"    (after macro replacement, before file access)
7918           "hello";
7919           "hello" ", world"</pre>
7920  or, after concatenation of the character string literals,
7921 <pre>
7922           printf("x1= %d, x2= %s", x1, x2);
7923           fputs(
7924             "strncmp(\"abc\\0d\", \"abc\", '\\4') == 0: @\n",
7925             s);
7926           #include "vers2.h"    (after macro replacement, before file access)
7927           "hello";
7928           "hello, world"</pre>
7929  Space around the # and ## tokens in the macro definition is optional.
7930  
7931 <p><!--para 7 -->
7932  EXAMPLE 5        To illustrate the rules for placemarker preprocessing tokens, the sequence
7933 <pre>
7934           #define t(x,y,z) x ## y ## z
7935           int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
7936                      t(10,,), t(,11,), t(,,12), t(,,) };</pre>
7937  results in
7938 <pre>
7939           int j[] = { 123, 45, 67, 89,
7940                       10, 11, 12, };</pre>
7941  
7942 <p><!--para 8 -->
7943  EXAMPLE 6        To demonstrate the redefinition rules, the following sequence is valid.
7944 <pre>
7945           #define      OBJ_LIKE      (1-1)
7946           #define      OBJ_LIKE      /* white space */ (1-1) /* other */
7947           #define      FUNC_LIKE(a)   ( a )
7948           #define      FUNC_LIKE( a )( /* note the white space */ \
7949                                        a /* other stuff on this line
7950                                            */ )</pre>
7951  But the following redefinitions are invalid:
7952 <pre>
7953           #define      OBJ_LIKE    (0)     // different token sequence
7954           #define      OBJ_LIKE    (1 - 1) // different white space
7955           #define      FUNC_LIKE(b) ( a ) // different parameter usage
7956           #define      FUNC_LIKE(b) ( b ) // different parameter spelling</pre>
7957  
7958 <p><!--para 9 -->
7959  EXAMPLE 7        Finally, to show the variable argument list macro facilities:
7960 <!--page 170 -->
7961 <pre>
7962           #define debug(...)       fprintf(stderr, __VA_ARGS__)
7963           #define showlist(...)    puts(#__VA_ARGS__)
7964           #define report(test, ...) ((test)?puts(#test):\
7965                       printf(__VA_ARGS__))
7966           debug("Flag");
7967           debug("X = %d\n", x);
7968           showlist(The first, second, and third items.);
7969           report(x&gt;y, "x is %d but y is %d", x, y);</pre>
7970  results in
7971 <pre>
7972           fprintf(stderr, "Flag" );
7973           fprintf(stderr, "X = %d\n", x );
7974           puts( "The first, second, and third items." );
7975           ((x&gt;y)?puts("x&gt;y"):
7976                       printf("x is %d but y is %d", x, y));</pre>
7977  
7978
7979 <h4><a name="6.10.4" href="#6.10.4">6.10.4 Line control</a></h4>
7980 <h6>Constraints</h6>
7981 <p><!--para 1 -->
7982  The string literal of a #line directive, if present, shall be a character string literal.
7983 <h6>Semantics</h6>
7984 <p><!--para 2 -->
7985  The line number of the current source line is one greater than the number of new-line
7986  characters read or introduced in translation phase 1 (<a href="#5.1.1.2">5.1.1.2</a>) while processing the source
7987  file to the current token.
7988 <p><!--para 3 -->
7989  A preprocessing directive of the form
7990 <pre>
7991     # line digit-sequence new-line</pre>
7992  causes the implementation to behave as if the following sequence of source lines begins
7993  with a source line that has a line number as specified by the digit sequence (interpreted as
7994  a decimal integer). The digit sequence shall not specify zero, nor a number greater than
7995  2147483647.
7996 <p><!--para 4 -->
7997  A preprocessing directive of the form
7998 <pre>
7999     # line digit-sequence "s-char-sequence<sub>opt</sub>" new-line</pre>
8000  sets the presumed line number similarly and changes the presumed name of the source
8001  file to be the contents of the character string literal.
8002 <p><!--para 5 -->
8003  A preprocessing directive of the form
8004 <pre>
8005     # line pp-tokens new-line</pre>
8006  (that does not match one of the two previous forms) is permitted. The preprocessing
8007  tokens after line on the directive are processed just as in normal text (each identifier
8008  currently defined as a macro name is replaced by its replacement list of preprocessing
8009  tokens). The directive resulting after all replacements shall match one of the two
8010  previous forms and is then processed as appropriate.
8011 <!--page 171 -->
8012
8013 <h4><a name="6.10.5" href="#6.10.5">6.10.5 Error directive</a></h4>
8014 <h6>Semantics</h6>
8015 <p><!--para 1 -->
8016  A preprocessing directive of the form
8017 <pre>
8018     # error pp-tokens<sub>opt</sub> new-line</pre>
8019  causes the implementation to produce a diagnostic message that includes the specified
8020  sequence of preprocessing tokens.
8021
8022 <h4><a name="6.10.6" href="#6.10.6">6.10.6 Pragma directive</a></h4>
8023 <h6>Semantics</h6>
8024 <p><!--para 1 -->
8025  A preprocessing directive of the form
8026 <pre>
8027     # pragma pp-tokens<sub>opt</sub> new-line</pre>
8028  where the preprocessing token STDC does not immediately follow pragma in the
8029  directive (prior to any macro replacement)<sup><a href="#note152"><b>152)</b></a></sup> causes the implementation to behave in an
8030  implementation-defined manner. The behavior might cause translation to fail or cause the
8031  translator or the resulting program to behave in a non-conforming manner. Any such
8032  pragma that is not recognized by the implementation is ignored.
8033 <p><!--para 2 -->
8034  If the preprocessing token STDC does immediately follow pragma in the directive (prior
8035  to any macro replacement), then no macro replacement is performed on the directive, and
8036  the directive shall have one of the following forms<sup><a href="#note153"><b>153)</b></a></sup> whose meanings are described
8037  elsewhere:
8038 <pre>
8039     #pragma STDC FP_CONTRACT on-off-switch
8040     #pragma STDC FENV_ACCESS on-off-switch
8041     #pragma STDC CX_LIMITED_RANGE on-off-switch
8042     on-off-switch: one of
8043                 ON     OFF           DEFAULT</pre>
8044 <p><b> Forward references</b>: the FP_CONTRACT pragma (<a href="#7.12.2">7.12.2</a>), the FENV_ACCESS pragma
8045  (<a href="#7.6.1">7.6.1</a>), the CX_LIMITED_RANGE pragma (<a href="#7.3.4">7.3.4</a>).
8046  
8047  
8048  
8049  
8050 <!--page 172 -->
8051
8052 <h6>footnotes</h6>
8053 <p><small><a name="note152" href="#note152">152)</a> An implementation is not required to perform macro replacement in pragmas, but it is permitted
8054  except for in standard pragmas (where STDC immediately follows pragma). If the result of macro
8055  replacement in a non-standard pragma has the same form as a standard pragma, the behavior is still
8056  implementation-defined; an implementation is permitted to behave as if it were the standard pragma,
8057  but is not required to.
8058 </small>
8059 <p><small><a name="note153" href="#note153">153)</a> See ''future language directions'' (<a href="#6.11.8">6.11.8</a>).
8060 </small>
8061
8062 <h4><a name="6.10.7" href="#6.10.7">6.10.7 Null directive</a></h4>
8063 <h6>Semantics</h6>
8064 <p><!--para 1 -->
8065  A preprocessing directive of the form
8066 <pre>
8067     # new-line</pre>
8068  has no effect.
8069
8070 <h4><a name="6.10.8" href="#6.10.8">6.10.8 Predefined macro names</a></h4>
8071 <p><!--para 1 -->
8072  The following macro names<sup><a href="#note154"><b>154)</b></a></sup> shall be defined by the implementation:
8073 <dl>
8074 <dt> __DATE__ <dd>The date of translation of the preprocessing translation unit: a character
8075             string literal of the form "Mmm dd yyyy", where the names of the
8076             months are the same as those generated by the asctime function, and the
8077             first character of dd is a space character if the value is less than 10. If the
8078             date of translation is not available, an implementation-defined valid date
8079             shall be supplied.
8080 <dt> __FILE__ <dd>The presumed name of the current source file (a character string literal).<sup><a href="#note155"><b>155)</b></a></sup>
8081 <dt> __LINE__ <dd>The presumed line number (within the current source file) of the current
8082             source line (an integer constant).<sup><a href="#note155"><b>155)</b></a></sup>
8083 <dt> __STDC__ <dd>The integer constant 1, intended to indicate a conforming implementation.
8084 <dt> __STDC_HOSTED__ <dd>The integer constant 1 if the implementation is a hosted
8085            implementation or the integer constant 0 if it is not.
8086 <dt> __STDC_MB_MIGHT_NEQ_WC__ <dd>The integer constant 1, intended to indicate that, in
8087            the encoding for wchar_t, a member of the basic character set need not
8088            have a code value equal to its value when used as the lone character in an
8089            integer character constant.
8090 <dt> __STDC_VERSION__ <dd>The integer constant 199901L.<sup><a href="#note156"><b>156)</b></a></sup>
8091 <dt> __TIME__ <dd>The time of translation of the preprocessing translation unit: a character
8092             string literal of the form "hh:mm:ss" as in the time generated by the
8093             asctime function. If the time of translation is not available, an
8094             implementation-defined valid time shall be supplied.
8095 </dl>
8096  
8097  
8098 <!--page 173 -->
8099 <p><!--para 2 -->
8100  The following macro names are conditionally defined by the implementation:
8101 <dl>
8102 <dt> __STDC_IEC_559__ <dd>The integer constant 1, intended to indicate conformance to the
8103            specifications in <a href="#F">annex F</a> (IEC 60559 floating-point arithmetic).
8104 <dt> __STDC_IEC_559_COMPLEX__ <dd>The integer constant 1, intended to indicate
8105            adherence to the specifications in informative <a href="#G">annex G</a> (IEC 60559
8106            compatible complex arithmetic).
8107 <dt> __STDC_ISO_10646__ <dd>An integer constant of the form yyyymmL (for example,
8108            199712L). If this symbol is defined, then every character in the Unicode
8109            required set, when stored in an object of type wchar_t, has the same
8110            value as the short identifier of that character. The Unicode required set
8111            consists of all the characters that are defined by ISO/IEC 10646, along with
8112            all amendments and technical corrigenda, as of the specified year and
8113            month.
8114 </dl>
8115 <p><!--para 3 -->
8116  The values of the predefined macros (except for __FILE__ and __LINE__) remain
8117  constant throughout the translation unit.
8118 <p><!--para 4 -->
8119  None of these macro names, nor the identifier defined, shall be the subject of a
8120  #define or a #undef preprocessing directive. Any other predefined macro names
8121  shall begin with a leading underscore followed by an uppercase letter or a second
8122  underscore.
8123 <p><!--para 5 -->
8124  The implementation shall not predefine the macro __cplusplus, nor shall it define it
8125  in any standard header.
8126 <p><b> Forward references</b>: the asctime function (<a href="#7.23.3.1">7.23.3.1</a>), standard headers (<a href="#7.1.2">7.1.2</a>).
8127
8128 <h6>footnotes</h6>
8129 <p><small><a name="note154" href="#note154">154)</a> See ''future language directions'' (<a href="#6.11.9">6.11.9</a>).
8130 </small>
8131 <p><small><a name="note155" href="#note155">155)</a> The presumed source file name and line number can be changed by the #line directive.
8132 </small>
8133 <p><small><a name="note156" href="#note156">156)</a> This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in
8134  ISO/IEC 9899/AMD1:1995. The intention is that this will remain an integer constant of type long
8135  int that is increased with each revision of this International Standard.
8136 </small>
8137
8138 <h4><a name="6.10.9" href="#6.10.9">6.10.9 Pragma operator</a></h4>
8139 <h6>Semantics</h6>
8140 <p><!--para 1 -->
8141  A unary operator expression of the form:
8142 <pre>
8143     _Pragma ( string-literal )</pre>
8144  is processed as follows: The string literal is destringized by deleting the L prefix, if
8145  present, deleting the leading and trailing double-quotes, replacing each escape sequence
8146  \" by a double-quote, and replacing each escape sequence \\ by a single backslash. The
8147  resulting sequence of characters is processed through translation phase 3 to produce
8148  preprocessing tokens that are executed as if they were the pp-tokens in a pragma
8149  directive. The original four preprocessing tokens in the unary operator expression are
8150  removed.
8151 <p><!--para 2 -->
8152  EXAMPLE       A directive of the form:
8153 <pre>
8154           #pragma listing on "..\listing.dir"</pre>
8155  can also be expressed as:
8156 <!--page 174 -->
8157 <pre>
8158          _Pragma ( "listing on \"..\\listing.dir\"" )</pre>
8159  The latter form is processed in the same way whether it appears literally as shown, or results from macro
8160  replacement, as in:
8161 <!--page 175 -->
8162 <pre>
8163          #define LISTING(x) PRAGMA(listing on #x)
8164          #define PRAGMA(x) _Pragma(#x)
8165          LISTING ( ..\listing.dir )</pre>
8166
8167 <h3><a name="6.11" href="#6.11">6.11 Future language directions</a></h3>
8168
8169 <h4><a name="6.11.1" href="#6.11.1">6.11.1 Floating types</a></h4>
8170 <p><!--para 1 -->
8171  Future standardization may include additional floating-point types, including those with
8172  greater range, precision, or both than long double.
8173
8174 <h4><a name="6.11.2" href="#6.11.2">6.11.2 Linkages of identifiers</a></h4>
8175 <p><!--para 1 -->
8176  Declaring an identifier with internal linkage at file scope without the static storage-
8177  class specifier is an obsolescent feature.
8178
8179 <h4><a name="6.11.3" href="#6.11.3">6.11.3 External names</a></h4>
8180 <p><!--para 1 -->
8181  Restriction of the significance of an external name to fewer than 255 characters
8182  (considering each universal character name or extended source character as a single
8183  character) is an obsolescent feature that is a concession to existing implementations.
8184
8185 <h4><a name="6.11.4" href="#6.11.4">6.11.4 Character escape sequences</a></h4>
8186 <p><!--para 1 -->
8187  Lowercase letters as escape sequences are reserved for future standardization. Other
8188  characters may be used in extensions.
8189
8190 <h4><a name="6.11.5" href="#6.11.5">6.11.5 Storage-class specifiers</a></h4>
8191 <p><!--para 1 -->
8192  The placement of a storage-class specifier other than at the beginning of the declaration
8193  specifiers in a declaration is an obsolescent feature.
8194
8195 <h4><a name="6.11.6" href="#6.11.6">6.11.6 Function declarators</a></h4>
8196 <p><!--para 1 -->
8197  The use of function declarators with empty parentheses (not prototype-format parameter
8198  type declarators) is an obsolescent feature.
8199
8200 <h4><a name="6.11.7" href="#6.11.7">6.11.7 Function definitions</a></h4>
8201 <p><!--para 1 -->
8202  The use of function definitions with separate parameter identifier and declaration lists
8203  (not prototype-format parameter type and identifier declarators) is an obsolescent feature.
8204
8205 <h4><a name="6.11.8" href="#6.11.8">6.11.8 Pragma directives</a></h4>
8206 <p><!--para 1 -->
8207  Pragmas whose first preprocessing token is STDC are reserved for future standardization.
8208
8209 <h4><a name="6.11.9" href="#6.11.9">6.11.9 Predefined macro names</a></h4>
8210 <p><!--para 1 -->
8211  Macro names beginning with __STDC_ are reserved for future standardization.
8212 <!--page 176 -->
8213
8214 <h2><a name="7" href="#7">7. Library</a></h2>
8215  
8216
8217 <h3><a name="7.1" href="#7.1">7.1 Introduction</a></h3>
8218
8219 <h4><a name="7.1.1" href="#7.1.1">7.1.1 Definitions of terms</a></h4>
8220 <p><!--para 1 -->
8221  A string is a contiguous sequence of characters terminated by and including the first null
8222  character. The term multibyte string is sometimes used instead to emphasize special
8223  processing given to multibyte characters contained in the string or to avoid confusion
8224  with a wide string. A pointer to a string is a pointer to its initial (lowest addressed)
8225  character. The length of a string is the number of bytes preceding the null character and
8226  the value of a string is the sequence of the values of the contained characters, in order.
8227 <p><!--para 2 -->
8228  The decimal-point character is the character used by functions that convert floating-point
8229  numbers to or from character sequences to denote the beginning of the fractional part of
8230  such character sequences.<sup><a href="#note157"><b>157)</b></a></sup> It is represented in the text and examples by a period, but
8231  may be changed by the setlocale function.
8232 <p><!--para 3 -->
8233  A null wide character is a wide character with code value zero.
8234 <p><!--para 4 -->
8235  A wide string is a contiguous sequence of wide characters terminated by and including
8236  the first null wide character. A pointer to a wide string is a pointer to its initial (lowest
8237  addressed) wide character. The length of a wide string is the number of wide characters
8238  preceding the null wide character and the value of a wide string is the sequence of code
8239  values of the contained wide characters, in order.
8240 <p><!--para 5 -->
8241  A shift sequence is a contiguous sequence of bytes within a multibyte string that
8242  (potentially) causes a change in shift state (see <a href="#5.2.1.2">5.2.1.2</a>). A shift sequence shall not have a
8243  corresponding wide character; it is instead taken to be an adjunct to an adjacent multibyte
8244  character.<sup><a href="#note158"><b>158)</b></a></sup>
8245 <p><b> Forward references</b>: character handling (<a href="#7.4">7.4</a>), the setlocale function (<a href="#7.11.1.1">7.11.1.1</a>).
8246  
8247  
8248  
8249  
8250 <!--page 177 -->
8251
8252 <h6>footnotes</h6>
8253 <p><small><a name="note157" href="#note157">157)</a> The functions that make use of the decimal-point character are the numeric conversion functions
8254  (<a href="#7.20.1">7.20.1</a>, <a href="#7.24.4.1">7.24.4.1</a>) and the formatted input/output functions (<a href="#7.19.6">7.19.6</a>, <a href="#7.24.2">7.24.2</a>).
8255 </small>
8256 <p><small><a name="note158" href="#note158">158)</a> For state-dependent encodings, the values for MB_CUR_MAX and MB_LEN_MAX shall thus be large
8257  enough to count all the bytes in any complete multibyte character plus at least one adjacent shift
8258  sequence of maximum length. Whether these counts provide for more than one shift sequence is the
8259  implementation's choice.
8260 </small>
8261
8262 <h4><a name="7.1.2" href="#7.1.2">7.1.2 Standard headers</a></h4>
8263 <p><!--para 1 -->
8264  Each library function is declared, with a type that includes a prototype, in a header,<sup><a href="#note159"><b>159)</b></a></sup>
8265  whose contents are made available by the #include preprocessing directive. The
8266  header declares a set of related functions, plus any necessary types and additional macros
8267  needed to facilitate their use. Declarations of types described in this clause shall not
8268  include type qualifiers, unless explicitly stated otherwise.
8269 <p><!--para 2 -->
8270  The standard headers are
8271 <p><!--para 3 -->
8272 <pre>
8273         <a href="#7.2">&lt;assert.h&gt;</a>             <a href="#7.8">&lt;inttypes.h&gt;</a>            <a href="#7.14">&lt;signal.h&gt;</a>              <a href="#7.20">&lt;stdlib.h&gt;</a>
8274         <a href="#7.3">&lt;complex.h&gt;</a>            <a href="#7.9">&lt;iso646.h&gt;</a>              <a href="#7.15">&lt;stdarg.h&gt;</a>              <a href="#7.21">&lt;string.h&gt;</a>
8275         <a href="#7.4">&lt;ctype.h&gt;</a>              <a href="#7.10">&lt;limits.h&gt;</a>              <a href="#7.16">&lt;stdbool.h&gt;</a>             <a href="#7.22">&lt;tgmath.h&gt;</a>
8276         <a href="#7.5">&lt;errno.h&gt;</a>              <a href="#7.11">&lt;locale.h&gt;</a>              <a href="#7.17">&lt;stddef.h&gt;</a>              <a href="#7.23">&lt;time.h&gt;</a>
8277         <a href="#7.6">&lt;fenv.h&gt;</a>               <a href="#7.12">&lt;math.h&gt;</a>                <a href="#7.18">&lt;stdint.h&gt;</a>              <a href="#7.24">&lt;wchar.h&gt;</a>
8278         <a href="#7.7">&lt;float.h&gt;</a>              <a href="#7.13">&lt;setjmp.h&gt;</a>              <a href="#7.19">&lt;stdio.h&gt;</a>               <a href="#7.25">&lt;wctype.h&gt;</a></pre>
8279  If a file with the same name as one of the above &lt; and &gt; delimited sequences, not
8280  provided as part of the implementation, is placed in any of the standard places that are
8281  searched for included source files, the behavior is undefined.
8282 <p><!--para 4 -->
8283  Standard headers may be included in any order; each may be included more than once in
8284  a given scope, with no effect different from being included only once, except that the
8285  effect of including <a href="#7.2">&lt;assert.h&gt;</a> depends on the definition of NDEBUG (see <a href="#7.2">7.2</a>). If
8286  used, a header shall be included outside of any external declaration or definition, and it
8287  shall first be included before the first reference to any of the functions or objects it
8288  declares, or to any of the types or macros it defines. However, if an identifier is declared
8289  or defined in more than one header, the second and subsequent associated headers may be
8290  included after the initial reference to the identifier. The program shall not have any
8291  macros with names lexically identical to keywords currently defined prior to the
8292  inclusion.
8293 <p><!--para 5 -->
8294  Any definition of an object-like macro described in this clause shall expand to code that is
8295  fully protected by parentheses where necessary, so that it groups in an arbitrary
8296  expression as if it were a single identifier.
8297 <p><!--para 6 -->
8298  Any declaration of a library function shall have external linkage.
8299 <p><!--para 7 -->
8300  A summary of the contents of the standard headers is given in <a href="#B">annex B</a>.
8301 <p><b> Forward references</b>: diagnostics (<a href="#7.2">7.2</a>).
8302  
8303  
8304  
8305  
8306 <!--page 178 -->
8307
8308 <h6>footnotes</h6>
8309 <p><small><a name="note159" href="#note159">159)</a> A header is not necessarily a source file, nor are the &lt; and &gt; delimited sequences in header names
8310  necessarily valid source file names.
8311 </small>
8312
8313 <h4><a name="7.1.3" href="#7.1.3">7.1.3 Reserved identifiers</a></h4>
8314 <p><!--para 1 -->
8315  Each header declares or defines all identifiers listed in its associated subclause, and
8316  optionally declares or defines identifiers listed in its associated future library directions
8317  subclause and identifiers which are always reserved either for any use or for use as file
8318  scope identifiers.
8319 <ul>
8320 <li>  All identifiers that begin with an underscore and either an uppercase letter or another
8321  underscore are always reserved for any use.
8322 <li>  All identifiers that begin with an underscore are always reserved for use as identifiers
8323  with file scope in both the ordinary and tag name spaces.
8324 <li>  Each macro name in any of the following subclauses (including the future library
8325  directions) is reserved for use as specified if any of its associated headers is included;
8326  unless explicitly stated otherwise (see <a href="#7.1.4">7.1.4</a>).
8327 <li>  All identifiers with external linkage in any of the following subclauses (including the
8328  future library directions) are always reserved for use as identifiers with external
8329  linkage.<sup><a href="#note160"><b>160)</b></a></sup>
8330 <li>  Each identifier with file scope listed in any of the following subclauses (including the
8331  future library directions) is reserved for use as a macro name and as an identifier with
8332  file scope in the same name space if any of its associated headers is included.
8333 </ul>
8334 <p><!--para 2 -->
8335  No other identifiers are reserved. If the program declares or defines an identifier in a
8336  context in which it is reserved (other than as allowed by <a href="#7.1.4">7.1.4</a>), or defines a reserved
8337  identifier as a macro name, the behavior is undefined.
8338 <p><!--para 3 -->
8339  If the program removes (with #undef) any macro definition of an identifier in the first
8340  group listed above, the behavior is undefined.
8341
8342 <h6>footnotes</h6>
8343 <p><small><a name="note160" href="#note160">160)</a> The list of reserved identifiers with external linkage includes errno, math_errhandling,
8344  setjmp, and va_end.
8345 </small>
8346
8347 <h4><a name="7.1.4" href="#7.1.4">7.1.4 Use of library functions</a></h4>
8348 <p><!--para 1 -->
8349  Each of the following statements applies unless explicitly stated otherwise in the detailed
8350  descriptions that follow: If an argument to a function has an invalid value (such as a value
8351  outside the domain of the function, or a pointer outside the address space of the program,
8352  or a null pointer, or a pointer to non-modifiable storage when the corresponding
8353  parameter is not const-qualified) or a type (after promotion) not expected by a function
8354  with variable number of arguments, the behavior is undefined. If a function argument is
8355  described as being an array, the pointer actually passed to the function shall have a value
8356  such that all address computations and accesses to objects (that would be valid if the
8357  pointer did point to the first element of such an array) are in fact valid. Any function
8358  declared in a header may be additionally implemented as a function-like macro defined in
8359  
8360 <!--page 179 -->
8361  the header, so if a library function is declared explicitly when its header is included, one
8362  of the techniques shown below can be used to ensure the declaration is not affected by
8363  such a macro. Any macro definition of a function can be suppressed locally by enclosing
8364  the name of the function in parentheses, because the name is then not followed by the left
8365  parenthesis that indicates expansion of a macro function name. For the same syntactic
8366  reason, it is permitted to take the address of a library function even if it is also defined as
8367  a macro.<sup><a href="#note161"><b>161)</b></a></sup> The use of #undef to remove any macro definition will also ensure that an
8368  actual function is referred to. Any invocation of a library function that is implemented as
8369  a macro shall expand to code that evaluates each of its arguments exactly once, fully
8370  protected by parentheses where necessary, so it is generally safe to use arbitrary
8371  expressions as arguments.<sup><a href="#note162"><b>162)</b></a></sup> Likewise, those function-like macros described in the
8372  following subclauses may be invoked in an expression anywhere a function with a
8373  compatible return type could be called.<sup><a href="#note163"><b>163)</b></a></sup> All object-like macros listed as expanding to
8374  integer constant expressions shall additionally be suitable for use in #if preprocessing
8375  directives.
8376 <p><!--para 2 -->
8377  Provided that a library function can be declared without reference to any type defined in a
8378  header, it is also permissible to declare the function and use it without including its
8379  associated header.
8380 <p><!--para 3 -->
8381  There is a sequence point immediately before a library function returns.
8382 <p><!--para 4 -->
8383  The functions in the standard library are not guaranteed to be reentrant and may modify
8384  objects with static storage duration.<sup><a href="#note164"><b>164)</b></a></sup>
8385  
8386  
8387  
8388 <!--page 180 -->
8389 <p><!--para 5 -->
8390  EXAMPLE       The function atoi may be used in any of several ways:
8391 <ul>
8392 <li>  by use of its associated header (possibly generating a macro expansion)
8393 <pre>
8394            #include <a href="#7.20">&lt;stdlib.h&gt;</a>
8395            const char *str;
8396            /* ... */
8397            i = atoi(str);</pre>
8398 <li>  by use of its associated header (assuredly generating a true function reference)
8399 <pre>
8400            #include <a href="#7.20">&lt;stdlib.h&gt;</a>
8401            #undef atoi
8402            const char *str;
8403            /* ... */
8404            i = atoi(str);</pre>
8405   or
8406 <pre>
8407            #include <a href="#7.20">&lt;stdlib.h&gt;</a>
8408            const char *str;
8409            /* ... */
8410            i = (atoi)(str);</pre>
8411 <li>  by explicit declaration
8412 <!--page 181 -->
8413 <pre>
8414            extern int atoi(const char *);
8415            const char *str;
8416            /* ... */
8417            i = atoi(str);</pre>
8418 </ul>
8419
8420 <h6>footnotes</h6>
8421 <p><small><a name="note161" href="#note161">161)</a> This means that an implementation shall provide an actual function for each library function, even if it
8422  also provides a macro for that function.
8423 </small>
8424 <p><small><a name="note162" href="#note162">162)</a> Such macros might not contain the sequence points that the corresponding function calls do.
8425 </small>
8426 <p><small><a name="note163" href="#note163">163)</a> Because external identifiers and some macro names beginning with an underscore are reserved,
8427  implementations may provide special semantics for such names. For example, the identifier
8428  _BUILTIN_abs could be used to indicate generation of in-line code for the abs function. Thus, the
8429  appropriate header could specify
8430
8431 <pre>
8432           #define abs(x) _BUILTIN_abs(x)</pre>
8433  for a compiler whose code generator will accept it.
8434  In this manner, a user desiring to guarantee that a given library function such as abs will be a genuine
8435  function may write
8436
8437 <pre>
8438           #undef abs</pre>
8439  whether the implementation's header provides a macro implementation of abs or a built-in
8440  implementation. The prototype for the function, which precedes and is hidden by any macro
8441  definition, is thereby revealed also.
8442 </small>
8443 <p><small><a name="note164" href="#note164">164)</a> Thus, a signal handler cannot, in general, call standard library functions.
8444 </small>
8445
8446 <h3><a name="7.2" href="#7.2">7.2 Diagnostics <assert.h></a></h3>
8447 <p><!--para 1 -->
8448  The header <a href="#7.2">&lt;assert.h&gt;</a> defines the assert macro and refers to another macro,
8449 <pre>
8450          NDEBUG</pre>
8451  which is not defined by <a href="#7.2">&lt;assert.h&gt;</a>. If NDEBUG is defined as a macro name at the
8452  point in the source file where <a href="#7.2">&lt;assert.h&gt;</a> is included, the assert macro is defined
8453  simply as
8454 <pre>
8455          #define assert(ignore) ((void)0)</pre>
8456  The assert macro is redefined according to the current state of NDEBUG each time that
8457  <a href="#7.2">&lt;assert.h&gt;</a> is included.
8458 <p><!--para 2 -->
8459  The assert macro shall be implemented as a macro, not as an actual function. If the
8460  macro definition is suppressed in order to access an actual function, the behavior is
8461  undefined.
8462
8463 <h4><a name="7.2.1" href="#7.2.1">7.2.1 Program diagnostics</a></h4>
8464
8465 <h5><a name="7.2.1.1" href="#7.2.1.1">7.2.1.1 The assert macro</a></h5>
8466 <h6>Synopsis</h6>
8467 <p><!--para 1 -->
8468 <pre>
8469          #include <a href="#7.2">&lt;assert.h&gt;</a>
8470          void assert(scalar expression);</pre>
8471 <h6>Description</h6>
8472 <p><!--para 2 -->
8473  The assert macro puts diagnostic tests into programs; it expands to a void expression.
8474  When it is executed, if expression (which shall have a scalar type) is false (that is,
8475  compares equal to 0), the assert macro writes information about the particular call that
8476  failed (including the text of the argument, the name of the source file, the source line
8477  number, and the name of the enclosing function -- the latter are respectively the values of
8478  the preprocessing macros __FILE__ and __LINE__ and of the identifier
8479  __func__) on the standard error stream in an implementation-defined format.<sup><a href="#note165"><b>165)</b></a></sup> It
8480  then calls the abort function.
8481 <h6>Returns</h6>
8482 <p><!--para 3 -->
8483  The assert macro returns no value.
8484 <p><b> Forward references</b>: the abort function (<a href="#7.20.4.1">7.20.4.1</a>).
8485  
8486  
8487  
8488  
8489 <!--page 182 -->
8490
8491 <h6>footnotes</h6>
8492 <p><small><a name="note165" href="#note165">165)</a> The message written might be of the form:
8493  Assertion failed: expression, function abc, file xyz, line nnn.
8494 </small>
8495
8496 <h3><a name="7.3" href="#7.3">7.3 Complex arithmetic <complex.h></a></h3>
8497
8498 <h4><a name="7.3.1" href="#7.3.1">7.3.1 Introduction</a></h4>
8499 <p><!--para 1 -->
8500  The header <a href="#7.3">&lt;complex.h&gt;</a> defines macros and declares functions that support complex
8501  arithmetic.<sup><a href="#note166"><b>166)</b></a></sup> Each synopsis specifies a family of functions consisting of a principal
8502  function with one or more double complex parameters and a double complex or
8503  double return value; and other functions with the same name but with f and l suffixes
8504  which are corresponding functions with float and long double parameters and
8505  return values.
8506 <p><!--para 2 -->
8507  The macro
8508 <pre>
8509           complex</pre>
8510  expands to _Complex; the macro
8511 <pre>
8512           _Complex_I</pre>
8513  expands to a constant expression of type const float _Complex, with the value of
8514  the imaginary unit.<sup><a href="#note167"><b>167)</b></a></sup>
8515 <p><!--para 3 -->
8516  The macros
8517 <pre>
8518           imaginary</pre>
8519  and
8520 <pre>
8521           _Imaginary_I</pre>
8522  are defined if and only if the implementation supports imaginary types;<sup><a href="#note168"><b>168)</b></a></sup> if defined,
8523  they expand to _Imaginary and a constant expression of type const float
8524  _Imaginary with the value of the imaginary unit.
8525 <p><!--para 4 -->
8526  The macro
8527 <pre>
8528           I</pre>
8529  expands to either _Imaginary_I or _Complex_I. If _Imaginary_I is not
8530  defined, I shall expand to _Complex_I.
8531 <p><!--para 5 -->
8532  Notwithstanding the provisions of <a href="#7.1.3">7.1.3</a>, a program may undefine and perhaps then
8533  redefine the macros complex, imaginary, and I.
8534 <p><b> Forward references</b>: IEC 60559-compatible complex arithmetic (<a href="#G">annex G</a>).
8535  
8536  
8537  
8538 <!--page 183 -->
8539
8540 <h6>footnotes</h6>
8541 <p><small><a name="note166" href="#note166">166)</a> See ''future library directions'' (<a href="#7.26.1">7.26.1</a>).
8542 </small>
8543 <p><small><a name="note167" href="#note167">167)</a> The imaginary unit is a number i such that i 2   = -1.
8544 </small>
8545 <p><small><a name="note168" href="#note168">168)</a> A specification for imaginary types is in informative <a href="#G">annex G</a>.
8546 </small>
8547
8548 <h4><a name="7.3.2" href="#7.3.2">7.3.2 Conventions</a></h4>
8549 <p><!--para 1 -->
8550  Values are interpreted as radians, not degrees. An implementation may set errno but is
8551  not required to.
8552
8553 <h4><a name="7.3.3" href="#7.3.3">7.3.3 Branch cuts</a></h4>
8554 <p><!--para 1 -->
8555  Some of the functions below have branch cuts, across which the function is
8556  discontinuous. For implementations with a signed zero (including all IEC 60559
8557  implementations) that follow the specifications of <a href="#G">annex G</a>, the sign of zero distinguishes
8558  one side of a cut from another so the function is continuous (except for format
8559  limitations) as the cut is approached from either side. For example, for the square root
8560  function, which has a branch cut along the negative real axis, the top of the cut, with
8561  imaginary part +0, maps to the positive imaginary axis, and the bottom of the cut, with
8562  imaginary part -0, maps to the negative imaginary axis.
8563 <p><!--para 2 -->
8564  Implementations that do not support a signed zero (see <a href="#F">annex F</a>) cannot distinguish the
8565  sides of branch cuts. These implementations shall map a cut so the function is continuous
8566  as the cut is approached coming around the finite endpoint of the cut in a counter
8567  clockwise direction. (Branch cuts for the functions specified here have just one finite
8568  endpoint.) For example, for the square root function, coming counter clockwise around
8569  the finite endpoint of the cut along the negative real axis approaches the cut from above,
8570  so the cut maps to the positive imaginary axis.
8571
8572 <h4><a name="7.3.4" href="#7.3.4">7.3.4 The CX_LIMITED_RANGE pragma</a></h4>
8573 <h6>Synopsis</h6>
8574 <p><!--para 1 -->
8575 <pre>
8576           #include <a href="#7.3">&lt;complex.h&gt;</a>
8577           #pragma STDC CX_LIMITED_RANGE on-off-switch</pre>
8578 <h6>Description</h6>
8579 <p><!--para 2 -->
8580  The usual mathematical formulas for complex multiply, divide, and absolute value are
8581  problematic because of their treatment of infinities and because of undue overflow and
8582  underflow. The CX_LIMITED_RANGE pragma can be used to inform the
8583  implementation that (where the state is ''on'') the usual mathematical formulas are
8584  acceptable.<sup><a href="#note169"><b>169)</b></a></sup> The pragma can occur either outside external declarations or preceding all
8585  explicit declarations and statements inside a compound statement. When outside external
8586  
8587 <!--page 184 -->
8588  declarations, the pragma takes effect from its occurrence until another
8589  CX_LIMITED_RANGE pragma is encountered, or until the end of the translation unit.
8590  When inside a compound statement, the pragma takes effect from its occurrence until
8591  another CX_LIMITED_RANGE pragma is encountered (including within a nested
8592  compound statement), or until the end of the compound statement; at the end of a
8593  compound statement the state for the pragma is restored to its condition just before the
8594  compound statement. If this pragma is used in any other context, the behavior is
8595  undefined. The default state for the pragma is ''off''.
8596
8597 <h6>footnotes</h6>
8598 <p><small><a name="note169" href="#note169">169)</a> The purpose of the pragma is to allow the implementation to use the formulas:
8599
8600 <pre>
8601      (x + iy) x (u + iv) = (xu - yv) + i(yu + xv)
8602      (x + iy) / (u + iv) = [(xu + yv) + i(yu - xv)]/(u2 + v 2 )
8603      | x + iy | = (sqrt) x 2 + y 2
8604                   ???????????????</pre>
8605  where the programmer can determine they are safe.
8606 </small>
8607
8608 <h4><a name="7.3.5" href="#7.3.5">7.3.5 Trigonometric functions</a></h4>
8609
8610 <h5><a name="7.3.5.1" href="#7.3.5.1">7.3.5.1 The cacos functions</a></h5>
8611 <h6>Synopsis</h6>
8612 <p><!--para 1 -->
8613 <pre>
8614         #include <a href="#7.3">&lt;complex.h&gt;</a>
8615         double complex cacos(double complex z);
8616         float complex cacosf(float complex z);
8617         long double complex cacosl(long double complex z);</pre>
8618 <h6>Description</h6>
8619 <p><!--para 2 -->
8620  The cacos functions compute the complex arc cosine of z, with branch cuts outside the
8621  interval [-1, +1] along the real axis.
8622 <h6>Returns</h6>
8623 <p><!--para 3 -->
8624  The cacos functions return the complex arc cosine value, in the range of a strip
8625  mathematically unbounded along the imaginary axis and in the interval [0, pi ] along the
8626  real axis.
8627
8628 <h5><a name="7.3.5.2" href="#7.3.5.2">7.3.5.2 The casin functions</a></h5>
8629 <h6>Synopsis</h6>
8630 <p><!--para 1 -->
8631 <pre>
8632         #include <a href="#7.3">&lt;complex.h&gt;</a>
8633         double complex casin(double complex z);
8634         float complex casinf(float complex z);
8635         long double complex casinl(long double complex z);</pre>
8636 <h6>Description</h6>
8637 <p><!--para 2 -->
8638  The casin functions compute the complex arc sine of z, with branch cuts outside the
8639  interval [-1, +1] along the real axis.
8640 <h6>Returns</h6>
8641 <p><!--para 3 -->
8642  The casin functions return the complex arc sine value, in the range of a strip
8643  mathematically unbounded along the imaginary axis and in the interval [-pi /2, +pi /2]
8644  along the real axis.
8645 <!--page 185 -->
8646
8647 <h5><a name="7.3.5.3" href="#7.3.5.3">7.3.5.3 The catan functions</a></h5>
8648 <h6>Synopsis</h6>
8649 <p><!--para 1 -->
8650 <pre>
8651         #include <a href="#7.3">&lt;complex.h&gt;</a>
8652         double complex catan(double complex z);
8653         float complex catanf(float complex z);
8654         long double complex catanl(long double complex z);</pre>
8655 <h6>Description</h6>
8656 <p><!--para 2 -->
8657  The catan functions compute the complex arc tangent of z, with branch cuts outside the
8658  interval [-i, +i] along the imaginary axis.
8659 <h6>Returns</h6>
8660 <p><!--para 3 -->
8661  The catan functions return the complex arc tangent value, in the range of a strip
8662  mathematically unbounded along the imaginary axis and in the interval [-pi /2, +pi /2]
8663  along the real axis.
8664
8665 <h5><a name="7.3.5.4" href="#7.3.5.4">7.3.5.4 The ccos functions</a></h5>
8666 <h6>Synopsis</h6>
8667 <p><!--para 1 -->
8668 <pre>
8669         #include <a href="#7.3">&lt;complex.h&gt;</a>
8670         double complex ccos(double complex z);
8671         float complex ccosf(float complex z);
8672         long double complex ccosl(long double complex z);</pre>
8673 <h6>Description</h6>
8674 <p><!--para 2 -->
8675  The ccos functions compute the complex cosine of z.
8676 <h6>Returns</h6>
8677 <p><!--para 3 -->
8678  The ccos functions return the complex cosine value.
8679
8680 <h5><a name="7.3.5.5" href="#7.3.5.5">7.3.5.5 The csin functions</a></h5>
8681 <h6>Synopsis</h6>
8682 <p><!--para 1 -->
8683 <pre>
8684         #include <a href="#7.3">&lt;complex.h&gt;</a>
8685         double complex csin(double complex z);
8686         float complex csinf(float complex z);
8687         long double complex csinl(long double complex z);</pre>
8688 <h6>Description</h6>
8689 <p><!--para 2 -->
8690  The csin functions compute the complex sine of z.
8691 <h6>Returns</h6>
8692 <p><!--para 3 -->
8693  The csin functions return the complex sine value.
8694 <!--page 186 -->
8695
8696 <h5><a name="7.3.5.6" href="#7.3.5.6">7.3.5.6 The ctan functions</a></h5>
8697 <h6>Synopsis</h6>
8698 <p><!--para 1 -->
8699 <pre>
8700         #include <a href="#7.3">&lt;complex.h&gt;</a>
8701         double complex ctan(double complex z);
8702         float complex ctanf(float complex z);
8703         long double complex ctanl(long double complex z);</pre>
8704 <h6>Description</h6>
8705 <p><!--para 2 -->
8706  The ctan functions compute the complex tangent of z.
8707 <h6>Returns</h6>
8708 <p><!--para 3 -->
8709  The ctan functions return the complex tangent value.
8710
8711 <h4><a name="7.3.6" href="#7.3.6">7.3.6 Hyperbolic functions</a></h4>
8712
8713 <h5><a name="7.3.6.1" href="#7.3.6.1">7.3.6.1 The cacosh functions</a></h5>
8714 <h6>Synopsis</h6>
8715 <p><!--para 1 -->
8716 <pre>
8717         #include <a href="#7.3">&lt;complex.h&gt;</a>
8718         double complex cacosh(double complex z);
8719         float complex cacoshf(float complex z);
8720         long double complex cacoshl(long double complex z);</pre>
8721 <h6>Description</h6>
8722 <p><!--para 2 -->
8723  The cacosh functions compute the complex arc hyperbolic cosine of z, with a branch
8724  cut at values less than 1 along the real axis.
8725 <h6>Returns</h6>
8726 <p><!--para 3 -->
8727  The cacosh functions return the complex arc hyperbolic cosine value, in the range of a
8728  half-strip of non-negative values along the real axis and in the interval [-ipi , +ipi ] along
8729  the imaginary axis.
8730
8731 <h5><a name="7.3.6.2" href="#7.3.6.2">7.3.6.2 The casinh functions</a></h5>
8732 <h6>Synopsis</h6>
8733 <p><!--para 1 -->
8734 <pre>
8735         #include <a href="#7.3">&lt;complex.h&gt;</a>
8736         double complex casinh(double complex z);
8737         float complex casinhf(float complex z);
8738         long double complex casinhl(long double complex z);</pre>
8739 <h6>Description</h6>
8740 <p><!--para 2 -->
8741  The casinh functions compute the complex arc hyperbolic sine of z, with branch cuts
8742  outside the interval [-i, +i] along the imaginary axis.
8743 <!--page 187 -->
8744 <h6>Returns</h6>
8745 <p><!--para 3 -->
8746  The casinh functions return the complex arc hyperbolic sine value, in the range of a
8747  strip mathematically unbounded along the real axis and in the interval [-ipi /2, +ipi /2]
8748  along the imaginary axis.
8749
8750 <h5><a name="7.3.6.3" href="#7.3.6.3">7.3.6.3 The catanh functions</a></h5>
8751 <h6>Synopsis</h6>
8752 <p><!--para 1 -->
8753 <pre>
8754         #include <a href="#7.3">&lt;complex.h&gt;</a>
8755         double complex catanh(double complex z);
8756         float complex catanhf(float complex z);
8757         long double complex catanhl(long double complex z);</pre>
8758 <h6>Description</h6>
8759 <p><!--para 2 -->
8760  The catanh functions compute the complex arc hyperbolic tangent of z, with branch
8761  cuts outside the interval [-1, +1] along the real axis.
8762 <h6>Returns</h6>
8763 <p><!--para 3 -->
8764  The catanh functions return the complex arc hyperbolic tangent value, in the range of a
8765  strip mathematically unbounded along the real axis and in the interval [-ipi /2, +ipi /2]
8766  along the imaginary axis.
8767
8768 <h5><a name="7.3.6.4" href="#7.3.6.4">7.3.6.4 The ccosh functions</a></h5>
8769 <h6>Synopsis</h6>
8770 <p><!--para 1 -->
8771 <pre>
8772         #include <a href="#7.3">&lt;complex.h&gt;</a>
8773         double complex ccosh(double complex z);
8774         float complex ccoshf(float complex z);
8775         long double complex ccoshl(long double complex z);</pre>
8776 <h6>Description</h6>
8777 <p><!--para 2 -->
8778  The ccosh functions compute the complex hyperbolic cosine of z.
8779 <h6>Returns</h6>
8780 <p><!--para 3 -->
8781  The ccosh functions return the complex hyperbolic cosine value.
8782
8783 <h5><a name="7.3.6.5" href="#7.3.6.5">7.3.6.5 The csinh functions</a></h5>
8784 <h6>Synopsis</h6>
8785 <p><!--para 1 -->
8786 <!--page 188 -->
8787 <pre>
8788         #include <a href="#7.3">&lt;complex.h&gt;</a>
8789         double complex csinh(double complex z);
8790         float complex csinhf(float complex z);
8791         long double complex csinhl(long double complex z);</pre>
8792 <h6>Description</h6>
8793 <p><!--para 2 -->
8794  The csinh functions compute the complex hyperbolic sine of z.
8795 <h6>Returns</h6>
8796 <p><!--para 3 -->
8797  The csinh functions return the complex hyperbolic sine value.
8798
8799 <h5><a name="7.3.6.6" href="#7.3.6.6">7.3.6.6 The ctanh functions</a></h5>
8800 <h6>Synopsis</h6>
8801 <p><!--para 1 -->
8802 <pre>
8803         #include <a href="#7.3">&lt;complex.h&gt;</a>
8804         double complex ctanh(double complex z);
8805         float complex ctanhf(float complex z);
8806         long double complex ctanhl(long double complex z);</pre>
8807 <h6>Description</h6>
8808 <p><!--para 2 -->
8809  The ctanh functions compute the complex hyperbolic tangent of z.
8810 <h6>Returns</h6>
8811 <p><!--para 3 -->
8812  The ctanh functions return the complex hyperbolic tangent value.
8813
8814 <h4><a name="7.3.7" href="#7.3.7">7.3.7 Exponential and logarithmic functions</a></h4>
8815
8816 <h5><a name="7.3.7.1" href="#7.3.7.1">7.3.7.1 The cexp functions</a></h5>
8817 <h6>Synopsis</h6>
8818 <p><!--para 1 -->
8819 <pre>
8820         #include <a href="#7.3">&lt;complex.h&gt;</a>
8821         double complex cexp(double complex z);
8822         float complex cexpf(float complex z);
8823         long double complex cexpl(long double complex z);</pre>
8824 <h6>Description</h6>
8825 <p><!--para 2 -->
8826  The cexp functions compute the complex base-e exponential of z.
8827 <h6>Returns</h6>
8828 <p><!--para 3 -->
8829  The cexp functions return the complex base-e exponential value.
8830
8831 <h5><a name="7.3.7.2" href="#7.3.7.2">7.3.7.2 The clog functions</a></h5>
8832 <h6>Synopsis</h6>
8833 <p><!--para 1 -->
8834 <!--page 189 -->
8835 <pre>
8836         #include <a href="#7.3">&lt;complex.h&gt;</a>
8837         double complex clog(double complex z);
8838         float complex clogf(float complex z);
8839         long double complex clogl(long double complex z);</pre>
8840 <h6>Description</h6>
8841 <p><!--para 2 -->
8842  The clog functions compute the complex natural (base-e) logarithm of z, with a branch
8843  cut along the negative real axis.
8844 <h6>Returns</h6>
8845 <p><!--para 3 -->
8846  The clog functions return the complex natural logarithm value, in the range of a strip
8847  mathematically unbounded along the real axis and in the interval [-ipi , +ipi ] along the
8848  imaginary axis.
8849
8850 <h4><a name="7.3.8" href="#7.3.8">7.3.8 Power and absolute-value functions</a></h4>
8851
8852 <h5><a name="7.3.8.1" href="#7.3.8.1">7.3.8.1 The cabs functions</a></h5>
8853 <h6>Synopsis</h6>
8854 <p><!--para 1 -->
8855 <pre>
8856         #include <a href="#7.3">&lt;complex.h&gt;</a>
8857         double cabs(double complex z);
8858         float cabsf(float complex z);
8859         long double cabsl(long double complex z);</pre>
8860 <h6>Description</h6>
8861 <p><!--para 2 -->
8862  The cabs functions compute the complex absolute value (also called norm, modulus, or
8863  magnitude) of z.
8864 <h6>Returns</h6>
8865 <p><!--para 3 -->
8866  The cabs functions return the complex absolute value.
8867
8868 <h5><a name="7.3.8.2" href="#7.3.8.2">7.3.8.2 The cpow functions</a></h5>
8869 <h6>Synopsis</h6>
8870 <p><!--para 1 -->
8871 <pre>
8872         #include <a href="#7.3">&lt;complex.h&gt;</a>
8873         double complex cpow(double complex x, double complex y);
8874         float complex cpowf(float complex x, float complex y);
8875         long double complex cpowl(long double complex x,
8876              long double complex y);</pre>
8877 <h6>Description</h6>
8878 <p><!--para 2 -->
8879  The cpow functions compute the complex power function xy , with a branch cut for the
8880  first parameter along the negative real axis.
8881 <h6>Returns</h6>
8882 <p><!--para 3 -->
8883  The cpow functions return the complex power function value.
8884 <!--page 190 -->
8885
8886 <h5><a name="7.3.8.3" href="#7.3.8.3">7.3.8.3 The csqrt functions</a></h5>
8887 <h6>Synopsis</h6>
8888 <p><!--para 1 -->
8889 <pre>
8890         #include <a href="#7.3">&lt;complex.h&gt;</a>
8891         double complex csqrt(double complex z);
8892         float complex csqrtf(float complex z);
8893         long double complex csqrtl(long double complex z);</pre>
8894 <h6>Description</h6>
8895 <p><!--para 2 -->
8896  The csqrt functions compute the complex square root of z, with a branch cut along the
8897  negative real axis.
8898 <h6>Returns</h6>
8899 <p><!--para 3 -->
8900  The csqrt functions return the complex square root value, in the range of the right half-
8901  plane (including the imaginary axis).
8902
8903 <h4><a name="7.3.9" href="#7.3.9">7.3.9 Manipulation functions</a></h4>
8904
8905 <h5><a name="7.3.9.1" href="#7.3.9.1">7.3.9.1 The carg functions</a></h5>
8906 <h6>Synopsis</h6>
8907 <p><!--para 1 -->
8908 <pre>
8909         #include <a href="#7.3">&lt;complex.h&gt;</a>
8910         double carg(double complex z);
8911         float cargf(float complex z);
8912         long double cargl(long double complex z);</pre>
8913 <h6>Description</h6>
8914 <p><!--para 2 -->
8915  The carg functions compute the argument (also called phase angle) of z, with a branch
8916  cut along the negative real axis.
8917 <h6>Returns</h6>
8918 <p><!--para 3 -->
8919  The carg functions return the value of the argument in the interval [-pi , +pi ].
8920
8921 <h5><a name="7.3.9.2" href="#7.3.9.2">7.3.9.2 The cimag functions</a></h5>
8922 <h6>Synopsis</h6>
8923 <p><!--para 1 -->
8924 <!--page 191 -->
8925 <pre>
8926         #include <a href="#7.3">&lt;complex.h&gt;</a>
8927         double cimag(double complex z);
8928         float cimagf(float complex z);
8929         long double cimagl(long double complex z);</pre>
8930 <h6>Description</h6>
8931 <p><!--para 2 -->
8932  The cimag functions compute the imaginary part of z.<sup><a href="#note170"><b>170)</b></a></sup>
8933 <h6>Returns</h6>
8934 <p><!--para 3 -->
8935  The cimag functions return the imaginary part value (as a real).
8936
8937 <h6>footnotes</h6>
8938 <p><small><a name="note170" href="#note170">170)</a> For a variable z of complex type, z == creal(z) + cimag(z)*I.
8939 </small>
8940
8941 <h5><a name="7.3.9.3" href="#7.3.9.3">7.3.9.3 The conj functions</a></h5>
8942 <h6>Synopsis</h6>
8943 <p><!--para 1 -->
8944 <pre>
8945         #include <a href="#7.3">&lt;complex.h&gt;</a>
8946         double complex conj(double complex z);
8947         float complex conjf(float complex z);
8948         long double complex conjl(long double complex z);</pre>
8949 <h6>Description</h6>
8950 <p><!--para 2 -->
8951  The conj functions compute the complex conjugate of z, by reversing the sign of its
8952  imaginary part.
8953 <h6>Returns</h6>
8954 <p><!--para 3 -->
8955  The conj functions return the complex conjugate value.
8956
8957 <h5><a name="7.3.9.4" href="#7.3.9.4">7.3.9.4 The cproj functions</a></h5>
8958 <h6>Synopsis</h6>
8959 <p><!--para 1 -->
8960 <pre>
8961         #include <a href="#7.3">&lt;complex.h&gt;</a>
8962         double complex cproj(double complex z);
8963         float complex cprojf(float complex z);
8964         long double complex cprojl(long double complex z);</pre>
8965 <h6>Description</h6>
8966 <p><!--para 2 -->
8967  The cproj functions compute a projection of z onto the Riemann sphere: z projects to
8968  z except that all complex infinities (even those with one infinite part and one NaN part)
8969  project to positive infinity on the real axis. If z has an infinite part, then cproj(z) is
8970  equivalent to
8971 <pre>
8972         INFINITY + I * copysign(0.0, cimag(z))</pre>
8973 <h6>Returns</h6>
8974 <p><!--para 3 -->
8975  The cproj functions return the value of the projection onto the Riemann sphere.
8976  
8977  
8978  
8979  
8980 <!--page 192 -->
8981
8982 <h5><a name="7.3.9.5" href="#7.3.9.5">7.3.9.5 The creal functions</a></h5>
8983 <h6>Synopsis</h6>
8984 <p><!--para 1 -->
8985 <pre>
8986         #include <a href="#7.3">&lt;complex.h&gt;</a>
8987         double creal(double complex z);
8988         float crealf(float complex z);
8989         long double creall(long double complex z);</pre>
8990 <h6>Description</h6>
8991 <p><!--para 2 -->
8992  The creal functions compute the real part of z.<sup><a href="#note171"><b>171)</b></a></sup>
8993 <h6>Returns</h6>
8994 <p><!--para 3 -->
8995  The creal functions return the real part value.
8996  
8997  
8998  
8999  
9000 <!--page 193 -->
9001
9002 <h6>footnotes</h6>
9003 <p><small><a name="note171" href="#note171">171)</a> For a variable z of complex type, z == creal(z) + cimag(z)*I.
9004 </small>
9005
9006 <h3><a name="7.4" href="#7.4">7.4 Character handling <ctype.h></a></h3>
9007 <p><!--para 1 -->
9008  The header <a href="#7.4">&lt;ctype.h&gt;</a> declares several functions useful for classifying and mapping
9009  characters.<sup><a href="#note172"><b>172)</b></a></sup> In all cases the argument is an int, the value of which shall be
9010  representable as an unsigned char or shall equal the value of the macro EOF. If the
9011  argument has any other value, the behavior is undefined.
9012 <p><!--para 2 -->
9013  The behavior of these functions is affected by the current locale. Those functions that
9014  have locale-specific aspects only when not in the "C" locale are noted below.
9015 <p><!--para 3 -->
9016  The term printing character refers to a member of a locale-specific set of characters, each
9017  of which occupies one printing position on a display device; the term control character
9018  refers to a member of a locale-specific set of characters that are not printing
9019  characters.<sup><a href="#note173"><b>173)</b></a></sup> All letters and digits are printing characters.
9020 <p><b> Forward references</b>: EOF (<a href="#7.19.1">7.19.1</a>), localization (<a href="#7.11">7.11</a>).
9021
9022 <h6>footnotes</h6>
9023 <p><small><a name="note172" href="#note172">172)</a> See ''future library directions'' (<a href="#7.26.2">7.26.2</a>).
9024 </small>
9025 <p><small><a name="note173" href="#note173">173)</a> In an implementation that uses the seven-bit US ASCII character set, the printing characters are those
9026  whose values lie from 0x20 (space) through 0x7E (tilde); the control characters are those whose
9027  values lie from 0 (NUL) through 0x1F (US), and the character 0x7F (DEL).
9028 </small>
9029
9030 <h4><a name="7.4.1" href="#7.4.1">7.4.1 Character classification functions</a></h4>
9031 <p><!--para 1 -->
9032  The functions in this subclause return nonzero (true) if and only if the value of the
9033  argument c conforms to that in the description of the function.
9034
9035 <h5><a name="7.4.1.1" href="#7.4.1.1">7.4.1.1 The isalnum function</a></h5>
9036 <h6>Synopsis</h6>
9037 <p><!--para 1 -->
9038 <pre>
9039           #include <a href="#7.4">&lt;ctype.h&gt;</a>
9040           int isalnum(int c);</pre>
9041 <h6>Description</h6>
9042 <p><!--para 2 -->
9043  The isalnum function tests for any character for which isalpha or isdigit is true.
9044
9045 <h5><a name="7.4.1.2" href="#7.4.1.2">7.4.1.2 The isalpha function</a></h5>
9046 <h6>Synopsis</h6>
9047 <p><!--para 1 -->
9048 <pre>
9049           #include <a href="#7.4">&lt;ctype.h&gt;</a>
9050           int isalpha(int c);</pre>
9051 <h6>Description</h6>
9052 <p><!--para 2 -->
9053  The isalpha function tests for any character for which isupper or islower is true,
9054  or any character that is one of a locale-specific set of alphabetic characters for which
9055  
9056  
9057  
9058 <!--page 194 -->
9059  none of iscntrl, isdigit, ispunct, or isspace is true.<sup><a href="#note174"><b>174)</b></a></sup> In the "C" locale,
9060  isalpha returns true only for the characters for which isupper or islower is true.
9061
9062 <h6>footnotes</h6>
9063 <p><small><a name="note174" href="#note174">174)</a> The functions islower and isupper test true or false separately for each of these additional
9064  characters; all four combinations are possible.
9065 </small>
9066
9067 <h5><a name="7.4.1.3" href="#7.4.1.3">7.4.1.3 The isblank function</a></h5>
9068 <h6>Synopsis</h6>
9069 <p><!--para 1 -->
9070 <pre>
9071          #include <a href="#7.4">&lt;ctype.h&gt;</a>
9072          int isblank(int c);</pre>
9073 <h6>Description</h6>
9074 <p><!--para 2 -->
9075  The isblank function tests for any character that is a standard blank character or is one
9076  of a locale-specific set of characters for which isspace is true and that is used to
9077  separate words within a line of text. The standard blank characters are the following:
9078  space (' '), and horizontal tab ('\t'). In the "C" locale, isblank returns true only
9079  for the standard blank characters.
9080
9081 <h5><a name="7.4.1.4" href="#7.4.1.4">7.4.1.4 The iscntrl function</a></h5>
9082 <h6>Synopsis</h6>
9083 <p><!--para 1 -->
9084 <pre>
9085          #include <a href="#7.4">&lt;ctype.h&gt;</a>
9086          int iscntrl(int c);</pre>
9087 <h6>Description</h6>
9088 <p><!--para 2 -->
9089  The iscntrl function tests for any control character.
9090
9091 <h5><a name="7.4.1.5" href="#7.4.1.5">7.4.1.5 The isdigit function</a></h5>
9092 <h6>Synopsis</h6>
9093 <p><!--para 1 -->
9094 <pre>
9095          #include <a href="#7.4">&lt;ctype.h&gt;</a>
9096          int isdigit(int c);</pre>
9097 <h6>Description</h6>
9098 <p><!--para 2 -->
9099  The isdigit function tests for any decimal-digit character (as defined in <a href="#5.2.1">5.2.1</a>).
9100
9101 <h5><a name="7.4.1.6" href="#7.4.1.6">7.4.1.6 The isgraph function</a></h5>
9102 <h6>Synopsis</h6>
9103 <p><!--para 1 -->
9104 <pre>
9105          #include <a href="#7.4">&lt;ctype.h&gt;</a>
9106          int isgraph(int c);</pre>
9107  
9108  
9109  
9110  
9111 <!--page 195 -->
9112 <h6>Description</h6>
9113 <p><!--para 2 -->
9114  The isgraph function tests for any printing character except space (' ').
9115
9116 <h5><a name="7.4.1.7" href="#7.4.1.7">7.4.1.7 The islower function</a></h5>
9117 <h6>Synopsis</h6>
9118 <p><!--para 1 -->
9119 <pre>
9120         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9121         int islower(int c);</pre>
9122 <h6>Description</h6>
9123 <p><!--para 2 -->
9124  The islower function tests for any character that is a lowercase letter or is one of a
9125  locale-specific set of characters for which none of iscntrl, isdigit, ispunct, or
9126  isspace is true. In the "C" locale, islower returns true only for the lowercase
9127  letters (as defined in <a href="#5.2.1">5.2.1</a>).
9128
9129 <h5><a name="7.4.1.8" href="#7.4.1.8">7.4.1.8 The isprint function</a></h5>
9130 <h6>Synopsis</h6>
9131 <p><!--para 1 -->
9132 <pre>
9133         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9134         int isprint(int c);</pre>
9135 <h6>Description</h6>
9136 <p><!--para 2 -->
9137  The isprint function tests for any printing character including space (' ').
9138
9139 <h5><a name="7.4.1.9" href="#7.4.1.9">7.4.1.9 The ispunct function</a></h5>
9140 <h6>Synopsis</h6>
9141 <p><!--para 1 -->
9142 <pre>
9143         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9144         int ispunct(int c);</pre>
9145 <h6>Description</h6>
9146 <p><!--para 2 -->
9147  The ispunct function tests for any printing character that is one of a locale-specific set
9148  of punctuation characters for which neither isspace nor isalnum is true. In the "C"
9149  locale, ispunct returns true for every printing character for which neither isspace
9150  nor isalnum is true.
9151
9152 <h5><a name="7.4.1.10" href="#7.4.1.10">7.4.1.10 The isspace function</a></h5>
9153 <h6>Synopsis</h6>
9154 <p><!--para 1 -->
9155 <pre>
9156         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9157         int isspace(int c);</pre>
9158 <h6>Description</h6>
9159 <p><!--para 2 -->
9160  The isspace function tests for any character that is a standard white-space character or
9161  is one of a locale-specific set of characters for which isalnum is false. The standard
9162 <!--page 196 -->
9163  white-space characters are the following: space (' '), form feed ('\f'), new-line
9164  ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). In the
9165  "C" locale, isspace returns true only for the standard white-space characters.
9166
9167 <h5><a name="7.4.1.11" href="#7.4.1.11">7.4.1.11 The isupper function</a></h5>
9168 <h6>Synopsis</h6>
9169 <p><!--para 1 -->
9170 <pre>
9171         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9172         int isupper(int c);</pre>
9173 <h6>Description</h6>
9174 <p><!--para 2 -->
9175  The isupper function tests for any character that is an uppercase letter or is one of a
9176  locale-specific set of characters for which none of iscntrl, isdigit, ispunct, or
9177  isspace is true. In the "C" locale, isupper returns true only for the uppercase
9178  letters (as defined in <a href="#5.2.1">5.2.1</a>).
9179
9180 <h5><a name="7.4.1.12" href="#7.4.1.12">7.4.1.12 The isxdigit function</a></h5>
9181 <h6>Synopsis</h6>
9182 <p><!--para 1 -->
9183 <pre>
9184         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9185         int isxdigit(int c);</pre>
9186 <h6>Description</h6>
9187 <p><!--para 2 -->
9188  The isxdigit function tests for any hexadecimal-digit character (as defined in <a href="#6.4.4.1">6.4.4.1</a>).
9189
9190 <h4><a name="7.4.2" href="#7.4.2">7.4.2 Character case mapping functions</a></h4>
9191
9192 <h5><a name="7.4.2.1" href="#7.4.2.1">7.4.2.1 The tolower function</a></h5>
9193 <h6>Synopsis</h6>
9194 <p><!--para 1 -->
9195 <pre>
9196         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9197         int tolower(int c);</pre>
9198 <h6>Description</h6>
9199 <p><!--para 2 -->
9200  The tolower function converts an uppercase letter to a corresponding lowercase letter.
9201 <h6>Returns</h6>
9202 <p><!--para 3 -->
9203  If the argument is a character for which isupper is true and there are one or more
9204  corresponding characters, as specified by the current locale, for which islower is true,
9205  the tolower function returns one of the corresponding characters (always the same one
9206  for any given locale); otherwise, the argument is returned unchanged.
9207 <!--page 197 -->
9208
9209 <h5><a name="7.4.2.2" href="#7.4.2.2">7.4.2.2 The toupper function</a></h5>
9210 <h6>Synopsis</h6>
9211 <p><!--para 1 -->
9212 <pre>
9213         #include <a href="#7.4">&lt;ctype.h&gt;</a>
9214         int toupper(int c);</pre>
9215 <h6>Description</h6>
9216 <p><!--para 2 -->
9217  The toupper function converts a lowercase letter to a corresponding uppercase letter.
9218 <h6>Returns</h6>
9219 <p><!--para 3 -->
9220  If the argument is a character for which islower is true and there are one or more
9221  corresponding characters, as specified by the current locale, for which isupper is true,
9222  the toupper function returns one of the corresponding characters (always the same one
9223  for any given locale); otherwise, the argument is returned unchanged.
9224 <!--page 198 -->
9225
9226 <h3><a name="7.5" href="#7.5">7.5 Errors <errno.h></a></h3>
9227 <p><!--para 1 -->
9228  The header <a href="#7.5">&lt;errno.h&gt;</a> defines several macros, all relating to the reporting of error
9229  conditions.
9230 <p><!--para 2 -->
9231  The macros are
9232 <pre>
9233           EDOM
9234           EILSEQ
9235           ERANGE</pre>
9236  which expand to integer constant expressions with type int, distinct positive values, and
9237  which are suitable for use in #if preprocessing directives; and
9238 <pre>
9239           errno</pre>
9240  which expands to a modifiable lvalue<sup><a href="#note175"><b>175)</b></a></sup> that has type int, the value of which is set to a
9241  positive error number by several library functions. It is unspecified whether errno is a
9242  macro or an identifier declared with external linkage. If a macro definition is suppressed
9243  in order to access an actual object, or a program defines an identifier with the name
9244  errno, the behavior is undefined.
9245 <p><!--para 3 -->
9246  The value of errno is zero at program startup, but is never set to zero by any library
9247  function.<sup><a href="#note176"><b>176)</b></a></sup> The value of errno may be set to nonzero by a library function call
9248  whether or not there is an error, provided the use of errno is not documented in the
9249  description of the function in this International Standard.
9250 <p><!--para 4 -->
9251  Additional macro definitions, beginning with E and a digit or E and an uppercase
9252  letter,<sup><a href="#note177"><b>177)</b></a></sup> may also be specified by the implementation.
9253  
9254  
9255  
9256  
9257 <!--page 199 -->
9258
9259 <h6>footnotes</h6>
9260 <p><small><a name="note175" href="#note175">175)</a> The macro errno need not be the identifier of an object. It might expand to a modifiable lvalue
9261  resulting from a function call (for example, *errno()).
9262 </small>
9263 <p><small><a name="note176" href="#note176">176)</a> Thus, a program that uses errno for error checking should set it to zero before a library function call,
9264  then inspect it before a subsequent library function call. Of course, a library function can save the
9265  value of errno on entry and then set it to zero, as long as the original value is restored if errno's
9266  value is still zero just before the return.
9267 </small>
9268 <p><small><a name="note177" href="#note177">177)</a> See ''future library directions'' (<a href="#7.26.3">7.26.3</a>).
9269 </small>
9270
9271 <h3><a name="7.6" href="#7.6">7.6 Floating-point environment <fenv.h></a></h3>
9272 <p><!--para 1 -->
9273  The header <a href="#7.6">&lt;fenv.h&gt;</a> declares two types and several macros and functions to provide
9274  access to the floating-point environment. The floating-point environment refers
9275  collectively to any floating-point status flags and control modes supported by the
9276  implementation.<sup><a href="#note178"><b>178)</b></a></sup> A floating-point status flag is a system variable whose value is set
9277  (but never cleared) when a floating-point exception is raised, which occurs as a side effect
9278  of exceptional floating-point arithmetic to provide auxiliary information.<sup><a href="#note179"><b>179)</b></a></sup> A floating-
9279  point control mode is a system variable whose value may be set by the user to affect the
9280  subsequent behavior of floating-point arithmetic.
9281 <p><!--para 2 -->
9282  Certain programming conventions support the intended model of use for the floating-
9283  point environment:<sup><a href="#note180"><b>180)</b></a></sup>
9284 <ul>
9285 <li>  a function call does not alter its caller's floating-point control modes, clear its caller's
9286  floating-point status flags, nor depend on the state of its caller's floating-point status
9287  flags unless the function is so documented;
9288 <li>  a function call is assumed to require default floating-point control modes, unless its
9289  documentation promises otherwise;
9290 <li>  a function call is assumed to have the potential for raising floating-point exceptions,
9291  unless its documentation promises otherwise.
9292 </ul>
9293 <p><!--para 3 -->
9294  The type
9295 <pre>
9296          fenv_t</pre>
9297  represents the entire floating-point environment.
9298 <p><!--para 4 -->
9299  The type
9300 <pre>
9301          fexcept_t</pre>
9302  represents the floating-point status flags collectively, including any status the
9303  implementation associates with the flags.
9304  
9305  
9306  
9307  
9308 <!--page 200 -->
9309 <p><!--para 5 -->
9310  Each of the macros
9311 <pre>
9312          FE_DIVBYZERO
9313          FE_INEXACT
9314          FE_INVALID
9315          FE_OVERFLOW
9316          FE_UNDERFLOW</pre>
9317  is defined if and only if the implementation supports the floating-point exception by
9318  means of the functions in 7.6.2.<sup><a href="#note181"><b>181)</b></a></sup> Additional implementation-defined floating-point
9319  exceptions, with macro definitions beginning with FE_ and an uppercase letter, may also
9320  be specified by the implementation. The defined macros expand to integer constant
9321  expressions with values such that bitwise ORs of all combinations of the macros result in
9322  distinct values, and furthermore, bitwise ANDs of all combinations of the macros result in
9323  zero.<sup><a href="#note182"><b>182)</b></a></sup>
9324 <p><!--para 6 -->
9325  The macro
9326 <pre>
9327          FE_ALL_EXCEPT</pre>
9328  is simply the bitwise OR of all floating-point exception macros defined by the
9329  implementation. If no such macros are defined, FE_ALL_EXCEPT shall be defined as 0.
9330 <p><!--para 7 -->
9331  Each of the macros
9332 <pre>
9333          FE_DOWNWARD
9334          FE_TONEAREST
9335          FE_TOWARDZERO
9336          FE_UPWARD</pre>
9337  is defined if and only if the implementation supports getting and setting the represented
9338  rounding direction by means of the fegetround and fesetround functions.
9339  Additional implementation-defined rounding directions, with macro definitions beginning
9340  with FE_ and an uppercase letter, may also be specified by the implementation. The
9341  defined macros expand to integer constant expressions whose values are distinct
9342  nonnegative values.<sup><a href="#note183"><b>183)</b></a></sup>
9343 <p><!--para 8 -->
9344  The macro
9345  
9346  
9347  
9348 <!--page 201 -->
9349 <pre>
9350           FE_DFL_ENV</pre>
9351  represents the default floating-point environment -- the one installed at program startup
9352 <ul>
9353 <li>  and has type ''pointer to const-qualified fenv_t''. It can be used as an argument to
9354 </ul>
9355  <a href="#7.6">&lt;fenv.h&gt;</a> functions that manage the floating-point environment.
9356 <p><!--para 9 -->
9357  Additional implementation-defined environments, with macro definitions beginning with
9358  FE_ and an uppercase letter, and having type ''pointer to const-qualified fenv_t'', may
9359  also be specified by the implementation.
9360
9361 <h6>footnotes</h6>
9362 <p><small><a name="note178" href="#note178">178)</a> This header is designed to support the floating-point exception status flags and directed-rounding
9363  control modes required by IEC 60559, and other similar floating-point state information. Also it is
9364  designed to facilitate code portability among all systems.
9365 </small>
9366 <p><small><a name="note179" href="#note179">179)</a> A floating-point status flag is not an object and can be set more than once within an expression.
9367 </small>
9368 <p><small><a name="note180" href="#note180">180)</a> With these conventions, a programmer can safely assume default floating-point control modes (or be
9369  unaware of them). The responsibilities associated with accessing the floating-point environment fall
9370  on the programmer or program that does so explicitly.
9371 </small>
9372 <p><small><a name="note181" href="#note181">181)</a> The implementation supports an exception if there are circumstances where a call to at least one of the
9373  functions in <a href="#7.6.2">7.6.2</a>, using the macro as the appropriate argument, will succeed. It is not necessary for
9374  all the functions to succeed all the time.
9375 </small>
9376 <p><small><a name="note182" href="#note182">182)</a> The macros should be distinct powers of two.
9377 </small>
9378 <p><small><a name="note183" href="#note183">183)</a> Even though the rounding direction macros may expand to constants corresponding to the values of
9379  FLT_ROUNDS, they are not required to do so.
9380 </small>
9381
9382 <h4><a name="7.6.1" href="#7.6.1">7.6.1 The FENV_ACCESS pragma</a></h4>
9383 <h6>Synopsis</h6>
9384 <p><!--para 1 -->
9385 <pre>
9386           #include <a href="#7.6">&lt;fenv.h&gt;</a>
9387           #pragma STDC FENV_ACCESS on-off-switch</pre>
9388 <h6>Description</h6>
9389 <p><!--para 2 -->
9390  The FENV_ACCESS pragma provides a means to inform the implementation when a
9391  program might access the floating-point environment to test floating-point status flags or
9392  run under non-default floating-point control modes.<sup><a href="#note184"><b>184)</b></a></sup> The pragma shall occur either
9393  outside external declarations or preceding all explicit declarations and statements inside a
9394  compound statement. When outside external declarations, the pragma takes effect from
9395  its occurrence until another FENV_ACCESS pragma is encountered, or until the end of
9396  the translation unit. When inside a compound statement, the pragma takes effect from its
9397  occurrence until another FENV_ACCESS pragma is encountered (including within a
9398  nested compound statement), or until the end of the compound statement; at the end of a
9399  compound statement the state for the pragma is restored to its condition just before the
9400  compound statement. If this pragma is used in any other context, the behavior is
9401  undefined. If part of a program tests floating-point status flags, sets floating-point control
9402  modes, or runs under non-default mode settings, but was translated with the state for the
9403  FENV_ACCESS pragma ''off'', the behavior is undefined. The default state (''on'' or
9404  ''off'') for the pragma is implementation-defined. (When execution passes from a part of
9405  the program translated with FENV_ACCESS ''off'' to a part translated with
9406  FENV_ACCESS ''on'', the state of the floating-point status flags is unspecified and the
9407  floating-point control modes have their default settings.)
9408  
9409  
9410  
9411  
9412 <!--page 202 -->
9413 <p><!--para 3 -->
9414  EXAMPLE
9415 <p><!--para 4 -->
9416 <pre>
9417          #include <a href="#7.6">&lt;fenv.h&gt;</a>
9418          void f(double x)
9419          {
9420                #pragma STDC FENV_ACCESS ON
9421                void g(double);
9422                void h(double);
9423                /* ... */
9424                g(x + 1);
9425                h(x + 1);
9426                /* ... */
9427          }</pre>
9428  If the function g might depend on status flags set as a side effect of the first x + 1, or if the second
9429  x + 1 might depend on control modes set as a side effect of the call to function g, then the program shall
9430  contain an appropriately placed invocation of #pragma STDC FENV_ACCESS ON.<sup><a href="#note185"><b>185)</b></a></sup>
9431  
9432
9433 <h6>footnotes</h6>
9434 <p><small><a name="note184" href="#note184">184)</a> The purpose of the FENV_ACCESS pragma is to allow certain optimizations that could subvert flag
9435  tests and mode changes (e.g., global common subexpression elimination, code motion, and constant
9436  folding). In general, if the state of FENV_ACCESS is ''off'', the translator can assume that default
9437  modes are in effect and the flags are not tested.
9438 </small>
9439 <p><small><a name="note185" href="#note185">185)</a> The side effects impose a temporal ordering that requires two evaluations of x + 1. On the other
9440  hand, without the #pragma STDC FENV_ACCESS ON pragma, and assuming the default state is
9441  ''off'', just one evaluation of x + 1 would suffice.
9442 </small>
9443
9444 <h4><a name="7.6.2" href="#7.6.2">7.6.2 Floating-point exceptions</a></h4>
9445 <p><!--para 1 -->
9446  The following functions provide access to the floating-point status flags.<sup><a href="#note186"><b>186)</b></a></sup> The int
9447  input argument for the functions represents a subset of floating-point exceptions, and can
9448  be zero or the bitwise OR of one or more floating-point exception macros, for example
9449  FE_OVERFLOW | FE_INEXACT. For other argument values the behavior of these
9450  functions is undefined.
9451
9452 <h6>footnotes</h6>
9453 <p><small><a name="note186" href="#note186">186)</a> The functions fetestexcept, feraiseexcept, and feclearexcept support the basic
9454  abstraction of flags that are either set or clear. An implementation may endow floating-point status
9455  flags with more information -- for example, the address of the code which first raised the floating-
9456  point exception; the functions fegetexceptflag and fesetexceptflag deal with the full
9457  content of flags.
9458 </small>
9459
9460 <h5><a name="7.6.2.1" href="#7.6.2.1">7.6.2.1 The feclearexcept function</a></h5>
9461 <h6>Synopsis</h6>
9462 <p><!--para 1 -->
9463 <pre>
9464          #include <a href="#7.6">&lt;fenv.h&gt;</a>
9465          int feclearexcept(int excepts);</pre>
9466 <h6>Description</h6>
9467 <p><!--para 2 -->
9468  The feclearexcept function attempts to clear the supported floating-point exceptions
9469  represented by its argument.
9470 <h6>Returns</h6>
9471 <p><!--para 3 -->
9472  The feclearexcept function returns zero if the excepts argument is zero or if all
9473  the specified exceptions were successfully cleared. Otherwise, it returns a nonzero value.
9474  
9475  
9476 <!--page 203 -->
9477
9478 <h5><a name="7.6.2.2" href="#7.6.2.2">7.6.2.2 The fegetexceptflag function</a></h5>
9479 <h6>Synopsis</h6>
9480 <p><!--para 1 -->
9481 <pre>
9482           #include <a href="#7.6">&lt;fenv.h&gt;</a>
9483           int fegetexceptflag(fexcept_t *flagp,
9484                int excepts);</pre>
9485 <h6>Description</h6>
9486 <p><!--para 2 -->
9487  The fegetexceptflag function attempts to store an implementation-defined
9488  representation of the states of the floating-point status flags indicated by the argument
9489  excepts in the object pointed to by the argument flagp.
9490 <h6>Returns</h6>
9491 <p><!--para 3 -->
9492  The fegetexceptflag function returns zero if the representation was successfully
9493  stored. Otherwise, it returns a nonzero value.
9494
9495 <h5><a name="7.6.2.3" href="#7.6.2.3">7.6.2.3 The feraiseexcept function</a></h5>
9496 <h6>Synopsis</h6>
9497 <p><!--para 1 -->
9498 <pre>
9499           #include <a href="#7.6">&lt;fenv.h&gt;</a>
9500           int feraiseexcept(int excepts);</pre>
9501 <h6>Description</h6>
9502 <p><!--para 2 -->
9503  The feraiseexcept function attempts to raise the supported floating-point exceptions
9504  represented by its argument.<sup><a href="#note187"><b>187)</b></a></sup> The order in which these floating-point exceptions are
9505  raised is unspecified, except as stated in <a href="#F.7.6">F.7.6</a>. Whether the feraiseexcept function
9506  additionally raises the ''inexact'' floating-point exception whenever it raises the
9507  ''overflow'' or ''underflow'' floating-point exception is implementation-defined.
9508 <h6>Returns</h6>
9509 <p><!--para 3 -->
9510  The feraiseexcept function returns zero if the excepts argument is zero or if all
9511  the specified exceptions were successfully raised. Otherwise, it returns a nonzero value.
9512  
9513  
9514  
9515  
9516 <!--page 204 -->
9517
9518 <h6>footnotes</h6>
9519 <p><small><a name="note187" href="#note187">187)</a> The effect is intended to be similar to that of floating-point exceptions raised by arithmetic operations.
9520  Hence, enabled traps for floating-point exceptions raised by this function are taken. The specification
9521  in <a href="#F.7.6">F.7.6</a> is in the same spirit.
9522 </small>
9523
9524 <h5><a name="7.6.2.4" href="#7.6.2.4">7.6.2.4 The fesetexceptflag function</a></h5>
9525 <h6>Synopsis</h6>
9526 <p><!--para 1 -->
9527 <pre>
9528          #include <a href="#7.6">&lt;fenv.h&gt;</a>
9529          int fesetexceptflag(const fexcept_t *flagp,
9530               int excepts);</pre>
9531 <h6>Description</h6>
9532 <p><!--para 2 -->
9533  The fesetexceptflag function attempts to set the floating-point status flags
9534  indicated by the argument excepts to the states stored in the object pointed to by
9535  flagp. The value of *flagp shall have been set by a previous call to
9536  fegetexceptflag whose second argument represented at least those floating-point
9537  exceptions represented by the argument excepts. This function does not raise floating-
9538  point exceptions, but only sets the state of the flags.
9539 <h6>Returns</h6>
9540 <p><!--para 3 -->
9541  The fesetexceptflag function returns zero if the excepts argument is zero or if
9542  all the specified flags were successfully set to the appropriate state. Otherwise, it returns
9543  a nonzero value.
9544
9545 <h5><a name="7.6.2.5" href="#7.6.2.5">7.6.2.5 The fetestexcept function</a></h5>
9546 <h6>Synopsis</h6>
9547 <p><!--para 1 -->
9548 <pre>
9549          #include <a href="#7.6">&lt;fenv.h&gt;</a>
9550          int fetestexcept(int excepts);</pre>
9551 <h6>Description</h6>
9552 <p><!--para 2 -->
9553  The fetestexcept function determines which of a specified subset of the floating-
9554  point exception flags are currently set. The excepts argument specifies the floating-
9555  point status flags to be queried.<sup><a href="#note188"><b>188)</b></a></sup>
9556 <h6>Returns</h6>
9557 <p><!--para 3 -->
9558  The fetestexcept function returns the value of the bitwise OR of the floating-point
9559  exception macros corresponding to the currently set floating-point exceptions included in
9560  excepts.
9561 <p><!--para 4 -->
9562  EXAMPLE       Call f if ''invalid'' is set, then g if ''overflow'' is set:
9563  
9564  
9565  
9566  
9567 <!--page 205 -->
9568 <pre>
9569         #include <a href="#7.6">&lt;fenv.h&gt;</a>
9570         /* ... */
9571         {
9572                 #pragma STDC FENV_ACCESS ON
9573                 int set_excepts;
9574                 feclearexcept(FE_INVALID | FE_OVERFLOW);
9575                 // maybe raise exceptions
9576                 set_excepts = fetestexcept(FE_INVALID | FE_OVERFLOW);
9577                 if (set_excepts &amp; FE_INVALID) f();
9578                 if (set_excepts &amp; FE_OVERFLOW) g();
9579                 /* ... */
9580         }</pre>
9581  
9582
9583 <h6>footnotes</h6>
9584 <p><small><a name="note188" href="#note188">188)</a> This mechanism allows testing several floating-point exceptions with just one function call.
9585 </small>
9586
9587 <h4><a name="7.6.3" href="#7.6.3">7.6.3 Rounding</a></h4>
9588 <p><!--para 1 -->
9589  The fegetround and fesetround functions provide control of rounding direction
9590  modes.
9591
9592 <h5><a name="7.6.3.1" href="#7.6.3.1">7.6.3.1 The fegetround function</a></h5>
9593 <h6>Synopsis</h6>
9594 <p><!--para 1 -->
9595 <pre>
9596         #include <a href="#7.6">&lt;fenv.h&gt;</a>
9597         int fegetround(void);</pre>
9598 <h6>Description</h6>
9599 <p><!--para 2 -->
9600  The fegetround function gets the current rounding direction.
9601 <h6>Returns</h6>
9602 <p><!--para 3 -->
9603  The fegetround function returns the value of the rounding direction macro
9604  representing the current rounding direction or a negative value if there is no such
9605  rounding direction macro or the current rounding direction is not determinable.
9606
9607 <h5><a name="7.6.3.2" href="#7.6.3.2">7.6.3.2 The fesetround function</a></h5>
9608 <h6>Synopsis</h6>
9609 <p><!--para 1 -->
9610 <pre>
9611         #include <a href="#7.6">&lt;fenv.h&gt;</a>
9612         int fesetround(int round);</pre>
9613 <h6>Description</h6>
9614 <p><!--para 2 -->
9615  The fesetround function establishes the rounding direction represented by its
9616  argument round. If the argument is not equal to the value of a rounding direction macro,
9617  the rounding direction is not changed.
9618 <h6>Returns</h6>
9619 <p><!--para 3 -->
9620  The fesetround function returns zero if and only if the requested rounding direction
9621  was established.
9622 <!--page 206 -->
9623 <p><!--para 4 -->
9624  EXAMPLE Save, set, and restore the rounding direction. Report an error and abort if setting the
9625  rounding direction fails.
9626 <pre>
9627         #include <a href="#7.6">&lt;fenv.h&gt;</a>
9628         #include <a href="#7.2">&lt;assert.h&gt;</a>
9629         void f(int round_dir)
9630         {
9631               #pragma STDC FENV_ACCESS ON
9632               int save_round;
9633               int setround_ok;
9634               save_round = fegetround();
9635               setround_ok = fesetround(round_dir);
9636               assert(setround_ok == 0);
9637               /* ... */
9638               fesetround(save_round);
9639               /* ... */
9640         }</pre>
9641  
9642
9643 <h4><a name="7.6.4" href="#7.6.4">7.6.4 Environment</a></h4>
9644 <p><!--para 1 -->
9645  The functions in this section manage the floating-point environment -- status flags and
9646  control modes -- as one entity.
9647
9648 <h5><a name="7.6.4.1" href="#7.6.4.1">7.6.4.1 The fegetenv function</a></h5>
9649 <h6>Synopsis</h6>
9650 <p><!--para 1 -->
9651 <pre>
9652         #include <a href="#7.6">&lt;fenv.h&gt;</a>
9653         int fegetenv(fenv_t *envp);</pre>
9654 <h6>Description</h6>
9655 <p><!--para 2 -->
9656  The fegetenv function attempts to store the current floating-point environment in the
9657  object pointed to by envp.
9658 <h6>Returns</h6>
9659 <p><!--para 3 -->
9660  The fegetenv function returns zero if the environment was successfully stored.
9661  Otherwise, it returns a nonzero value.
9662
9663 <h5><a name="7.6.4.2" href="#7.6.4.2">7.6.4.2 The feholdexcept function</a></h5>
9664 <h6>Synopsis</h6>
9665 <p><!--para 1 -->
9666 <pre>
9667         #include <a href="#7.6">&lt;fenv.h&gt;</a>
9668         int feholdexcept(fenv_t *envp);</pre>
9669 <h6>Description</h6>
9670 <p><!--para 2 -->
9671  The feholdexcept function saves the current floating-point environment in the object
9672  pointed to by envp, clears the floating-point status flags, and then installs a non-stop
9673  (continue on floating-point exceptions) mode, if available, for all floating-point
9674  exceptions.<sup><a href="#note189"><b>189)</b></a></sup>
9675 <!--page 207 -->
9676 <h6>Returns</h6>
9677 <p><!--para 3 -->
9678  The feholdexcept function returns zero if and only if non-stop floating-point
9679  exception handling was successfully installed.
9680
9681 <h6>footnotes</h6>
9682 <p><small><a name="note189" href="#note189">189)</a> IEC 60559 systems have a default non-stop mode, and typically at least one other mode for trap
9683  handling or aborting; if the system provides only the non-stop mode then installing it is trivial. For
9684  such systems, the feholdexcept function can be used in conjunction with the feupdateenv
9685  function to write routines that hide spurious floating-point exceptions from their callers.
9686 </small>
9687
9688 <h5><a name="7.6.4.3" href="#7.6.4.3">7.6.4.3 The fesetenv function</a></h5>
9689 <h6>Synopsis</h6>
9690 <p><!--para 1 -->
9691 <pre>
9692          #include <a href="#7.6">&lt;fenv.h&gt;</a>
9693          int fesetenv(const fenv_t *envp);</pre>
9694 <h6>Description</h6>
9695 <p><!--para 2 -->
9696  The fesetenv function attempts to establish the floating-point environment represented
9697  by the object pointed to by envp. The argument envp shall point to an object set by a
9698  call to fegetenv or feholdexcept, or equal a floating-point environment macro.
9699  Note that fesetenv merely installs the state of the floating-point status flags
9700  represented through its argument, and does not raise these floating-point exceptions.
9701 <h6>Returns</h6>
9702 <p><!--para 3 -->
9703  The fesetenv function returns zero if the environment was successfully established.
9704  Otherwise, it returns a nonzero value.
9705
9706 <h5><a name="7.6.4.4" href="#7.6.4.4">7.6.4.4 The feupdateenv function</a></h5>
9707 <h6>Synopsis</h6>
9708 <p><!--para 1 -->
9709 <pre>
9710          #include <a href="#7.6">&lt;fenv.h&gt;</a>
9711          int feupdateenv(const fenv_t *envp);</pre>
9712 <h6>Description</h6>
9713 <p><!--para 2 -->
9714  The feupdateenv function attempts to save the currently raised floating-point
9715  exceptions in its automatic storage, install the floating-point environment represented by
9716  the object pointed to by envp, and then raise the saved floating-point exceptions. The
9717  argument envp shall point to an object set by a call to feholdexcept or fegetenv,
9718  or equal a floating-point environment macro.
9719 <h6>Returns</h6>
9720 <p><!--para 3 -->
9721  The feupdateenv function returns zero if all the actions were successfully carried out.
9722  Otherwise, it returns a nonzero value.
9723  
9724  
9725  
9726  
9727 <!--page 208 -->
9728 <p><!--para 4 -->
9729  EXAMPLE   Hide spurious underflow floating-point exceptions:
9730 <!--page 209 -->
9731 <pre>
9732        #include <a href="#7.6">&lt;fenv.h&gt;</a>
9733        double f(double x)
9734        {
9735              #pragma STDC FENV_ACCESS ON
9736              double result;
9737              fenv_t save_env;
9738              if (feholdexcept(&amp;save_env))
9739                    return /* indication of an environmental problem */;
9740              // compute result
9741              if (/* test spurious underflow */)
9742                    if (feclearexcept(FE_UNDERFLOW))
9743                             return /* indication of an environmental problem */;
9744              if (feupdateenv(&amp;save_env))
9745                    return /* indication of an environmental problem */;
9746              return result;
9747        }</pre>
9748
9749 <h3><a name="7.7" href="#7.7">7.7 Characteristics of floating types <float.h></a></h3>
9750 <p><!--para 1 -->
9751  The header <a href="#7.7">&lt;float.h&gt;</a> defines several macros that expand to various limits and
9752  parameters of the standard floating-point types.
9753 <p><!--para 2 -->
9754  The macros, their meanings, and the constraints (or restrictions) on their values are listed
9755  in <a href="#5.2.4.2.2">5.2.4.2.2</a>.
9756 <!--page 210 -->
9757
9758 <h3><a name="7.8" href="#7.8">7.8 Format conversion of integer types <inttypes.h></a></h3>
9759 <p><!--para 1 -->
9760  The header <a href="#7.8">&lt;inttypes.h&gt;</a> includes the header <a href="#7.18">&lt;stdint.h&gt;</a> and extends it with
9761  additional facilities provided by hosted implementations.
9762 <p><!--para 2 -->
9763  It declares functions for manipulating greatest-width integers and converting numeric
9764  character strings to greatest-width integers, and it declares the type
9765 <pre>
9766           imaxdiv_t</pre>
9767  which is a structure type that is the type of the value returned by the imaxdiv function.
9768  For each type declared in <a href="#7.18">&lt;stdint.h&gt;</a>, it defines corresponding macros for conversion
9769  specifiers for use with the formatted input/output functions.<sup><a href="#note190"><b>190)</b></a></sup>
9770 <p><b> Forward references</b>: integer types <a href="#7.18">&lt;stdint.h&gt;</a> (<a href="#7.18">7.18</a>), formatted input/output
9771  functions (<a href="#7.19.6">7.19.6</a>), formatted wide character input/output functions (<a href="#7.24.2">7.24.2</a>).
9772
9773 <h6>footnotes</h6>
9774 <p><small><a name="note190" href="#note190">190)</a> See ''future library directions'' (<a href="#7.26.4">7.26.4</a>).
9775 </small>
9776
9777 <h4><a name="7.8.1" href="#7.8.1">7.8.1 Macros for format specifiers</a></h4>
9778 <p><!--para 1 -->
9779  Each of the following object-like macros<sup><a href="#note191"><b>191)</b></a></sup> expands to a character string literal
9780  containing a conversion specifier, possibly modified by a length modifier, suitable for use
9781  within the format argument of a formatted input/output function when converting the
9782  corresponding integer type. These macro names have the general form of PRI (character
9783  string literals for the fprintf and fwprintf family) or SCN (character string literals
9784  for the fscanf and fwscanf family),<sup><a href="#note192"><b>192)</b></a></sup> followed by the conversion specifier,
9785  followed by a name corresponding to a similar type name in <a href="#7.18.1">7.18.1</a>. In these names, N
9786  represents the width of the type as described in <a href="#7.18.1">7.18.1</a>. For example, PRIdFAST32 can
9787  be used in a format string to print the value of an integer of type int_fast32_t.
9788 <p><!--para 2 -->
9789  The fprintf macros for signed integers are:
9790 <pre>
9791         PRIdN             PRIdLEASTN                PRIdFASTN          PRIdMAX             PRIdPTR
9792         PRIiN             PRIiLEASTN                PRIiFASTN          PRIiMAX             PRIiPTR</pre>
9793  
9794  
9795  
9796  
9797 <!--page 211 -->
9798 <p><!--para 3 -->
9799  The fprintf macros for unsigned integers are:
9800 <p><!--para 4 -->
9801 <pre>
9802         PRIoN           PRIoLEASTN               PRIoFASTN              PRIoMAX             PRIoPTR
9803         PRIuN           PRIuLEASTN               PRIuFASTN              PRIuMAX             PRIuPTR
9804         PRIxN           PRIxLEASTN               PRIxFASTN              PRIxMAX             PRIxPTR
9805         PRIXN           PRIXLEASTN               PRIXFASTN              PRIXMAX             PRIXPTR</pre>
9806  The fscanf macros for signed integers are:
9807 <p><!--para 5 -->
9808 <pre>
9809         SCNdN           SCNdLEASTN               SCNdFASTN              SCNdMAX             SCNdPTR
9810         SCNiN           SCNiLEASTN               SCNiFASTN              SCNiMAX             SCNiPTR</pre>
9811  The fscanf macros for unsigned integers are:
9812 <p><!--para 6 -->
9813 <pre>
9814         SCNoN           SCNoLEASTN               SCNoFASTN              SCNoMAX             SCNoPTR
9815         SCNuN           SCNuLEASTN               SCNuFASTN              SCNuMAX             SCNuPTR
9816         SCNxN           SCNxLEASTN               SCNxFASTN              SCNxMAX             SCNxPTR</pre>
9817  For each type that the implementation provides in <a href="#7.18">&lt;stdint.h&gt;</a>, the corresponding
9818  fprintf macros shall be defined and the corresponding fscanf macros shall be
9819  defined unless the implementation does not have a suitable fscanf length modifier for
9820  the type.
9821 <p><!--para 7 -->
9822  EXAMPLE
9823 <pre>
9824          #include <a href="#7.8">&lt;inttypes.h&gt;</a>
9825          #include <a href="#7.24">&lt;wchar.h&gt;</a>
9826          int main(void)
9827          {
9828                uintmax_t i = UINTMAX_MAX;    // this type always exists
9829                wprintf(L"The largest integer value is %020"
9830                      PRIxMAX "\n", i);
9831                return 0;
9832          }</pre>
9833  
9834
9835 <h6>footnotes</h6>
9836 <p><small><a name="note191" href="#note191">191)</a> C++ implementations should define these macros only when __STDC_FORMAT_MACROS is defined
9837  before <a href="#7.8">&lt;inttypes.h&gt;</a> is included.
9838 </small>
9839 <p><small><a name="note192" href="#note192">192)</a> Separate macros are given for use with fprintf and fscanf functions because, in the general case,
9840  different format specifiers may be required for fprintf and fscanf, even when the type is the
9841  same.
9842 </small>
9843
9844 <h4><a name="7.8.2" href="#7.8.2">7.8.2 Functions for greatest-width integer types</a></h4>
9845
9846 <h5><a name="7.8.2.1" href="#7.8.2.1">7.8.2.1 The imaxabs function</a></h5>
9847 <h6>Synopsis</h6>
9848 <p><!--para 1 -->
9849 <pre>
9850          #include <a href="#7.8">&lt;inttypes.h&gt;</a>
9851          intmax_t imaxabs(intmax_t j);</pre>
9852 <h6>Description</h6>
9853 <p><!--para 2 -->
9854  The imaxabs function computes the absolute value of an integer j. If the result cannot
9855  be represented, the behavior is undefined.<sup><a href="#note193"><b>193)</b></a></sup>
9856  
9857  
9858  
9859 <!--page 212 -->
9860 <h6>Returns</h6>
9861 <p><!--para 3 -->
9862  The imaxabs function returns the absolute value.
9863
9864 <h6>footnotes</h6>
9865 <p><small><a name="note193" href="#note193">193)</a> The absolute value of the most negative number cannot be represented in two's complement.
9866 </small>
9867
9868 <h5><a name="7.8.2.2" href="#7.8.2.2">7.8.2.2 The imaxdiv function</a></h5>
9869 <h6>Synopsis</h6>
9870 <p><!--para 1 -->
9871 <pre>
9872             #include <a href="#7.8">&lt;inttypes.h&gt;</a>
9873             imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);</pre>
9874 <h6>Description</h6>
9875 <p><!--para 2 -->
9876  The imaxdiv function computes numer / denom and numer % denom in a single
9877  operation.
9878 <h6>Returns</h6>
9879 <p><!--para 3 -->
9880  The imaxdiv function returns a structure of type imaxdiv_t comprising both the
9881  quotient and the remainder. The structure shall contain (in either order) the members
9882  quot (the quotient) and rem (the remainder), each of which has type intmax_t. If
9883  either part of the result cannot be represented, the behavior is undefined.
9884
9885 <h5><a name="7.8.2.3" href="#7.8.2.3">7.8.2.3 The strtoimax and strtoumax functions</a></h5>
9886 <h6>Synopsis</h6>
9887 <p><!--para 1 -->
9888 <pre>
9889         #include <a href="#7.8">&lt;inttypes.h&gt;</a>
9890         intmax_t strtoimax(const char * restrict nptr,
9891              char ** restrict endptr, int base);
9892         uintmax_t strtoumax(const char * restrict nptr,
9893              char ** restrict endptr, int base);</pre>
9894 <h6>Description</h6>
9895 <p><!--para 2 -->
9896  The strtoimax and strtoumax functions are equivalent to the strtol, strtoll,
9897  strtoul, and strtoull functions, except that the initial portion of the string is
9898  converted to intmax_t and uintmax_t representation, respectively.
9899 <h6>Returns</h6>
9900 <p><!--para 3 -->
9901  The strtoimax and strtoumax functions return the converted value, if any. If no
9902  conversion could be performed, zero is returned. If the correct value is outside the range
9903  of representable values, INTMAX_MAX, INTMAX_MIN, or UINTMAX_MAX is returned
9904  (according to the return type and sign of the value, if any), and the value of the macro
9905  ERANGE is stored in errno.
9906 <p><b> Forward references</b>: the strtol, strtoll, strtoul, and strtoull functions
9907  (<a href="#7.20.1.4">7.20.1.4</a>).
9908 <!--page 213 -->
9909
9910 <h5><a name="7.8.2.4" href="#7.8.2.4">7.8.2.4 The wcstoimax and wcstoumax functions</a></h5>
9911 <h6>Synopsis</h6>
9912 <p><!--para 1 -->
9913 <pre>
9914         #include <a href="#7.17">&lt;stddef.h&gt;</a>           // for wchar_t
9915         #include <a href="#7.8">&lt;inttypes.h&gt;</a>
9916         intmax_t wcstoimax(const wchar_t * restrict nptr,
9917              wchar_t ** restrict endptr, int base);
9918         uintmax_t wcstoumax(const wchar_t * restrict nptr,
9919              wchar_t ** restrict endptr, int base);</pre>
9920 <h6>Description</h6>
9921 <p><!--para 2 -->
9922  The wcstoimax and wcstoumax functions are equivalent to the wcstol, wcstoll,
9923  wcstoul, and wcstoull functions except that the initial portion of the wide string is
9924  converted to intmax_t and uintmax_t representation, respectively.
9925 <h6>Returns</h6>
9926 <p><!--para 3 -->
9927  The wcstoimax function returns the converted value, if any. If no conversion could be
9928  performed, zero is returned. If the correct value is outside the range of representable
9929  values, INTMAX_MAX, INTMAX_MIN, or UINTMAX_MAX is returned (according to the
9930  return type and sign of the value, if any), and the value of the macro ERANGE is stored in
9931  errno.
9932 <p><b> Forward references</b>: the wcstol, wcstoll, wcstoul, and wcstoull functions
9933  (<a href="#7.24.4.1.2">7.24.4.1.2</a>).
9934 <!--page 214 -->
9935
9936 <h3><a name="7.9" href="#7.9">7.9 Alternative spellings <iso646.h></a></h3>
9937 <p><!--para 1 -->
9938  The header <a href="#7.9">&lt;iso646.h&gt;</a> defines the following eleven macros (on the left) that expand
9939  to the corresponding tokens (on the right):
9940 <!--page 215 -->
9941 <pre>
9942        and          &amp;&amp;
9943        and_eq       &amp;=
9944        bitand       &amp;
9945        bitor        |
9946        compl        ~
9947        not          !
9948        not_eq       !=
9949        or           ||
9950        or_eq        |=
9951        xor          ^
9952        xor_eq       ^=</pre>
9953
9954 <h3><a name="7.10" href="#7.10">7.10 Sizes of integer types <limits.h></a></h3>
9955 <p><!--para 1 -->
9956  The header <a href="#7.10">&lt;limits.h&gt;</a> defines several macros that expand to various limits and
9957  parameters of the standard integer types.
9958 <p><!--para 2 -->
9959  The macros, their meanings, and the constraints (or restrictions) on their values are listed
9960  in <a href="#5.2.4.2.1">5.2.4.2.1</a>.
9961 <!--page 216 -->
9962
9963 <h3><a name="7.11" href="#7.11">7.11 Localization <locale.h></a></h3>
9964 <p><!--para 1 -->
9965  The header <a href="#7.11">&lt;locale.h&gt;</a> declares two functions, one type, and defines several macros.
9966 <p><!--para 2 -->
9967  The type is
9968 <pre>
9969         struct lconv</pre>
9970  which contains members related to the formatting of numeric values. The structure shall
9971  contain at least the following members, in any order. The semantics of the members and
9972  their normal ranges are explained in <a href="#7.11.2.1">7.11.2.1</a>. In the "C" locale, the members shall have
9973  the values specified in the comments.
9974 <!--page 217 -->
9975 <p><!--para 3 -->
9976 <pre>
9977         char   *decimal_point;                 //   "."
9978         char   *thousands_sep;                 //   ""
9979         char   *grouping;                      //   ""
9980         char   *mon_decimal_point;             //   ""
9981         char   *mon_thousands_sep;             //   ""
9982         char   *mon_grouping;                  //   ""
9983         char   *positive_sign;                 //   ""
9984         char   *negative_sign;                 //   ""
9985         char   *currency_symbol;               //   ""
9986         char   frac_digits;                    //   CHAR_MAX
9987         char   p_cs_precedes;                  //   CHAR_MAX
9988         char   n_cs_precedes;                  //   CHAR_MAX
9989         char   p_sep_by_space;                 //   CHAR_MAX
9990         char   n_sep_by_space;                 //   CHAR_MAX
9991         char   p_sign_posn;                    //   CHAR_MAX
9992         char   n_sign_posn;                    //   CHAR_MAX
9993         char   *int_curr_symbol;               //   ""
9994         char   int_frac_digits;                //   CHAR_MAX
9995         char   int_p_cs_precedes;              //   CHAR_MAX
9996         char   int_n_cs_precedes;              //   CHAR_MAX
9997         char   int_p_sep_by_space;             //   CHAR_MAX
9998         char   int_n_sep_by_space;             //   CHAR_MAX
9999         char   int_p_sign_posn;                //   CHAR_MAX
10000         char   int_n_sign_posn;                //   CHAR_MAX</pre>
10001  The macros defined are NULL (described in <a href="#7.17">7.17</a>); and
10002 <pre>
10003           LC_ALL
10004           LC_COLLATE
10005           LC_CTYPE
10006           LC_MONETARY
10007           LC_NUMERIC
10008           LC_TIME</pre>
10009  which expand to integer constant expressions with distinct values, suitable for use as the
10010  first argument to the setlocale function.<sup><a href="#note194"><b>194)</b></a></sup> Additional macro definitions, beginning
10011  with the characters LC_ and an uppercase letter,<sup><a href="#note195"><b>195)</b></a></sup> may also be specified by the
10012  implementation.
10013
10014 <h6>footnotes</h6>
10015 <p><small><a name="note194" href="#note194">194)</a> ISO/IEC 9945-2 specifies locale and charmap formats that may be used to specify locales for C.
10016 </small>
10017 <p><small><a name="note195" href="#note195">195)</a> See ''future library directions'' (<a href="#7.26.5">7.26.5</a>).
10018 </small>
10019
10020 <h4><a name="7.11.1" href="#7.11.1">7.11.1 Locale control</a></h4>
10021
10022 <h5><a name="7.11.1.1" href="#7.11.1.1">7.11.1.1 The setlocale function</a></h5>
10023 <h6>Synopsis</h6>
10024 <p><!--para 1 -->
10025 <pre>
10026           #include <a href="#7.11">&lt;locale.h&gt;</a>
10027           char *setlocale(int category, const char *locale);</pre>
10028 <h6>Description</h6>
10029 <p><!--para 2 -->
10030  The setlocale function selects the appropriate portion of the program's locale as
10031  specified by the category and locale arguments. The setlocale function may be
10032  used to change or query the program's entire current locale or portions thereof. The value
10033  LC_ALL for category names the program's entire locale; the other values for
10034  category name only a portion of the program's locale. LC_COLLATE affects the
10035  behavior of the strcoll and strxfrm functions. LC_CTYPE affects the behavior of
10036  the character handling functions<sup><a href="#note196"><b>196)</b></a></sup> and the multibyte and wide character functions.
10037  LC_MONETARY affects the monetary formatting information returned by the
10038  localeconv function. LC_NUMERIC affects the decimal-point character for the
10039  formatted input/output functions and the string conversion functions, as well as the
10040  nonmonetary formatting information returned by the localeconv function. LC_TIME
10041  affects the behavior of the strftime and wcsftime functions.
10042 <p><!--para 3 -->
10043  A value of "C" for locale specifies the minimal environment for C translation; a value
10044  of "" for locale specifies the locale-specific native environment. Other
10045  implementation-defined strings may be passed as the second argument to setlocale.
10046  
10047 <!--page 218 -->
10048 <p><!--para 4 -->
10049  At program startup, the equivalent of
10050 <pre>
10051          setlocale(LC_ALL, "C");</pre>
10052  is executed.
10053 <p><!--para 5 -->
10054  The implementation shall behave as if no library function calls the setlocale function.
10055 <h6>Returns</h6>
10056 <p><!--para 6 -->
10057  If a pointer to a string is given for locale and the selection can be honored, the
10058  setlocale function returns a pointer to the string associated with the specified
10059  category for the new locale. If the selection cannot be honored, the setlocale
10060  function returns a null pointer and the program's locale is not changed.
10061 <p><!--para 7 -->
10062  A null pointer for locale causes the setlocale function to return a pointer to the
10063  string associated with the category for the program's current locale; the program's
10064  locale is not changed.<sup><a href="#note197"><b>197)</b></a></sup>
10065 <p><!--para 8 -->
10066  The pointer to string returned by the setlocale function is such that a subsequent call
10067  with that string value and its associated category will restore that part of the program's
10068  locale. The string pointed to shall not be modified by the program, but may be
10069  overwritten by a subsequent call to the setlocale function.
10070 <p><b> Forward references</b>: formatted input/output functions (<a href="#7.19.6">7.19.6</a>), multibyte/wide
10071  character conversion functions (<a href="#7.20.7">7.20.7</a>), multibyte/wide string conversion functions
10072  (<a href="#7.20.8">7.20.8</a>), numeric conversion functions (<a href="#7.20.1">7.20.1</a>), the strcoll function (<a href="#7.21.4.3">7.21.4.3</a>), the
10073  strftime function (<a href="#7.23.3.5">7.23.3.5</a>), the strxfrm function (<a href="#7.21.4.5">7.21.4.5</a>).
10074
10075 <h6>footnotes</h6>
10076 <p><small><a name="note196" href="#note196">196)</a> The only functions in <a href="#7.4">7.4</a> whose behavior is not affected by the current locale are isdigit and
10077  isxdigit.
10078 </small>
10079 <p><small><a name="note197" href="#note197">197)</a> The implementation shall arrange to encode in a string the various categories due to a heterogeneous
10080  locale when category has the value LC_ALL.
10081 </small>
10082
10083 <h4><a name="7.11.2" href="#7.11.2">7.11.2 Numeric formatting convention inquiry</a></h4>
10084
10085 <h5><a name="7.11.2.1" href="#7.11.2.1">7.11.2.1 The localeconv function</a></h5>
10086 <h6>Synopsis</h6>
10087 <p><!--para 1 -->
10088 <pre>
10089          #include <a href="#7.11">&lt;locale.h&gt;</a>
10090          struct lconv *localeconv(void);</pre>
10091 <h6>Description</h6>
10092 <p><!--para 2 -->
10093  The localeconv function sets the components of an object with type struct lconv
10094  with values appropriate for the formatting of numeric quantities (monetary and otherwise)
10095  according to the rules of the current locale.
10096 <p><!--para 3 -->
10097  The members of the structure with type char * are pointers to strings, any of which
10098  (except decimal_point) can point to "", to indicate that the value is not available in
10099  the current locale or is of zero length. Apart from grouping and mon_grouping, the
10100  
10101 <!--page 219 -->
10102  strings shall start and end in the initial shift state. The members with type char are
10103  nonnegative numbers, any of which can be CHAR_MAX to indicate that the value is not
10104  available in the current locale. The members include the following:
10105  char *decimal_point
10106 <pre>
10107            The decimal-point character used to format nonmonetary quantities.</pre>
10108  char *thousands_sep
10109 <pre>
10110            The character used to separate groups of digits before the decimal-point
10111            character in formatted nonmonetary quantities.</pre>
10112  char *grouping
10113 <pre>
10114            A string whose elements indicate the size of each group of digits in
10115            formatted nonmonetary quantities.</pre>
10116  char *mon_decimal_point
10117 <pre>
10118            The decimal-point used to format monetary quantities.</pre>
10119  char *mon_thousands_sep
10120 <pre>
10121            The separator for groups of digits before the decimal-point in formatted
10122            monetary quantities.</pre>
10123  char *mon_grouping
10124 <pre>
10125            A string whose elements indicate the size of each group of digits in
10126            formatted monetary quantities.</pre>
10127  char *positive_sign
10128 <pre>
10129            The string used to indicate a nonnegative-valued formatted monetary
10130            quantity.</pre>
10131  char *negative_sign
10132 <pre>
10133            The string used to indicate a negative-valued formatted monetary quantity.</pre>
10134  char *currency_symbol
10135 <pre>
10136            The local currency symbol applicable to the current locale.</pre>
10137  char frac_digits
10138 <pre>
10139            The number of fractional digits (those after the decimal-point) to be
10140            displayed in a locally formatted monetary quantity.</pre>
10141  char p_cs_precedes
10142 <pre>
10143            Set to 1 or 0 if the currency_symbol respectively precedes or
10144            succeeds the value for a nonnegative locally formatted monetary quantity.</pre>
10145  char n_cs_precedes
10146 <!--page 220 -->
10147 <pre>
10148            Set to 1 or 0 if the currency_symbol respectively precedes or
10149            succeeds the value for a negative locally formatted monetary quantity.</pre>
10150  char p_sep_by_space
10151 <pre>
10152            Set to a value indicating the separation of the currency_symbol, the
10153            sign string, and the value for a nonnegative locally formatted monetary
10154            quantity.</pre>
10155  char n_sep_by_space
10156 <pre>
10157            Set to a value indicating the separation of the currency_symbol, the
10158            sign string, and the value for a negative locally formatted monetary
10159            quantity.</pre>
10160  char p_sign_posn
10161 <pre>
10162            Set to a value indicating the positioning of the positive_sign for a
10163            nonnegative locally formatted monetary quantity.</pre>
10164  char n_sign_posn
10165 <pre>
10166            Set to a value indicating the positioning of the negative_sign for a
10167            negative locally formatted monetary quantity.</pre>
10168  char *int_curr_symbol
10169 <pre>
10170            The international currency symbol applicable to the current locale. The
10171            first three characters contain the alphabetic international currency symbol
10172            in accordance with those specified in ISO 4217. The fourth character
10173            (immediately preceding the null character) is the character used to separate
10174            the international currency symbol from the monetary quantity.</pre>
10175  char int_frac_digits
10176 <pre>
10177            The number of fractional digits (those after the decimal-point) to be
10178            displayed in an internationally formatted monetary quantity.</pre>
10179  char int_p_cs_precedes
10180 <pre>
10181            Set to 1 or 0 if the int_curr_symbol respectively precedes or
10182            succeeds the value for a nonnegative internationally formatted monetary
10183            quantity.</pre>
10184  char int_n_cs_precedes
10185 <pre>
10186            Set to 1 or 0 if the int_curr_symbol respectively precedes or
10187            succeeds the value for a negative internationally formatted monetary
10188            quantity.</pre>
10189  char int_p_sep_by_space
10190 <!--page 221 -->
10191 <pre>
10192            Set to a value indicating the separation of the int_curr_symbol, the
10193            sign string, and the value for a nonnegative internationally formatted
10194            monetary quantity.</pre>
10195  char int_n_sep_by_space
10196 <pre>
10197            Set to a value indicating the separation of the int_curr_symbol, the
10198            sign string, and the value for a negative internationally formatted monetary
10199            quantity.</pre>
10200  char int_p_sign_posn
10201 <pre>
10202            Set to a value indicating the positioning of the positive_sign for a
10203            nonnegative internationally formatted monetary quantity.</pre>
10204  char int_n_sign_posn
10205 <p><!--para 4 -->
10206 <pre>
10207            Set to a value indicating the positioning of the negative_sign for a
10208            negative internationally formatted monetary quantity.</pre>
10209  The elements of grouping and mon_grouping are interpreted according to the
10210  following:
10211  CHAR_MAX      No further grouping is to be performed.
10212  0             The previous element is to be repeatedly used for the remainder of the
10213 <pre>
10214                digits.</pre>
10215  other         The integer value is the number of digits that compose the current group.
10216 <p><!--para 5 -->
10217 <pre>
10218                The next element is examined to determine the size of the next group of
10219                digits before the current group.</pre>
10220  The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space,
10221  and int_n_sep_by_space are interpreted according to the following:
10222  0   No space separates the currency symbol and value.
10223  1   If the currency symbol and sign string are adjacent, a space separates them from the
10224 <pre>
10225      value; otherwise, a space separates the currency symbol from the value.</pre>
10226  2   If the currency symbol and sign string are adjacent, a space separates them;
10227 <pre>
10228      otherwise, a space separates the sign string from the value.</pre>
10229  For int_p_sep_by_space and int_n_sep_by_space, the fourth character of
10230  int_curr_symbol is used instead of a space.
10231 <p><!--para 6 -->
10232  The values of p_sign_posn, n_sign_posn, int_p_sign_posn,                            and
10233  int_n_sign_posn are interpreted according to the following:
10234  0   Parentheses surround the quantity and currency symbol.
10235  1   The sign string precedes the quantity and currency symbol.
10236  2   The sign string succeeds the quantity and currency symbol.
10237  3   The sign string immediately precedes the currency symbol.
10238  4   The sign string immediately succeeds the currency symbol.
10239 <!--page 222 -->
10240 <p><!--para 7 -->
10241  The implementation shall behave as if no library function calls the localeconv
10242  function.
10243 <h6>Returns</h6>
10244 <p><!--para 8 -->
10245  The localeconv function returns a pointer to the filled-in object. The structure
10246  pointed to by the return value shall not be modified by the program, but may be
10247  overwritten by a subsequent call to the localeconv function. In addition, calls to the
10248  setlocale function with categories LC_ALL, LC_MONETARY, or LC_NUMERIC may
10249  overwrite the contents of the structure.
10250 <p><!--para 9 -->
10251  EXAMPLE 1 The following table illustrates rules which may well be used by four countries to format
10252  monetary quantities.
10253 <pre>
10254                                Local format                                     International format</pre>
10255  
10256  Country            Positive                  Negative                    Positive               Negative
10257  
10258  Country1     1.234,56 mk             -1.234,56 mk                  FIM   1.234,56         FIM -1.234,56
10259  Country2     L.1.234                 -L.1.234                      ITL   1.234            -ITL 1.234
10260  Country3     fl. 1.234,56              fl. -1.234,56                   NLG   1.234,56         NLG -1.234,56
10261  Country4     SFrs.1,234.56           SFrs.1,234.56C                CHF   1,234.56         CHF 1,234.56C
10262 <p><!--para 10 -->
10263  For these four countries, the respective values for the monetary members of the structure returned by
10264  localeconv could be:
10265 <pre>
10266                                    Country1              Country2              Country3            Country4</pre>
10267  
10268  mon_decimal_point                 ","                   ""                   ","                 "."
10269  mon_thousands_sep                 "."                   "."                  "."                 ","
10270  mon_grouping                      "\3"                  "\3"                 "\3"                "\3"
10271  positive_sign                     ""                    ""                   ""                  ""
10272  negative_sign                     "-"                   "-"                  "-"                 "C"
10273  currency_symbol                   "mk"                  "L."                 "\u0192"            "SFrs."
10274  frac_digits                       2                     0                    2                   2
10275  p_cs_precedes                     0                     1                    1                   1
10276  n_cs_precedes                     0                     1                    1                   1
10277  p_sep_by_space                    1                     0                    1                   0
10278  n_sep_by_space                    1                     0                    2                   0
10279  p_sign_posn                       1                     1                    1                   1
10280  n_sign_posn                       1                     1                    4                   2
10281  int_curr_symbol                   "FIM "                "ITL "               "NLG "              "CHF "
10282  int_frac_digits                   2                     0                    2                   2
10283  int_p_cs_precedes                 1                     1                    1                   1
10284  int_n_cs_precedes                 1                     1                    1                   1
10285  int_p_sep_by_space                1                     1                    1                   1
10286  int_n_sep_by_space                2                     1                    2                   1
10287  int_p_sign_posn                   1                     1                    1                   1
10288  int_n_sign_posn                   4                     1                    4                   2
10289 <!--page 223 -->
10290 <p><!--para 11 -->
10291  EXAMPLE 2 The following table illustrates how the cs_precedes, sep_by_space, and sign_posn members
10292  affect the formatted value.
10293 <pre>
10294                                                                p_sep_by_space</pre>
10295  
10296  p_cs_precedes           p_sign_posn                0                   1                  2
10297  
10298 <pre>
10299                  0                    0         (<a href="#1.25">1.25</a>$)            (<a href="#1.25">1.25</a> $)            (<a href="#1.25">1.25</a>$)
10300                                       1         +1.25$             +1.25 $             + <a href="#1.25">1.25</a>$
10301                                       2         <a href="#1.25">1.25</a>$+             <a href="#1.25">1.25</a> $+             <a href="#1.25">1.25</a>$ +
10302                                       3         <a href="#1.25">1.25</a>+$             <a href="#1.25">1.25</a> +$             <a href="#1.25">1.25</a>+ $
10303                                       4         <a href="#1.25">1.25</a>$+             <a href="#1.25">1.25</a> $+             <a href="#1.25">1.25</a>$ +</pre>
10304  
10305 <!--page 224 -->
10306 <pre>
10307                  1                    0         ($1.25)            ($ <a href="#1.25">1.25</a>)            ($1.25)
10308                                       1         +$1.25             +$ <a href="#1.25">1.25</a>             + $1.25
10309                                       2         $1.25+             $ <a href="#1.25">1.25</a>+             $1.25 +
10310                                       3         +$1.25             +$ <a href="#1.25">1.25</a>             + $1.25
10311                                       4         $+1.25             $+ <a href="#1.25">1.25</a>             $ +1.25</pre>
10312
10313 <h3><a name="7.12" href="#7.12">7.12 Mathematics <math.h></a></h3>
10314 <p><!--para 1 -->
10315  The header <a href="#7.12">&lt;math.h&gt;</a> declares two types and many mathematical functions and defines
10316  several macros. Most synopses specify a family of functions consisting of a principal
10317  function with one or more double parameters, a double return value, or both; and
10318  other functions with the same name but with f and l suffixes, which are corresponding
10319  functions with float and long double parameters, return values, or both.<sup><a href="#note198"><b>198)</b></a></sup>
10320  Integer arithmetic functions and conversion functions are discussed later.
10321 <p><!--para 2 -->
10322  The types
10323 <pre>
10324          float_t
10325          double_t</pre>
10326  are floating types at least as wide as float and double, respectively, and such that
10327  double_t is at least as wide as float_t. If FLT_EVAL_METHOD equals 0,
10328  float_t and double_t are float and double, respectively; if
10329  FLT_EVAL_METHOD equals 1, they are both double; if FLT_EVAL_METHOD equals
10330  2, they are both long double; and for other values of FLT_EVAL_METHOD, they are
10331  otherwise implementation-defined.<sup><a href="#note199"><b>199)</b></a></sup>
10332 <p><!--para 3 -->
10333  The macro
10334 <pre>
10335          HUGE_VAL</pre>
10336  expands to a positive double constant expression, not necessarily representable as a
10337  float. The macros
10338 <pre>
10339          HUGE_VALF
10340          HUGE_VALL</pre>
10341  are respectively float and long double analogs of HUGE_VAL.<sup><a href="#note200"><b>200)</b></a></sup>
10342 <p><!--para 4 -->
10343  The macro
10344 <pre>
10345          INFINITY</pre>
10346  expands to a constant expression of type float representing positive or unsigned
10347  infinity, if available; else to a positive constant of type float that overflows at
10348  
10349  
10350  
10351 <!--page 225 -->
10352  translation time.<sup><a href="#note201"><b>201)</b></a></sup>
10353 <p><!--para 5 -->
10354  The macro
10355 <pre>
10356           NAN</pre>
10357  is defined if and only if the implementation supports quiet NaNs for the float type. It
10358  expands to a constant expression of type float representing a quiet NaN.
10359 <p><!--para 6 -->
10360  The number classification macros
10361 <pre>
10362           FP_INFINITE
10363           FP_NAN
10364           FP_NORMAL
10365           FP_SUBNORMAL
10366           FP_ZERO</pre>
10367  represent the mutually exclusive kinds of floating-point values. They expand to integer
10368  constant expressions with distinct values. Additional implementation-defined floating-
10369  point classifications, with macro definitions beginning with FP_ and an uppercase letter,
10370  may also be specified by the implementation.
10371 <p><!--para 7 -->
10372  The macro
10373 <pre>
10374           FP_FAST_FMA</pre>
10375  is optionally defined. If defined, it indicates that the fma function generally executes
10376  about as fast as, or faster than, a multiply and an add of double operands.<sup><a href="#note202"><b>202)</b></a></sup> The
10377  macros
10378 <pre>
10379           FP_FAST_FMAF
10380           FP_FAST_FMAL</pre>
10381  are, respectively, float and long double analogs of FP_FAST_FMA. If defined,
10382  these macros expand to the integer constant 1.
10383 <p><!--para 8 -->
10384  The macros
10385 <pre>
10386           FP_ILOGB0
10387           FP_ILOGBNAN</pre>
10388  expand to integer constant expressions whose values are returned by ilogb(x) if x is
10389  zero or NaN, respectively. The value of FP_ILOGB0 shall be either INT_MIN or
10390  -INT_MAX. The value of FP_ILOGBNAN shall be either INT_MAX or INT_MIN.
10391  
10392  
10393 <!--page 226 -->
10394 <p><!--para 9 -->
10395  The macros
10396 <pre>
10397          MATH_ERRNO
10398          MATH_ERREXCEPT</pre>
10399  expand to the integer constants 1 and 2, respectively; the macro
10400 <pre>
10401          math_errhandling</pre>
10402  expands to an expression that has type int and the value MATH_ERRNO,
10403  MATH_ERREXCEPT, or the bitwise OR of both. The value of math_errhandling is
10404  constant for the duration of the program. It is unspecified whether
10405  math_errhandling is a macro or an identifier with external linkage. If a macro
10406  definition is suppressed or a program defines an identifier with the name
10407  math_errhandling, the behavior is undefined.               If the expression
10408  math_errhandling &amp; MATH_ERREXCEPT can be nonzero, the implementation
10409  shall define the macros FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW in
10410  <a href="#7.6">&lt;fenv.h&gt;</a>.
10411
10412 <h6>footnotes</h6>
10413 <p><small><a name="note198" href="#note198">198)</a> Particularly on systems with wide expression evaluation, a <a href="#7.12">&lt;math.h&gt;</a> function might pass arguments
10414  and return values in wider format than the synopsis prototype indicates.
10415 </small>
10416 <p><small><a name="note199" href="#note199">199)</a> The types float_t and double_t are intended to be the implementation's most efficient types at
10417  least as wide as float and double, respectively. For FLT_EVAL_METHOD equal 0, 1, or 2, the
10418  type float_t is the narrowest type used by the implementation to evaluate floating expressions.
10419 </small>
10420 <p><small><a name="note200" href="#note200">200)</a> HUGE_VAL, HUGE_VALF, and HUGE_VALL can be positive infinities in an implementation that
10421  supports infinities.
10422 </small>
10423 <p><small><a name="note201" href="#note201">201)</a> In this case, using INFINITY will violate the constraint in <a href="#6.4.4">6.4.4</a> and thus require a diagnostic.
10424 </small>
10425 <p><small><a name="note202" href="#note202">202)</a> Typically, the FP_FAST_FMA macro is defined if and only if the fma function is implemented
10426  directly with a hardware multiply-add instruction. Software implementations are expected to be
10427  substantially slower.
10428 </small>
10429
10430 <h4><a name="7.12.1" href="#7.12.1">7.12.1 Treatment of error conditions</a></h4>
10431 <p><!--para 1 -->
10432  The behavior of each of the functions in <a href="#7.12">&lt;math.h&gt;</a> is specified for all representable
10433  values of its input arguments, except where stated otherwise. Each function shall execute
10434  as if it were a single operation without generating any externally visible exceptional
10435  conditions.
10436 <p><!--para 2 -->
10437  For all functions, a domain error occurs if an input argument is outside the domain over
10438  which the mathematical function is defined. The description of each function lists any
10439  required domain errors; an implementation may define additional domain errors, provided
10440  that such errors are consistent with the mathematical definition of the function.<sup><a href="#note203"><b>203)</b></a></sup> On a
10441  domain error, the function returns an implementation-defined value; if the integer
10442  expression math_errhandling &amp; MATH_ERRNO is nonzero, the integer expression
10443  errno acquires the value EDOM; if the integer expression math_errhandling &amp;
10444  MATH_ERREXCEPT is nonzero, the ''invalid'' floating-point exception is raised.
10445 <p><!--para 3 -->
10446  Similarly, a range error occurs if the mathematical result of the function cannot be
10447  represented in an object of the specified type, due to extreme magnitude.
10448 <p><!--para 4 -->
10449  A floating result overflows if the magnitude of the mathematical result is finite but so
10450  large that the mathematical result cannot be represented without extraordinary roundoff
10451  error in an object of the specified type. If a floating result overflows and default rounding
10452  is in effect, or if the mathematical result is an exact infinity from finite arguments (for
10453  example log(0.0)), then the function returns the value of the macro HUGE_VAL,
10454  
10455  
10456 <!--page 227 -->
10457  HUGE_VALF, or HUGE_VALL according to the return type, with the same sign as the
10458  correct value of the function; if the integer expression math_errhandling &amp;
10459  MATH_ERRNO is nonzero, the integer expression errno acquires the value ERANGE; if
10460  the integer expression math_errhandling &amp; MATH_ERREXCEPT is nonzero, the
10461  ''divide-by-zero'' floating-point exception is raised if the mathematical result is an exact
10462  infinity and the ''overflow'' floating-point exception is raised otherwise.
10463 <p><!--para 5 -->
10464  The result underflows if the magnitude of the mathematical result is so small that the
10465  mathematical result cannot be represented, without extraordinary roundoff error, in an
10466  object of the specified type.<sup><a href="#note204"><b>204)</b></a></sup> If the result underflows, the function returns an
10467  implementation-defined value whose magnitude is no greater than the smallest
10468  normalized positive number in the specified type; if the integer expression
10469  math_errhandling &amp; MATH_ERRNO is nonzero, whether errno acquires the
10470  value    ERANGE       is    implementation-defined;     if   the  integer   expression
10471  math_errhandling &amp; MATH_ERREXCEPT is nonzero, whether the ''underflow''
10472  floating-point exception is raised is implementation-defined.
10473
10474 <h6>footnotes</h6>
10475 <p><small><a name="note203" href="#note203">203)</a> In an implementation that supports infinities, this allows an infinity as an argument to be a domain
10476  error if the mathematical domain of the function does not include the infinity.
10477 </small>
10478 <p><small><a name="note204" href="#note204">204)</a> The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and
10479  also ''flush-to-zero'' underflow.
10480 </small>
10481
10482 <h4><a name="7.12.2" href="#7.12.2">7.12.2 The FP_CONTRACT pragma</a></h4>
10483 <h6>Synopsis</h6>
10484 <p><!--para 1 -->
10485 <pre>
10486          #include <a href="#7.12">&lt;math.h&gt;</a>
10487          #pragma STDC FP_CONTRACT on-off-switch</pre>
10488 <h6>Description</h6>
10489 <p><!--para 2 -->
10490  The FP_CONTRACT pragma can be used to allow (if the state is ''on'') or disallow (if the
10491  state is ''off'') the implementation to contract expressions (<a href="#6.5">6.5</a>). Each pragma can occur
10492  either outside external declarations or preceding all explicit declarations and statements
10493  inside a compound statement. When outside external declarations, the pragma takes
10494  effect from its occurrence until another FP_CONTRACT pragma is encountered, or until
10495  the end of the translation unit. When inside a compound statement, the pragma takes
10496  effect from its occurrence until another FP_CONTRACT pragma is encountered
10497  (including within a nested compound statement), or until the end of the compound
10498  statement; at the end of a compound statement the state for the pragma is restored to its
10499  condition just before the compound statement. If this pragma is used in any other
10500  context, the behavior is undefined. The default state (''on'' or ''off'') for the pragma is
10501  implementation-defined.
10502  
10503  
10504  
10505  
10506 <!--page 228 -->
10507
10508 <h4><a name="7.12.3" href="#7.12.3">7.12.3 Classification macros</a></h4>
10509 <p><!--para 1 -->
10510  In the synopses in this subclause, real-floating indicates that the argument shall be an
10511  expression of real floating type.
10512
10513 <h5><a name="7.12.3.1" href="#7.12.3.1">7.12.3.1 The fpclassify macro</a></h5>
10514 <h6>Synopsis</h6>
10515 <p><!--para 1 -->
10516 <pre>
10517           #include <a href="#7.12">&lt;math.h&gt;</a>
10518           int fpclassify(real-floating x);</pre>
10519 <h6>Description</h6>
10520 <p><!--para 2 -->
10521  The fpclassify macro classifies its argument value as NaN, infinite, normal,
10522  subnormal, zero, or into another implementation-defined category. First, an argument
10523  represented in a format wider than its semantic type is converted to its semantic type.
10524  Then classification is based on the type of the argument.<sup><a href="#note205"><b>205)</b></a></sup>
10525 <h6>Returns</h6>
10526 <p><!--para 3 -->
10527  The fpclassify macro returns the value of the number classification macro
10528  appropriate to the value of its argument.
10529 <p><!--para 4 -->
10530  EXAMPLE        The fpclassify macro might be implemented in terms of ordinary functions as
10531 <pre>
10532           #define fpclassify(x) \
10533                 ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) : \
10534                  (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) : \
10535                                                    __fpclassifyl(x))</pre>
10536  
10537
10538 <h6>footnotes</h6>
10539 <p><small><a name="note205" href="#note205">205)</a> Since an expression can be evaluated with more range and precision than its type has, it is important to
10540  know the type that classification is based on. For example, a normal long double value might
10541  become subnormal when converted to double, and zero when converted to float.
10542 </small>
10543
10544 <h5><a name="7.12.3.2" href="#7.12.3.2">7.12.3.2 The isfinite macro</a></h5>
10545 <h6>Synopsis</h6>
10546 <p><!--para 1 -->
10547 <pre>
10548           #include <a href="#7.12">&lt;math.h&gt;</a>
10549           int isfinite(real-floating x);</pre>
10550 <h6>Description</h6>
10551 <p><!--para 2 -->
10552  The isfinite macro determines whether its argument has a finite value (zero,
10553  subnormal, or normal, and not infinite or NaN). First, an argument represented in a
10554  format wider than its semantic type is converted to its semantic type. Then determination
10555  is based on the type of the argument.
10556  
10557  
10558  
10559  
10560 <!--page 229 -->
10561 <h6>Returns</h6>
10562 <p><!--para 3 -->
10563  The isfinite macro returns a nonzero value if and only if its argument has a finite
10564  value.
10565
10566 <h5><a name="7.12.3.3" href="#7.12.3.3">7.12.3.3 The isinf macro</a></h5>
10567 <h6>Synopsis</h6>
10568 <p><!--para 1 -->
10569 <pre>
10570          #include <a href="#7.12">&lt;math.h&gt;</a>
10571          int isinf(real-floating x);</pre>
10572 <h6>Description</h6>
10573 <p><!--para 2 -->
10574  The isinf macro determines whether its argument value is an infinity (positive or
10575  negative). First, an argument represented in a format wider than its semantic type is
10576  converted to its semantic type. Then determination is based on the type of the argument.
10577 <h6>Returns</h6>
10578 <p><!--para 3 -->
10579  The isinf macro returns a nonzero value if and only if its argument has an infinite
10580  value.
10581
10582 <h5><a name="7.12.3.4" href="#7.12.3.4">7.12.3.4 The isnan macro</a></h5>
10583 <h6>Synopsis</h6>
10584 <p><!--para 1 -->
10585 <pre>
10586          #include <a href="#7.12">&lt;math.h&gt;</a>
10587          int isnan(real-floating x);</pre>
10588 <h6>Description</h6>
10589 <p><!--para 2 -->
10590  The isnan macro determines whether its argument value is a NaN. First, an argument
10591  represented in a format wider than its semantic type is converted to its semantic type.
10592  Then determination is based on the type of the argument.<sup><a href="#note206"><b>206)</b></a></sup>
10593 <h6>Returns</h6>
10594 <p><!--para 3 -->
10595  The isnan macro returns a nonzero value if and only if its argument has a NaN value.
10596
10597 <h6>footnotes</h6>
10598 <p><small><a name="note206" href="#note206">206)</a> For the isnan macro, the type for determination does not matter unless the implementation supports
10599  NaNs in the evaluation type but not in the semantic type.
10600 </small>
10601
10602 <h5><a name="7.12.3.5" href="#7.12.3.5">7.12.3.5 The isnormal macro</a></h5>
10603 <h6>Synopsis</h6>
10604 <p><!--para 1 -->
10605 <pre>
10606          #include <a href="#7.12">&lt;math.h&gt;</a>
10607          int isnormal(real-floating x);</pre>
10608  
10609  
10610  
10611  
10612 <!--page 230 -->
10613 <h6>Description</h6>
10614 <p><!--para 2 -->
10615  The isnormal macro determines whether its argument value is normal (neither zero,
10616  subnormal, infinite, nor NaN). First, an argument represented in a format wider than its
10617  semantic type is converted to its semantic type. Then determination is based on the type
10618  of the argument.
10619 <h6>Returns</h6>
10620 <p><!--para 3 -->
10621  The isnormal macro returns a nonzero value if and only if its argument has a normal
10622  value.
10623
10624 <h5><a name="7.12.3.6" href="#7.12.3.6">7.12.3.6 The signbit macro</a></h5>
10625 <h6>Synopsis</h6>
10626 <p><!--para 1 -->
10627 <pre>
10628          #include <a href="#7.12">&lt;math.h&gt;</a>
10629          int signbit(real-floating x);</pre>
10630 <h6>Description</h6>
10631 <p><!--para 2 -->
10632  The signbit macro determines whether the sign of its argument value is negative.<sup><a href="#note207"><b>207)</b></a></sup>
10633 <h6>Returns</h6>
10634 <p><!--para 3 -->
10635  The signbit macro returns a nonzero value if and only if the sign of its argument value
10636  is negative.
10637
10638 <h6>footnotes</h6>
10639 <p><small><a name="note207" href="#note207">207)</a> The signbit macro reports the sign of all values, including infinities, zeros, and NaNs. If zero is
10640  unsigned, it is treated as positive.
10641 </small>
10642
10643 <h4><a name="7.12.4" href="#7.12.4">7.12.4 Trigonometric functions</a></h4>
10644
10645 <h5><a name="7.12.4.1" href="#7.12.4.1">7.12.4.1 The acos functions</a></h5>
10646 <h6>Synopsis</h6>
10647 <p><!--para 1 -->
10648 <pre>
10649          #include <a href="#7.12">&lt;math.h&gt;</a>
10650          double acos(double x);
10651          float acosf(float x);
10652          long double acosl(long double x);</pre>
10653 <h6>Description</h6>
10654 <p><!--para 2 -->
10655  The acos functions compute the principal value of the arc cosine of x. A domain error
10656  occurs for arguments not in the interval [-1, +1].
10657 <h6>Returns</h6>
10658 <p><!--para 3 -->
10659  The acos functions return arccos x in the interval [0, pi ] radians.
10660  
10661  
10662  
10663  
10664 <!--page 231 -->
10665
10666 <h5><a name="7.12.4.2" href="#7.12.4.2">7.12.4.2 The asin functions</a></h5>
10667 <h6>Synopsis</h6>
10668 <p><!--para 1 -->
10669 <pre>
10670         #include <a href="#7.12">&lt;math.h&gt;</a>
10671         double asin(double x);
10672         float asinf(float x);
10673         long double asinl(long double x);</pre>
10674 <h6>Description</h6>
10675 <p><!--para 2 -->
10676  The asin functions compute the principal value of the arc sine of x. A domain error
10677  occurs for arguments not in the interval [-1, +1].
10678 <h6>Returns</h6>
10679 <p><!--para 3 -->
10680  The asin functions return arcsin x in the interval [-pi /2, +pi /2] radians.
10681
10682 <h5><a name="7.12.4.3" href="#7.12.4.3">7.12.4.3 The atan functions</a></h5>
10683 <h6>Synopsis</h6>
10684 <p><!--para 1 -->
10685 <pre>
10686         #include <a href="#7.12">&lt;math.h&gt;</a>
10687         double atan(double x);
10688         float atanf(float x);
10689         long double atanl(long double x);</pre>
10690 <h6>Description</h6>
10691 <p><!--para 2 -->
10692  The atan functions compute the principal value of the arc tangent of x.
10693 <h6>Returns</h6>
10694 <p><!--para 3 -->
10695  The atan functions return arctan x in the interval [-pi /2, +pi /2] radians.
10696
10697 <h5><a name="7.12.4.4" href="#7.12.4.4">7.12.4.4 The atan2 functions</a></h5>
10698 <h6>Synopsis</h6>
10699 <p><!--para 1 -->
10700 <pre>
10701         #include <a href="#7.12">&lt;math.h&gt;</a>
10702         double atan2(double y, double x);
10703         float atan2f(float y, float x);
10704         long double atan2l(long double y, long double x);</pre>
10705 <h6>Description</h6>
10706 <p><!--para 2 -->
10707  The atan2 functions compute the value of the arc tangent of y/x, using the signs of both
10708  arguments to determine the quadrant of the return value. A domain error may occur if
10709  both arguments are zero.
10710 <h6>Returns</h6>
10711 <p><!--para 3 -->
10712  The atan2 functions return arctan y/x in the interval [-pi , +pi ] radians.
10713 <!--page 232 -->
10714
10715 <h5><a name="7.12.4.5" href="#7.12.4.5">7.12.4.5 The cos functions</a></h5>
10716 <h6>Synopsis</h6>
10717 <p><!--para 1 -->
10718 <pre>
10719         #include <a href="#7.12">&lt;math.h&gt;</a>
10720         double cos(double x);
10721         float cosf(float x);
10722         long double cosl(long double x);</pre>
10723 <h6>Description</h6>
10724 <p><!--para 2 -->
10725  The cos functions compute the cosine of x (measured in radians).
10726 <h6>Returns</h6>
10727 <p><!--para 3 -->
10728  The cos functions return cos x.
10729
10730 <h5><a name="7.12.4.6" href="#7.12.4.6">7.12.4.6 The sin functions</a></h5>
10731 <h6>Synopsis</h6>
10732 <p><!--para 1 -->
10733 <pre>
10734         #include <a href="#7.12">&lt;math.h&gt;</a>
10735         double sin(double x);
10736         float sinf(float x);
10737         long double sinl(long double x);</pre>
10738 <h6>Description</h6>
10739 <p><!--para 2 -->
10740  The sin functions compute the sine of x (measured in radians).
10741 <h6>Returns</h6>
10742 <p><!--para 3 -->
10743  The sin functions return sin x.
10744
10745 <h5><a name="7.12.4.7" href="#7.12.4.7">7.12.4.7 The tan functions</a></h5>
10746 <h6>Synopsis</h6>
10747 <p><!--para 1 -->
10748 <pre>
10749         #include <a href="#7.12">&lt;math.h&gt;</a>
10750         double tan(double x);
10751         float tanf(float x);
10752         long double tanl(long double x);</pre>
10753 <h6>Description</h6>
10754 <p><!--para 2 -->
10755  The tan functions return the tangent of x (measured in radians).
10756 <h6>Returns</h6>
10757 <p><!--para 3 -->
10758  The tan functions return tan x.
10759 <!--page 233 -->
10760
10761 <h4><a name="7.12.5" href="#7.12.5">7.12.5 Hyperbolic functions</a></h4>
10762
10763 <h5><a name="7.12.5.1" href="#7.12.5.1">7.12.5.1 The acosh functions</a></h5>
10764 <h6>Synopsis</h6>
10765 <p><!--para 1 -->
10766 <pre>
10767         #include <a href="#7.12">&lt;math.h&gt;</a>
10768         double acosh(double x);
10769         float acoshf(float x);
10770         long double acoshl(long double x);</pre>
10771 <h6>Description</h6>
10772 <p><!--para 2 -->
10773  The acosh functions compute the (nonnegative) arc hyperbolic cosine of x. A domain
10774  error occurs for arguments less than 1.
10775 <h6>Returns</h6>
10776 <p><!--para 3 -->
10777  The acosh functions return arcosh x in the interval [0, +(inf)].
10778
10779 <h5><a name="7.12.5.2" href="#7.12.5.2">7.12.5.2 The asinh functions</a></h5>
10780 <h6>Synopsis</h6>
10781 <p><!--para 1 -->
10782 <pre>
10783         #include <a href="#7.12">&lt;math.h&gt;</a>
10784         double asinh(double x);
10785         float asinhf(float x);
10786         long double asinhl(long double x);</pre>
10787 <h6>Description</h6>
10788 <p><!--para 2 -->
10789  The asinh functions compute the arc hyperbolic sine of x.
10790 <h6>Returns</h6>
10791 <p><!--para 3 -->
10792  The asinh functions return arsinh x.
10793
10794 <h5><a name="7.12.5.3" href="#7.12.5.3">7.12.5.3 The atanh functions</a></h5>
10795 <h6>Synopsis</h6>
10796 <p><!--para 1 -->
10797 <pre>
10798         #include <a href="#7.12">&lt;math.h&gt;</a>
10799         double atanh(double x);
10800         float atanhf(float x);
10801         long double atanhl(long double x);</pre>
10802 <h6>Description</h6>
10803 <p><!--para 2 -->
10804  The atanh functions compute the arc hyperbolic tangent of x. A domain error occurs
10805  for arguments not in the interval [-1, +1]. A range error may occur if the argument
10806  equals -1 or +1.
10807 <!--page 234 -->
10808 <h6>Returns</h6>
10809 <p><!--para 3 -->
10810  The atanh functions return artanh x.
10811
10812 <h5><a name="7.12.5.4" href="#7.12.5.4">7.12.5.4 The cosh functions</a></h5>
10813 <h6>Synopsis</h6>
10814 <p><!--para 1 -->
10815 <pre>
10816         #include <a href="#7.12">&lt;math.h&gt;</a>
10817         double cosh(double x);
10818         float coshf(float x);
10819         long double coshl(long double x);</pre>
10820 <h6>Description</h6>
10821 <p><!--para 2 -->
10822  The cosh functions compute the hyperbolic cosine of x. A range error occurs if the
10823  magnitude of x is too large.
10824 <h6>Returns</h6>
10825 <p><!--para 3 -->
10826  The cosh functions return cosh x.
10827
10828 <h5><a name="7.12.5.5" href="#7.12.5.5">7.12.5.5 The sinh functions</a></h5>
10829 <h6>Synopsis</h6>
10830 <p><!--para 1 -->
10831 <pre>
10832         #include <a href="#7.12">&lt;math.h&gt;</a>
10833         double sinh(double x);
10834         float sinhf(float x);
10835         long double sinhl(long double x);</pre>
10836 <h6>Description</h6>
10837 <p><!--para 2 -->
10838  The sinh functions compute the hyperbolic sine of x. A range error occurs if the
10839  magnitude of x is too large.
10840 <h6>Returns</h6>
10841 <p><!--para 3 -->
10842  The sinh functions return sinh x.
10843
10844 <h5><a name="7.12.5.6" href="#7.12.5.6">7.12.5.6 The tanh functions</a></h5>
10845 <h6>Synopsis</h6>
10846 <p><!--para 1 -->
10847 <pre>
10848         #include <a href="#7.12">&lt;math.h&gt;</a>
10849         double tanh(double x);
10850         float tanhf(float x);
10851         long double tanhl(long double x);</pre>
10852 <h6>Description</h6>
10853 <p><!--para 2 -->
10854  The tanh functions compute the hyperbolic tangent of x.
10855 <!--page 235 -->
10856 <h6>Returns</h6>
10857 <p><!--para 3 -->
10858  The tanh functions return tanh x.
10859
10860 <h4><a name="7.12.6" href="#7.12.6">7.12.6 Exponential and logarithmic functions</a></h4>
10861
10862 <h5><a name="7.12.6.1" href="#7.12.6.1">7.12.6.1 The exp functions</a></h5>
10863 <h6>Synopsis</h6>
10864 <p><!--para 1 -->
10865 <pre>
10866         #include <a href="#7.12">&lt;math.h&gt;</a>
10867         double exp(double x);
10868         float expf(float x);
10869         long double expl(long double x);</pre>
10870 <h6>Description</h6>
10871 <p><!--para 2 -->
10872  The exp functions compute the base-e exponential of x. A range error occurs if the
10873  magnitude of x is too large.
10874 <h6>Returns</h6>
10875 <p><!--para 3 -->
10876  The exp functions return ex .
10877
10878 <h5><a name="7.12.6.2" href="#7.12.6.2">7.12.6.2 The exp2 functions</a></h5>
10879 <h6>Synopsis</h6>
10880 <p><!--para 1 -->
10881 <pre>
10882         #include <a href="#7.12">&lt;math.h&gt;</a>
10883         double exp2(double x);
10884         float exp2f(float x);
10885         long double exp2l(long double x);</pre>
10886 <h6>Description</h6>
10887 <p><!--para 2 -->
10888  The exp2 functions compute the base-2 exponential of x. A range error occurs if the
10889  magnitude of x is too large.
10890 <h6>Returns</h6>
10891 <p><!--para 3 -->
10892  The exp2 functions return 2x .
10893
10894 <h5><a name="7.12.6.3" href="#7.12.6.3">7.12.6.3 The expm1 functions</a></h5>
10895 <h6>Synopsis</h6>
10896 <p><!--para 1 -->
10897 <!--page 236 -->
10898 <pre>
10899         #include <a href="#7.12">&lt;math.h&gt;</a>
10900         double expm1(double x);
10901         float expm1f(float x);
10902         long double expm1l(long double x);</pre>
10903 <h6>Description</h6>
10904 <p><!--para 2 -->
10905  The expm1 functions compute the base-e exponential of the argument, minus 1. A range
10906  error occurs if x is too large.<sup><a href="#note208"><b>208)</b></a></sup>
10907 <h6>Returns</h6>
10908 <p><!--para 3 -->
10909  The expm1 functions return ex - 1.
10910
10911 <h6>footnotes</h6>
10912 <p><small><a name="note208" href="#note208">208)</a> For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1.
10913 </small>
10914
10915 <h5><a name="7.12.6.4" href="#7.12.6.4">7.12.6.4 The frexp functions</a></h5>
10916 <h6>Synopsis</h6>
10917 <p><!--para 1 -->
10918 <pre>
10919          #include <a href="#7.12">&lt;math.h&gt;</a>
10920          double frexp(double value, int *exp);
10921          float frexpf(float value, int *exp);
10922          long double frexpl(long double value, int *exp);</pre>
10923 <h6>Description</h6>
10924 <p><!--para 2 -->
10925  The frexp functions break a floating-point number into a normalized fraction and an
10926  integral power of 2. They store the integer in the int object pointed to by exp.
10927 <h6>Returns</h6>
10928 <p><!--para 3 -->
10929  If value is not a floating-point number, the results are unspecified. Otherwise, the
10930  frexp functions return the value x, such that x has a magnitude in the interval [1/2, 1) or
10931  zero, and value equals x x 2*exp . If value is zero, both parts of the result are zero.
10932
10933 <h5><a name="7.12.6.5" href="#7.12.6.5">7.12.6.5 The ilogb functions</a></h5>
10934 <h6>Synopsis</h6>
10935 <p><!--para 1 -->
10936 <pre>
10937          #include <a href="#7.12">&lt;math.h&gt;</a>
10938          int ilogb(double x);
10939          int ilogbf(float x);
10940          int ilogbl(long double x);</pre>
10941 <h6>Description</h6>
10942 <p><!--para 2 -->
10943  The ilogb functions extract the exponent of x as a signed int value. If x is zero they
10944  compute the value FP_ILOGB0; if x is infinite they compute the value INT_MAX; if x is
10945  a NaN they compute the value FP_ILOGBNAN; otherwise, they are equivalent to calling
10946  the corresponding logb function and casting the returned value to type int. A domain
10947  error or range error may occur if x is zero, infinite, or NaN. If the correct value is outside
10948  the range of the return type, the numeric result is unspecified.
10949  
10950  
10951  
10952  
10953 <!--page 237 -->
10954 <h6>Returns</h6>
10955 <p><!--para 3 -->
10956  The ilogb functions return the exponent of x as a signed int value.
10957 <p><b> Forward references</b>: the logb functions (<a href="#7.12.6.11">7.12.6.11</a>).
10958
10959 <h5><a name="7.12.6.6" href="#7.12.6.6">7.12.6.6 The ldexp functions</a></h5>
10960 <h6>Synopsis</h6>
10961 <p><!--para 1 -->
10962 <pre>
10963         #include <a href="#7.12">&lt;math.h&gt;</a>
10964         double ldexp(double x, int exp);
10965         float ldexpf(float x, int exp);
10966         long double ldexpl(long double x, int exp);</pre>
10967 <h6>Description</h6>
10968 <p><!--para 2 -->
10969  The ldexp functions multiply a floating-point number by an integral power of 2. A
10970  range error may occur.
10971 <h6>Returns</h6>
10972 <p><!--para 3 -->
10973  The ldexp functions return x x 2exp .
10974
10975 <h5><a name="7.12.6.7" href="#7.12.6.7">7.12.6.7 The log functions</a></h5>
10976 <h6>Synopsis</h6>
10977 <p><!--para 1 -->
10978 <pre>
10979         #include <a href="#7.12">&lt;math.h&gt;</a>
10980         double log(double x);
10981         float logf(float x);
10982         long double logl(long double x);</pre>
10983 <h6>Description</h6>
10984 <p><!--para 2 -->
10985  The log functions compute the base-e (natural) logarithm of x. A domain error occurs if
10986  the argument is negative. A range error may occur if the argument is zero.
10987 <h6>Returns</h6>
10988 <p><!--para 3 -->
10989  The log functions return loge x.
10990
10991 <h5><a name="7.12.6.8" href="#7.12.6.8">7.12.6.8 The log10 functions</a></h5>
10992 <h6>Synopsis</h6>
10993 <p><!--para 1 -->
10994 <!--page 238 -->
10995 <pre>
10996         #include <a href="#7.12">&lt;math.h&gt;</a>
10997         double log10(double x);
10998         float log10f(float x);
10999         long double log10l(long double x);</pre>
11000 <h6>Description</h6>
11001 <p><!--para 2 -->
11002  The log10 functions compute the base-10 (common) logarithm of x. A domain error
11003  occurs if the argument is negative. A range error may occur if the argument is zero.
11004 <h6>Returns</h6>
11005 <p><!--para 3 -->
11006  The log10 functions return log10 x.
11007
11008 <h5><a name="7.12.6.9" href="#7.12.6.9">7.12.6.9 The log1p functions</a></h5>
11009 <h6>Synopsis</h6>
11010 <p><!--para 1 -->
11011 <pre>
11012          #include <a href="#7.12">&lt;math.h&gt;</a>
11013          double log1p(double x);
11014          float log1pf(float x);
11015          long double log1pl(long double x);</pre>
11016 <h6>Description</h6>
11017 <p><!--para 2 -->
11018  The log1p functions compute the base-e (natural) logarithm of 1 plus the argument.<sup><a href="#note209"><b>209)</b></a></sup>
11019  A domain error occurs if the argument is less than -1. A range error may occur if the
11020  argument equals -1.
11021 <h6>Returns</h6>
11022 <p><!--para 3 -->
11023  The log1p functions return loge (1 + x).
11024
11025 <h6>footnotes</h6>
11026 <p><small><a name="note209" href="#note209">209)</a> For small magnitude x, log1p(x) is expected to be more accurate than log(1 + x).
11027 </small>
11028
11029 <h5><a name="7.12.6.10" href="#7.12.6.10">7.12.6.10 The log2 functions</a></h5>
11030 <h6>Synopsis</h6>
11031 <p><!--para 1 -->
11032 <pre>
11033          #include <a href="#7.12">&lt;math.h&gt;</a>
11034          double log2(double x);
11035          float log2f(float x);
11036          long double log2l(long double x);</pre>
11037 <h6>Description</h6>
11038 <p><!--para 2 -->
11039  The log2 functions compute the base-2 logarithm of x. A domain error occurs if the
11040  argument is less than zero. A range error may occur if the argument is zero.
11041 <h6>Returns</h6>
11042 <p><!--para 3 -->
11043  The log2 functions return log2 x.
11044  
11045  
11046  
11047  
11048 <!--page 239 -->
11049
11050 <h5><a name="7.12.6.11" href="#7.12.6.11">7.12.6.11 The logb functions</a></h5>
11051 <h6>Synopsis</h6>
11052 <p><!--para 1 -->
11053 <pre>
11054         #include <a href="#7.12">&lt;math.h&gt;</a>
11055         double logb(double x);
11056         float logbf(float x);
11057         long double logbl(long double x);</pre>
11058 <h6>Description</h6>
11059 <p><!--para 2 -->
11060  The logb functions extract the exponent of x, as a signed integer value in floating-point
11061  format. If x is subnormal it is treated as though it were normalized; thus, for positive
11062  finite x,
11063 <pre>
11064        1 &lt;= x x FLT_RADIX-logb(x) &lt; FLT_RADIX</pre>
11065  A domain error or range error may occur if the argument is zero.
11066 <h6>Returns</h6>
11067 <p><!--para 3 -->
11068  The logb functions return the signed exponent of x.
11069
11070 <h5><a name="7.12.6.12" href="#7.12.6.12">7.12.6.12 The modf functions</a></h5>
11071 <h6>Synopsis</h6>
11072 <p><!--para 1 -->
11073 <pre>
11074         #include <a href="#7.12">&lt;math.h&gt;</a>
11075         double modf(double value, double *iptr);
11076         float modff(float value, float *iptr);
11077         long double modfl(long double value, long double *iptr);</pre>
11078 <h6>Description</h6>
11079 <p><!--para 2 -->
11080  The modf functions break the argument value into integral and fractional parts, each of
11081  which has the same type and sign as the argument. They store the integral part (in
11082  floating-point format) in the object pointed to by iptr.
11083 <h6>Returns</h6>
11084 <p><!--para 3 -->
11085  The modf functions return the signed fractional part of value.
11086 <!--page 240 -->
11087
11088 <h5><a name="7.12.6.13" href="#7.12.6.13">7.12.6.13 The scalbn and scalbln functions</a></h5>
11089 <h6>Synopsis</h6>
11090 <p><!--para 1 -->
11091 <pre>
11092         #include <a href="#7.12">&lt;math.h&gt;</a>
11093         double scalbn(double x, int n);
11094         float scalbnf(float x, int n);
11095         long double scalbnl(long double x, int n);
11096         double scalbln(double x, long int n);
11097         float scalblnf(float x, long int n);
11098         long double scalblnl(long double x, long int n);</pre>
11099 <h6>Description</h6>
11100 <p><!--para 2 -->
11101  The scalbn and scalbln functions compute x x FLT_RADIXn efficiently, not
11102  normally by computing FLT_RADIXn explicitly. A range error may occur.
11103 <h6>Returns</h6>
11104 <p><!--para 3 -->
11105  The scalbn and scalbln functions return x x FLT_RADIXn .
11106
11107 <h4><a name="7.12.7" href="#7.12.7">7.12.7 Power and absolute-value functions</a></h4>
11108
11109 <h5><a name="7.12.7.1" href="#7.12.7.1">7.12.7.1 The cbrt functions</a></h5>
11110 <h6>Synopsis</h6>
11111 <p><!--para 1 -->
11112 <pre>
11113         #include <a href="#7.12">&lt;math.h&gt;</a>
11114         double cbrt(double x);
11115         float cbrtf(float x);
11116         long double cbrtl(long double x);</pre>
11117 <h6>Description</h6>
11118 <p><!--para 2 -->
11119  The cbrt functions compute the real cube root of x.
11120 <h6>Returns</h6>
11121 <p><!--para 3 -->
11122  The cbrt functions return x1/3 .
11123
11124 <h5><a name="7.12.7.2" href="#7.12.7.2">7.12.7.2 The fabs functions</a></h5>
11125 <h6>Synopsis</h6>
11126 <p><!--para 1 -->
11127 <pre>
11128         #include <a href="#7.12">&lt;math.h&gt;</a>
11129         double fabs(double x);
11130         float fabsf(float x);
11131         long double fabsl(long double x);</pre>
11132 <h6>Description</h6>
11133 <p><!--para 2 -->
11134  The fabs functions compute the absolute value of a floating-point number x.
11135 <!--page 241 -->
11136 <h6>Returns</h6>
11137 <p><!--para 3 -->
11138  The fabs functions return | x |.
11139
11140 <h5><a name="7.12.7.3" href="#7.12.7.3">7.12.7.3 The hypot functions</a></h5>
11141 <h6>Synopsis</h6>
11142 <p><!--para 1 -->
11143 <pre>
11144         #include <a href="#7.12">&lt;math.h&gt;</a>
11145         double hypot(double x, double y);
11146         float hypotf(float x, float y);
11147         long double hypotl(long double x, long double y);</pre>
11148 <h6>Description</h6>
11149 <p><!--para 2 -->
11150  The hypot functions compute the square root of the sum of the squares of x and y,
11151  without undue overflow or underflow. A range error may occur.
11152 <p><!--para 3 -->
11153 <h6>Returns</h6>
11154 <p><!--para 4 -->
11155  The hypot functions return (sqrt)x2 + y2 .
11156 <pre>
11157                             ???
11158                             ???????????????</pre>
11159
11160 <h5><a name="7.12.7.4" href="#7.12.7.4">7.12.7.4 The pow functions</a></h5>
11161 <h6>Synopsis</h6>
11162 <p><!--para 1 -->
11163 <pre>
11164         #include <a href="#7.12">&lt;math.h&gt;</a>
11165         double pow(double x, double y);
11166         float powf(float x, float y);
11167         long double powl(long double x, long double y);</pre>
11168 <h6>Description</h6>
11169 <p><!--para 2 -->
11170  The pow functions compute x raised to the power y. A domain error occurs if x is finite
11171  and negative and y is finite and not an integer value. A range error may occur. A domain
11172  error may occur if x is zero and y is zero. A domain error or range error may occur if x
11173  is zero and y is less than zero.
11174 <h6>Returns</h6>
11175 <p><!--para 3 -->
11176  The pow functions return xy .
11177
11178 <h5><a name="7.12.7.5" href="#7.12.7.5">7.12.7.5 The sqrt functions</a></h5>
11179 <h6>Synopsis</h6>
11180 <p><!--para 1 -->
11181 <!--page 242 -->
11182 <pre>
11183         #include <a href="#7.12">&lt;math.h&gt;</a>
11184         double sqrt(double x);
11185         float sqrtf(float x);
11186         long double sqrtl(long double x);</pre>
11187 <h6>Description</h6>
11188 <p><!--para 2 -->
11189  The sqrt functions compute the nonnegative square root of x. A domain error occurs if
11190  the argument is less than zero.
11191 <h6>Returns</h6>
11192 <p><!--para 3 -->
11193  The sqrt functions return (sqrt)x.
11194 <pre>
11195                            ???
11196                            ???</pre>
11197
11198 <h4><a name="7.12.8" href="#7.12.8">7.12.8 Error and gamma functions</a></h4>
11199
11200 <h5><a name="7.12.8.1" href="#7.12.8.1">7.12.8.1 The erf functions</a></h5>
11201 <h6>Synopsis</h6>
11202 <p><!--para 1 -->
11203 <pre>
11204         #include <a href="#7.12">&lt;math.h&gt;</a>
11205         double erf(double x);
11206         float erff(float x);
11207         long double erfl(long double x);</pre>
11208 <h6>Description</h6>
11209 <p><!--para 2 -->
11210  The erf functions compute the error function of x.
11211 <h6>Returns</h6>
11212 <pre>
11213                                     2        x
11214                                          (integral)</pre>
11215  
11216  The erf functions return erf x =                e-t dt.
11217 <pre>
11218                                                    2</pre>
11219  
11220  
11221 <pre>
11222                                     (sqrt)pi
11223                                     ???
11224                                     ???    0</pre>
11225  
11226
11227 <h5><a name="7.12.8.2" href="#7.12.8.2">7.12.8.2 The erfc functions</a></h5>
11228 <h6>Synopsis</h6>
11229 <p><!--para 1 -->
11230 <pre>
11231         #include <a href="#7.12">&lt;math.h&gt;</a>
11232         double erfc(double x);
11233         float erfcf(float x);
11234         long double erfcl(long double x);</pre>
11235 <h6>Description</h6>
11236 <p><!--para 2 -->
11237  The erfc functions compute the complementary error function of x. A range error
11238  occurs if x is too large.
11239 <h6>Returns</h6>
11240 <pre>
11241                                                            2        (inf)
11242                                                                 (integral)</pre>
11243  
11244  The erfc functions return erfc x = 1 - erf x =                         e-t dt.
11245 <pre>
11246                                                                           2</pre>
11247  
11248  
11249 <!--page 243 -->
11250 <pre>
11251                                                            (sqrt)pi
11252                                                            ???
11253                                                            ???    x</pre>
11254
11255 <h5><a name="7.12.8.3" href="#7.12.8.3">7.12.8.3 The lgamma functions</a></h5>
11256 <h6>Synopsis</h6>
11257 <p><!--para 1 -->
11258 <pre>
11259         #include <a href="#7.12">&lt;math.h&gt;</a>
11260         double lgamma(double x);
11261         float lgammaf(float x);
11262         long double lgammal(long double x);</pre>
11263 <h6>Description</h6>
11264 <p><!--para 2 -->
11265  The lgamma functions compute the natural logarithm of the absolute value of gamma of
11266  x. A range error occurs if x is too large. A range error may occur if x is a negative
11267  integer or zero.
11268 <h6>Returns</h6>
11269 <p><!--para 3 -->
11270  The lgamma functions return loge | (Gamma)(x) |.
11271
11272 <h5><a name="7.12.8.4" href="#7.12.8.4">7.12.8.4 The tgamma functions</a></h5>
11273 <h6>Synopsis</h6>
11274 <p><!--para 1 -->
11275 <pre>
11276         #include <a href="#7.12">&lt;math.h&gt;</a>
11277         double tgamma(double x);
11278         float tgammaf(float x);
11279         long double tgammal(long double x);</pre>
11280 <h6>Description</h6>
11281 <p><!--para 2 -->
11282  The tgamma functions compute the gamma function of x. A domain error or range error
11283  may occur if x is a negative integer or zero. A range error may occur if the magnitude of
11284  x is too large or too small.
11285 <h6>Returns</h6>
11286 <p><!--para 3 -->
11287  The tgamma functions return (Gamma)(x).
11288
11289 <h4><a name="7.12.9" href="#7.12.9">7.12.9 Nearest integer functions</a></h4>
11290
11291 <h5><a name="7.12.9.1" href="#7.12.9.1">7.12.9.1 The ceil functions</a></h5>
11292 <h6>Synopsis</h6>
11293 <p><!--para 1 -->
11294 <pre>
11295         #include <a href="#7.12">&lt;math.h&gt;</a>
11296         double ceil(double x);
11297         float ceilf(float x);
11298         long double ceill(long double x);</pre>
11299 <h6>Description</h6>
11300 <p><!--para 2 -->
11301  The ceil functions compute the smallest integer value not less than x.
11302 <!--page 244 -->
11303 <h6>Returns</h6>
11304 <p><!--para 3 -->
11305  The ceil functions return ???x???, expressed as a floating-point number.
11306
11307 <h5><a name="7.12.9.2" href="#7.12.9.2">7.12.9.2 The floor functions</a></h5>
11308 <h6>Synopsis</h6>
11309 <p><!--para 1 -->
11310 <pre>
11311         #include <a href="#7.12">&lt;math.h&gt;</a>
11312         double floor(double x);
11313         float floorf(float x);
11314         long double floorl(long double x);</pre>
11315 <h6>Description</h6>
11316 <p><!--para 2 -->
11317  The floor functions compute the largest integer value not greater than x.
11318 <h6>Returns</h6>
11319 <p><!--para 3 -->
11320  The floor functions return ???x???, expressed as a floating-point number.
11321
11322 <h5><a name="7.12.9.3" href="#7.12.9.3">7.12.9.3 The nearbyint functions</a></h5>
11323 <h6>Synopsis</h6>
11324 <p><!--para 1 -->
11325 <pre>
11326         #include <a href="#7.12">&lt;math.h&gt;</a>
11327         double nearbyint(double x);
11328         float nearbyintf(float x);
11329         long double nearbyintl(long double x);</pre>
11330 <h6>Description</h6>
11331 <p><!--para 2 -->
11332  The nearbyint functions round their argument to an integer value in floating-point
11333  format, using the current rounding direction and without raising the ''inexact'' floating-
11334  point exception.
11335 <h6>Returns</h6>
11336 <p><!--para 3 -->
11337  The nearbyint functions return the rounded integer value.
11338
11339 <h5><a name="7.12.9.4" href="#7.12.9.4">7.12.9.4 The rint functions</a></h5>
11340 <h6>Synopsis</h6>
11341 <p><!--para 1 -->
11342 <pre>
11343         #include <a href="#7.12">&lt;math.h&gt;</a>
11344         double rint(double x);
11345         float rintf(float x);
11346         long double rintl(long double x);</pre>
11347 <h6>Description</h6>
11348 <p><!--para 2 -->
11349  The rint functions differ from the nearbyint functions (<a href="#7.12.9.3">7.12.9.3</a>) only in that the
11350  rint functions may raise the ''inexact'' floating-point exception if the result differs in
11351  value from the argument.
11352 <!--page 245 -->
11353 <h6>Returns</h6>
11354 <p><!--para 3 -->
11355  The rint functions return the rounded integer value.
11356
11357 <h5><a name="7.12.9.5" href="#7.12.9.5">7.12.9.5 The lrint and llrint functions</a></h5>
11358 <h6>Synopsis</h6>
11359 <p><!--para 1 -->
11360 <pre>
11361         #include <a href="#7.12">&lt;math.h&gt;</a>
11362         long int lrint(double x);
11363         long int lrintf(float x);
11364         long int lrintl(long double x);
11365         long long int llrint(double x);
11366         long long int llrintf(float x);
11367         long long int llrintl(long double x);</pre>
11368 <h6>Description</h6>
11369 <p><!--para 2 -->
11370  The lrint and llrint functions round their argument to the nearest integer value,
11371  rounding according to the current rounding direction. If the rounded value is outside the
11372  range of the return type, the numeric result is unspecified and a domain error or range
11373  error may occur.                                                                          *
11374 <h6>Returns</h6>
11375 <p><!--para 3 -->
11376  The lrint and llrint functions return the rounded integer value.
11377
11378 <h5><a name="7.12.9.6" href="#7.12.9.6">7.12.9.6 The round functions</a></h5>
11379 <h6>Synopsis</h6>
11380 <p><!--para 1 -->
11381 <pre>
11382         #include <a href="#7.12">&lt;math.h&gt;</a>
11383         double round(double x);
11384         float roundf(float x);
11385         long double roundl(long double x);</pre>
11386 <h6>Description</h6>
11387 <p><!--para 2 -->
11388  The round functions round their argument to the nearest integer value in floating-point
11389  format, rounding halfway cases away from zero, regardless of the current rounding
11390  direction.
11391 <h6>Returns</h6>
11392 <p><!--para 3 -->
11393  The round functions return the rounded integer value.
11394 <!--page 246 -->
11395
11396 <h5><a name="7.12.9.7" href="#7.12.9.7">7.12.9.7 The lround and llround functions</a></h5>
11397 <h6>Synopsis</h6>
11398 <p><!--para 1 -->
11399 <pre>
11400         #include <a href="#7.12">&lt;math.h&gt;</a>
11401         long int lround(double x);
11402         long int lroundf(float x);
11403         long int lroundl(long double x);
11404         long long int llround(double x);
11405         long long int llroundf(float x);
11406         long long int llroundl(long double x);</pre>
11407 <h6>Description</h6>
11408 <p><!--para 2 -->
11409  The lround and llround functions round their argument to the nearest integer value,
11410  rounding halfway cases away from zero, regardless of the current rounding direction. If
11411  the rounded value is outside the range of the return type, the numeric result is unspecified
11412  and a domain error or range error may occur.
11413 <h6>Returns</h6>
11414 <p><!--para 3 -->
11415  The lround and llround functions return the rounded integer value.
11416
11417 <h5><a name="7.12.9.8" href="#7.12.9.8">7.12.9.8 The trunc functions</a></h5>
11418 <h6>Synopsis</h6>
11419 <p><!--para 1 -->
11420 <pre>
11421         #include <a href="#7.12">&lt;math.h&gt;</a>
11422         double trunc(double x);
11423         float truncf(float x);
11424         long double truncl(long double x);</pre>
11425 <h6>Description</h6>
11426 <p><!--para 2 -->
11427  The trunc functions round their argument to the integer value, in floating format,
11428  nearest to but no larger in magnitude than the argument.
11429 <h6>Returns</h6>
11430 <p><!--para 3 -->
11431  The trunc functions return the truncated integer value.
11432 <!--page 247 -->
11433
11434 <h4><a name="7.12.10" href="#7.12.10">7.12.10 Remainder functions</a></h4>
11435
11436 <h5><a name="7.12.10.1" href="#7.12.10.1">7.12.10.1 The fmod functions</a></h5>
11437 <h6>Synopsis</h6>
11438 <p><!--para 1 -->
11439 <pre>
11440           #include <a href="#7.12">&lt;math.h&gt;</a>
11441           double fmod(double x, double y);
11442           float fmodf(float x, float y);
11443           long double fmodl(long double x, long double y);</pre>
11444 <h6>Description</h6>
11445 <p><!--para 2 -->
11446  The fmod functions compute the floating-point remainder of x/y.
11447 <h6>Returns</h6>
11448 <p><!--para 3 -->
11449  The fmod functions return the value x - ny, for some integer n such that, if y is nonzero,
11450  the result has the same sign as x and magnitude less than the magnitude of y. If y is zero,
11451  whether a domain error occurs or the fmod functions return zero is implementation-
11452  defined.
11453
11454 <h5><a name="7.12.10.2" href="#7.12.10.2">7.12.10.2 The remainder functions</a></h5>
11455 <h6>Synopsis</h6>
11456 <p><!--para 1 -->
11457 <pre>
11458           #include <a href="#7.12">&lt;math.h&gt;</a>
11459           double remainder(double x, double y);
11460           float remainderf(float x, float y);
11461           long double remainderl(long double x, long double y);</pre>
11462 <h6>Description</h6>
11463 <p><!--para 2 -->
11464  The remainder functions compute the remainder x REM y required by IEC 60559.<sup><a href="#note210"><b>210)</b></a></sup>
11465 <h6>Returns</h6>
11466 <p><!--para 3 -->
11467  The remainder functions return x REM y. If y is zero, whether a domain error occurs
11468  or the functions return zero is implementation defined.
11469  
11470  
11471  
11472  
11473 <!--page 248 -->
11474
11475 <h6>footnotes</h6>
11476 <p><small><a name="note210" href="#note210">210)</a> ''When y != 0, the remainder r = x REM y is defined regardless of the rounding mode by the
11477  mathematical relation r = x - ny, where n is the integer nearest the exact value of x/y; whenever
11478  | n - x/y | = 1/2, then n is even. Thus, the remainder is always exact. If r = 0, its sign shall be that of
11479  x.'' This definition is applicable for all implementations.
11480 </small>
11481
11482 <h5><a name="7.12.10.3" href="#7.12.10.3">7.12.10.3 The remquo functions</a></h5>
11483 <h6>Synopsis</h6>
11484 <p><!--para 1 -->
11485 <pre>
11486         #include <a href="#7.12">&lt;math.h&gt;</a>
11487         double remquo(double x, double y, int *quo);
11488         float remquof(float x, float y, int *quo);
11489         long double remquol(long double x, long double y,
11490              int *quo);</pre>
11491 <h6>Description</h6>
11492 <p><!--para 2 -->
11493  The remquo functions compute the same remainder as the remainder functions. In
11494  the object pointed to by quo they store a value whose sign is the sign of x/y and whose
11495  magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where
11496  n is an implementation-defined integer greater than or equal to 3.
11497 <h6>Returns</h6>
11498 <p><!--para 3 -->
11499  The remquo functions return x REM y. If y is zero, the value stored in the object
11500  pointed to by quo is unspecified and whether a domain error occurs or the functions
11501  return zero is implementation defined.
11502
11503 <h4><a name="7.12.11" href="#7.12.11">7.12.11 Manipulation functions</a></h4>
11504
11505 <h5><a name="7.12.11.1" href="#7.12.11.1">7.12.11.1 The copysign functions</a></h5>
11506 <h6>Synopsis</h6>
11507 <p><!--para 1 -->
11508 <pre>
11509         #include <a href="#7.12">&lt;math.h&gt;</a>
11510         double copysign(double x, double y);
11511         float copysignf(float x, float y);
11512         long double copysignl(long double x, long double y);</pre>
11513 <h6>Description</h6>
11514 <p><!--para 2 -->
11515  The copysign functions produce a value with the magnitude of x and the sign of y.
11516  They produce a NaN (with the sign of y) if x is a NaN. On implementations that
11517  represent a signed zero but do not treat negative zero consistently in arithmetic
11518  operations, the copysign functions regard the sign of zero as positive.
11519 <h6>Returns</h6>
11520 <p><!--para 3 -->
11521  The copysign functions return a value with the magnitude of x and the sign of y.
11522 <!--page 249 -->
11523
11524 <h5><a name="7.12.11.2" href="#7.12.11.2">7.12.11.2 The nan functions</a></h5>
11525 <h6>Synopsis</h6>
11526 <p><!--para 1 -->
11527 <pre>
11528          #include <a href="#7.12">&lt;math.h&gt;</a>
11529          double nan(const char *tagp);
11530          float nanf(const char *tagp);
11531          long double nanl(const char *tagp);</pre>
11532 <h6>Description</h6>
11533 <p><!--para 2 -->
11534  The call nan("n-char-sequence") is equivalent to strtod("NAN(n-char-
11535  sequence)",     (char**)       NULL); the call nan("") is equivalent to
11536  strtod("NAN()", (char**) NULL). If tagp does not point to an n-char
11537  sequence or an empty string, the call is equivalent to strtod("NAN", (char**)
11538  NULL). Calls to nanf and nanl are equivalent to the corresponding calls to strtof
11539  and strtold.
11540 <h6>Returns</h6>
11541 <p><!--para 3 -->
11542  The nan functions return a quiet NaN, if available, with content indicated through tagp.
11543  If the implementation does not support quiet NaNs, the functions return zero.
11544 <p><b> Forward references</b>: the strtod, strtof, and strtold functions (<a href="#7.20.1.3">7.20.1.3</a>).
11545
11546 <h5><a name="7.12.11.3" href="#7.12.11.3">7.12.11.3 The nextafter functions</a></h5>
11547 <h6>Synopsis</h6>
11548 <p><!--para 1 -->
11549 <pre>
11550          #include <a href="#7.12">&lt;math.h&gt;</a>
11551          double nextafter(double x, double y);
11552          float nextafterf(float x, float y);
11553          long double nextafterl(long double x, long double y);</pre>
11554 <h6>Description</h6>
11555 <p><!--para 2 -->
11556  The nextafter functions determine the next representable value, in the type of the
11557  function, after x in the direction of y, where x and y are first converted to the type of the
11558  function.<sup><a href="#note211"><b>211)</b></a></sup> The nextafter functions return y if x equals y. A range error may occur
11559  if the magnitude of x is the largest finite value representable in the type and the result is
11560  infinite or not representable in the type.
11561 <h6>Returns</h6>
11562 <p><!--para 3 -->
11563  The nextafter functions return the next representable value in the specified format
11564  after x in the direction of y.
11565  
11566  
11567 <!--page 250 -->
11568
11569 <h6>footnotes</h6>
11570 <p><small><a name="note211" href="#note211">211)</a> The argument values are converted to the type of the function, even by a macro implementation of the
11571  function.
11572 </small>
11573
11574 <h5><a name="7.12.11.4" href="#7.12.11.4">7.12.11.4 The nexttoward functions</a></h5>
11575 <h6>Synopsis</h6>
11576 <p><!--para 1 -->
11577 <pre>
11578          #include <a href="#7.12">&lt;math.h&gt;</a>
11579          double nexttoward(double x, long double y);
11580          float nexttowardf(float x, long double y);
11581          long double nexttowardl(long double x, long double y);</pre>
11582 <h6>Description</h6>
11583 <p><!--para 2 -->
11584  The nexttoward functions are equivalent to the nextafter functions except that the
11585  second parameter has type long double and the functions return y converted to the
11586  type of the function if x equals y.<sup><a href="#note212"><b>212)</b></a></sup>
11587
11588 <h6>footnotes</h6>
11589 <p><small><a name="note212" href="#note212">212)</a> The result of the nexttoward functions is determined in the type of the function, without loss of
11590  range or precision in a floating second argument.
11591 </small>
11592
11593 <h4><a name="7.12.12" href="#7.12.12">7.12.12 Maximum, minimum, and positive difference functions</a></h4>
11594
11595 <h5><a name="7.12.12.1" href="#7.12.12.1">7.12.12.1 The fdim functions</a></h5>
11596 <h6>Synopsis</h6>
11597 <p><!--para 1 -->
11598 <pre>
11599          #include <a href="#7.12">&lt;math.h&gt;</a>
11600          double fdim(double x, double y);
11601          float fdimf(float x, float y);
11602          long double fdiml(long double x, long double y);</pre>
11603 <h6>Description</h6>
11604 <p><!--para 2 -->
11605  The fdim functions determine the positive difference between their arguments:
11606 <pre>
11607        ???x - y if x &gt; y
11608        ???
11609        ???+0     if x &lt;= y</pre>
11610  A range error may occur.
11611 <h6>Returns</h6>
11612 <p><!--para 3 -->
11613  The fdim functions return the positive difference value.
11614
11615 <h5><a name="7.12.12.2" href="#7.12.12.2">7.12.12.2 The fmax functions</a></h5>
11616 <h6>Synopsis</h6>
11617 <p><!--para 1 -->
11618 <pre>
11619          #include <a href="#7.12">&lt;math.h&gt;</a>
11620          double fmax(double x, double y);
11621          float fmaxf(float x, float y);
11622          long double fmaxl(long double x, long double y);</pre>
11623  
11624  
11625  
11626 <!--page 251 -->
11627 <h6>Description</h6>
11628 <p><!--para 2 -->
11629  The fmax functions determine the maximum numeric value of their arguments.<sup><a href="#note213"><b>213)</b></a></sup>
11630 <h6>Returns</h6>
11631 <p><!--para 3 -->
11632  The fmax functions return the maximum numeric value of their arguments.
11633
11634 <h6>footnotes</h6>
11635 <p><small><a name="note213" href="#note213">213)</a> NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the
11636  fmax functions choose the numeric value. See <a href="#F.9.9.2">F.9.9.2</a>.
11637 </small>
11638
11639 <h5><a name="7.12.12.3" href="#7.12.12.3">7.12.12.3 The fmin functions</a></h5>
11640 <h6>Synopsis</h6>
11641 <p><!--para 1 -->
11642 <pre>
11643          #include <a href="#7.12">&lt;math.h&gt;</a>
11644          double fmin(double x, double y);
11645          float fminf(float x, float y);
11646          long double fminl(long double x, long double y);</pre>
11647 <h6>Description</h6>
11648 <p><!--para 2 -->
11649  The fmin functions determine the minimum numeric value of their arguments.<sup><a href="#note214"><b>214)</b></a></sup>
11650 <h6>Returns</h6>
11651 <p><!--para 3 -->
11652  The fmin functions return the minimum numeric value of their arguments.
11653
11654 <h6>footnotes</h6>
11655 <p><small><a name="note214" href="#note214">214)</a> The fmin functions are analogous to the fmax functions in their treatment of NaNs.
11656 </small>
11657
11658 <h4><a name="7.12.13" href="#7.12.13">7.12.13 Floating multiply-add</a></h4>
11659
11660 <h5><a name="7.12.13.1" href="#7.12.13.1">7.12.13.1 The fma functions</a></h5>
11661 <h6>Synopsis</h6>
11662 <p><!--para 1 -->
11663 <pre>
11664          #include <a href="#7.12">&lt;math.h&gt;</a>
11665          double fma(double x, double y, double z);
11666          float fmaf(float x, float y, float z);
11667          long double fmal(long double x, long double y,
11668               long double z);</pre>
11669 <h6>Description</h6>
11670 <p><!--para 2 -->
11671  The fma functions compute (x x y) + z, rounded as one ternary operation: they compute
11672  the value (as if) to infinite precision and round once to the result format, according to the
11673  current rounding mode. A range error may occur.
11674 <h6>Returns</h6>
11675 <p><!--para 3 -->
11676  The fma functions return (x x y) + z, rounded as one ternary operation.
11677  
11678  
11679  
11680  
11681 <!--page 252 -->
11682
11683 <h4><a name="7.12.14" href="#7.12.14">7.12.14 Comparison macros</a></h4>
11684 <p><!--para 1 -->
11685  The relational and equality operators support the usual mathematical relationships
11686  between numeric values. For any ordered pair of numeric values exactly one of the
11687  relationships -- less, greater, and equal -- is true. Relational operators may raise the
11688  ''invalid'' floating-point exception when argument values are NaNs. For a NaN and a
11689  numeric value, or for two NaNs, just the unordered relationship is true.<sup><a href="#note215"><b>215)</b></a></sup> The following
11690  subclauses provide macros that are quiet (non floating-point exception raising) versions
11691  of the relational operators, and other comparison macros that facilitate writing efficient
11692  code that accounts for NaNs without suffering the ''invalid'' floating-point exception. In
11693  the synopses in this subclause, real-floating indicates that the argument shall be an
11694  expression of real floating type.
11695
11696 <h6>footnotes</h6>
11697 <p><small><a name="note215" href="#note215">215)</a> IEC 60559 requires that the built-in relational operators raise the ''invalid'' floating-point exception if
11698  the operands compare unordered, as an error indicator for programs written without consideration of
11699  NaNs; the result in these cases is false.
11700 </small>
11701
11702 <h5><a name="7.12.14.1" href="#7.12.14.1">7.12.14.1 The isgreater macro</a></h5>
11703 <h6>Synopsis</h6>
11704 <p><!--para 1 -->
11705 <pre>
11706           #include <a href="#7.12">&lt;math.h&gt;</a>
11707           int isgreater(real-floating x, real-floating y);</pre>
11708 <h6>Description</h6>
11709 <p><!--para 2 -->
11710  The isgreater macro determines whether its first argument is greater than its second
11711  argument. The value of isgreater(x, y) is always equal to (x) &gt; (y); however,
11712  unlike (x) &gt; (y), isgreater(x, y) does not raise the ''invalid'' floating-point
11713  exception when x and y are unordered.
11714 <h6>Returns</h6>
11715 <p><!--para 3 -->
11716  The isgreater macro returns the value of (x) &gt; (y).
11717
11718 <h5><a name="7.12.14.2" href="#7.12.14.2">7.12.14.2 The isgreaterequal macro</a></h5>
11719 <h6>Synopsis</h6>
11720 <p><!--para 1 -->
11721 <pre>
11722           #include <a href="#7.12">&lt;math.h&gt;</a>
11723           int isgreaterequal(real-floating x, real-floating y);</pre>
11724 <h6>Description</h6>
11725 <p><!--para 2 -->
11726  The isgreaterequal macro determines whether its first argument is greater than or
11727  equal to its second argument. The value of isgreaterequal(x, y) is always equal
11728  to (x) &gt;= (y); however, unlike (x) &gt;= (y), isgreaterequal(x, y) does
11729  not raise the ''invalid'' floating-point exception when x and y are unordered.
11730  
11731  
11732  
11733 <!--page 253 -->
11734 <h6>Returns</h6>
11735 <p><!--para 3 -->
11736  The isgreaterequal macro returns the value of (x) &gt;= (y).
11737
11738 <h5><a name="7.12.14.3" href="#7.12.14.3">7.12.14.3 The isless macro</a></h5>
11739 <h6>Synopsis</h6>
11740 <p><!--para 1 -->
11741 <pre>
11742         #include <a href="#7.12">&lt;math.h&gt;</a>
11743         int isless(real-floating x, real-floating y);</pre>
11744 <h6>Description</h6>
11745 <p><!--para 2 -->
11746  The isless macro determines whether its first argument is less than its second
11747  argument. The value of isless(x, y) is always equal to (x) &lt; (y); however,
11748  unlike (x) &lt; (y), isless(x, y) does not raise the ''invalid'' floating-point
11749  exception when x and y are unordered.
11750 <h6>Returns</h6>
11751 <p><!--para 3 -->
11752  The isless macro returns the value of (x) &lt; (y).
11753
11754 <h5><a name="7.12.14.4" href="#7.12.14.4">7.12.14.4 The islessequal macro</a></h5>
11755 <h6>Synopsis</h6>
11756 <p><!--para 1 -->
11757 <pre>
11758         #include <a href="#7.12">&lt;math.h&gt;</a>
11759         int islessequal(real-floating x, real-floating y);</pre>
11760 <h6>Description</h6>
11761 <p><!--para 2 -->
11762  The islessequal macro determines whether its first argument is less than or equal to
11763  its second argument. The value of islessequal(x, y) is always equal to
11764  (x) &lt;= (y); however, unlike (x) &lt;= (y), islessequal(x, y) does not raise
11765  the ''invalid'' floating-point exception when x and y are unordered.
11766 <h6>Returns</h6>
11767 <p><!--para 3 -->
11768  The islessequal macro returns the value of (x) &lt;= (y).
11769
11770 <h5><a name="7.12.14.5" href="#7.12.14.5">7.12.14.5 The islessgreater macro</a></h5>
11771 <h6>Synopsis</h6>
11772 <p><!--para 1 -->
11773 <pre>
11774         #include <a href="#7.12">&lt;math.h&gt;</a>
11775         int islessgreater(real-floating x, real-floating y);</pre>
11776 <h6>Description</h6>
11777 <p><!--para 2 -->
11778  The islessgreater macro determines whether its first argument is less than or
11779  greater than its second argument. The islessgreater(x, y) macro is similar to
11780  (x) &lt; (y) || (x) &gt; (y); however, islessgreater(x, y) does not raise
11781  the ''invalid'' floating-point exception when x and y are unordered (nor does it evaluate x
11782  and y twice).
11783 <!--page 254 -->
11784 <h6>Returns</h6>
11785 <p><!--para 3 -->
11786  The islessgreater macro returns the value of (x) &lt; (y) || (x) &gt; (y).
11787
11788 <h5><a name="7.12.14.6" href="#7.12.14.6">7.12.14.6 The isunordered macro</a></h5>
11789 <h6>Synopsis</h6>
11790 <p><!--para 1 -->
11791 <pre>
11792        #include <a href="#7.12">&lt;math.h&gt;</a>
11793        int isunordered(real-floating x, real-floating y);</pre>
11794 <h6>Description</h6>
11795 <p><!--para 2 -->
11796  The isunordered macro determines whether its arguments are unordered.
11797 <h6>Returns</h6>
11798 <p><!--para 3 -->
11799  The isunordered macro returns 1 if its arguments are unordered and 0 otherwise.
11800 <!--page 255 -->
11801
11802 <h3><a name="7.13" href="#7.13">7.13 Nonlocal jumps <setjmp.h></a></h3>
11803 <p><!--para 1 -->
11804  The header <a href="#7.13">&lt;setjmp.h&gt;</a> defines the macro setjmp, and declares one function and
11805  one type, for bypassing the normal function call and return discipline.<sup><a href="#note216"><b>216)</b></a></sup>
11806 <p><!--para 2 -->
11807  The type declared is
11808 <pre>
11809          jmp_buf</pre>
11810  which is an array type suitable for holding the information needed to restore a calling
11811  environment. The environment of a call to the setjmp macro consists of information
11812  sufficient for a call to the longjmp function to return execution to the correct block and
11813  invocation of that block, were it called recursively. It does not include the state of the
11814  floating-point status flags, of open files, or of any other component of the abstract
11815  machine.
11816 <p><!--para 3 -->
11817  It is unspecified whether setjmp is a macro or an identifier declared with external
11818  linkage. If a macro definition is suppressed in order to access an actual function, or a
11819  program defines an external identifier with the name setjmp, the behavior is undefined.
11820
11821 <h6>footnotes</h6>
11822 <p><small><a name="note216" href="#note216">216)</a> These functions are useful for dealing with unusual conditions encountered in a low-level function of
11823  a program.
11824 </small>
11825
11826 <h4><a name="7.13.1" href="#7.13.1">7.13.1 Save calling environment</a></h4>
11827
11828 <h5><a name="7.13.1.1" href="#7.13.1.1">7.13.1.1 The setjmp macro</a></h5>
11829 <h6>Synopsis</h6>
11830 <p><!--para 1 -->
11831 <pre>
11832          #include <a href="#7.13">&lt;setjmp.h&gt;</a>
11833          int setjmp(jmp_buf env);</pre>
11834 <h6>Description</h6>
11835 <p><!--para 2 -->
11836  The setjmp macro saves its calling environment in its jmp_buf argument for later use
11837  by the longjmp function.
11838 <h6>Returns</h6>
11839 <p><!--para 3 -->
11840  If the return is from a direct invocation, the setjmp macro returns the value zero. If the
11841  return is from a call to the longjmp function, the setjmp macro returns a nonzero
11842  value.
11843  Environmental limits
11844 <p><!--para 4 -->
11845  An invocation of the setjmp macro shall appear only in one of the following contexts:
11846 <ul>
11847 <li>  the entire controlling expression of a selection or iteration statement;
11848 <li>  one operand of a relational or equality operator with the other operand an integer
11849  constant expression, with the resulting expression being the entire controlling
11850  
11851  
11852 <!--page 256 -->
11853    expression of a selection or iteration statement;
11854 <li>  the operand of a unary ! operator with the resulting expression being the entire
11855  controlling expression of a selection or iteration statement; or
11856 <li>  the entire expression of an expression statement (possibly cast to void).
11857 </ul>
11858 <p><!--para 5 -->
11859  If the invocation appears in any other context, the behavior is undefined.
11860
11861 <h4><a name="7.13.2" href="#7.13.2">7.13.2 Restore calling environment</a></h4>
11862
11863 <h5><a name="7.13.2.1" href="#7.13.2.1">7.13.2.1 The longjmp function</a></h5>
11864 <h6>Synopsis</h6>
11865 <p><!--para 1 -->
11866 <pre>
11867           #include <a href="#7.13">&lt;setjmp.h&gt;</a>
11868           void longjmp(jmp_buf env, int val);</pre>
11869 <h6>Description</h6>
11870 <p><!--para 2 -->
11871  The longjmp function restores the environment saved by the most recent invocation of
11872  the setjmp macro in the same invocation of the program with the corresponding
11873  jmp_buf argument. If there has been no such invocation, or if the function containing
11874  the invocation of the setjmp macro has terminated execution<sup><a href="#note217"><b>217)</b></a></sup> in the interim, or if the
11875  invocation of the setjmp macro was within the scope of an identifier with variably
11876  modified type and execution has left that scope in the interim, the behavior is undefined.
11877 <p><!--para 3 -->
11878  All accessible objects have values, and all other components of the abstract machine<sup><a href="#note218"><b>218)</b></a></sup>
11879  have state, as of the time the longjmp function was called, except that the values of
11880  objects of automatic storage duration that are local to the function containing the
11881  invocation of the corresponding setjmp macro that do not have volatile-qualified type
11882  and have been changed between the setjmp invocation and longjmp call are
11883  indeterminate.
11884 <h6>Returns</h6>
11885 <p><!--para 4 -->
11886  After longjmp is completed, program execution continues as if the corresponding
11887  invocation of the setjmp macro had just returned the value specified by val. The
11888  longjmp function cannot cause the setjmp macro to return the value 0; if val is 0,
11889  the setjmp macro returns the value 1.
11890 <p><!--para 5 -->
11891  EXAMPLE The longjmp function that returns control back to the point of the setjmp invocation
11892  might cause memory associated with a variable length array object to be squandered.
11893  
11894  
11895  
11896  
11897 <!--page 257 -->
11898 <!--page 258 -->
11899 <pre>
11900         #include <a href="#7.13">&lt;setjmp.h&gt;</a>
11901         jmp_buf buf;
11902         void g(int n);
11903         void h(int n);
11904         int n = 6;
11905         void f(void)
11906         {
11907               int x[n];          // valid: f is not terminated
11908               setjmp(buf);
11909               g(n);
11910         }
11911         void g(int n)
11912         {
11913               int a[n];          // a may remain allocated
11914               h(n);
11915         }
11916         void h(int n)
11917         {
11918               int b[n];          // b may remain allocated
11919               longjmp(buf, 2);   // might cause memory loss
11920         }</pre>
11921
11922 <h6>footnotes</h6>
11923 <p><small><a name="note217" href="#note217">217)</a> For example, by executing a return statement or because another longjmp call has caused a
11924  transfer to a setjmp invocation in a function earlier in the set of nested calls.
11925 </small>
11926 <p><small><a name="note218" href="#note218">218)</a> This includes, but is not limited to, the floating-point status flags and the state of open files.
11927 </small>
11928
11929 <h3><a name="7.14" href="#7.14">7.14 Signal handling <signal.h></a></h3>
11930 <p><!--para 1 -->
11931  The header <a href="#7.14">&lt;signal.h&gt;</a> declares a type and two functions and defines several macros,
11932  for handling various signals (conditions that may be reported during program execution).
11933 <p><!--para 2 -->
11934  The type defined is
11935 <pre>
11936          sig_atomic_t</pre>
11937  which is the (possibly volatile-qualified) integer type of an object that can be accessed as
11938  an atomic entity, even in the presence of asynchronous interrupts.
11939 <p><!--para 3 -->
11940  The macros defined are
11941 <pre>
11942          SIG_DFL
11943          SIG_ERR
11944          SIG_IGN</pre>
11945  which expand to constant expressions with distinct values that have type compatible with
11946  the second argument to, and the return value of, the signal function, and whose values
11947  compare unequal to the address of any declarable function; and the following, which
11948  expand to positive integer constant expressions with type int and distinct values that are
11949  the signal numbers, each corresponding to the specified condition:
11950 <p><!--para 4 -->
11951 <pre>
11952          SIGABRT abnormal termination, such as is initiated by the abort function
11953          SIGFPE         an erroneous arithmetic operation, such as zero divide or an operation
11954                         resulting in overflow
11955          SIGILL         detection of an invalid function image, such as an invalid instruction
11956          SIGINT         receipt of an interactive attention signal
11957          SIGSEGV an invalid access to storage
11958          SIGTERM a termination request sent to the program</pre>
11959  An implementation need not generate any of these signals, except as a result of explicit
11960  calls to the raise function. Additional signals and pointers to undeclarable functions,
11961  with macro definitions beginning, respectively, with the letters SIG and an uppercase
11962  letter or with SIG_ and an uppercase letter,<sup><a href="#note219"><b>219)</b></a></sup> may also be specified by the
11963  implementation. The complete set of signals, their semantics, and their default handling
11964  is implementation-defined; all signal numbers shall be positive.
11965  
11966  
11967  
11968  
11969 <!--page 259 -->
11970
11971 <h6>footnotes</h6>
11972 <p><small><a name="note219" href="#note219">219)</a> See ''future library directions'' (<a href="#7.26.9">7.26.9</a>). The names of the signal numbers reflect the following terms
11973  (respectively): abort, floating-point exception, illegal instruction, interrupt, segmentation violation,
11974  and termination.
11975 </small>
11976
11977 <h4><a name="7.14.1" href="#7.14.1">7.14.1 Specify signal handling</a></h4>
11978
11979 <h5><a name="7.14.1.1" href="#7.14.1.1">7.14.1.1 The signal function</a></h5>
11980 <h6>Synopsis</h6>
11981 <p><!--para 1 -->
11982 <pre>
11983          #include <a href="#7.14">&lt;signal.h&gt;</a>
11984          void (*signal(int sig, void (*func)(int)))(int);</pre>
11985 <h6>Description</h6>
11986 <p><!--para 2 -->
11987  The signal function chooses one of three ways in which receipt of the signal number
11988  sig is to be subsequently handled. If the value of func is SIG_DFL, default handling
11989  for that signal will occur. If the value of func is SIG_IGN, the signal will be ignored.
11990  Otherwise, func shall point to a function to be called when that signal occurs. An
11991  invocation of such a function because of a signal, or (recursively) of any further functions
11992  called by that invocation (other than functions in the standard library), is called a signal
11993  handler.
11994 <p><!--para 3 -->
11995  When a signal occurs and func points to a function, it is implementation-defined
11996  whether the equivalent of signal(sig, SIG_DFL); is executed or the
11997  implementation prevents some implementation-defined set of signals (at least including
11998  sig) from occurring until the current signal handling has completed; in the case of
11999  SIGILL, the implementation may alternatively define that no action is taken. Then the
12000  equivalent of (*func)(sig); is executed. If and when the function returns, if the
12001  value of sig is SIGFPE, SIGILL, SIGSEGV, or any other implementation-defined
12002  value corresponding to a computational exception, the behavior is undefined; otherwise
12003  the program will resume execution at the point it was interrupted.
12004 <p><!--para 4 -->
12005  If the signal occurs as the result of calling the abort or raise function, the signal
12006  handler shall not call the raise function.
12007 <p><!--para 5 -->
12008  If the signal occurs other than as the result of calling the abort or raise function, the
12009  behavior is undefined if the signal handler refers to any object with static storage duration
12010  other than by assigning a value to an object declared as volatile sig_atomic_t, or
12011  the signal handler calls any function in the standard library other than the abort
12012  function, the _Exit function, or the signal function with the first argument equal to
12013  the signal number corresponding to the signal that caused the invocation of the handler.
12014  Furthermore, if such a call to the signal function results in a SIG_ERR return, the
12015  value of errno is indeterminate.<sup><a href="#note220"><b>220)</b></a></sup>
12016 <p><!--para 6 -->
12017  At program startup, the equivalent of
12018 <pre>
12019          signal(sig, SIG_IGN);</pre>
12020  
12021  
12022 <!--page 260 -->
12023  may be executed for some signals selected in an implementation-defined manner; the
12024  equivalent of
12025 <pre>
12026         signal(sig, SIG_DFL);</pre>
12027  is executed for all other signals defined by the implementation.
12028 <p><!--para 7 -->
12029  The implementation shall behave as if no library function calls the signal function.
12030 <h6>Returns</h6>
12031 <p><!--para 8 -->
12032  If the request can be honored, the signal function returns the value of func for the
12033  most recent successful call to signal for the specified signal sig. Otherwise, a value of
12034  SIG_ERR is returned and a positive value is stored in errno.
12035 <p><b> Forward references</b>: the abort function (<a href="#7.20.4.1">7.20.4.1</a>), the exit function (<a href="#7.20.4.3">7.20.4.3</a>), the
12036  _Exit function (<a href="#7.20.4.4">7.20.4.4</a>).
12037
12038 <h6>footnotes</h6>
12039 <p><small><a name="note220" href="#note220">220)</a> If any signal is generated by an asynchronous signal handler, the behavior is undefined.
12040 </small>
12041
12042 <h4><a name="7.14.2" href="#7.14.2">7.14.2 Send signal</a></h4>
12043
12044 <h5><a name="7.14.2.1" href="#7.14.2.1">7.14.2.1 The raise function</a></h5>
12045 <h6>Synopsis</h6>
12046 <p><!--para 1 -->
12047 <pre>
12048         #include <a href="#7.14">&lt;signal.h&gt;</a>
12049         int raise(int sig);</pre>
12050 <h6>Description</h6>
12051 <p><!--para 2 -->
12052  The raise function carries out the actions described in <a href="#7.14.1.1">7.14.1.1</a> for the signal sig. If a
12053  signal handler is called, the raise function shall not return until after the signal handler
12054  does.
12055 <h6>Returns</h6>
12056 <p><!--para 3 -->
12057  The raise function returns zero if successful, nonzero if unsuccessful.
12058 <!--page 261 -->
12059
12060 <h3><a name="7.15" href="#7.15">7.15 Variable arguments <stdarg.h></a></h3>
12061 <p><!--para 1 -->
12062  The header <a href="#7.15">&lt;stdarg.h&gt;</a> declares a type and defines four macros, for advancing
12063  through a list of arguments whose number and types are not known to the called function
12064  when it is translated.
12065 <p><!--para 2 -->
12066  A function may be called with a variable number of arguments of varying types. As
12067  described in <a href="#6.9.1">6.9.1</a>, its parameter list contains one or more parameters. The rightmost
12068  parameter plays a special role in the access mechanism, and will be designated parmN in
12069  this description.
12070 <p><!--para 3 -->
12071  The type declared is
12072 <pre>
12073          va_list</pre>
12074  which is an object type suitable for holding information needed by the macros
12075  va_start, va_arg, va_end, and va_copy. If access to the varying arguments is
12076  desired, the called function shall declare an object (generally referred to as ap in this
12077  subclause) having type va_list. The object ap may be passed as an argument to
12078  another function; if that function invokes the va_arg macro with parameter ap, the
12079  value of ap in the calling function is indeterminate and shall be passed to the va_end
12080  macro prior to any further reference to ap.<sup><a href="#note221"><b>221)</b></a></sup>
12081
12082 <h6>footnotes</h6>
12083 <p><small><a name="note221" href="#note221">221)</a> It is permitted to create a pointer to a va_list and pass that pointer to another function, in which
12084  case the original function may make further use of the original list after the other function returns.
12085 </small>
12086
12087 <h4><a name="7.15.1" href="#7.15.1">7.15.1 Variable argument list access macros</a></h4>
12088 <p><!--para 1 -->
12089  The va_start and va_arg macros described in this subclause shall be implemented
12090  as macros, not functions. It is unspecified whether va_copy and va_end are macros or
12091  identifiers declared with external linkage. If a macro definition is suppressed in order to
12092  access an actual function, or a program defines an external identifier with the same name,
12093  the behavior is undefined. Each invocation of the va_start and va_copy macros
12094  shall be matched by a corresponding invocation of the va_end macro in the same
12095  function.
12096
12097 <h5><a name="7.15.1.1" href="#7.15.1.1">7.15.1.1 The va_arg macro</a></h5>
12098 <h6>Synopsis</h6>
12099 <p><!--para 1 -->
12100 <pre>
12101          #include <a href="#7.15">&lt;stdarg.h&gt;</a>
12102          type va_arg(va_list ap, type);</pre>
12103 <h6>Description</h6>
12104 <p><!--para 2 -->
12105  The va_arg macro expands to an expression that has the specified type and the value of
12106  the next argument in the call. The parameter ap shall have been initialized by the
12107  va_start or va_copy macro (without an intervening invocation of the va_end
12108  
12109 <!--page 262 -->
12110  macro for the same ap). Each invocation of the va_arg macro modifies ap so that the
12111  values of successive arguments are returned in turn. The parameter type shall be a type
12112  name specified such that the type of a pointer to an object that has the specified type can
12113  be obtained simply by postfixing a * to type. If there is no actual next argument, or if
12114  type is not compatible with the type of the actual next argument (as promoted according
12115  to the default argument promotions), the behavior is undefined, except for the following
12116  cases:
12117 <ul>
12118 <li>  one type is a signed integer type, the other type is the corresponding unsigned integer
12119  type, and the value is representable in both types;
12120 <li>  one type is pointer to void and the other is a pointer to a character type.
12121 </ul>
12122 <h6>Returns</h6>
12123 <p><!--para 3 -->
12124  The first invocation of the va_arg macro after that of the va_start macro returns the
12125  value of the argument after that specified by parmN . Successive invocations return the
12126  values of the remaining arguments in succession.
12127
12128 <h5><a name="7.15.1.2" href="#7.15.1.2">7.15.1.2 The va_copy macro</a></h5>
12129 <h6>Synopsis</h6>
12130 <p><!--para 1 -->
12131 <pre>
12132         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
12133         void va_copy(va_list dest, va_list src);</pre>
12134 <h6>Description</h6>
12135 <p><!--para 2 -->
12136  The va_copy macro initializes dest as a copy of src, as if the va_start macro had
12137  been applied to dest followed by the same sequence of uses of the va_arg macro as
12138  had previously been used to reach the present state of src. Neither the va_copy nor
12139  va_start macro shall be invoked to reinitialize dest without an intervening
12140  invocation of the va_end macro for the same dest.
12141 <h6>Returns</h6>
12142 <p><!--para 3 -->
12143  The va_copy macro returns no value.
12144
12145 <h5><a name="7.15.1.3" href="#7.15.1.3">7.15.1.3 The va_end macro</a></h5>
12146 <h6>Synopsis</h6>
12147 <p><!--para 1 -->
12148 <pre>
12149         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
12150         void va_end(va_list ap);</pre>
12151 <h6>Description</h6>
12152 <p><!--para 2 -->
12153  The va_end macro facilitates a normal return from the function whose variable
12154  argument list was referred to by the expansion of the va_start macro, or the function
12155  containing the expansion of the va_copy macro, that initialized the va_list ap. The
12156  va_end macro may modify ap so that it is no longer usable (without being reinitialized
12157 <!--page 263 -->
12158  by the va_start or va_copy macro). If there is no corresponding invocation of the
12159  va_start or va_copy macro, or if the va_end macro is not invoked before the
12160  return, the behavior is undefined.
12161 <h6>Returns</h6>
12162 <p><!--para 3 -->
12163  The va_end macro returns no value.
12164
12165 <h5><a name="7.15.1.4" href="#7.15.1.4">7.15.1.4 The va_start macro</a></h5>
12166 <h6>Synopsis</h6>
12167 <p><!--para 1 -->
12168 <pre>
12169          #include <a href="#7.15">&lt;stdarg.h&gt;</a>
12170          void va_start(va_list ap, parmN);</pre>
12171 <h6>Description</h6>
12172 <p><!--para 2 -->
12173  The va_start macro shall be invoked before any access to the unnamed arguments.
12174 <p><!--para 3 -->
12175  The va_start macro initializes ap for subsequent use by the va_arg and va_end
12176  macros. Neither the va_start nor va_copy macro shall be invoked to reinitialize ap
12177  without an intervening invocation of the va_end macro for the same ap.
12178 <p><!--para 4 -->
12179  The parameter parmN is the identifier of the rightmost parameter in the variable
12180  parameter list in the function definition (the one just before the , ...). If the parameter
12181  parmN is declared with the register storage class, with a function or array type, or
12182  with a type that is not compatible with the type that results after application of the default
12183  argument promotions, the behavior is undefined.
12184 <h6>Returns</h6>
12185 <p><!--para 5 -->
12186  The va_start macro returns no value.
12187 <p><!--para 6 -->
12188  EXAMPLE 1 The function f1 gathers into an array a list of arguments that are pointers to strings (but not
12189  more than MAXARGS arguments), then passes the array as a single argument to function f2. The number of
12190  pointers is specified by the first argument to f1.
12191 <!--page 264 -->
12192 <pre>
12193          #include <a href="#7.15">&lt;stdarg.h&gt;</a>
12194          #define MAXARGS   31
12195          void f1(int n_ptrs, ...)
12196          {
12197                va_list ap;
12198                char *array[MAXARGS];
12199                int ptr_no = 0;
12200                    if (n_ptrs &gt; MAXARGS)
12201                          n_ptrs = MAXARGS;
12202                    va_start(ap, n_ptrs);
12203                    while (ptr_no &lt; n_ptrs)
12204                          array[ptr_no++] = va_arg(ap, char *);
12205                    va_end(ap);
12206                    f2(n_ptrs, array);
12207           }</pre>
12208  Each call to f1 is required to have visible the definition of the function or a declaration such as
12209 <pre>
12210           void f1(int, ...);</pre>
12211  
12212 <p><!--para 7 -->
12213  EXAMPLE 2 The function f3 is similar, but saves the status of the variable argument list after the
12214  indicated number of arguments; after f2 has been called once with the whole list, the trailing part of the list
12215  is gathered again and passed to function f4.
12216 <!--page 265 -->
12217 <pre>
12218           #include <a href="#7.15">&lt;stdarg.h&gt;</a>
12219           #define MAXARGS 31
12220           void f3(int n_ptrs, int f4_after, ...)
12221           {
12222                 va_list ap, ap_save;
12223                 char *array[MAXARGS];
12224                 int ptr_no = 0;
12225                 if (n_ptrs &gt; MAXARGS)
12226                       n_ptrs = MAXARGS;
12227                 va_start(ap, f4_after);
12228                 while (ptr_no &lt; n_ptrs) {
12229                       array[ptr_no++] = va_arg(ap, char *);
12230                       if (ptr_no == f4_after)
12231                             va_copy(ap_save, ap);
12232                 }
12233                 va_end(ap);
12234                 f2(n_ptrs, array);
12235                    // Now process the saved copy.
12236                    n_ptrs -= f4_after;
12237                    ptr_no = 0;
12238                    while (ptr_no &lt; n_ptrs)
12239                          array[ptr_no++] = va_arg(ap_save, char *);
12240                    va_end(ap_save);
12241                    f4(n_ptrs, array);
12242           }</pre>
12243
12244 <h3><a name="7.16" href="#7.16">7.16 Boolean type and values <stdbool.h></a></h3>
12245 <p><!--para 1 -->
12246  The header <a href="#7.16">&lt;stdbool.h&gt;</a> defines four macros.
12247 <p><!--para 2 -->
12248  The macro
12249 <pre>
12250           bool</pre>
12251  expands to _Bool.
12252 <p><!--para 3 -->
12253  The remaining three macros are suitable for use in #if preprocessing directives. They
12254  are
12255 <pre>
12256           true</pre>
12257  which expands to the integer constant 1,
12258 <pre>
12259           false</pre>
12260  which expands to the integer constant 0, and
12261 <pre>
12262           __bool_true_false_are_defined</pre>
12263  which expands to the integer constant 1.
12264 <p><!--para 4 -->
12265  Notwithstanding the provisions of <a href="#7.1.3">7.1.3</a>, a program may undefine and perhaps then
12266  redefine the macros bool, true, and false.<sup><a href="#note222"><b>222)</b></a></sup>
12267  
12268  
12269  
12270  
12271 <!--page 266 -->
12272
12273 <h6>footnotes</h6>
12274 <p><small><a name="note222" href="#note222">222)</a> See ''future library directions'' (<a href="#7.26.7">7.26.7</a>).
12275 </small>
12276
12277 <h3><a name="7.17" href="#7.17">7.17 Common definitions <stddef.h></a></h3>
12278 <p><!--para 1 -->
12279  The following types and macros are defined in the standard header <a href="#7.17">&lt;stddef.h&gt;</a>. Some
12280  are also defined in other headers, as noted in their respective subclauses.
12281 <p><!--para 2 -->
12282  The types are
12283 <pre>
12284         ptrdiff_t</pre>
12285  which is the signed integer type of the result of subtracting two pointers;
12286 <pre>
12287         size_t</pre>
12288  which is the unsigned integer type of the result of the sizeof operator; and
12289 <pre>
12290         wchar_t</pre>
12291  which is an integer type whose range of values can represent distinct codes for all
12292  members of the largest extended character set specified among the supported locales; the
12293  null character shall have the code value zero. Each member of the basic character set
12294  shall have a code value equal to its value when used as the lone character in an integer
12295  character      constant     if     an      implementation      does      not      define
12296  __STDC_MB_MIGHT_NEQ_WC__.
12297 <p><!--para 3 -->
12298  The macros are
12299 <pre>
12300         NULL</pre>
12301  which expands to an implementation-defined null pointer constant; and
12302 <pre>
12303         offsetof(type, member-designator)</pre>
12304  which expands to an integer constant expression that has type size_t, the value of
12305  which is the offset in bytes, to the structure member (designated by member-designator),
12306  from the beginning of its structure (designated by type). The type and member designator
12307  shall be such that given
12308 <pre>
12309         static type t;</pre>
12310  then the expression &amp;(t.member-designator) evaluates to an address constant. (If the
12311  specified member is a bit-field, the behavior is undefined.)
12312 <h6> Recommended practice</h6>
12313 <p><!--para 4 -->
12314  The types used for size_t and ptrdiff_t should not have an integer conversion rank
12315  greater than that of signed long int unless the implementation supports objects
12316  large enough to make this necessary.
12317 <p><b> Forward references</b>: localization (<a href="#7.11">7.11</a>).
12318 <!--page 267 -->
12319
12320 <h3><a name="7.18" href="#7.18">7.18 Integer types <stdint.h></a></h3>
12321 <p><!--para 1 -->
12322  The header <a href="#7.18">&lt;stdint.h&gt;</a> declares sets of integer types having specified widths, and
12323  defines corresponding sets of macros.<sup><a href="#note223"><b>223)</b></a></sup> It also defines macros that specify limits of
12324  integer types corresponding to types defined in other standard headers.
12325 <p><!--para 2 -->
12326  Types are defined in the following categories:
12327 <ul>
12328 <li>  integer types having certain exact widths;
12329 <li>  integer types having at least certain specified widths;
12330 <li>  fastest integer types having at least certain specified widths;
12331 <li>  integer types wide enough to hold pointers to objects;
12332 <li>  integer types having greatest width.
12333 </ul>
12334  (Some of these types may denote the same type.)
12335 <p><!--para 3 -->
12336  Corresponding macros specify limits of the declared types and construct suitable
12337  constants.
12338 <p><!--para 4 -->
12339  For each type described herein that the implementation provides,<sup><a href="#note224"><b>224)</b></a></sup> <a href="#7.18">&lt;stdint.h&gt;</a> shall
12340  declare that typedef name and define the associated macros. Conversely, for each type
12341  described herein that the implementation does not provide, <a href="#7.18">&lt;stdint.h&gt;</a> shall not
12342  declare that typedef name nor shall it define the associated macros. An implementation
12343  shall provide those types described as ''required'', but need not provide any of the others
12344  (described as ''optional'').
12345
12346 <h6>footnotes</h6>
12347 <p><small><a name="note223" href="#note223">223)</a> See ''future library directions'' (<a href="#7.26.8">7.26.8</a>).
12348 </small>
12349 <p><small><a name="note224" href="#note224">224)</a> Some of these types may denote implementation-defined extended integer types.
12350 </small>
12351
12352 <h4><a name="7.18.1" href="#7.18.1">7.18.1 Integer types</a></h4>
12353 <p><!--para 1 -->
12354  When typedef names differing only in the absence or presence of the initial u are defined,
12355  they shall denote corresponding signed and unsigned types as described in <a href="#6.2.5">6.2.5</a>; an
12356  implementation providing one of these corresponding types shall also provide the other.
12357 <p><!--para 2 -->
12358  In the following descriptions, the symbol N represents an unsigned decimal integer with
12359  no leading zeros (e.g., 8 or 24, but not 04 or 048).
12360  
12361  
12362  
12363  
12364 <!--page 268 -->
12365
12366 <h5><a name="7.18.1.1" href="#7.18.1.1">7.18.1.1 Exact-width integer types</a></h5>
12367 <p><!--para 1 -->
12368  The typedef name intN_t designates a signed integer type with width N , no padding
12369  bits, and a two's complement representation. Thus, int8_t denotes a signed integer
12370  type with a width of exactly 8 bits.
12371 <p><!--para 2 -->
12372  The typedef name uintN_t designates an unsigned integer type with width N . Thus,
12373  uint24_t denotes an unsigned integer type with a width of exactly 24 bits.
12374 <p><!--para 3 -->
12375  These types are optional. However, if an implementation provides integer types with
12376  widths of 8, 16, 32, or 64 bits, no padding bits, and (for the signed types) that have a
12377  two's complement representation, it shall define the corresponding typedef names.
12378
12379 <h5><a name="7.18.1.2" href="#7.18.1.2">7.18.1.2 Minimum-width integer types</a></h5>
12380 <p><!--para 1 -->
12381  The typedef name int_leastN_t designates a signed integer type with a width of at
12382  least N , such that no signed integer type with lesser size has at least the specified width.
12383  Thus, int_least32_t denotes a signed integer type with a width of at least 32 bits.
12384 <p><!--para 2 -->
12385  The typedef name uint_leastN_t designates an unsigned integer type with a width
12386  of at least N , such that no unsigned integer type with lesser size has at least the specified
12387  width. Thus, uint_least16_t denotes an unsigned integer type with a width of at
12388  least 16 bits.
12389 <p><!--para 3 -->
12390  The following types are required:
12391 <pre>
12392           int_least8_t                                      uint_least8_t
12393           int_least16_t                                     uint_least16_t
12394           int_least32_t                                     uint_least32_t
12395           int_least64_t                                     uint_least64_t</pre>
12396  All other types of this form are optional.
12397
12398 <h5><a name="7.18.1.3" href="#7.18.1.3">7.18.1.3 Fastest minimum-width integer types</a></h5>
12399 <p><!--para 1 -->
12400  Each of the following types designates an integer type that is usually fastest<sup><a href="#note225"><b>225)</b></a></sup> to operate
12401  with among all integer types that have at least the specified width.
12402 <p><!--para 2 -->
12403  The typedef name int_fastN_t designates the fastest signed integer type with a width
12404  of at least N . The typedef name uint_fastN_t designates the fastest unsigned integer
12405  type with a width of at least N .
12406  
12407  
12408  
12409  
12410 <!--page 269 -->
12411 <p><!--para 3 -->
12412  The following types are required:
12413 <pre>
12414         int_fast8_t                                 uint_fast8_t
12415         int_fast16_t                                uint_fast16_t
12416         int_fast32_t                                uint_fast32_t
12417         int_fast64_t                                uint_fast64_t</pre>
12418  All other types of this form are optional.
12419
12420 <h6>footnotes</h6>
12421 <p><small><a name="note225" href="#note225">225)</a> The designated type is not guaranteed to be fastest for all purposes; if the implementation has no clear
12422  grounds for choosing one type over another, it will simply pick some integer type satisfying the
12423  signedness and width requirements.
12424 </small>
12425
12426 <h5><a name="7.18.1.4" href="#7.18.1.4">7.18.1.4 Integer types capable of holding object pointers</a></h5>
12427 <p><!--para 1 -->
12428  The following type designates a signed integer type with the property that any valid
12429  pointer to void can be converted to this type, then converted back to pointer to void,
12430  and the result will compare equal to the original pointer:
12431 <pre>
12432         intptr_t</pre>
12433  The following type designates an unsigned integer type with the property that any valid
12434  pointer to void can be converted to this type, then converted back to pointer to void,
12435  and the result will compare equal to the original pointer:
12436 <pre>
12437         uintptr_t</pre>
12438  These types are optional.
12439
12440 <h5><a name="7.18.1.5" href="#7.18.1.5">7.18.1.5 Greatest-width integer types</a></h5>
12441 <p><!--para 1 -->
12442  The following type designates a signed integer type capable of representing any value of
12443  any signed integer type:
12444 <pre>
12445         intmax_t</pre>
12446  The following type designates an unsigned integer type capable of representing any value
12447  of any unsigned integer type:
12448 <pre>
12449         uintmax_t</pre>
12450  These types are required.
12451
12452 <h4><a name="7.18.2" href="#7.18.2">7.18.2 Limits of specified-width integer types</a></h4>
12453 <p><!--para 1 -->
12454  The following object-like macros<sup><a href="#note226"><b>226)</b></a></sup> specify the minimum and maximum limits of the
12455  types declared in <a href="#7.18">&lt;stdint.h&gt;</a>. Each macro name corresponds to a similar type name in
12456  <a href="#7.18.1">7.18.1</a>.
12457 <p><!--para 2 -->
12458  Each instance of any defined macro shall be replaced by a constant expression suitable
12459  for use in #if preprocessing directives, and this expression shall have the same type as
12460  would an expression that is an object of the corresponding type converted according to
12461  
12462 <!--page 270 -->
12463  the integer promotions. Its implementation-defined value shall be equal to or greater in
12464  magnitude (absolute value) than the corresponding value given below, with the same sign,
12465  except where stated to be exactly the given value.
12466
12467 <h6>footnotes</h6>
12468 <p><small><a name="note226" href="#note226">226)</a> C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined
12469  before <a href="#7.18">&lt;stdint.h&gt;</a> is included.
12470 </small>
12471
12472 <h5><a name="7.18.2.1" href="#7.18.2.1">7.18.2.1 Limits of exact-width integer types</a></h5>
12473 <p><!--para 1 -->
12474 <ul>
12475 <li>  minimum values of exact-width signed integer types
12476   INTN_MIN                                    exactly -(2 N -1 )
12477 <li>  maximum values of exact-width signed integer types
12478   INTN_MAX                                    exactly 2 N -1 - 1
12479 <li>  maximum values of exact-width unsigned integer types
12480   UINTN_MAX                                   exactly 2 N - 1
12481 </ul>
12482
12483 <h5><a name="7.18.2.2" href="#7.18.2.2">7.18.2.2 Limits of minimum-width integer types</a></h5>
12484 <p><!--para 1 -->
12485 <ul>
12486 <li>  minimum values of minimum-width signed integer types
12487   INT_LEASTN_MIN                                      -(2 N -1 - 1)
12488 <li>  maximum values of minimum-width signed integer types
12489   INT_LEASTN_MAX                                      2 N -1 - 1
12490 <li>  maximum values of minimum-width unsigned integer types
12491   UINT_LEASTN_MAX                                     2N - 1
12492 </ul>
12493
12494 <h5><a name="7.18.2.3" href="#7.18.2.3">7.18.2.3 Limits of fastest minimum-width integer types</a></h5>
12495 <p><!--para 1 -->
12496 <ul>
12497 <li>  minimum values of fastest minimum-width signed integer types
12498   INT_FASTN_MIN                                       -(2 N -1 - 1)
12499 <li>  maximum values of fastest minimum-width signed integer types
12500   INT_FASTN_MAX                                       2 N -1 - 1
12501 <li>  maximum values of fastest minimum-width unsigned integer types
12502   UINT_FASTN_MAX                                      2N - 1
12503 </ul>
12504
12505 <h5><a name="7.18.2.4" href="#7.18.2.4">7.18.2.4 Limits of integer types capable of holding object pointers</a></h5>
12506 <p><!--para 1 -->
12507 <ul>
12508 <li>  minimum value of pointer-holding signed integer type
12509 <pre>
12510      INTPTR_MIN                                       -(215 - 1)</pre>
12511 <li>  maximum value of pointer-holding signed integer type
12512 <!--page 271 -->
12513 <pre>
12514      INTPTR_MAX                                       215 - 1</pre>
12515 <li>  maximum value of pointer-holding unsigned integer type
12516    UINTPTR_MAX                                                   216 - 1
12517 </ul>
12518
12519 <h5><a name="7.18.2.5" href="#7.18.2.5">7.18.2.5 Limits of greatest-width integer types</a></h5>
12520 <p><!--para 1 -->
12521 <ul>
12522 <li>  minimum value of greatest-width signed integer type
12523    INTMAX_MIN                                                    -(263 - 1)
12524 <li>  maximum value of greatest-width signed integer type
12525    INTMAX_MAX                                                    263 - 1
12526 <li>  maximum value of greatest-width unsigned integer type
12527    UINTMAX_MAX                                                   264 - 1
12528 </ul>
12529
12530 <h4><a name="7.18.3" href="#7.18.3">7.18.3 Limits of other integer types</a></h4>
12531 <p><!--para 1 -->
12532  The following object-like macros<sup><a href="#note227"><b>227)</b></a></sup> specify the minimum and maximum limits of
12533  integer types corresponding to types defined in other standard headers.
12534 <p><!--para 2 -->
12535  Each instance of these macros shall be replaced by a constant expression suitable for use
12536  in #if preprocessing directives, and this expression shall have the same type as would an
12537  expression that is an object of the corresponding type converted according to the integer
12538  promotions. Its implementation-defined value shall be equal to or greater in magnitude
12539  (absolute value) than the corresponding value given below, with the same sign. An
12540  implementation shall define only the macros corresponding to those typedef names it
12541  actually provides.<sup><a href="#note228"><b>228)</b></a></sup>
12542 <ul>
12543 <li>  limits of ptrdiff_t
12544    PTRDIFF_MIN                                                 -65535
12545    PTRDIFF_MAX                                                 +65535
12546 <li>  limits of sig_atomic_t
12547    SIG_ATOMIC_MIN                                              see below
12548    SIG_ATOMIC_MAX                                              see below
12549 <li>  limit of size_t
12550    SIZE_MAX                                                      65535
12551 <li>  limits of wchar_t
12552  
12553  
12554  
12555 <!--page 272 -->
12556   WCHAR_MIN                                              see below
12557   WCHAR_MAX                                              see below
12558 <li>  limits of wint_t
12559   WINT_MIN                                               see below
12560   WINT_MAX                                               see below
12561 </ul>
12562 <p><!--para 3 -->
12563  If sig_atomic_t (see <a href="#7.14">7.14</a>) is defined as a signed integer type, the value of
12564  SIG_ATOMIC_MIN shall be no greater than -127 and the value of SIG_ATOMIC_MAX
12565  shall be no less than 127; otherwise, sig_atomic_t is defined as an unsigned integer
12566  type, and the value of SIG_ATOMIC_MIN shall be 0 and the value of
12567  SIG_ATOMIC_MAX shall be no less than 255.
12568 <p><!--para 4 -->
12569  If wchar_t (see <a href="#7.17">7.17</a>) is defined as a signed integer type, the value of WCHAR_MIN
12570  shall be no greater than -127 and the value of WCHAR_MAX shall be no less than 127;
12571  otherwise, wchar_t is defined as an unsigned integer type, and the value of
12572  WCHAR_MIN shall be 0 and the value of WCHAR_MAX shall be no less than 255.<sup><a href="#note229"><b>229)</b></a></sup>
12573 <p><!--para 5 -->
12574  If wint_t (see <a href="#7.24">7.24</a>) is defined as a signed integer type, the value of WINT_MIN shall
12575  be no greater than -32767 and the value of WINT_MAX shall be no less than 32767;
12576  otherwise, wint_t is defined as an unsigned integer type, and the value of WINT_MIN
12577  shall be 0 and the value of WINT_MAX shall be no less than 65535.
12578
12579 <h6>footnotes</h6>
12580 <p><small><a name="note227" href="#note227">227)</a> C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined
12581  before <a href="#7.18">&lt;stdint.h&gt;</a> is included.
12582 </small>
12583 <p><small><a name="note228" href="#note228">228)</a> A freestanding implementation need not provide all of these types.
12584 </small>
12585 <p><small><a name="note229" href="#note229">229)</a> The values WCHAR_MIN and WCHAR_MAX do not necessarily correspond to members of the extended
12586  character set.
12587 </small>
12588
12589 <h4><a name="7.18.4" href="#7.18.4">7.18.4 Macros for integer constants</a></h4>
12590 <p><!--para 1 -->
12591  The following function-like macros<sup><a href="#note230"><b>230)</b></a></sup> expand to integer constants suitable for
12592  initializing objects that have integer types corresponding to types defined in
12593  <a href="#7.18">&lt;stdint.h&gt;</a>. Each macro name corresponds to a similar type name in <a href="#7.18.1.2">7.18.1.2</a> or
12594  <a href="#7.18.1.5">7.18.1.5</a>.
12595 <p><!--para 2 -->
12596  The argument in any instance of these macros shall be an unsuffixed integer constant (as
12597  defined in <a href="#6.4.4.1">6.4.4.1</a>) with a value that does not exceed the limits for the corresponding type.
12598 <p><!--para 3 -->
12599  Each invocation of one of these macros shall expand to an integer constant expression
12600  suitable for use in #if preprocessing directives. The type of the expression shall have
12601  the same type as would an expression of the corresponding type converted according to
12602  the integer promotions. The value of the expression shall be that of the argument.
12603  
12604  
12605  
12606  
12607 <!--page 273 -->
12608
12609 <h6>footnotes</h6>
12610 <p><small><a name="note230" href="#note230">230)</a> C++ implementations should define these macros only when __STDC_CONSTANT_MACROS is
12611  defined before <a href="#7.18">&lt;stdint.h&gt;</a> is included.
12612 </small>
12613
12614 <h5><a name="7.18.4.1" href="#7.18.4.1">7.18.4.1 Macros for minimum-width integer constants</a></h5>
12615 <p><!--para 1 -->
12616  The macro INTN_C(value) shall expand to an integer constant expression
12617  corresponding to the type int_leastN_t. The macro UINTN_C(value) shall expand
12618  to an integer constant expression corresponding to the type uint_leastN_t. For
12619  example, if uint_least64_t is a name for the type unsigned long long int,
12620  then UINT64_C(0x123) might expand to the integer constant 0x123ULL.
12621
12622 <h5><a name="7.18.4.2" href="#7.18.4.2">7.18.4.2 Macros for greatest-width integer constants</a></h5>
12623 <p><!--para 1 -->
12624  The following macro expands to an integer constant expression having the value specified
12625  by its argument and the type intmax_t:
12626 <pre>
12627         INTMAX_C(value)</pre>
12628  The following macro expands to an integer constant expression having the value specified
12629  by its argument and the type uintmax_t:
12630 <!--page 274 -->
12631 <pre>
12632         UINTMAX_C(value)</pre>
12633
12634 <h3><a name="7.19" href="#7.19">7.19 Input/output <stdio.h></a></h3>
12635
12636 <h4><a name="7.19.1" href="#7.19.1">7.19.1 Introduction</a></h4>
12637 <p><!--para 1 -->
12638  The header <a href="#7.19">&lt;stdio.h&gt;</a> declares three types, several macros, and many functions for
12639  performing input and output.
12640 <p><!--para 2 -->
12641  The types declared are size_t (described in <a href="#7.17">7.17</a>);
12642 <pre>
12643         FILE</pre>
12644  which is an object type capable of recording all the information needed to control a
12645  stream, including its file position indicator, a pointer to its associated buffer (if any), an
12646  error indicator that records whether a read/write error has occurred, and an end-of-file
12647  indicator that records whether the end of the file has been reached; and
12648 <pre>
12649         fpos_t</pre>
12650  which is an object type other than an array type capable of recording all the information
12651  needed to specify uniquely every position within a file.
12652 <p><!--para 3 -->
12653  The macros are NULL (described in <a href="#7.17">7.17</a>);
12654 <pre>
12655         _IOFBF
12656         _IOLBF
12657         _IONBF</pre>
12658  which expand to integer constant expressions with distinct values, suitable for use as the
12659  third argument to the setvbuf function;
12660 <pre>
12661         BUFSIZ</pre>
12662  which expands to an integer constant expression that is the size of the buffer used by the
12663  setbuf function;
12664 <pre>
12665         EOF</pre>
12666  which expands to an integer constant expression, with type int and a negative value, that
12667  is returned by several functions to indicate end-of-file, that is, no more input from a
12668  stream;
12669 <pre>
12670         FOPEN_MAX</pre>
12671  which expands to an integer constant expression that is the minimum number of files that
12672  the implementation guarantees can be open simultaneously;
12673 <pre>
12674         FILENAME_MAX</pre>
12675  which expands to an integer constant expression that is the size needed for an array of
12676  char large enough to hold the longest file name string that the implementation
12677 <!--page 275 -->
12678  guarantees can be opened;<sup><a href="#note231"><b>231)</b></a></sup>
12679 <pre>
12680          L_tmpnam</pre>
12681  which expands to an integer constant expression that is the size needed for an array of
12682  char large enough to hold a temporary file name string generated by the tmpnam
12683  function;
12684 <pre>
12685          SEEK_CUR
12686          SEEK_END
12687          SEEK_SET</pre>
12688  which expand to integer constant expressions with distinct values, suitable for use as the
12689  third argument to the fseek function;
12690 <pre>
12691          TMP_MAX</pre>
12692  which expands to an integer constant expression that is the maximum number of unique
12693  file names that can be generated by the tmpnam function;
12694 <pre>
12695          stderr
12696          stdin
12697          stdout</pre>
12698  which are expressions of type ''pointer to FILE'' that point to the FILE objects
12699  associated, respectively, with the standard error, input, and output streams.
12700 <p><!--para 4 -->
12701  The header <a href="#7.24">&lt;wchar.h&gt;</a> declares a number of functions useful for wide character input
12702  and output. The wide character input/output functions described in that subclause
12703  provide operations analogous to most of those described here, except that the
12704  fundamental units internal to the program are wide characters. The external
12705  representation (in the file) is a sequence of ''generalized'' multibyte characters, as
12706  described further in <a href="#7.19.3">7.19.3</a>.
12707 <p><!--para 5 -->
12708  The input/output functions are given the following collective terms:
12709 <ul>
12710 <li>  The wide character input functions -- those functions described in <a href="#7.24">7.24</a> that perform
12711  input into wide characters and wide strings: fgetwc, fgetws, getwc, getwchar,
12712  fwscanf, wscanf, vfwscanf, and vwscanf.
12713 <li>  The wide character output functions -- those functions described in <a href="#7.24">7.24</a> that perform
12714  output from wide characters and wide strings: fputwc, fputws, putwc,
12715  putwchar, fwprintf, wprintf, vfwprintf, and vwprintf.
12716  
12717  
12718 <!--page 276 -->
12719 <li>  The wide character input/output functions -- the union of the ungetwc function, the
12720  wide character input functions, and the wide character output functions.
12721 <li>  The byte input/output functions -- those functions described in this subclause that
12722  perform input/output: fgetc, fgets, fprintf, fputc, fputs, fread,
12723  fscanf, fwrite, getc, getchar, gets, printf, putc, putchar, puts,
12724  scanf, ungetc, vfprintf, vfscanf, vprintf, and vscanf.
12725 </ul>
12726 <p><b> Forward references</b>: files (<a href="#7.19.3">7.19.3</a>), the fseek function (<a href="#7.19.9.2">7.19.9.2</a>), streams (<a href="#7.19.2">7.19.2</a>), the
12727  tmpnam function (<a href="#7.19.4.4">7.19.4.4</a>), <a href="#7.24">&lt;wchar.h&gt;</a> (<a href="#7.24">7.24</a>).
12728
12729 <h6>footnotes</h6>
12730 <p><small><a name="note231" href="#note231">231)</a> If the implementation imposes no practical limit on the length of file name strings, the value of
12731  FILENAME_MAX should instead be the recommended size of an array intended to hold a file name
12732  string. Of course, file name string contents are subject to other system-specific constraints; therefore
12733  all possible strings of length FILENAME_MAX cannot be expected to be opened successfully.
12734 </small>
12735
12736 <h4><a name="7.19.2" href="#7.19.2">7.19.2 Streams</a></h4>
12737 <p><!--para 1 -->
12738  Input and output, whether to or from physical devices such as terminals and tape drives,
12739  or whether to or from files supported on structured storage devices, are mapped into
12740  logical data streams, whose properties are more uniform than their various inputs and
12741  outputs. Two forms of mapping are supported, for text streams and for binary
12742  streams.<sup><a href="#note232"><b>232)</b></a></sup>
12743 <p><!--para 2 -->
12744  A text stream is an ordered sequence of characters composed into lines, each line
12745  consisting of zero or more characters plus a terminating new-line character. Whether the
12746  last line requires a terminating new-line character is implementation-defined. Characters
12747  may have to be added, altered, or deleted on input and output to conform to differing
12748  conventions for representing text in the host environment. Thus, there need not be a one-
12749  to-one correspondence between the characters in a stream and those in the external
12750  representation. Data read in from a text stream will necessarily compare equal to the data
12751  that were earlier written out to that stream only if: the data consist only of printing
12752  characters and the control characters horizontal tab and new-line; no new-line character is
12753  immediately preceded by space characters; and the last character is a new-line character.
12754  Whether space characters that are written out immediately before a new-line character
12755  appear when read in is implementation-defined.
12756 <p><!--para 3 -->
12757  A binary stream is an ordered sequence of characters that can transparently record
12758  internal data. Data read in from a binary stream shall compare equal to the data that were
12759  earlier written out to that stream, under the same implementation. Such a stream may,
12760  however, have an implementation-defined number of null characters appended to the end
12761  of the stream.
12762 <p><!--para 4 -->
12763  Each stream has an orientation. After a stream is associated with an external file, but
12764  before any operations are performed on it, the stream is without orientation. Once a wide
12765  character input/output function has been applied to a stream without orientation, the
12766  
12767  
12768 <!--page 277 -->
12769  stream becomes a wide-oriented stream. Similarly, once a byte input/output function has
12770  been applied to a stream without orientation, the stream becomes a byte-oriented stream.
12771  Only a call to the freopen function or the fwide function can otherwise alter the
12772  orientation of a stream. (A successful call to freopen removes any orientation.)<sup><a href="#note233"><b>233)</b></a></sup>
12773 <p><!--para 5 -->
12774  Byte input/output functions shall not be applied to a wide-oriented stream and wide
12775  character input/output functions shall not be applied to a byte-oriented stream. The
12776  remaining stream operations do not affect, and are not affected by, a stream's orientation,
12777  except for the following additional restrictions:
12778 <ul>
12779 <li>  Binary wide-oriented streams have the file-positioning restrictions ascribed to both
12780  text and binary streams.
12781 <li>  For wide-oriented streams, after a successful call to a file-positioning function that
12782  leaves the file position indicator prior to the end-of-file, a wide character output
12783  function can overwrite a partial multibyte character; any file contents beyond the
12784  byte(s) written are henceforth indeterminate.
12785 </ul>
12786 <p><!--para 6 -->
12787  Each wide-oriented stream has an associated mbstate_t object that stores the current
12788  parse state of the stream. A successful call to fgetpos stores a representation of the
12789  value of this mbstate_t object as part of the value of the fpos_t object. A later
12790  successful call to fsetpos using the same stored fpos_t value restores the value of
12791  the associated mbstate_t object as well as the position within the controlled stream.
12792  Environmental limits
12793 <p><!--para 7 -->
12794  An implementation shall support text files with lines containing at least 254 characters,
12795  including the terminating new-line character. The value of the macro BUFSIZ shall be at
12796  least 256.
12797 <p><b> Forward references</b>: the freopen function (<a href="#7.19.5.4">7.19.5.4</a>), the fwide function (<a href="#7.24.3.5">7.24.3.5</a>),
12798  mbstate_t (<a href="#7.25.1">7.25.1</a>), the fgetpos function (<a href="#7.19.9.1">7.19.9.1</a>), the fsetpos function
12799  (<a href="#7.19.9.3">7.19.9.3</a>).
12800  
12801  
12802  
12803  
12804 <!--page 278 -->
12805
12806 <h6>footnotes</h6>
12807 <p><small><a name="note232" href="#note232">232)</a> An implementation need not distinguish between text streams and binary streams. In such an
12808  implementation, there need be no new-line characters in a text stream nor any limit to the length of a
12809  line.
12810 </small>
12811 <p><small><a name="note233" href="#note233">233)</a> The three predefined streams stdin, stdout, and stderr are unoriented at program startup.
12812 </small>
12813
12814 <h4><a name="7.19.3" href="#7.19.3">7.19.3 Files</a></h4>
12815 <p><!--para 1 -->
12816  A stream is associated with an external file (which may be a physical device) by opening
12817  a file, which may involve creating a new file. Creating an existing file causes its former
12818  contents to be discarded, if necessary. If a file can support positioning requests (such as a
12819  disk file, as opposed to a terminal), then a file position indicator associated with the
12820  stream is positioned at the start (character number zero) of the file, unless the file is
12821  opened with append mode in which case it is implementation-defined whether the file
12822  position indicator is initially positioned at the beginning or the end of the file. The file
12823  position indicator is maintained by subsequent reads, writes, and positioning requests, to
12824  facilitate an orderly progression through the file.
12825 <p><!--para 2 -->
12826  Binary files are not truncated, except as defined in <a href="#7.19.5.3">7.19.5.3</a>. Whether a write on a text
12827  stream causes the associated file to be truncated beyond that point is implementation-
12828  defined.
12829 <p><!--para 3 -->
12830  When a stream is unbuffered, characters are intended to appear from the source or at the
12831  destination as soon as possible. Otherwise characters may be accumulated and
12832  transmitted to or from the host environment as a block. When a stream is fully buffered,
12833  characters are intended to be transmitted to or from the host environment as a block when
12834  a buffer is filled. When a stream is line buffered, characters are intended to be
12835  transmitted to or from the host environment as a block when a new-line character is
12836  encountered. Furthermore, characters are intended to be transmitted as a block to the host
12837  environment when a buffer is filled, when input is requested on an unbuffered stream, or
12838  when input is requested on a line buffered stream that requires the transmission of
12839  characters from the host environment. Support for these characteristics is
12840  implementation-defined, and may be affected via the setbuf and setvbuf functions.
12841 <p><!--para 4 -->
12842  A file may be disassociated from a controlling stream by closing the file. Output streams
12843  are flushed (any unwritten buffer contents are transmitted to the host environment) before
12844  the stream is disassociated from the file. The value of a pointer to a FILE object is
12845  indeterminate after the associated file is closed (including the standard text streams).
12846  Whether a file of zero length (on which no characters have been written by an output
12847  stream) actually exists is implementation-defined.
12848 <p><!--para 5 -->
12849  The file may be subsequently reopened, by the same or another program execution, and
12850  its contents reclaimed or modified (if it can be repositioned at its start). If the main
12851  function returns to its original caller, or if the exit function is called, all open files are
12852  closed (hence all output streams are flushed) before program termination. Other paths to
12853  program termination, such as calling the abort function, need not close all files
12854  properly.
12855 <p><!--para 6 -->
12856  The address of the FILE object used to control a stream may be significant; a copy of a
12857  FILE object need not serve in place of the original.
12858 <!--page 279 -->
12859 <p><!--para 7 -->
12860  At program startup, three text streams are predefined and need not be opened explicitly
12861 <ul>
12862 <li>  standard input (for reading conventional input), standard output (for writing
12863 </ul>
12864  conventional output), and standard error (for writing diagnostic output). As initially
12865  opened, the standard error stream is not fully buffered; the standard input and standard
12866  output streams are fully buffered if and only if the stream can be determined not to refer
12867  to an interactive device.
12868 <p><!--para 8 -->
12869  Functions that open additional (nontemporary) files require a file name, which is a string.
12870  The rules for composing valid file names are implementation-defined. Whether the same
12871  file can be simultaneously open multiple times is also implementation-defined.
12872 <p><!--para 9 -->
12873  Although both text and binary wide-oriented streams are conceptually sequences of wide
12874  characters, the external file associated with a wide-oriented stream is a sequence of
12875  multibyte characters, generalized as follows:
12876 <ul>
12877 <li>  Multibyte encodings within files may contain embedded null bytes (unlike multibyte
12878  encodings valid for use internal to the program).
12879 <li>  A file need not begin nor end in the initial shift state.<sup><a href="#note234"><b>234)</b></a></sup>
12880 </ul>
12881 <p><!--para 10 -->
12882  Moreover, the encodings used for multibyte characters may differ among files. Both the
12883  nature and choice of such encodings are implementation-defined.
12884 <p><!--para 11 -->
12885  The wide character input functions read multibyte characters from the stream and convert
12886  them to wide characters as if they were read by successive calls to the fgetwc function.
12887  Each conversion occurs as if by a call to the mbrtowc function, with the conversion state
12888  described by the stream's own mbstate_t object. The byte input functions read
12889  characters from the stream as if by successive calls to the fgetc function.
12890 <p><!--para 12 -->
12891  The wide character output functions convert wide characters to multibyte characters and
12892  write them to the stream as if they were written by successive calls to the fputwc
12893  function. Each conversion occurs as if by a call to the wcrtomb function, with the
12894  conversion state described by the stream's own mbstate_t object. The byte output
12895  functions write characters to the stream as if by successive calls to the fputc function.
12896 <p><!--para 13 -->
12897  In some cases, some of the byte input/output functions also perform conversions between
12898  multibyte characters and wide characters. These conversions also occur as if by calls to
12899  the mbrtowc and wcrtomb functions.
12900 <p><!--para 14 -->
12901  An encoding error occurs if the character sequence presented to the underlying
12902  mbrtowc function does not form a valid (generalized) multibyte character, or if the code
12903  value passed to the underlying wcrtomb does not correspond to a valid (generalized)
12904  
12905  
12906 <!--page 280 -->
12907  multibyte character. The wide character input/output functions and the byte input/output
12908  functions store the value of the macro EILSEQ in errno if and only if an encoding error
12909  occurs.
12910  Environmental limits
12911 <p><!--para 15 -->
12912  The value of FOPEN_MAX shall be at least eight, including the three standard text
12913  streams.
12914 <p><b> Forward references</b>: the exit function (<a href="#7.20.4.3">7.20.4.3</a>), the fgetc function (<a href="#7.19.7.1">7.19.7.1</a>), the
12915  fopen function (<a href="#7.19.5.3">7.19.5.3</a>), the fputc function (<a href="#7.19.7.3">7.19.7.3</a>), the setbuf function
12916  (<a href="#7.19.5.5">7.19.5.5</a>), the setvbuf function (<a href="#7.19.5.6">7.19.5.6</a>), the fgetwc function (<a href="#7.24.3.1">7.24.3.1</a>), the
12917  fputwc function (<a href="#7.24.3.3">7.24.3.3</a>), conversion state (<a href="#7.24.6">7.24.6</a>), the mbrtowc function
12918  (<a href="#7.24.6.3.2">7.24.6.3.2</a>), the wcrtomb function (<a href="#7.24.6.3.3">7.24.6.3.3</a>).
12919
12920 <h6>footnotes</h6>
12921 <p><small><a name="note234" href="#note234">234)</a> Setting the file position indicator to end-of-file, as with fseek(file, 0, SEEK_END), has
12922  undefined behavior for a binary stream (because of possible trailing null characters) or for any stream
12923  with state-dependent encoding that does not assuredly end in the initial shift state.
12924 </small>
12925
12926 <h4><a name="7.19.4" href="#7.19.4">7.19.4 Operations on files</a></h4>
12927
12928 <h5><a name="7.19.4.1" href="#7.19.4.1">7.19.4.1 The remove function</a></h5>
12929 <h6>Synopsis</h6>
12930 <p><!--para 1 -->
12931 <pre>
12932         #include <a href="#7.19">&lt;stdio.h&gt;</a>
12933         int remove(const char *filename);</pre>
12934 <h6>Description</h6>
12935 <p><!--para 2 -->
12936  The remove function causes the file whose name is the string pointed to by filename
12937  to be no longer accessible by that name. A subsequent attempt to open that file using that
12938  name will fail, unless it is created anew. If the file is open, the behavior of the remove
12939  function is implementation-defined.
12940 <h6>Returns</h6>
12941 <p><!--para 3 -->
12942  The remove function returns zero if the operation succeeds, nonzero if it fails.
12943
12944 <h5><a name="7.19.4.2" href="#7.19.4.2">7.19.4.2 The rename function</a></h5>
12945 <h6>Synopsis</h6>
12946 <p><!--para 1 -->
12947 <pre>
12948         #include <a href="#7.19">&lt;stdio.h&gt;</a>
12949         int rename(const char *old, const char *new);</pre>
12950 <h6>Description</h6>
12951 <p><!--para 2 -->
12952  The rename function causes the file whose name is the string pointed to by old to be
12953  henceforth known by the name given by the string pointed to by new. The file named
12954  old is no longer accessible by that name. If a file named by the string pointed to by new
12955  exists prior to the call to the rename function, the behavior is implementation-defined.
12956 <!--page 281 -->
12957 <h6>Returns</h6>
12958 <p><!--para 3 -->
12959  The rename function returns zero if the operation succeeds, nonzero if it fails,<sup><a href="#note235"><b>235)</b></a></sup> in
12960  which case if the file existed previously it is still known by its original name.
12961
12962 <h6>footnotes</h6>
12963 <p><small><a name="note235" href="#note235">235)</a> Among the reasons the implementation may cause the rename function to fail are that the file is open
12964  or that it is necessary to copy its contents to effectuate its renaming.
12965 </small>
12966
12967 <h5><a name="7.19.4.3" href="#7.19.4.3">7.19.4.3 The tmpfile function</a></h5>
12968 <h6>Synopsis</h6>
12969 <p><!--para 1 -->
12970 <pre>
12971          #include <a href="#7.19">&lt;stdio.h&gt;</a>
12972          FILE *tmpfile(void);</pre>
12973 <h6>Description</h6>
12974 <p><!--para 2 -->
12975  The tmpfile function creates a temporary binary file that is different from any other
12976  existing file and that will automatically be removed when it is closed or at program
12977  termination. If the program terminates abnormally, whether an open temporary file is
12978  removed is implementation-defined. The file is opened for update with "wb+" mode.
12979 <h6> Recommended practice</h6>
12980 <p><!--para 3 -->
12981  It should be possible to open at least TMP_MAX temporary files during the lifetime of the
12982  program (this limit may be shared with tmpnam) and there should be no limit on the
12983  number simultaneously open other than this limit and any limit on the number of open
12984  files (FOPEN_MAX).
12985 <h6>Returns</h6>
12986 <p><!--para 4 -->
12987  The tmpfile function returns a pointer to the stream of the file that it created. If the file
12988  cannot be created, the tmpfile function returns a null pointer.
12989 <p><b> Forward references</b>: the fopen function (<a href="#7.19.5.3">7.19.5.3</a>).
12990
12991 <h5><a name="7.19.4.4" href="#7.19.4.4">7.19.4.4 The tmpnam function</a></h5>
12992 <h6>Synopsis</h6>
12993 <p><!--para 1 -->
12994 <pre>
12995          #include <a href="#7.19">&lt;stdio.h&gt;</a>
12996          char *tmpnam(char *s);</pre>
12997 <h6>Description</h6>
12998 <p><!--para 2 -->
12999  The tmpnam function generates a string that is a valid file name and that is not the same
13000  as the name of an existing file.<sup><a href="#note236"><b>236)</b></a></sup> The function is potentially capable of generating
13001  
13002  
13003 <!--page 282 -->
13004  TMP_MAX different strings, but any or all of them may already be in use by existing files
13005  and thus not be suitable return values.
13006 <p><!--para 3 -->
13007  The tmpnam function generates a different string each time it is called.
13008 <p><!--para 4 -->
13009  The implementation shall behave as if no library function calls the tmpnam function.
13010 <h6>Returns</h6>
13011 <p><!--para 5 -->
13012  If no suitable string can be generated, the tmpnam function returns a null pointer.
13013  Otherwise, if the argument is a null pointer, the tmpnam function leaves its result in an
13014  internal static object and returns a pointer to that object (subsequent calls to the tmpnam
13015  function may modify the same object). If the argument is not a null pointer, it is assumed
13016  to point to an array of at least L_tmpnam chars; the tmpnam function writes its result
13017  in that array and returns the argument as its value.
13018  Environmental limits
13019 <p><!--para 6 -->
13020  The value of the macro TMP_MAX shall be at least 25.
13021
13022 <h6>footnotes</h6>
13023 <p><small><a name="note236" href="#note236">236)</a> Files created using strings generated by the tmpnam function are temporary only in the sense that
13024  their names should not collide with those generated by conventional naming rules for the
13025  implementation. It is still necessary to use the remove function to remove such files when their use
13026  is ended, and before program termination.
13027 </small>
13028
13029 <h4><a name="7.19.5" href="#7.19.5">7.19.5 File access functions</a></h4>
13030
13031 <h5><a name="7.19.5.1" href="#7.19.5.1">7.19.5.1 The fclose function</a></h5>
13032 <h6>Synopsis</h6>
13033 <p><!--para 1 -->
13034 <pre>
13035         #include <a href="#7.19">&lt;stdio.h&gt;</a>
13036         int fclose(FILE *stream);</pre>
13037 <h6>Description</h6>
13038 <p><!--para 2 -->
13039  A successful call to the fclose function causes the stream pointed to by stream to be
13040  flushed and the associated file to be closed. Any unwritten buffered data for the stream
13041  are delivered to the host environment to be written to the file; any unread buffered data
13042  are discarded. Whether or not the call succeeds, the stream is disassociated from the file
13043  and any buffer set by the setbuf or setvbuf function is disassociated from the stream
13044  (and deallocated if it was automatically allocated).
13045 <h6>Returns</h6>
13046 <p><!--para 3 -->
13047  The fclose function returns zero if the stream was successfully closed, or EOF if any
13048  errors were detected.
13049
13050 <h5><a name="7.19.5.2" href="#7.19.5.2">7.19.5.2 The fflush function</a></h5>
13051 <h6>Synopsis</h6>
13052 <p><!--para 1 -->
13053 <!--page 283 -->
13054 <pre>
13055         #include <a href="#7.19">&lt;stdio.h&gt;</a>
13056         int fflush(FILE *stream);</pre>
13057 <h6>Description</h6>
13058 <p><!--para 2 -->
13059  If stream points to an output stream or an update stream in which the most recent
13060  operation was not input, the fflush function causes any unwritten data for that stream
13061  to be delivered to the host environment to be written to the file; otherwise, the behavior is
13062  undefined.
13063 <p><!--para 3 -->
13064  If stream is a null pointer, the fflush function performs this flushing action on all
13065  streams for which the behavior is defined above.
13066 <h6>Returns</h6>
13067 <p><!--para 4 -->
13068  The fflush function sets the error indicator for the stream and returns EOF if a write
13069  error occurs, otherwise it returns zero.
13070 <p><b> Forward references</b>: the fopen function (<a href="#7.19.5.3">7.19.5.3</a>).
13071
13072 <h5><a name="7.19.5.3" href="#7.19.5.3">7.19.5.3 The fopen function</a></h5>
13073 <h6>Synopsis</h6>
13074 <p><!--para 1 -->
13075 <pre>
13076          #include <a href="#7.19">&lt;stdio.h&gt;</a>
13077          FILE *fopen(const char * restrict filename,
13078               const char * restrict mode);</pre>
13079 <h6>Description</h6>
13080 <p><!--para 2 -->
13081  The fopen function opens the file whose name is the string pointed to by filename,
13082  and associates a stream with it.
13083 <p><!--para 3 -->
13084  The argument mode points to a string. If the string is one of the following, the file is
13085  open in the indicated mode. Otherwise, the behavior is undefined.<sup><a href="#note237"><b>237)</b></a></sup>
13086  r                open text file for reading
13087  w                truncate to zero length or create text file for writing
13088  a                append; open or create text file for writing at end-of-file
13089  rb               open binary file for reading
13090  wb               truncate to zero length or create binary file for writing
13091  ab               append; open or create binary file for writing at end-of-file
13092  r+               open text file for update (reading and writing)
13093  w+               truncate to zero length or create text file for update
13094  a+               append; open or create text file for update, writing at end-of-file
13095  
13096  
13097  
13098  
13099 <!--page 284 -->
13100  r+b or rb+ open binary file for update (reading and writing)
13101  w+b or wb+ truncate to zero length or create binary file for update
13102  a+b or ab+ append; open or create binary file for update, writing at end-of-file
13103 <p><!--para 4 -->
13104  Opening a file with read mode ('r' as the first character in the mode argument) fails if
13105  the file does not exist or cannot be read.
13106 <p><!--para 5 -->
13107  Opening a file with append mode ('a' as the first character in the mode argument)
13108  causes all subsequent writes to the file to be forced to the then current end-of-file,
13109  regardless of intervening calls to the fseek function. In some implementations, opening
13110  a binary file with append mode ('b' as the second or third character in the above list of
13111  mode argument values) may initially position the file position indicator for the stream
13112  beyond the last data written, because of null character padding.
13113 <p><!--para 6 -->
13114  When a file is opened with update mode ('+' as the second or third character in the
13115  above list of mode argument values), both input and output may be performed on the
13116  associated stream. However, output shall not be directly followed by input without an
13117  intervening call to the fflush function or to a file positioning function (fseek,
13118  fsetpos, or rewind), and input shall not be directly followed by output without an
13119  intervening call to a file positioning function, unless the input operation encounters end-
13120  of-file. Opening (or creating) a text file with update mode may instead open (or create) a
13121  binary stream in some implementations.
13122 <p><!--para 7 -->
13123  When opened, a stream is fully buffered if and only if it can be determined not to refer to
13124  an interactive device. The error and end-of-file indicators for the stream are cleared.
13125 <h6>Returns</h6>
13126 <p><!--para 8 -->
13127  The fopen function returns a pointer to the object controlling the stream. If the open
13128  operation fails, fopen returns a null pointer.
13129 <p><b> Forward references</b>: file positioning functions (<a href="#7.19.9">7.19.9</a>).
13130
13131 <h6>footnotes</h6>
13132 <p><small><a name="note237" href="#note237">237)</a> If the string begins with one of the above sequences, the implementation might choose to ignore the
13133  remaining characters, or it might use them to select different kinds of a file (some of which might not
13134  conform to the properties in <a href="#7.19.2">7.19.2</a>).
13135 </small>
13136
13137 <h5><a name="7.19.5.4" href="#7.19.5.4">7.19.5.4 The freopen function</a></h5>
13138 <h6>Synopsis</h6>
13139 <p><!--para 1 -->
13140 <pre>
13141         #include <a href="#7.19">&lt;stdio.h&gt;</a>
13142         FILE *freopen(const char * restrict filename,
13143              const char * restrict mode,
13144              FILE * restrict stream);</pre>
13145 <h6>Description</h6>
13146 <p><!--para 2 -->
13147  The freopen function opens the file whose name is the string pointed to by filename
13148  and associates the stream pointed to by stream with it. The mode argument is used just
13149 <!--page 285 -->
13150  as in the fopen function.<sup><a href="#note238"><b>238)</b></a></sup>
13151 <p><!--para 3 -->
13152  If filename is a null pointer, the freopen function attempts to change the mode of
13153  the stream to that specified by mode, as if the name of the file currently associated with
13154  the stream had been used. It is implementation-defined which changes of mode are
13155  permitted (if any), and under what circumstances.
13156 <p><!--para 4 -->
13157  The freopen function first attempts to close any file that is associated with the specified
13158  stream. Failure to close the file is ignored. The error and end-of-file indicators for the
13159  stream are cleared.
13160 <h6>Returns</h6>
13161 <p><!--para 5 -->
13162  The freopen function returns a null pointer if the open operation fails. Otherwise,
13163  freopen returns the value of stream.
13164
13165 <h6>footnotes</h6>
13166 <p><small><a name="note238" href="#note238">238)</a> The primary use of the freopen function is to change the file associated with a standard text stream
13167  (stderr, stdin, or stdout), as those identifiers need not be modifiable lvalues to which the value
13168  returned by the fopen function may be assigned.
13169 </small>
13170
13171 <h5><a name="7.19.5.5" href="#7.19.5.5">7.19.5.5 The setbuf function</a></h5>
13172 <h6>Synopsis</h6>
13173 <p><!--para 1 -->
13174 <pre>
13175          #include <a href="#7.19">&lt;stdio.h&gt;</a>
13176          void setbuf(FILE * restrict stream,
13177               char * restrict buf);</pre>
13178 <h6>Description</h6>
13179 <p><!--para 2 -->
13180  Except that it returns no value, the setbuf function is equivalent to the setvbuf
13181  function invoked with the values _IOFBF for mode and BUFSIZ for size, or (if buf
13182  is a null pointer), with the value _IONBF for mode.
13183 <h6>Returns</h6>
13184 <p><!--para 3 -->
13185  The setbuf function returns no value.
13186 <p><b> Forward references</b>: the setvbuf function (<a href="#7.19.5.6">7.19.5.6</a>).
13187
13188 <h5><a name="7.19.5.6" href="#7.19.5.6">7.19.5.6 The setvbuf function</a></h5>
13189 <h6>Synopsis</h6>
13190 <p><!--para 1 -->
13191 <pre>
13192          #include <a href="#7.19">&lt;stdio.h&gt;</a>
13193          int setvbuf(FILE * restrict stream,
13194               char * restrict buf,
13195               int mode, size_t size);</pre>
13196  
13197  
13198  
13199  
13200 <!--page 286 -->
13201 <h6>Description</h6>
13202 <p><!--para 2 -->
13203  The setvbuf function may be used only after the stream pointed to by stream has
13204  been associated with an open file and before any other operation (other than an
13205  unsuccessful call to setvbuf) is performed on the stream. The argument mode
13206  determines how stream will be buffered, as follows: _IOFBF causes input/output to be
13207  fully buffered; _IOLBF causes input/output to be line buffered; _IONBF causes
13208  input/output to be unbuffered. If buf is not a null pointer, the array it points to may be
13209  used instead of a buffer allocated by the setvbuf function<sup><a href="#note239"><b>239)</b></a></sup> and the argument size
13210  specifies the size of the array; otherwise, size may determine the size of a buffer
13211  allocated by the setvbuf function. The contents of the array at any time are
13212  indeterminate.
13213 <h6>Returns</h6>
13214 <p><!--para 3 -->
13215  The setvbuf function returns zero on success, or nonzero if an invalid value is given
13216  for mode or if the request cannot be honored.
13217
13218 <h6>footnotes</h6>
13219 <p><small><a name="note239" href="#note239">239)</a> The buffer has to have a lifetime at least as great as the open stream, so the stream should be closed
13220  before a buffer that has automatic storage duration is deallocated upon block exit.
13221 </small>
13222
13223 <h4><a name="7.19.6" href="#7.19.6">7.19.6 Formatted input/output functions</a></h4>
13224 <p><!--para 1 -->
13225  The formatted input/output functions shall behave as if there is a sequence point after the
13226  actions associated with each specifier.<sup><a href="#note240"><b>240)</b></a></sup>
13227
13228 <h6>footnotes</h6>
13229 <p><small><a name="note240" href="#note240">240)</a> The fprintf functions perform writes to memory for the %n specifier.
13230 </small>
13231
13232 <h5><a name="7.19.6.1" href="#7.19.6.1">7.19.6.1 The fprintf function</a></h5>
13233 <h6>Synopsis</h6>
13234 <p><!--para 1 -->
13235 <pre>
13236          #include <a href="#7.19">&lt;stdio.h&gt;</a>
13237          int fprintf(FILE * restrict stream,
13238               const char * restrict format, ...);</pre>
13239 <h6>Description</h6>
13240 <p><!--para 2 -->
13241  The fprintf function writes output to the stream pointed to by stream, under control
13242  of the string pointed to by format that specifies how subsequent arguments are
13243  converted for output. If there are insufficient arguments for the format, the behavior is
13244  undefined. If the format is exhausted while arguments remain, the excess arguments are
13245  evaluated (as always) but are otherwise ignored. The fprintf function returns when
13246  the end of the format string is encountered.
13247 <p><!--para 3 -->
13248  The format shall be a multibyte character sequence, beginning and ending in its initial
13249  shift state. The format is composed of zero or more directives: ordinary multibyte
13250  characters (not %), which are copied unchanged to the output stream; and conversion
13251  
13252  
13253 <!--page 287 -->
13254  specifications, each of which results in fetching zero or more subsequent arguments,
13255  converting them, if applicable, according to the corresponding conversion specifier, and
13256  then writing the result to the output stream.
13257 <p><!--para 4 -->
13258  Each conversion specification is introduced by the character %. After the %, the following
13259  appear in sequence:
13260 <ul>
13261 <li>  Zero or more flags (in any order) that modify the meaning of the conversion
13262  specification.
13263 <li>  An optional minimum field width. If the converted value has fewer characters than the
13264  field width, it is padded with spaces (by default) on the left (or right, if the left
13265  adjustment flag, described later, has been given) to the field width. The field width
13266  takes the form of an asterisk * (described later) or a nonnegative decimal integer.<sup><a href="#note241"><b>241)</b></a></sup>
13267 <li>  An optional precision that gives the minimum number of digits to appear for the d, i,
13268  o, u, x, and X conversions, the number of digits to appear after the decimal-point
13269  character for a, A, e, E, f, and F conversions, the maximum number of significant
13270  digits for the g and G conversions, or the maximum number of bytes to be written for
13271  s conversions. The precision takes the form of a period (.) followed either by an
13272  asterisk * (described later) or by an optional decimal integer; if only the period is
13273  specified, the precision is taken as zero. If a precision appears with any other
13274  conversion specifier, the behavior is undefined.
13275 <li>  An optional length modifier that specifies the size of the argument.
13276 <li>  A conversion specifier character that specifies the type of conversion to be applied.
13277 </ul>
13278 <p><!--para 5 -->
13279  As noted above, a field width, or precision, or both, may be indicated by an asterisk. In
13280  this case, an int argument supplies the field width or precision. The arguments
13281  specifying field width, or precision, or both, shall appear (in that order) before the
13282  argument (if any) to be converted. A negative field width argument is taken as a - flag
13283  followed by a positive field width. A negative precision argument is taken as if the
13284  precision were omitted.
13285 <p><!--para 6 -->
13286  The flag characters and their meanings are:
13287  -        The result of the conversion is left-justified within the field. (It is right-justified if
13288 <pre>
13289           this flag is not specified.)</pre>
13290  +        The result of a signed conversion always begins with a plus or minus sign. (It
13291 <pre>
13292           begins with a sign only when a negative value is converted if this flag is not</pre>
13293  
13294  
13295  
13296  
13297 <!--page 288 -->
13298 <pre>
13299            specified.)<sup><a href="#note242"><b>242)</b></a></sup></pre>
13300  space If the first character of a signed conversion is not a sign, or if a signed conversion
13301 <pre>
13302        results in no characters, a space is prefixed to the result. If the space and + flags
13303        both appear, the space flag is ignored.</pre>
13304  #         The result is converted to an ''alternative form''. For o conversion, it increases
13305 <pre>
13306            the precision, if and only if necessary, to force the first digit of the result to be a
13307            zero (if the value and precision are both 0, a single 0 is printed). For x (or X)
13308            conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g,
13309            and G conversions, the result of converting a floating-point number always
13310            contains a decimal-point character, even if no digits follow it. (Normally, a
13311            decimal-point character appears in the result of these conversions only if a digit
13312            follows it.) For g and G conversions, trailing zeros are not removed from the
13313            result. For other conversions, the behavior is undefined.</pre>
13314  0         For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros
13315 <p><!--para 7 -->
13316 <pre>
13317            (following any indication of sign or base) are used to pad to the field width rather
13318            than performing space padding, except when converting an infinity or NaN. If the
13319            0 and - flags both appear, the 0 flag is ignored. For d, i, o, u, x, and X
13320            conversions, if a precision is specified, the 0 flag is ignored. For other
13321            conversions, the behavior is undefined.</pre>
13322  The length modifiers and their meanings are:
13323  hh             Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
13324 <pre>
13325                 signed char or unsigned char argument (the argument will have
13326                 been promoted according to the integer promotions, but its value shall be
13327                 converted to signed char or unsigned char before printing); or that
13328                 a following n conversion specifier applies to a pointer to a signed char
13329                 argument.</pre>
13330  h              Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
13331 <pre>
13332                 short int or unsigned short int argument (the argument will
13333                 have been promoted according to the integer promotions, but its value shall
13334                 be converted to short int or unsigned short int before printing);
13335                 or that a following n conversion specifier applies to a pointer to a short
13336                 int argument.</pre>
13337  l (ell)        Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
13338 <pre>
13339                 long int or unsigned long int argument; that a following n
13340                 conversion specifier applies to a pointer to a long int argument; that a</pre>
13341  
13342 <!--page 289 -->
13343 <pre>
13344               following c conversion specifier applies to a wint_t argument; that a
13345               following s conversion specifier applies to a pointer to a wchar_t
13346               argument; or has no effect on a following a, A, e, E, f, F, g, or G conversion
13347               specifier.</pre>
13348  ll (ell-ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
13349 <pre>
13350               long long int or unsigned long long int argument; or that a
13351               following n conversion specifier applies to a pointer to a long long int
13352               argument.</pre>
13353  j            Specifies that a following d, i, o, u, x, or X conversion specifier applies to
13354 <pre>
13355               an intmax_t or uintmax_t argument; or that a following n conversion
13356               specifier applies to a pointer to an intmax_t argument.</pre>
13357  z            Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
13358 <pre>
13359               size_t or the corresponding signed integer type argument; or that a
13360               following n conversion specifier applies to a pointer to a signed integer type
13361               corresponding to size_t argument.</pre>
13362  t            Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
13363 <pre>
13364               ptrdiff_t or the corresponding unsigned integer type argument; or that a
13365               following n conversion specifier applies to a pointer to a ptrdiff_t
13366               argument.</pre>
13367  L            Specifies that a following a, A, e, E, f, F, g, or G conversion specifier
13368 <pre>
13369               applies to a long double argument.</pre>
13370  If a length modifier appears with any conversion specifier other than as specified above,
13371  the behavior is undefined.
13372 <p><!--para 8 -->
13373  The conversion specifiers and their meanings are:
13374  d,i         The int argument is converted to signed decimal in the style [-]dddd. The
13375 <pre>
13376              precision specifies the minimum number of digits to appear; if the value
13377              being converted can be represented in fewer digits, it is expanded with
13378              leading zeros. The default precision is 1. The result of converting a zero
13379              value with a precision of zero is no characters.</pre>
13380  o,u,x,X The unsigned int argument is converted to unsigned octal (o), unsigned
13381 <!--page 290 -->
13382 <pre>
13383          decimal (u), or unsigned hexadecimal notation (x or X) in the style dddd; the
13384          letters abcdef are used for x conversion and the letters ABCDEF for X
13385          conversion. The precision specifies the minimum number of digits to appear;
13386          if the value being converted can be represented in fewer digits, it is expanded
13387          with leading zeros. The default precision is 1. The result of converting a
13388          zero value with a precision of zero is no characters.</pre>
13389  f,F          A double argument representing a floating-point number is converted to
13390 <pre>
13391               decimal notation in the style [-]ddd.ddd, where the number of digits after
13392               the decimal-point character is equal to the precision specification. If the
13393               precision is missing, it is taken as 6; if the precision is zero and the # flag is
13394               not specified, no decimal-point character appears. If a decimal-point
13395               character appears, at least one digit appears before it. The value is rounded to
13396               the appropriate number of digits.
13397               A double argument representing an infinity is converted in one of the styles
13398               [-]inf or [-]infinity -- which style is implementation-defined. A
13399               double argument representing a NaN is converted in one of the styles
13400               [-]nan or [-]nan(n-char-sequence) -- which style, and the meaning of
13401               any n-char-sequence, is implementation-defined. The F conversion specifier
13402               produces INF, INFINITY, or NAN instead of inf, infinity, or nan,
13403               respectively.<sup><a href="#note243"><b>243)</b></a></sup></pre>
13404  e,E          A double argument representing a floating-point number is converted in the
13405 <pre>
13406               style [-]d.ddd e(+-)dd, where there is one digit (which is nonzero if the
13407               argument is nonzero) before the decimal-point character and the number of
13408               digits after it is equal to the precision; if the precision is missing, it is taken as
13409               6; if the precision is zero and the # flag is not specified, no decimal-point
13410               character appears. The value is rounded to the appropriate number of digits.
13411               The E conversion specifier produces a number with E instead of e
13412               introducing the exponent. The exponent always contains at least two digits,
13413               and only as many more digits as necessary to represent the exponent. If the
13414               value is zero, the exponent is zero.
13415               A double argument representing an infinity or NaN is converted in the style
13416               of an f or F conversion specifier.</pre>
13417  g,G          A double argument representing a floating-point number is converted in
13418 <pre>
13419               style f or e (or in style F or E in the case of a G conversion specifier),
13420               depending on the value converted and the precision. Let P equal the
13421               precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero.
13422               Then, if a conversion with style E would have an exponent of X :
13423               -- if P &gt; X &gt;= -4, the conversion is with style f (or F) and precision
13424                 P - (X + 1).
13425               -- otherwise, the conversion is with style e (or E) and precision P - 1.
13426               Finally, unless the # flag is used, any trailing zeros are removed from the</pre>
13427  
13428 <!--page 291 -->
13429 <pre>
13430                fractional portion of the result and the decimal-point character is removed if
13431                there is no fractional portion remaining.
13432                A double argument representing an infinity or NaN is converted in the style
13433                of an f or F conversion specifier.</pre>
13434  a,A           A double argument representing a floating-point number is converted in the
13435 <pre>
13436                style [-]0xh.hhhh p(+-)d, where there is one hexadecimal digit (which is
13437                nonzero if the argument is a normalized floating-point number and is
13438                otherwise unspecified) before the decimal-point character<sup><a href="#note244"><b>244)</b></a></sup> and the number
13439                of hexadecimal digits after it is equal to the precision; if the precision is
13440                missing and FLT_RADIX is a power of 2, then the precision is sufficient for
13441                an exact representation of the value; if the precision is missing and
13442                FLT_RADIX is not a power of 2, then the precision is sufficient to
13443                distinguish<sup><a href="#note245"><b>245)</b></a></sup> values of type double, except that trailing zeros may be
13444                omitted; if the precision is zero and the # flag is not specified, no decimal-
13445                point character appears. The letters abcdef are used for a conversion and
13446                the letters ABCDEF for A conversion. The A conversion specifier produces a
13447                number with X and P instead of x and p. The exponent always contains at
13448                least one digit, and only as many more digits as necessary to represent the
13449                decimal exponent of 2. If the value is zero, the exponent is zero.
13450                A double argument representing an infinity or NaN is converted in the style
13451                of an f or F conversion specifier.</pre>
13452  c             If no l length modifier is present, the int argument is converted to an
13453 <pre>
13454                unsigned char, and the resulting character is written.
13455                If an l length modifier is present, the wint_t argument is converted as if by
13456                an ls conversion specification with no precision and an argument that points
13457                to the initial element of a two-element array of wchar_t, the first element
13458                containing the wint_t argument to the lc conversion specification and the
13459                second a null wide character.</pre>
13460  s             If no l length modifier is present, the argument shall be a pointer to the initial
13461 <pre>
13462                element of an array of character type.<sup><a href="#note246"><b>246)</b></a></sup> Characters from the array are</pre>
13463  
13464  
13465 <!--page 292 -->
13466 <pre>
13467                 written up to (but not including) the terminating null character. If the
13468                 precision is specified, no more than that many bytes are written. If the
13469                 precision is not specified or is greater than the size of the array, the array shall
13470                 contain a null character.
13471                 If an l length modifier is present, the argument shall be a pointer to the initial
13472                 element of an array of wchar_t type. Wide characters from the array are
13473                 converted to multibyte characters (each as if by a call to the wcrtomb
13474                 function, with the conversion state described by an mbstate_t object
13475                 initialized to zero before the first wide character is converted) up to and
13476                 including a terminating null wide character. The resulting multibyte
13477                 characters are written up to (but not including) the terminating null character
13478                 (byte). If no precision is specified, the array shall contain a null wide
13479                 character. If a precision is specified, no more than that many bytes are
13480                 written (including shift sequences, if any), and the array shall contain a null
13481                 wide character if, to equal the multibyte character sequence length given by
13482                 the precision, the function would need to access a wide character one past the
13483                 end of the array. In no case is a partial multibyte character written.<sup><a href="#note247"><b>247)</b></a></sup></pre>
13484  p              The argument shall be a pointer to void. The value of the pointer is
13485 <pre>
13486                 converted to a sequence of printing characters, in an implementation-defined
13487                 manner.</pre>
13488  n              The argument shall be a pointer to signed integer into which is written the
13489 <pre>
13490                 number of characters written to the output stream so far by this call to
13491                 fprintf. No argument is converted, but one is consumed. If the conversion
13492                 specification includes any flags, a field width, or a precision, the behavior is
13493                 undefined.</pre>
13494  %              A % character is written. No argument is converted. The complete
13495 <p><!--para 9 -->
13496 <pre>
13497                 conversion specification shall be %%.</pre>
13498  If a conversion specification is invalid, the behavior is undefined.<sup><a href="#note248"><b>248)</b></a></sup> If any argument is
13499  not the correct type for the corresponding conversion specification, the behavior is
13500  undefined.
13501 <p><!--para 10 -->
13502  In no case does a nonexistent or small field width cause truncation of a field; if the result
13503  of a conversion is wider than the field width, the field is expanded to contain the
13504  conversion result.
13505  
13506  
13507  
13508  
13509 <!--page 293 -->
13510 <p><!--para 11 -->
13511  For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded
13512  to a hexadecimal floating number with the given precision.
13513 <h6> Recommended practice</h6>
13514 <p><!--para 12 -->
13515  For a and A conversions, if FLT_RADIX is not a power of 2 and the result is not exactly
13516  representable in the given precision, the result should be one of the two adjacent numbers
13517  in hexadecimal floating style with the given precision, with the extra stipulation that the
13518  error should have a correct sign for the current rounding direction.
13519 <p><!--para 13 -->
13520  For e, E, f, F, g, and G conversions, if the number of significant decimal digits is at most
13521  DECIMAL_DIG, then the result should be correctly rounded.<sup><a href="#note249"><b>249)</b></a></sup> If the number of
13522  significant decimal digits is more than DECIMAL_DIG but the source value is exactly
13523  representable with DECIMAL_DIG digits, then the result should be an exact
13524  representation with trailing zeros. Otherwise, the source value is bounded by two
13525  adjacent decimal strings L &lt; U, both having DECIMAL_DIG significant digits; the value
13526  of the resultant decimal string D should satisfy L &lt;= D &lt;= U, with the extra stipulation that
13527  the error should have a correct sign for the current rounding direction.
13528 <h6>Returns</h6>
13529 <p><!--para 14 -->
13530  The fprintf function returns the number of characters transmitted, or a negative value
13531  if an output or encoding error occurred.
13532  Environmental limits
13533 <p><!--para 15 -->
13534  The number of characters that can be produced by any single conversion shall be at least
13535  4095.
13536 <p><!--para 16 -->
13537  EXAMPLE 1 To print a date and time in the form ''Sunday, July 3, 10:02'' followed by pi to five decimal
13538  places:
13539 <pre>
13540          #include <a href="#7.12">&lt;math.h&gt;</a>
13541          #include <a href="#7.19">&lt;stdio.h&gt;</a>
13542          /* ... */
13543          char *weekday, *month;      // pointers to strings
13544          int day, hour, min;
13545          fprintf(stdout, "%s, %s %d, %.2d:%.2d\n",
13546                  weekday, month, day, hour, min);
13547          fprintf(stdout, "pi = %.5f\n", 4 * atan(1.0));</pre>
13548  
13549 <p><!--para 17 -->
13550  EXAMPLE 2 In this example, multibyte characters do not have a state-dependent encoding, and the
13551  members of the extended character set that consist of more than one byte each consist of exactly two bytes,
13552  the first of which is denoted here by a and the second by an uppercase letter.
13553  
13554  
13555  
13556  
13557 <!--page 294 -->
13558 <p><!--para 18 -->
13559  Given the following wide string with length seven,
13560 <pre>
13561           static wchar_t wstr[] = L" X Yabc Z W";</pre>
13562  the seven calls
13563 <pre>
13564           fprintf(stdout,          "|1234567890123|\n");
13565           fprintf(stdout,          "|%13ls|\n", wstr);
13566           fprintf(stdout,          "|%-13.9ls|\n", wstr);
13567           fprintf(stdout,          "|%13.10ls|\n", wstr);
13568           fprintf(stdout,          "|%13.11ls|\n", wstr);
13569           fprintf(stdout,          "|%13.15ls|\n", &amp;wstr[2]);
13570           fprintf(stdout,          "|%13lc|\n", (wint_t) wstr[5]);</pre>
13571  will print the following seven lines:
13572 <pre>
13573           |1234567890123|
13574           |   X Yabc Z W|
13575           | X Yabc Z    |
13576           |     X Yabc Z|
13577           |   X Yabc Z W|
13578           |      abc Z W|
13579           |            Z|</pre>
13580  
13581 <p><b> Forward references</b>: conversion state (<a href="#7.24.6">7.24.6</a>), the wcrtomb function (<a href="#7.24.6.3.3">7.24.6.3.3</a>).
13582
13583 <h6>footnotes</h6>
13584 <p><small><a name="note241" href="#note241">241)</a> Note that 0 is taken as a flag, not as the beginning of a field width.
13585 </small>
13586 <p><small><a name="note242" href="#note242">242)</a> The results of all floating conversions of a negative zero, and of negative values that round to zero,
13587  include a minus sign.
13588 </small>
13589 <p><small><a name="note243" href="#note243">243)</a> When applied to infinite and NaN values, the -, +, and space flag characters have their usual meaning;
13590  the # and 0 flag characters have no effect.
13591 </small>
13592 <p><small><a name="note244" href="#note244">244)</a> Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so
13593  that subsequent digits align to nibble (4-bit) boundaries.
13594 </small>
13595 <p><small><a name="note245" href="#note245">245)</a> The precision p is sufficient to distinguish values of the source type if 16 p-1 &gt; b n where b is
13596  FLT_RADIX and n is the number of base-b digits in the significand of the source type. A smaller p
13597  might suffice depending on the implementation's scheme for determining the digit to the left of the
13598  decimal-point character.
13599 </small>
13600 <p><small><a name="note246" href="#note246">246)</a> No special provisions are made for multibyte characters.
13601 </small>
13602 <p><small><a name="note247" href="#note247">247)</a> Redundant shift sequences may result if multibyte characters have a state-dependent encoding.
13603 </small>
13604 <p><small><a name="note248" href="#note248">248)</a> See ''future library directions'' (<a href="#7.26.9">7.26.9</a>).
13605 </small>
13606 <p><small><a name="note249" href="#note249">249)</a> For binary-to-decimal conversion, the result format's values are the numbers representable with the
13607  given format specifier. The number of significant digits is determined by the format specifier, and in
13608  the case of fixed-point conversion by the source value as well.
13609 </small>
13610
13611 <h5><a name="7.19.6.2" href="#7.19.6.2">7.19.6.2 The fscanf function</a></h5>
13612 <h6>Synopsis</h6>
13613 <p><!--para 1 -->
13614 <pre>
13615           #include <a href="#7.19">&lt;stdio.h&gt;</a>
13616           int fscanf(FILE * restrict stream,
13617                const char * restrict format, ...);</pre>
13618 <h6>Description</h6>
13619 <p><!--para 2 -->
13620  The fscanf function reads input from the stream pointed to by stream, under control
13621  of the string pointed to by format that specifies the admissible input sequences and how
13622  they are to be converted for assignment, using subsequent arguments as pointers to the
13623  objects to receive the converted input. If there are insufficient arguments for the format,
13624  the behavior is undefined. If the format is exhausted while arguments remain, the excess
13625  arguments are evaluated (as always) but are otherwise ignored.
13626 <p><!--para 3 -->
13627  The format shall be a multibyte character sequence, beginning and ending in its initial
13628  shift state. The format is composed of zero or more directives: one or more white-space
13629  characters, an ordinary multibyte character (neither % nor a white-space character), or a
13630  conversion specification. Each conversion specification is introduced by the character %.
13631  After the %, the following appear in sequence:
13632 <ul>
13633 <li>  An optional assignment-suppressing character *.
13634 <li>  An optional decimal integer greater than zero that specifies the maximum field width
13635  (in characters).
13636 <!--page 295 -->
13637 <li>  An optional length modifier that specifies the size of the receiving object.
13638 <li>  A conversion specifier character that specifies the type of conversion to be applied.
13639 </ul>
13640 <p><!--para 4 -->
13641  The fscanf function executes each directive of the format in turn. If a directive fails, as
13642  detailed below, the function returns. Failures are described as input failures (due to the
13643  occurrence of an encoding error or the unavailability of input characters), or matching
13644  failures (due to inappropriate input).
13645 <p><!--para 5 -->
13646  A directive composed of white-space character(s) is executed by reading input up to the
13647  first non-white-space character (which remains unread), or until no more characters can
13648  be read.
13649 <p><!--para 6 -->
13650  A directive that is an ordinary multibyte character is executed by reading the next
13651  characters of the stream. If any of those characters differ from the ones composing the
13652  directive, the directive fails and the differing and subsequent characters remain unread.
13653  Similarly, if end-of-file, an encoding error, or a read error prevents a character from being
13654  read, the directive fails.
13655 <p><!--para 7 -->
13656  A directive that is a conversion specification defines a set of matching input sequences, as
13657  described below for each specifier. A conversion specification is executed in the
13658  following steps:
13659 <p><!--para 8 -->
13660  Input white-space characters (as specified by the isspace function) are skipped, unless
13661  the specification includes a [, c, or n specifier.<sup><a href="#note250"><b>250)</b></a></sup>
13662 <p><!--para 9 -->
13663  An input item is read from the stream, unless the specification includes an n specifier. An
13664  input item is defined as the longest sequence of input characters which does not exceed
13665  any specified field width and which is, or is a prefix of, a matching input sequence.<sup><a href="#note251"><b>251)</b></a></sup>
13666  The first character, if any, after the input item remains unread. If the length of the input
13667  item is zero, the execution of the directive fails; this condition is a matching failure unless
13668  end-of-file, an encoding error, or a read error prevented input from the stream, in which
13669  case it is an input failure.
13670 <p><!--para 10 -->
13671  Except in the case of a % specifier, the input item (or, in the case of a %n directive, the
13672  count of input characters) is converted to a type appropriate to the conversion specifier. If
13673  the input item is not a matching sequence, the execution of the directive fails: this
13674  condition is a matching failure. Unless assignment suppression was indicated by a *, the
13675  result of the conversion is placed in the object pointed to by the first argument following
13676  the format argument that has not already received a conversion result. If this object
13677  does not have an appropriate type, or if the result of the conversion cannot be represented
13678  
13679  
13680 <!--page 296 -->
13681  in the object, the behavior is undefined.
13682 <p><!--para 11 -->
13683  The length modifiers and their meanings are:
13684  hh           Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13685 <pre>
13686               to an argument with type pointer to signed char or unsigned char.</pre>
13687  h            Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13688 <pre>
13689               to an argument with type pointer to short int or unsigned short
13690               int.</pre>
13691  l (ell)      Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13692 <pre>
13693               to an argument with type pointer to long int or unsigned long
13694               int; that a following a, A, e, E, f, F, g, or G conversion specifier applies to
13695               an argument with type pointer to double; or that a following c, s, or [
13696               conversion specifier applies to an argument with type pointer to wchar_t.</pre>
13697  ll (ell-ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13698 <pre>
13699               to an argument with type pointer to long long int or unsigned
13700               long long int.</pre>
13701  j            Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13702 <pre>
13703               to an argument with type pointer to intmax_t or uintmax_t.</pre>
13704  z            Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13705 <pre>
13706               to an argument with type pointer to size_t or the corresponding signed
13707               integer type.</pre>
13708  t            Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
13709 <pre>
13710               to an argument with type pointer to ptrdiff_t or the corresponding
13711               unsigned integer type.</pre>
13712  L            Specifies that a following a, A, e, E, f, F, g, or G conversion specifier
13713 <pre>
13714               applies to an argument with type pointer to long double.</pre>
13715  If a length modifier appears with any conversion specifier other than as specified above,
13716  the behavior is undefined.
13717 <p><!--para 12 -->
13718  The conversion specifiers and their meanings are:
13719  d           Matches an optionally signed decimal integer, whose format is the same as
13720 <pre>
13721              expected for the subject sequence of the strtol function with the value 10
13722              for the base argument. The corresponding argument shall be a pointer to
13723              signed integer.</pre>
13724  i           Matches an optionally signed integer, whose format is the same as expected
13725 <!--page 297 -->
13726 <pre>
13727              for the subject sequence of the strtol function with the value 0 for the
13728              base argument. The corresponding argument shall be a pointer to signed
13729              integer.</pre>
13730  o             Matches an optionally signed octal integer, whose format is the same as
13731 <pre>
13732                expected for the subject sequence of the strtoul function with the value 8
13733                for the base argument. The corresponding argument shall be a pointer to
13734                unsigned integer.</pre>
13735  u             Matches an optionally signed decimal integer, whose format is the same as
13736 <pre>
13737                expected for the subject sequence of the strtoul function with the value 10
13738                for the base argument. The corresponding argument shall be a pointer to
13739                unsigned integer.</pre>
13740  x             Matches an optionally signed hexadecimal integer, whose format is the same
13741 <pre>
13742                as expected for the subject sequence of the strtoul function with the value
13743                16 for the base argument. The corresponding argument shall be a pointer to
13744                unsigned integer.</pre>
13745  a,e,f,g Matches an optionally signed floating-point number, infinity, or NaN, whose
13746 <pre>
13747          format is the same as expected for the subject sequence of the strtod
13748          function. The corresponding argument shall be a pointer to floating.</pre>
13749  c             Matches a sequence of characters of exactly the number specified by the field
13750 <pre>
13751                width (1 if no field width is present in the directive).<sup><a href="#note252"><b>252)</b></a></sup>
13752                If no l length modifier is present, the corresponding argument shall be a
13753                pointer to the initial element of a character array large enough to accept the
13754                sequence. No null character is added.
13755                If an l length modifier is present, the input shall be a sequence of multibyte
13756                characters that begins in the initial shift state. Each multibyte character in the
13757                sequence is converted to a wide character as if by a call to the mbrtowc
13758                function, with the conversion state described by an mbstate_t object
13759                initialized to zero before the first multibyte character is converted. The
13760                corresponding argument shall be a pointer to the initial element of an array of
13761                wchar_t large enough to accept the resulting sequence of wide characters.
13762                No null wide character is added.</pre>
13763  s             Matches a sequence of non-white-space characters.252)
13764 <pre>
13765                If no l length modifier is present, the corresponding argument shall be a
13766                pointer to the initial element of a character array large enough to accept the
13767                sequence and a terminating null character, which will be added automatically.
13768                If an l length modifier is present, the input shall be a sequence of multibyte</pre>
13769  
13770  
13771 <!--page 298 -->
13772 <pre>
13773           characters that begins in the initial shift state. Each multibyte character is
13774           converted to a wide character as if by a call to the mbrtowc function, with
13775           the conversion state described by an mbstate_t object initialized to zero
13776           before the first multibyte character is converted. The corresponding argument
13777           shall be a pointer to the initial element of an array of wchar_t large enough
13778           to accept the sequence and the terminating null wide character, which will be
13779           added automatically.</pre>
13780  [        Matches a nonempty sequence of characters from a set of expected characters
13781 <pre>
13782           (the scanset).252)
13783           If no l length modifier is present, the corresponding argument shall be a
13784           pointer to the initial element of a character array large enough to accept the
13785           sequence and a terminating null character, which will be added automatically.
13786           If an l length modifier is present, the input shall be a sequence of multibyte
13787           characters that begins in the initial shift state. Each multibyte character is
13788           converted to a wide character as if by a call to the mbrtowc function, with
13789           the conversion state described by an mbstate_t object initialized to zero
13790           before the first multibyte character is converted. The corresponding argument
13791           shall be a pointer to the initial element of an array of wchar_t large enough
13792           to accept the sequence and the terminating null wide character, which will be
13793           added automatically.
13794           The conversion specifier includes all subsequent characters in the format
13795           string, up to and including the matching right bracket (]). The characters
13796           between the brackets (the scanlist) compose the scanset, unless the character
13797           after the left bracket is a circumflex (^), in which case the scanset contains all
13798           characters that do not appear in the scanlist between the circumflex and the
13799           right bracket. If the conversion specifier begins with [] or [^], the right
13800           bracket character is in the scanlist and the next following right bracket
13801           character is the matching right bracket that ends the specification; otherwise
13802           the first following right bracket character is the one that ends the
13803           specification. If a - character is in the scanlist and is not the first, nor the
13804           second where the first character is a ^, nor the last character, the behavior is
13805           implementation-defined.</pre>
13806  p        Matches an implementation-defined set of sequences, which should be the
13807 <!--page 299 -->
13808 <pre>
13809           same as the set of sequences that may be produced by the %p conversion of
13810           the fprintf function. The corresponding argument shall be a pointer to a
13811           pointer to void. The input item is converted to a pointer value in an
13812           implementation-defined manner. If the input item is a value converted earlier
13813           during the same program execution, the pointer that results shall compare
13814           equal to that value; otherwise the behavior of the %p conversion is undefined.</pre>
13815  n              No input is consumed. The corresponding argument shall be a pointer to
13816 <pre>
13817                 signed integer into which is to be written the number of characters read from
13818                 the input stream so far by this call to the fscanf function. Execution of a
13819                 %n directive does not increment the assignment count returned at the
13820                 completion of execution of the fscanf function. No argument is converted,
13821                 but one is consumed. If the conversion specification includes an assignment-
13822                 suppressing character or a field width, the behavior is undefined.</pre>
13823  %              Matches a single % character; no conversion or assignment occurs. The
13824 <p><!--para 13 -->
13825 <pre>
13826                 complete conversion specification shall be %%.</pre>
13827  If a conversion specification is invalid, the behavior is undefined.<sup><a href="#note253"><b>253)</b></a></sup>
13828 <p><!--para 14 -->
13829  The conversion specifiers A, E, F, G, and X are also valid and behave the same as,
13830  respectively, a, e, f, g, and x.
13831 <p><!--para 15 -->
13832  Trailing white space (including new-line characters) is left unread unless matched by a
13833  directive. The success of literal matches and suppressed assignments is not directly
13834  determinable other than via the %n directive.
13835 <h6>Returns</h6>
13836 <p><!--para 16 -->
13837  The fscanf function returns the value of the macro EOF if an input failure occurs
13838  before any conversion. Otherwise, the function returns the number of input items
13839  assigned, which can be fewer than provided for, or even zero, in the event of an early
13840  matching failure.
13841 <p><!--para 17 -->
13842  EXAMPLE 1        The call:
13843 <pre>
13844           #include <a href="#7.19">&lt;stdio.h&gt;</a>
13845           /* ... */
13846           int n, i; float x; char name[50];
13847           n = fscanf(stdin, "%d%f%s", &amp;i, &amp;x, name);</pre>
13848  with the input line:
13849 <pre>
13850           25 54.32E-1 thompson</pre>
13851  will assign to n the value 3, to i the value 25, to x the value 5.432, and to name the sequence
13852  thompson\0.
13853  
13854 <p><!--para 18 -->
13855  EXAMPLE 2        The call:
13856 <pre>
13857           #include <a href="#7.19">&lt;stdio.h&gt;</a>
13858           /* ... */
13859           int i; float x; char name[50];
13860           fscanf(stdin, "%2d%f%*d %[0123456789]", &amp;i, &amp;x, name);</pre>
13861  with input:
13862  
13863  
13864  
13865 <!--page 300 -->
13866 <pre>
13867           56789 0123 56a72</pre>
13868  will assign to i the value 56 and to x the value 789.0, will skip 0123, and will assign to name the
13869  sequence 56\0. The next character read from the input stream will be a.
13870  
13871 <p><!--para 19 -->
13872  EXAMPLE 3         To accept repeatedly from stdin a quantity, a unit of measure, and an item name:
13873 <p><!--para 20 -->
13874 <pre>
13875           #include <a href="#7.19">&lt;stdio.h&gt;</a>
13876           /* ... */
13877           int count; float quant; char units[21], item[21];
13878           do {
13879                   count = fscanf(stdin, "%f%20s of %20s", &amp;quant, units, item);
13880                   fscanf(stdin,"%*[^\n]");
13881           } while (!feof(stdin) &amp;&amp; !ferror(stdin));</pre>
13882  If the stdin stream contains the following lines:
13883 <pre>
13884           2 quarts of oil
13885           -12.8degrees Celsius
13886           lots of luck
13887           10.0LBS      of
13888           dirt
13889           100ergs of energy</pre>
13890  the execution of the above example will be analogous to the following assignments:
13891 <pre>
13892           quant     =    2; strcpy(units, "quarts"); strcpy(item, "oil");
13893           count     =    3;
13894           quant     =    -12.8; strcpy(units, "degrees");
13895           count     =    2; // "C" fails to match "o"
13896           count     =    0; // "l" fails to match "%f"
13897           quant     =    10.0; strcpy(units, "LBS"); strcpy(item, "dirt");
13898           count     =    3;
13899           count     =    0; // "100e" fails to match "%f"
13900           count     =    EOF;</pre>
13901  
13902 <p><!--para 21 -->
13903  EXAMPLE 4         In:
13904 <pre>
13905           #include <a href="#7.19">&lt;stdio.h&gt;</a>
13906           /* ... */
13907           int d1, d2, n1, n2, i;
13908           i = sscanf("123", "%d%n%n%d", &amp;d1, &amp;n1, &amp;n2, &amp;d2);</pre>
13909  the value 123 is assigned to d1 and the value 3 to n1. Because %n can never get an input failure the value
13910  of 3 is also assigned to n2. The value of d2 is not affected. The value 1 is assigned to i.
13911  
13912 <p><!--para 22 -->
13913  EXAMPLE 5 In these examples, multibyte characters do have a state-dependent encoding, and the
13914  members of the extended character set that consist of more than one byte each consist of exactly two bytes,
13915  the first of which is denoted here by a and the second by an uppercase letter, but are only recognized as
13916  such when in the alternate shift state. The shift sequences are denoted by (uparrow) and (downarrow), in which the first causes
13917  entry into the alternate shift state.
13918 <p><!--para 23 -->
13919  After the call:
13920 <!--page 301 -->
13921 <pre>
13922            #include <a href="#7.19">&lt;stdio.h&gt;</a>
13923            /* ... */
13924            char str[50];
13925            fscanf(stdin, "a%s", str);</pre>
13926  with the input line:
13927 <pre>
13928            a(uparrow) X Y(downarrow) bc</pre>
13929  str will contain (uparrow) X Y(downarrow)\0 assuming that none of the bytes of the shift sequences (or of the multibyte
13930  characters, in the more general case) appears to be a single-byte white-space character.
13931 <p><!--para 24 -->
13932  In contrast, after the call:
13933 <pre>
13934            #include <a href="#7.19">&lt;stdio.h&gt;</a>
13935            #include <a href="#7.17">&lt;stddef.h&gt;</a>
13936            /* ... */
13937            wchar_t wstr[50];
13938            fscanf(stdin, "a%ls", wstr);</pre>
13939  with the same input line, wstr will contain the two wide characters that correspond to X and Y and a
13940  terminating null wide character.
13941 <p><!--para 25 -->
13942  However, the call:
13943 <pre>
13944            #include <a href="#7.19">&lt;stdio.h&gt;</a>
13945            #include <a href="#7.17">&lt;stddef.h&gt;</a>
13946            /* ... */
13947            wchar_t wstr[50];
13948            fscanf(stdin, "a(uparrow) X(downarrow)%ls", wstr);</pre>
13949  with the same input line will return zero due to a matching failure against the (downarrow) sequence in the format
13950  string.
13951 <p><!--para 26 -->
13952  Assuming that the first byte of the multibyte character X is the same as the first byte of the multibyte
13953  character Y, after the call:
13954 <pre>
13955            #include <a href="#7.19">&lt;stdio.h&gt;</a>
13956            #include <a href="#7.17">&lt;stddef.h&gt;</a>
13957            /* ... */
13958            wchar_t wstr[50];
13959            fscanf(stdin, "a(uparrow) Y(downarrow)%ls", wstr);</pre>
13960  with the same input line, zero will again be returned, but stdin will be left with a partially consumed
13961  multibyte character.
13962  
13963 <p><b> Forward references</b>: the strtod, strtof, and strtold functions (<a href="#7.20.1.3">7.20.1.3</a>), the
13964  strtol, strtoll, strtoul, and strtoull functions (<a href="#7.20.1.4">7.20.1.4</a>), conversion state
13965  (<a href="#7.24.6">7.24.6</a>), the wcrtomb function (<a href="#7.24.6.3.3">7.24.6.3.3</a>).
13966 <!--page 302 -->
13967
13968 <h6>footnotes</h6>
13969 <p><small><a name="note250" href="#note250">250)</a> These white-space characters are not counted against a specified field width.
13970 </small>
13971 <p><small><a name="note251" href="#note251">251)</a> fscanf pushes back at most one input character onto the input stream. Therefore, some sequences
13972  that are acceptable to strtod, strtol, etc., are unacceptable to fscanf.
13973 </small>
13974 <p><small><a name="note252" href="#note252">252)</a> No special provisions are made for multibyte characters in the matching rules used by the c, s, and [
13975  conversion specifiers -- the extent of the input field is determined on a byte-by-byte basis. The
13976  resulting field is nevertheless a sequence of multibyte characters that begins in the initial shift state.
13977 </small>
13978 <p><small><a name="note253" href="#note253">253)</a> See ''future library directions'' (<a href="#7.26.9">7.26.9</a>).
13979 </small>
13980
13981 <h5><a name="7.19.6.3" href="#7.19.6.3">7.19.6.3 The printf function</a></h5>
13982 <h6>Synopsis</h6>
13983 <p><!--para 1 -->
13984 <pre>
13985         #include <a href="#7.19">&lt;stdio.h&gt;</a>
13986         int printf(const char * restrict format, ...);</pre>
13987 <h6>Description</h6>
13988 <p><!--para 2 -->
13989  The printf function is equivalent to fprintf with the argument stdout interposed
13990  before the arguments to printf.
13991 <h6>Returns</h6>
13992 <p><!--para 3 -->
13993  The printf function returns the number of characters transmitted, or a negative value if
13994  an output or encoding error occurred.
13995
13996 <h5><a name="7.19.6.4" href="#7.19.6.4">7.19.6.4 The scanf function</a></h5>
13997 <h6>Synopsis</h6>
13998 <p><!--para 1 -->
13999 <pre>
14000         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14001         int scanf(const char * restrict format, ...);</pre>
14002 <h6>Description</h6>
14003 <p><!--para 2 -->
14004  The scanf function is equivalent to fscanf with the argument stdin interposed
14005  before the arguments to scanf.
14006 <h6>Returns</h6>
14007 <p><!--para 3 -->
14008  The scanf function returns the value of the macro EOF if an input failure occurs before
14009  any conversion. Otherwise, the scanf function returns the number of input items
14010  assigned, which can be fewer than provided for, or even zero, in the event of an early
14011  matching failure.
14012
14013 <h5><a name="7.19.6.5" href="#7.19.6.5">7.19.6.5 The snprintf function</a></h5>
14014 <h6>Synopsis</h6>
14015 <p><!--para 1 -->
14016 <pre>
14017         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14018         int snprintf(char * restrict s, size_t n,
14019              const char * restrict format, ...);</pre>
14020 <h6>Description</h6>
14021 <p><!--para 2 -->
14022  The snprintf function is equivalent to fprintf, except that the output is written into
14023  an array (specified by argument s) rather than to a stream. If n is zero, nothing is written,
14024  and s may be a null pointer. Otherwise, output characters beyond the n-1st are
14025  discarded rather than being written to the array, and a null character is written at the end
14026  of the characters actually written into the array. If copying takes place between objects
14027  that overlap, the behavior is undefined.
14028 <!--page 303 -->
14029 <h6>Returns</h6>
14030 <p><!--para 3 -->
14031  The snprintf function returns the number of characters that would have been written
14032  had n been sufficiently large, not counting the terminating null character, or a negative
14033  value if an encoding error occurred. Thus, the null-terminated output has been
14034  completely written if and only if the returned value is nonnegative and less than n.
14035
14036 <h5><a name="7.19.6.6" href="#7.19.6.6">7.19.6.6 The sprintf function</a></h5>
14037 <h6>Synopsis</h6>
14038 <p><!--para 1 -->
14039 <pre>
14040         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14041         int sprintf(char * restrict s,
14042              const char * restrict format, ...);</pre>
14043 <h6>Description</h6>
14044 <p><!--para 2 -->
14045  The sprintf function is equivalent to fprintf, except that the output is written into
14046  an array (specified by the argument s) rather than to a stream. A null character is written
14047  at the end of the characters written; it is not counted as part of the returned value. If
14048  copying takes place between objects that overlap, the behavior is undefined.
14049 <h6>Returns</h6>
14050 <p><!--para 3 -->
14051  The sprintf function returns the number of characters written in the array, not
14052  counting the terminating null character, or a negative value if an encoding error occurred.
14053
14054 <h5><a name="7.19.6.7" href="#7.19.6.7">7.19.6.7 The sscanf function</a></h5>
14055 <h6>Synopsis</h6>
14056 <p><!--para 1 -->
14057 <pre>
14058         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14059         int sscanf(const char * restrict s,
14060              const char * restrict format, ...);</pre>
14061 <h6>Description</h6>
14062 <p><!--para 2 -->
14063  The sscanf function is equivalent to fscanf, except that input is obtained from a
14064  string (specified by the argument s) rather than from a stream. Reaching the end of the
14065  string is equivalent to encountering end-of-file for the fscanf function. If copying
14066  takes place between objects that overlap, the behavior is undefined.
14067 <h6>Returns</h6>
14068 <p><!--para 3 -->
14069  The sscanf function returns the value of the macro EOF if an input failure occurs
14070  before any conversion. Otherwise, the sscanf function returns the number of input
14071  items assigned, which can be fewer than provided for, or even zero, in the event of an
14072  early matching failure.
14073 <!--page 304 -->
14074
14075 <h5><a name="7.19.6.8" href="#7.19.6.8">7.19.6.8 The vfprintf function</a></h5>
14076 <h6>Synopsis</h6>
14077 <p><!--para 1 -->
14078 <pre>
14079         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14080         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14081         int vfprintf(FILE * restrict stream,
14082              const char * restrict format,
14083              va_list arg);</pre>
14084 <h6>Description</h6>
14085 <p><!--para 2 -->
14086  The vfprintf function is equivalent to fprintf, with the variable argument list
14087  replaced by arg, which shall have been initialized by the va_start macro (and
14088  possibly subsequent va_arg calls). The vfprintf function does not invoke the
14089  va_end macro.<sup><a href="#note254"><b>254)</b></a></sup>
14090 <h6>Returns</h6>
14091 <p><!--para 3 -->
14092  The vfprintf function returns the number of characters transmitted, or a negative
14093  value if an output or encoding error occurred.
14094 <p><!--para 4 -->
14095  EXAMPLE       The following shows the use of the vfprintf function in a general error-reporting routine.
14096 <pre>
14097         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14098         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14099         void error(char *function_name, char *format, ...)
14100         {
14101               va_list args;
14102                  va_start(args, format);
14103                  // print out name of function causing error
14104                  fprintf(stderr, "ERROR in %s: ", function_name);
14105                  // print out remainder of message
14106                  vfprintf(stderr, format, args);
14107                  va_end(args);
14108         }</pre>
14109  
14110  
14111  
14112  
14113 <!--page 305 -->
14114
14115 <h6>footnotes</h6>
14116 <p><small><a name="note254" href="#note254">254)</a> As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and
14117  vsscanf invoke the va_arg macro, the value of arg after the return is indeterminate.
14118 </small>
14119
14120 <h5><a name="7.19.6.9" href="#7.19.6.9">7.19.6.9 The vfscanf function</a></h5>
14121 <h6>Synopsis</h6>
14122 <p><!--para 1 -->
14123 <pre>
14124         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14125         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14126         int vfscanf(FILE * restrict stream,
14127              const char * restrict format,
14128              va_list arg);</pre>
14129 <h6>Description</h6>
14130 <p><!--para 2 -->
14131  The vfscanf function is equivalent to fscanf, with the variable argument list
14132  replaced by arg, which shall have been initialized by the va_start macro (and
14133  possibly subsequent va_arg calls). The vfscanf function does not invoke the
14134  va_end macro.254)
14135 <h6>Returns</h6>
14136 <p><!--para 3 -->
14137  The vfscanf function returns the value of the macro EOF if an input failure occurs
14138  before any conversion. Otherwise, the vfscanf function returns the number of input
14139  items assigned, which can be fewer than provided for, or even zero, in the event of an
14140  early matching failure.
14141
14142 <h5><a name="7.19.6.10" href="#7.19.6.10">7.19.6.10 The vprintf function</a></h5>
14143 <h6>Synopsis</h6>
14144 <p><!--para 1 -->
14145 <pre>
14146         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14147         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14148         int vprintf(const char * restrict format,
14149              va_list arg);</pre>
14150 <h6>Description</h6>
14151 <p><!--para 2 -->
14152  The vprintf function is equivalent to printf, with the variable argument list
14153  replaced by arg, which shall have been initialized by the va_start macro (and
14154  possibly subsequent va_arg calls). The vprintf function does not invoke the
14155  va_end macro.254)
14156 <h6>Returns</h6>
14157 <p><!--para 3 -->
14158  The vprintf function returns the number of characters transmitted, or a negative value
14159  if an output or encoding error occurred.
14160 <!--page 306 -->
14161
14162 <h5><a name="7.19.6.11" href="#7.19.6.11">7.19.6.11 The vscanf function</a></h5>
14163 <h6>Synopsis</h6>
14164 <p><!--para 1 -->
14165 <pre>
14166         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14167         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14168         int vscanf(const char * restrict format,
14169              va_list arg);</pre>
14170 <h6>Description</h6>
14171 <p><!--para 2 -->
14172  The vscanf function is equivalent to scanf, with the variable argument list replaced
14173  by arg, which shall have been initialized by the va_start macro (and possibly
14174  subsequent va_arg calls). The vscanf function does not invoke the va_end
14175  macro.254)
14176 <h6>Returns</h6>
14177 <p><!--para 3 -->
14178  The vscanf function returns the value of the macro EOF if an input failure occurs
14179  before any conversion. Otherwise, the vscanf function returns the number of input
14180  items assigned, which can be fewer than provided for, or even zero, in the event of an
14181  early matching failure.
14182
14183 <h5><a name="7.19.6.12" href="#7.19.6.12">7.19.6.12 The vsnprintf function</a></h5>
14184 <h6>Synopsis</h6>
14185 <p><!--para 1 -->
14186 <pre>
14187         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14188         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14189         int vsnprintf(char * restrict s, size_t n,
14190              const char * restrict format,
14191              va_list arg);</pre>
14192 <h6>Description</h6>
14193 <p><!--para 2 -->
14194  The vsnprintf function is equivalent to snprintf, with the variable argument list
14195  replaced by arg, which shall have been initialized by the va_start macro (and
14196  possibly subsequent va_arg calls). The vsnprintf function does not invoke the
14197  va_end macro.254) If copying takes place between objects that overlap, the behavior is
14198  undefined.
14199 <h6>Returns</h6>
14200 <p><!--para 3 -->
14201  The vsnprintf function returns the number of characters that would have been written
14202  had n been sufficiently large, not counting the terminating null character, or a negative
14203  value if an encoding error occurred. Thus, the null-terminated output has been
14204  completely written if and only if the returned value is nonnegative and less than n.
14205 <!--page 307 -->
14206
14207 <h5><a name="7.19.6.13" href="#7.19.6.13">7.19.6.13 The vsprintf function</a></h5>
14208 <h6>Synopsis</h6>
14209 <p><!--para 1 -->
14210 <pre>
14211         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14212         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14213         int vsprintf(char * restrict s,
14214              const char * restrict format,
14215              va_list arg);</pre>
14216 <h6>Description</h6>
14217 <p><!--para 2 -->
14218  The vsprintf function is equivalent to sprintf, with the variable argument list
14219  replaced by arg, which shall have been initialized by the va_start macro (and
14220  possibly subsequent va_arg calls). The vsprintf function does not invoke the
14221  va_end macro.254) If copying takes place between objects that overlap, the behavior is
14222  undefined.
14223 <h6>Returns</h6>
14224 <p><!--para 3 -->
14225  The vsprintf function returns the number of characters written in the array, not
14226  counting the terminating null character, or a negative value if an encoding error occurred.
14227
14228 <h5><a name="7.19.6.14" href="#7.19.6.14">7.19.6.14 The vsscanf function</a></h5>
14229 <h6>Synopsis</h6>
14230 <p><!--para 1 -->
14231 <pre>
14232         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
14233         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14234         int vsscanf(const char * restrict s,
14235              const char * restrict format,
14236              va_list arg);</pre>
14237 <h6>Description</h6>
14238 <p><!--para 2 -->
14239  The vsscanf function is equivalent to sscanf, with the variable argument list
14240  replaced by arg, which shall have been initialized by the va_start macro (and
14241  possibly subsequent va_arg calls). The vsscanf function does not invoke the
14242  va_end macro.254)
14243 <h6>Returns</h6>
14244 <p><!--para 3 -->
14245  The vsscanf function returns the value of the macro EOF if an input failure occurs
14246  before any conversion. Otherwise, the vsscanf function returns the number of input
14247  items assigned, which can be fewer than provided for, or even zero, in the event of an
14248  early matching failure.
14249 <!--page 308 -->
14250
14251 <h4><a name="7.19.7" href="#7.19.7">7.19.7 Character input/output functions</a></h4>
14252
14253 <h5><a name="7.19.7.1" href="#7.19.7.1">7.19.7.1 The fgetc function</a></h5>
14254 <h6>Synopsis</h6>
14255 <p><!--para 1 -->
14256 <pre>
14257          #include <a href="#7.19">&lt;stdio.h&gt;</a>
14258          int fgetc(FILE *stream);</pre>
14259 <h6>Description</h6>
14260 <p><!--para 2 -->
14261  If the end-of-file indicator for the input stream pointed to by stream is not set and a
14262  next character is present, the fgetc function obtains that character as an unsigned
14263  char converted to an int and advances the associated file position indicator for the
14264  stream (if defined).
14265 <h6>Returns</h6>
14266 <p><!--para 3 -->
14267  If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-
14268  of-file indicator for the stream is set and the fgetc function returns EOF. Otherwise, the
14269  fgetc function returns the next character from the input stream pointed to by stream.
14270  If a read error occurs, the error indicator for the stream is set and the fgetc function
14271  returns EOF.<sup><a href="#note255"><b>255)</b></a></sup>
14272
14273 <h6>footnotes</h6>
14274 <p><small><a name="note255" href="#note255">255)</a> An end-of-file and a read error can be distinguished by use of the feof and ferror functions.
14275 </small>
14276
14277 <h5><a name="7.19.7.2" href="#7.19.7.2">7.19.7.2 The fgets function</a></h5>
14278 <h6>Synopsis</h6>
14279 <p><!--para 1 -->
14280 <pre>
14281          #include <a href="#7.19">&lt;stdio.h&gt;</a>
14282          char *fgets(char * restrict s, int n,
14283               FILE * restrict stream);</pre>
14284 <h6>Description</h6>
14285 <p><!--para 2 -->
14286  The fgets function reads at most one less than the number of characters specified by n
14287  from the stream pointed to by stream into the array pointed to by s. No additional
14288  characters are read after a new-line character (which is retained) or after end-of-file. A
14289  null character is written immediately after the last character read into the array.
14290 <h6>Returns</h6>
14291 <p><!--para 3 -->
14292  The fgets function returns s if successful. If end-of-file is encountered and no
14293  characters have been read into the array, the contents of the array remain unchanged and a
14294  null pointer is returned. If a read error occurs during the operation, the array contents are
14295  indeterminate and a null pointer is returned.
14296  
14297  
14298  
14299  
14300 <!--page 309 -->
14301
14302 <h5><a name="7.19.7.3" href="#7.19.7.3">7.19.7.3 The fputc function</a></h5>
14303 <h6>Synopsis</h6>
14304 <p><!--para 1 -->
14305 <pre>
14306         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14307         int fputc(int c, FILE *stream);</pre>
14308 <h6>Description</h6>
14309 <p><!--para 2 -->
14310  The fputc function writes the character specified by c (converted to an unsigned
14311  char) to the output stream pointed to by stream, at the position indicated by the
14312  associated file position indicator for the stream (if defined), and advances the indicator
14313  appropriately. If the file cannot support positioning requests, or if the stream was opened
14314  with append mode, the character is appended to the output stream.
14315 <h6>Returns</h6>
14316 <p><!--para 3 -->
14317  The fputc function returns the character written. If a write error occurs, the error
14318  indicator for the stream is set and fputc returns EOF.
14319
14320 <h5><a name="7.19.7.4" href="#7.19.7.4">7.19.7.4 The fputs function</a></h5>
14321 <h6>Synopsis</h6>
14322 <p><!--para 1 -->
14323 <pre>
14324         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14325         int fputs(const char * restrict s,
14326              FILE * restrict stream);</pre>
14327 <h6>Description</h6>
14328 <p><!--para 2 -->
14329  The fputs function writes the string pointed to by s to the stream pointed to by
14330  stream. The terminating null character is not written.
14331 <h6>Returns</h6>
14332 <p><!--para 3 -->
14333  The fputs function returns EOF if a write error occurs; otherwise it returns a
14334  nonnegative value.
14335
14336 <h5><a name="7.19.7.5" href="#7.19.7.5">7.19.7.5 The getc function</a></h5>
14337 <h6>Synopsis</h6>
14338 <p><!--para 1 -->
14339 <pre>
14340         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14341         int getc(FILE *stream);</pre>
14342 <h6>Description</h6>
14343 <p><!--para 2 -->
14344  The getc function is equivalent to fgetc, except that if it is implemented as a macro, it
14345  may evaluate stream more than once, so the argument should never be an expression
14346  with side effects.
14347 <!--page 310 -->
14348 <h6>Returns</h6>
14349 <p><!--para 3 -->
14350  The getc function returns the next character from the input stream pointed to by
14351  stream. If the stream is at end-of-file, the end-of-file indicator for the stream is set and
14352  getc returns EOF. If a read error occurs, the error indicator for the stream is set and
14353  getc returns EOF.
14354
14355 <h5><a name="7.19.7.6" href="#7.19.7.6">7.19.7.6 The getchar function</a></h5>
14356 <h6>Synopsis</h6>
14357 <p><!--para 1 -->
14358 <pre>
14359         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14360         int getchar(void);</pre>
14361 <h6>Description</h6>
14362 <p><!--para 2 -->
14363  The getchar function is equivalent to getc with the argument stdin.
14364 <h6>Returns</h6>
14365 <p><!--para 3 -->
14366  The getchar function returns the next character from the input stream pointed to by
14367  stdin. If the stream is at end-of-file, the end-of-file indicator for the stream is set and
14368  getchar returns EOF. If a read error occurs, the error indicator for the stream is set and
14369  getchar returns EOF.
14370
14371 <h5><a name="7.19.7.7" href="#7.19.7.7">7.19.7.7 The gets function</a></h5>
14372 <h6>Synopsis</h6>
14373 <p><!--para 1 -->
14374 <pre>
14375         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14376         char *gets(char *s);</pre>
14377 <h6>Description</h6>
14378 <p><!--para 2 -->
14379  The gets function reads characters from the input stream pointed to by stdin, into the
14380  array pointed to by s, until end-of-file is encountered or a new-line character is read.
14381  Any new-line character is discarded, and a null character is written immediately after the
14382  last character read into the array.
14383 <h6>Returns</h6>
14384 <p><!--para 3 -->
14385  The gets function returns s if successful. If end-of-file is encountered and no
14386  characters have been read into the array, the contents of the array remain unchanged and a
14387  null pointer is returned. If a read error occurs during the operation, the array contents are
14388  indeterminate and a null pointer is returned.
14389 <p><b> Forward references</b>: future library directions (<a href="#7.26.9">7.26.9</a>).
14390 <!--page 311 -->
14391
14392 <h5><a name="7.19.7.8" href="#7.19.7.8">7.19.7.8 The putc function</a></h5>
14393 <h6>Synopsis</h6>
14394 <p><!--para 1 -->
14395 <pre>
14396         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14397         int putc(int c, FILE *stream);</pre>
14398 <h6>Description</h6>
14399 <p><!--para 2 -->
14400  The putc function is equivalent to fputc, except that if it is implemented as a macro, it
14401  may evaluate stream more than once, so that argument should never be an expression
14402  with side effects.
14403 <h6>Returns</h6>
14404 <p><!--para 3 -->
14405  The putc function returns the character written. If a write error occurs, the error
14406  indicator for the stream is set and putc returns EOF.
14407
14408 <h5><a name="7.19.7.9" href="#7.19.7.9">7.19.7.9 The putchar function</a></h5>
14409 <h6>Synopsis</h6>
14410 <p><!--para 1 -->
14411 <pre>
14412         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14413         int putchar(int c);</pre>
14414 <h6>Description</h6>
14415 <p><!--para 2 -->
14416  The putchar function is equivalent to putc with the second argument stdout.
14417 <h6>Returns</h6>
14418 <p><!--para 3 -->
14419  The putchar function returns the character written. If a write error occurs, the error
14420  indicator for the stream is set and putchar returns EOF.
14421
14422 <h5><a name="7.19.7.10" href="#7.19.7.10">7.19.7.10 The puts function</a></h5>
14423 <h6>Synopsis</h6>
14424 <p><!--para 1 -->
14425 <pre>
14426         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14427         int puts(const char *s);</pre>
14428 <h6>Description</h6>
14429 <p><!--para 2 -->
14430  The puts function writes the string pointed to by s to the stream pointed to by stdout,
14431  and appends a new-line character to the output. The terminating null character is not
14432  written.
14433 <h6>Returns</h6>
14434 <p><!--para 3 -->
14435  The puts function returns EOF if a write error occurs; otherwise it returns a nonnegative
14436  value.
14437 <!--page 312 -->
14438
14439 <h5><a name="7.19.7.11" href="#7.19.7.11">7.19.7.11 The ungetc function</a></h5>
14440 <h6>Synopsis</h6>
14441 <p><!--para 1 -->
14442 <pre>
14443           #include <a href="#7.19">&lt;stdio.h&gt;</a>
14444           int ungetc(int c, FILE *stream);</pre>
14445 <h6>Description</h6>
14446 <p><!--para 2 -->
14447  The ungetc function pushes the character specified by c (converted to an unsigned
14448  char) back onto the input stream pointed to by stream. Pushed-back characters will be
14449  returned by subsequent reads on that stream in the reverse order of their pushing. A
14450  successful intervening call (with the stream pointed to by stream) to a file positioning
14451  function (fseek, fsetpos, or rewind) discards any pushed-back characters for the
14452  stream. The external storage corresponding to the stream is unchanged.
14453 <p><!--para 3 -->
14454  One character of pushback is guaranteed. If the ungetc function is called too many
14455  times on the same stream without an intervening read or file positioning operation on that
14456  stream, the operation may fail.
14457 <p><!--para 4 -->
14458  If the value of c equals that of the macro EOF, the operation fails and the input stream is
14459  unchanged.
14460 <p><!--para 5 -->
14461  A successful call to the ungetc function clears the end-of-file indicator for the stream.
14462  The value of the file position indicator for the stream after reading or discarding all
14463  pushed-back characters shall be the same as it was before the characters were pushed
14464  back. For a text stream, the value of its file position indicator after a successful call to the
14465  ungetc function is unspecified until all pushed-back characters are read or discarded.
14466  For a binary stream, its file position indicator is decremented by each successful call to
14467  the ungetc function; if its value was zero before a call, it is indeterminate after the
14468  call.<sup><a href="#note256"><b>256)</b></a></sup>
14469 <h6>Returns</h6>
14470 <p><!--para 6 -->
14471  The ungetc function returns the character pushed back after conversion, or EOF if the
14472  operation fails.
14473 <p><b> Forward references</b>: file positioning functions (<a href="#7.19.9">7.19.9</a>).
14474  
14475  
14476  
14477  
14478 <!--page 313 -->
14479
14480 <h6>footnotes</h6>
14481 <p><small><a name="note256" href="#note256">256)</a> See ''future library directions'' (<a href="#7.26.9">7.26.9</a>).
14482 </small>
14483
14484 <h4><a name="7.19.8" href="#7.19.8">7.19.8 Direct input/output functions</a></h4>
14485
14486 <h5><a name="7.19.8.1" href="#7.19.8.1">7.19.8.1 The fread function</a></h5>
14487 <h6>Synopsis</h6>
14488 <p><!--para 1 -->
14489 <pre>
14490         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14491         size_t fread(void * restrict ptr,
14492              size_t size, size_t nmemb,
14493              FILE * restrict stream);</pre>
14494 <h6>Description</h6>
14495 <p><!--para 2 -->
14496  The fread function reads, into the array pointed to by ptr, up to nmemb elements
14497  whose size is specified by size, from the stream pointed to by stream. For each
14498  object, size calls are made to the fgetc function and the results stored, in the order
14499  read, in an array of unsigned char exactly overlaying the object. The file position
14500  indicator for the stream (if defined) is advanced by the number of characters successfully
14501  read. If an error occurs, the resulting value of the file position indicator for the stream is
14502  indeterminate. If a partial element is read, its value is indeterminate.
14503 <h6>Returns</h6>
14504 <p><!--para 3 -->
14505  The fread function returns the number of elements successfully read, which may be
14506  less than nmemb if a read error or end-of-file is encountered. If size or nmemb is zero,
14507  fread returns zero and the contents of the array and the state of the stream remain
14508  unchanged.
14509
14510 <h5><a name="7.19.8.2" href="#7.19.8.2">7.19.8.2 The fwrite function</a></h5>
14511 <h6>Synopsis</h6>
14512 <p><!--para 1 -->
14513 <pre>
14514         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14515         size_t fwrite(const void * restrict ptr,
14516              size_t size, size_t nmemb,
14517              FILE * restrict stream);</pre>
14518 <h6>Description</h6>
14519 <p><!--para 2 -->
14520  The fwrite function writes, from the array pointed to by ptr, up to nmemb elements
14521  whose size is specified by size, to the stream pointed to by stream. For each object,
14522  size calls are made to the fputc function, taking the values (in order) from an array of
14523  unsigned char exactly overlaying the object. The file position indicator for the
14524  stream (if defined) is advanced by the number of characters successfully written. If an
14525  error occurs, the resulting value of the file position indicator for the stream is
14526  indeterminate.
14527 <!--page 314 -->
14528 <h6>Returns</h6>
14529 <p><!--para 3 -->
14530  The fwrite function returns the number of elements successfully written, which will be
14531  less than nmemb only if a write error is encountered. If size or nmemb is zero,
14532  fwrite returns zero and the state of the stream remains unchanged.
14533
14534 <h4><a name="7.19.9" href="#7.19.9">7.19.9 File positioning functions</a></h4>
14535
14536 <h5><a name="7.19.9.1" href="#7.19.9.1">7.19.9.1 The fgetpos function</a></h5>
14537 <h6>Synopsis</h6>
14538 <p><!--para 1 -->
14539 <pre>
14540         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14541         int fgetpos(FILE * restrict stream,
14542              fpos_t * restrict pos);</pre>
14543 <h6>Description</h6>
14544 <p><!--para 2 -->
14545  The fgetpos function stores the current values of the parse state (if any) and file
14546  position indicator for the stream pointed to by stream in the object pointed to by pos.
14547  The values stored contain unspecified information usable by the fsetpos function for
14548  repositioning the stream to its position at the time of the call to the fgetpos function.
14549 <h6>Returns</h6>
14550 <p><!--para 3 -->
14551  If successful, the fgetpos function returns zero; on failure, the fgetpos function
14552  returns nonzero and stores an implementation-defined positive value in errno.
14553 <p><b> Forward references</b>: the fsetpos function (<a href="#7.19.9.3">7.19.9.3</a>).
14554
14555 <h5><a name="7.19.9.2" href="#7.19.9.2">7.19.9.2 The fseek function</a></h5>
14556 <h6>Synopsis</h6>
14557 <p><!--para 1 -->
14558 <pre>
14559         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14560         int fseek(FILE *stream, long int offset, int whence);</pre>
14561 <h6>Description</h6>
14562 <p><!--para 2 -->
14563  The fseek function sets the file position indicator for the stream pointed to by stream.
14564  If a read or write error occurs, the error indicator for the stream is set and fseek fails.
14565 <p><!--para 3 -->
14566  For a binary stream, the new position, measured in characters from the beginning of the
14567  file, is obtained by adding offset to the position specified by whence. The specified
14568  position is the beginning of the file if whence is SEEK_SET, the current value of the file
14569  position indicator if SEEK_CUR, or end-of-file if SEEK_END. A binary stream need not
14570  meaningfully support fseek calls with a whence value of SEEK_END.
14571 <p><!--para 4 -->
14572  For a text stream, either offset shall be zero, or offset shall be a value returned by
14573  an earlier successful call to the ftell function on a stream associated with the same file
14574  and whence shall be SEEK_SET.
14575 <!--page 315 -->
14576 <p><!--para 5 -->
14577  After determining the new position, a successful call to the fseek function undoes any
14578  effects of the ungetc function on the stream, clears the end-of-file indicator for the
14579  stream, and then establishes the new position. After a successful fseek call, the next
14580  operation on an update stream may be either input or output.
14581 <h6>Returns</h6>
14582 <p><!--para 6 -->
14583  The fseek function returns nonzero only for a request that cannot be satisfied.
14584 <p><b> Forward references</b>: the ftell function (<a href="#7.19.9.4">7.19.9.4</a>).
14585
14586 <h5><a name="7.19.9.3" href="#7.19.9.3">7.19.9.3 The fsetpos function</a></h5>
14587 <h6>Synopsis</h6>
14588 <p><!--para 1 -->
14589 <pre>
14590         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14591         int fsetpos(FILE *stream, const fpos_t *pos);</pre>
14592 <h6>Description</h6>
14593 <p><!--para 2 -->
14594  The fsetpos function sets the mbstate_t object (if any) and file position indicator
14595  for the stream pointed to by stream according to the value of the object pointed to by
14596  pos, which shall be a value obtained from an earlier successful call to the fgetpos
14597  function on a stream associated with the same file. If a read or write error occurs, the
14598  error indicator for the stream is set and fsetpos fails.
14599 <p><!--para 3 -->
14600  A successful call to the fsetpos function undoes any effects of the ungetc function
14601  on the stream, clears the end-of-file indicator for the stream, and then establishes the new
14602  parse state and position. After a successful fsetpos call, the next operation on an
14603  update stream may be either input or output.
14604 <h6>Returns</h6>
14605 <p><!--para 4 -->
14606  If successful, the fsetpos function returns zero; on failure, the fsetpos function
14607  returns nonzero and stores an implementation-defined positive value in errno.
14608
14609 <h5><a name="7.19.9.4" href="#7.19.9.4">7.19.9.4 The ftell function</a></h5>
14610 <h6>Synopsis</h6>
14611 <p><!--para 1 -->
14612 <pre>
14613         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14614         long int ftell(FILE *stream);</pre>
14615 <h6>Description</h6>
14616 <p><!--para 2 -->
14617  The ftell function obtains the current value of the file position indicator for the stream
14618  pointed to by stream. For a binary stream, the value is the number of characters from
14619  the beginning of the file. For a text stream, its file position indicator contains unspecified
14620  information, usable by the fseek function for returning the file position indicator for the
14621  stream to its position at the time of the ftell call; the difference between two such
14622  return values is not necessarily a meaningful measure of the number of characters written
14623 <!--page 316 -->
14624  or read.
14625 <h6>Returns</h6>
14626 <p><!--para 3 -->
14627  If successful, the ftell function returns the current value of the file position indicator
14628  for the stream. On failure, the ftell function returns -1L and stores an
14629  implementation-defined positive value in errno.
14630
14631 <h5><a name="7.19.9.5" href="#7.19.9.5">7.19.9.5 The rewind function</a></h5>
14632 <h6>Synopsis</h6>
14633 <p><!--para 1 -->
14634 <pre>
14635         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14636         void rewind(FILE *stream);</pre>
14637 <h6>Description</h6>
14638 <p><!--para 2 -->
14639  The rewind function sets the file position indicator for the stream pointed to by
14640  stream to the beginning of the file. It is equivalent to
14641 <pre>
14642         (void)fseek(stream, 0L, SEEK_SET)</pre>
14643  except that the error indicator for the stream is also cleared.
14644 <h6>Returns</h6>
14645 <p><!--para 3 -->
14646  The rewind function returns no value.
14647
14648 <h4><a name="7.19.10" href="#7.19.10">7.19.10 Error-handling functions</a></h4>
14649
14650 <h5><a name="7.19.10.1" href="#7.19.10.1">7.19.10.1 The clearerr function</a></h5>
14651 <h6>Synopsis</h6>
14652 <p><!--para 1 -->
14653 <pre>
14654         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14655         void clearerr(FILE *stream);</pre>
14656 <h6>Description</h6>
14657 <p><!--para 2 -->
14658  The clearerr function clears the end-of-file and error indicators for the stream pointed
14659  to by stream.
14660 <h6>Returns</h6>
14661 <p><!--para 3 -->
14662  The clearerr function returns no value.
14663 <!--page 317 -->
14664
14665 <h5><a name="7.19.10.2" href="#7.19.10.2">7.19.10.2 The feof function</a></h5>
14666 <h6>Synopsis</h6>
14667 <p><!--para 1 -->
14668 <pre>
14669         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14670         int feof(FILE *stream);</pre>
14671 <h6>Description</h6>
14672 <p><!--para 2 -->
14673  The feof function tests the end-of-file indicator for the stream pointed to by stream.
14674 <h6>Returns</h6>
14675 <p><!--para 3 -->
14676  The feof function returns nonzero if and only if the end-of-file indicator is set for
14677  stream.
14678
14679 <h5><a name="7.19.10.3" href="#7.19.10.3">7.19.10.3 The ferror function</a></h5>
14680 <h6>Synopsis</h6>
14681 <p><!--para 1 -->
14682 <pre>
14683         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14684         int ferror(FILE *stream);</pre>
14685 <h6>Description</h6>
14686 <p><!--para 2 -->
14687  The ferror function tests the error indicator for the stream pointed to by stream.
14688 <h6>Returns</h6>
14689 <p><!--para 3 -->
14690  The ferror function returns nonzero if and only if the error indicator is set for
14691  stream.
14692
14693 <h5><a name="7.19.10.4" href="#7.19.10.4">7.19.10.4 The perror function</a></h5>
14694 <h6>Synopsis</h6>
14695 <p><!--para 1 -->
14696 <pre>
14697         #include <a href="#7.19">&lt;stdio.h&gt;</a>
14698         void perror(const char *s);</pre>
14699 <h6>Description</h6>
14700 <p><!--para 2 -->
14701  The perror function maps the error number in the integer expression errno to an
14702  error message. It writes a sequence of characters to the standard error stream thus: first
14703  (if s is not a null pointer and the character pointed to by s is not the null character), the
14704  string pointed to by s followed by a colon (:) and a space; then an appropriate error
14705  message string followed by a new-line character. The contents of the error message
14706  strings are the same as those returned by the strerror function with argument errno.
14707 <h6>Returns</h6>
14708 <p><!--para 3 -->
14709  The perror function returns no value.
14710 <p><b> Forward references</b>: the strerror function (<a href="#7.21.6.2">7.21.6.2</a>).
14711 <!--page 318 -->
14712
14713 <h3><a name="7.20" href="#7.20">7.20 General utilities <stdlib.h></a></h3>
14714 <p><!--para 1 -->
14715  The header <a href="#7.20">&lt;stdlib.h&gt;</a> declares five types and several functions of general utility, and
14716  defines several macros.<sup><a href="#note257"><b>257)</b></a></sup>
14717 <p><!--para 2 -->
14718  The types declared are size_t and wchar_t (both described in <a href="#7.17">7.17</a>),
14719 <pre>
14720           div_t</pre>
14721  which is a structure type that is the type of the value returned by the div function,
14722 <pre>
14723           ldiv_t</pre>
14724  which is a structure type that is the type of the value returned by the ldiv function, and
14725 <pre>
14726           lldiv_t</pre>
14727  which is a structure type that is the type of the value returned by the lldiv function.
14728 <p><!--para 3 -->
14729  The macros defined are NULL (described in <a href="#7.17">7.17</a>);
14730 <pre>
14731           EXIT_FAILURE</pre>
14732  and
14733 <pre>
14734           EXIT_SUCCESS</pre>
14735  which expand to integer constant expressions that can be used as the argument to the
14736  exit function to return unsuccessful or successful termination status, respectively, to the
14737  host environment;
14738 <pre>
14739           RAND_MAX</pre>
14740  which expands to an integer constant expression that is the maximum value returned by
14741  the rand function; and
14742 <pre>
14743           MB_CUR_MAX</pre>
14744  which expands to a positive integer expression with type size_t that is the maximum
14745  number of bytes in a multibyte character for the extended character set specified by the
14746  current locale (category LC_CTYPE), which is never greater than MB_LEN_MAX.
14747  
14748  
14749  
14750  
14751 <!--page 319 -->
14752
14753 <h6>footnotes</h6>
14754 <p><small><a name="note257" href="#note257">257)</a> See ''future library directions'' (<a href="#7.26.10">7.26.10</a>).
14755 </small>
14756
14757 <h4><a name="7.20.1" href="#7.20.1">7.20.1 Numeric conversion functions</a></h4>
14758 <p><!--para 1 -->
14759  The functions atof, atoi, atol, and atoll need not affect the value of the integer
14760  expression errno on an error. If the value of the result cannot be represented, the
14761  behavior is undefined.
14762
14763 <h5><a name="7.20.1.1" href="#7.20.1.1">7.20.1.1 The atof function</a></h5>
14764 <h6>Synopsis</h6>
14765 <p><!--para 1 -->
14766 <pre>
14767         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
14768         double atof(const char *nptr);</pre>
14769 <h6>Description</h6>
14770 <p><!--para 2 -->
14771  The atof function converts the initial portion of the string pointed to by nptr to
14772  double representation. Except for the behavior on error, it is equivalent to
14773 <pre>
14774         strtod(nptr, (char **)NULL)</pre>
14775 <h6>Returns</h6>
14776 <p><!--para 3 -->
14777  The atof function returns the converted value.
14778 <p><b> Forward references</b>: the strtod, strtof, and strtold functions (<a href="#7.20.1.3">7.20.1.3</a>).
14779
14780 <h5><a name="7.20.1.2" href="#7.20.1.2">7.20.1.2 The atoi, atol, and atoll functions</a></h5>
14781 <h6>Synopsis</h6>
14782 <p><!--para 1 -->
14783 <pre>
14784         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
14785         int atoi(const char *nptr);
14786         long int atol(const char *nptr);
14787         long long int atoll(const char *nptr);</pre>
14788 <h6>Description</h6>
14789 <p><!--para 2 -->
14790  The atoi, atol, and atoll functions convert the initial portion of the string pointed
14791  to by nptr to int, long int, and long long int representation, respectively.
14792  Except for the behavior on error, they are equivalent to
14793 <pre>
14794         atoi: (int)strtol(nptr, (char **)NULL, 10)
14795         atol: strtol(nptr, (char **)NULL, 10)
14796         atoll: strtoll(nptr, (char **)NULL, 10)</pre>
14797 <h6>Returns</h6>
14798 <p><!--para 3 -->
14799  The atoi, atol, and atoll functions return the converted value.
14800 <p><b> Forward references</b>: the strtol, strtoll, strtoul, and strtoull functions
14801  (<a href="#7.20.1.4">7.20.1.4</a>).
14802 <!--page 320 -->
14803
14804 <h5><a name="7.20.1.3" href="#7.20.1.3">7.20.1.3 The strtod, strtof, and strtold functions</a></h5>
14805 <h6>Synopsis</h6>
14806 <p><!--para 1 -->
14807 <pre>
14808         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
14809         double strtod(const char * restrict nptr,
14810              char ** restrict endptr);
14811         float strtof(const char * restrict nptr,
14812              char ** restrict endptr);
14813         long double strtold(const char * restrict nptr,
14814              char ** restrict endptr);</pre>
14815 <h6>Description</h6>
14816 <p><!--para 2 -->
14817  The strtod, strtof, and strtold functions convert the initial portion of the string
14818  pointed to by nptr to double, float, and long double representation,
14819  respectively. First, they decompose the input string into three parts: an initial, possibly
14820  empty, sequence of white-space characters (as specified by the isspace function), a
14821  subject sequence resembling a floating-point constant or representing an infinity or NaN;
14822  and a final string of one or more unrecognized characters, including the terminating null
14823  character of the input string. Then, they attempt to convert the subject sequence to a
14824  floating-point number, and return the result.
14825 <p><!--para 3 -->
14826  The expected form of the subject sequence is an optional plus or minus sign, then one of
14827  the following:
14828 <ul>
14829 <li>  a nonempty sequence of decimal digits optionally containing a decimal-point
14830  character, then an optional exponent part as defined in <a href="#6.4.4.2">6.4.4.2</a>;
14831 <li>  a 0x or 0X, then a nonempty sequence of hexadecimal digits optionally containing a
14832  decimal-point character, then an optional binary exponent part as defined in <a href="#6.4.4.2">6.4.4.2</a>;
14833 <li>  INF or INFINITY, ignoring case
14834 <li>  NAN or NAN(n-char-sequenceopt), ignoring case in the NAN part, where:
14835 <pre>
14836           n-char-sequence:
14837                  digit
14838                  nondigit
14839                  n-char-sequence digit
14840                  n-char-sequence nondigit</pre>
14841 </ul>
14842  The subject sequence is defined as the longest initial subsequence of the input string,
14843  starting with the first non-white-space character, that is of the expected form. The subject
14844  sequence contains no characters if the input string is not of the expected form.
14845 <p><!--para 4 -->
14846  If the subject sequence has the expected form for a floating-point number, the sequence of
14847  characters starting with the first digit or the decimal-point character (whichever occurs
14848  first) is interpreted as a floating constant according to the rules of <a href="#6.4.4.2">6.4.4.2</a>, except that the
14849 <!--page 321 -->
14850  decimal-point character is used in place of a period, and that if neither an exponent part
14851  nor a decimal-point character appears in a decimal floating point number, or if a binary
14852  exponent part does not appear in a hexadecimal floating point number, an exponent part
14853  of the appropriate type with value zero is assumed to follow the last digit in the string. If
14854  the subject sequence begins with a minus sign, the sequence is interpreted as negated.<sup><a href="#note258"><b>258)</b></a></sup>
14855  A character sequence INF or INFINITY is interpreted as an infinity, if representable in
14856  the return type, else like a floating constant that is too large for the range of the return
14857  type. A character sequence NAN or NAN(n-char-sequenceopt), is interpreted as a quiet
14858  NaN, if supported in the return type, else like a subject sequence part that does not have
14859  the expected form; the meaning of the n-char sequences is implementation-defined.<sup><a href="#note259"><b>259)</b></a></sup> A
14860  pointer to the final string is stored in the object pointed to by endptr, provided that
14861  endptr is not a null pointer.
14862 <p><!--para 5 -->
14863  If the subject sequence has the hexadecimal form and FLT_RADIX is a power of 2, the
14864  value resulting from the conversion is correctly rounded.
14865 <p><!--para 6 -->
14866  In other than the "C" locale, additional locale-specific subject sequence forms may be
14867  accepted.
14868 <p><!--para 7 -->
14869  If the subject sequence is empty or does not have the expected form, no conversion is
14870  performed; the value of nptr is stored in the object pointed to by endptr, provided
14871  that endptr is not a null pointer.
14872 <h6> Recommended practice</h6>
14873 <p><!--para 8 -->
14874  If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, and
14875  the result is not exactly representable, the result should be one of the two numbers in the
14876  appropriate internal format that are adjacent to the hexadecimal floating source value,
14877  with the extra stipulation that the error should have a correct sign for the current rounding
14878  direction.
14879 <p><!--para 9 -->
14880  If the subject sequence has the decimal form and at most DECIMAL_DIG (defined in
14881  <a href="#7.7">&lt;float.h&gt;</a>) significant digits, the result should be correctly rounded. If the subject
14882  sequence D has the decimal form and more than DECIMAL_DIG significant digits,
14883  consider the two bounding, adjacent decimal strings L and U, both having
14884  DECIMAL_DIG significant digits, such that the values of L, D, and U satisfy L &lt;= D &lt;= U.
14885  The result should be one of the (equal or adjacent) values that would be obtained by
14886  correctly rounding L and U according to the current rounding direction, with the extra
14887  
14888 <!--page 322 -->
14889  stipulation that the error with respect to D should have a correct sign for the current
14890  rounding direction.<sup><a href="#note260"><b>260)</b></a></sup>
14891 <h6>Returns</h6>
14892 <p><!--para 10 -->
14893  The functions return the converted value, if any. If no conversion could be performed,
14894  zero is returned. If the correct value is outside the range of representable values, plus or
14895  minus HUGE_VAL, HUGE_VALF, or HUGE_VALL is returned (according to the return
14896  type and sign of the value), and the value of the macro ERANGE is stored in errno. If
14897  the result underflows (<a href="#7.12.1">7.12.1</a>), the functions return a value whose magnitude is no greater
14898  than the smallest normalized positive number in the return type; whether errno acquires
14899  the value ERANGE is implementation-defined.
14900
14901 <h6>footnotes</h6>
14902 <p><small><a name="note258" href="#note258">258)</a> It is unspecified whether a minus-signed sequence is converted to a negative number directly or by
14903  negating the value resulting from converting the corresponding unsigned sequence (see <a href="#F.5">F.5</a>); the two
14904  methods may yield different results if rounding is toward positive or negative infinity. In either case,
14905  the functions honor the sign of zero if floating-point arithmetic supports signed zeros.
14906 </small>
14907 <p><small><a name="note259" href="#note259">259)</a> An implementation may use the n-char sequence to determine extra information to be represented in
14908  the NaN's significand.
14909 </small>
14910 <p><small><a name="note260" href="#note260">260)</a> DECIMAL_DIG, defined in <a href="#7.7">&lt;float.h&gt;</a>, should be sufficiently large that L and U will usually round
14911  to the same internal floating value, but if not will round to adjacent values.
14912 </small>
14913
14914 <h5><a name="7.20.1.4" href="#7.20.1.4">7.20.1.4 The strtol, strtoll, strtoul, and strtoull functions</a></h5>
14915 <h6>Synopsis</h6>
14916 <p><!--para 1 -->
14917 <pre>
14918          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
14919          long int strtol(
14920               const char * restrict nptr,
14921               char ** restrict endptr,
14922               int base);
14923          long long int strtoll(
14924               const char * restrict nptr,
14925               char ** restrict endptr,
14926               int base);
14927          unsigned long int strtoul(
14928               const char * restrict nptr,
14929               char ** restrict endptr,
14930               int base);
14931          unsigned long long int strtoull(
14932               const char * restrict nptr,
14933               char ** restrict endptr,
14934               int base);</pre>
14935 <h6>Description</h6>
14936 <p><!--para 2 -->
14937  The strtol, strtoll, strtoul, and strtoull functions convert the initial
14938  portion of the string pointed to by nptr to long int, long long int, unsigned
14939  long int, and unsigned long long int representation, respectively. First,
14940  they decompose the input string into three parts: an initial, possibly empty, sequence of
14941  white-space characters (as specified by the isspace function), a subject sequence
14942  
14943  
14944 <!--page 323 -->
14945  resembling an integer represented in some radix determined by the value of base, and a
14946  final string of one or more unrecognized characters, including the terminating null
14947  character of the input string. Then, they attempt to convert the subject sequence to an
14948  integer, and return the result.
14949 <p><!--para 3 -->
14950  If the value of base is zero, the expected form of the subject sequence is that of an
14951  integer constant as described in <a href="#6.4.4.1">6.4.4.1</a>, optionally preceded by a plus or minus sign, but
14952  not including an integer suffix. If the value of base is between 2 and 36 (inclusive), the
14953  expected form of the subject sequence is a sequence of letters and digits representing an
14954  integer with the radix specified by base, optionally preceded by a plus or minus sign,
14955  but not including an integer suffix. The letters from a (or A) through z (or Z) are
14956  ascribed the values 10 through 35; only letters and digits whose ascribed values are less
14957  than that of base are permitted. If the value of base is 16, the characters 0x or 0X may
14958  optionally precede the sequence of letters and digits, following the sign if present.
14959 <p><!--para 4 -->
14960  The subject sequence is defined as the longest initial subsequence of the input string,
14961  starting with the first non-white-space character, that is of the expected form. The subject
14962  sequence contains no characters if the input string is empty or consists entirely of white
14963  space, or if the first non-white-space character is other than a sign or a permissible letter
14964  or digit.
14965 <p><!--para 5 -->
14966  If the subject sequence has the expected form and the value of base is zero, the sequence
14967  of characters starting with the first digit is interpreted as an integer constant according to
14968  the rules of <a href="#6.4.4.1">6.4.4.1</a>. If the subject sequence has the expected form and the value of base
14969  is between 2 and 36, it is used as the base for conversion, ascribing to each letter its value
14970  as given above. If the subject sequence begins with a minus sign, the value resulting from
14971  the conversion is negated (in the return type). A pointer to the final string is stored in the
14972  object pointed to by endptr, provided that endptr is not a null pointer.
14973 <p><!--para 6 -->
14974  In other than the "C" locale, additional locale-specific subject sequence forms may be
14975  accepted.
14976 <p><!--para 7 -->
14977  If the subject sequence is empty or does not have the expected form, no conversion is
14978  performed; the value of nptr is stored in the object pointed to by endptr, provided
14979  that endptr is not a null pointer.
14980 <h6>Returns</h6>
14981 <p><!--para 8 -->
14982  The strtol, strtoll, strtoul, and strtoull functions return the converted
14983  value, if any. If no conversion could be performed, zero is returned. If the correct value
14984  is outside the range of representable values, LONG_MIN, LONG_MAX, LLONG_MIN,
14985  LLONG_MAX, ULONG_MAX, or ULLONG_MAX is returned (according to the return type
14986  and sign of the value, if any), and the value of the macro ERANGE is stored in errno.
14987 <!--page 324 -->
14988
14989 <h4><a name="7.20.2" href="#7.20.2">7.20.2 Pseudo-random sequence generation functions</a></h4>
14990
14991 <h5><a name="7.20.2.1" href="#7.20.2.1">7.20.2.1 The rand function</a></h5>
14992 <h6>Synopsis</h6>
14993 <p><!--para 1 -->
14994 <pre>
14995         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
14996         int rand(void);</pre>
14997 <h6>Description</h6>
14998 <p><!--para 2 -->
14999  The rand function computes a sequence of pseudo-random integers in the range 0 to
15000  RAND_MAX.
15001 <p><!--para 3 -->
15002  The implementation shall behave as if no library function calls the rand function.
15003 <h6>Returns</h6>
15004 <p><!--para 4 -->
15005  The rand function returns a pseudo-random integer.
15006  Environmental limits
15007 <p><!--para 5 -->
15008  The value of the RAND_MAX macro shall be at least 32767.
15009
15010 <h5><a name="7.20.2.2" href="#7.20.2.2">7.20.2.2 The srand function</a></h5>
15011 <h6>Synopsis</h6>
15012 <p><!--para 1 -->
15013 <pre>
15014         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15015         void srand(unsigned int seed);</pre>
15016 <h6>Description</h6>
15017 <p><!--para 2 -->
15018  The srand function uses the argument as a seed for a new sequence of pseudo-random
15019  numbers to be returned by subsequent calls to rand. If srand is then called with the
15020  same seed value, the sequence of pseudo-random numbers shall be repeated. If rand is
15021  called before any calls to srand have been made, the same sequence shall be generated
15022  as when srand is first called with a seed value of 1.
15023 <p><!--para 3 -->
15024  The implementation shall behave as if no library function calls the srand function.
15025 <h6>Returns</h6>
15026 <p><!--para 4 -->
15027  The srand function returns no value.
15028 <p><!--para 5 -->
15029  EXAMPLE       The following functions define a portable implementation of rand and srand.
15030 <!--page 325 -->
15031 <pre>
15032         static unsigned long int next = 1;
15033         int rand(void)   // RAND_MAX assumed to be 32767
15034         {
15035               next = next * 1103515245 + 12345;
15036               return (unsigned int)(next/65536) % 32768;
15037         }
15038          void srand(unsigned int seed)
15039          {
15040                next = seed;
15041          }</pre>
15042  
15043
15044 <h4><a name="7.20.3" href="#7.20.3">7.20.3 Memory management functions</a></h4>
15045 <p><!--para 1 -->
15046  The order and contiguity of storage allocated by successive calls to the calloc,
15047  malloc, and realloc functions is unspecified. The pointer returned if the allocation
15048  succeeds is suitably aligned so that it may be assigned to a pointer to any type of object
15049  and then used to access such an object or an array of such objects in the space allocated
15050  (until the space is explicitly deallocated). The lifetime of an allocated object extends
15051  from the allocation until the deallocation. Each such allocation shall yield a pointer to an
15052  object disjoint from any other object. The pointer returned points to the start (lowest byte
15053  address) of the allocated space. If the space cannot be allocated, a null pointer is
15054  returned. If the size of the space requested is zero, the behavior is implementation-
15055  defined: either a null pointer is returned, or the behavior is as if the size were some
15056  nonzero value, except that the returned pointer shall not be used to access an object.
15057
15058 <h5><a name="7.20.3.1" href="#7.20.3.1">7.20.3.1 The calloc function</a></h5>
15059 <h6>Synopsis</h6>
15060 <p><!--para 1 -->
15061 <pre>
15062          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15063          void *calloc(size_t nmemb, size_t size);</pre>
15064 <h6>Description</h6>
15065 <p><!--para 2 -->
15066  The calloc function allocates space for an array of nmemb objects, each of whose size
15067  is size. The space is initialized to all bits zero.<sup><a href="#note261"><b>261)</b></a></sup>
15068 <h6>Returns</h6>
15069 <p><!--para 3 -->
15070  The calloc function returns either a null pointer or a pointer to the allocated space.
15071
15072 <h6>footnotes</h6>
15073 <p><small><a name="note261" href="#note261">261)</a> Note that this need not be the same as the representation of floating-point zero or a null pointer
15074  constant.
15075 </small>
15076
15077 <h5><a name="7.20.3.2" href="#7.20.3.2">7.20.3.2 The free function</a></h5>
15078 <h6>Synopsis</h6>
15079 <p><!--para 1 -->
15080 <pre>
15081          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15082          void free(void *ptr);</pre>
15083 <h6>Description</h6>
15084 <p><!--para 2 -->
15085  The free function causes the space pointed to by ptr to be deallocated, that is, made
15086  available for further allocation. If ptr is a null pointer, no action occurs. Otherwise, if
15087  the argument does not match a pointer earlier returned by the calloc, malloc, or
15088  
15089  
15090 <!--page 326 -->
15091  realloc function, or if the space has been deallocated by a call to free or realloc,
15092  the behavior is undefined.
15093 <h6>Returns</h6>
15094 <p><!--para 3 -->
15095  The free function returns no value.
15096
15097 <h5><a name="7.20.3.3" href="#7.20.3.3">7.20.3.3 The malloc function</a></h5>
15098 <h6>Synopsis</h6>
15099 <p><!--para 1 -->
15100 <pre>
15101         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15102         void *malloc(size_t size);</pre>
15103 <h6>Description</h6>
15104 <p><!--para 2 -->
15105  The malloc function allocates space for an object whose size is specified by size and
15106  whose value is indeterminate.
15107 <h6>Returns</h6>
15108 <p><!--para 3 -->
15109  The malloc function returns either a null pointer or a pointer to the allocated space.
15110
15111 <h5><a name="7.20.3.4" href="#7.20.3.4">7.20.3.4 The realloc function</a></h5>
15112 <h6>Synopsis</h6>
15113 <p><!--para 1 -->
15114 <pre>
15115         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15116         void *realloc(void *ptr, size_t size);</pre>
15117 <h6>Description</h6>
15118 <p><!--para 2 -->
15119  The realloc function deallocates the old object pointed to by ptr and returns a
15120  pointer to a new object that has the size specified by size. The contents of the new
15121  object shall be the same as that of the old object prior to deallocation, up to the lesser of
15122  the new and old sizes. Any bytes in the new object beyond the size of the old object have
15123  indeterminate values.
15124 <p><!--para 3 -->
15125  If ptr is a null pointer, the realloc function behaves like the malloc function for the
15126  specified size. Otherwise, if ptr does not match a pointer earlier returned by the
15127  calloc, malloc, or realloc function, or if the space has been deallocated by a call
15128  to the free or realloc function, the behavior is undefined. If memory for the new
15129  object cannot be allocated, the old object is not deallocated and its value is unchanged.
15130 <h6>Returns</h6>
15131 <p><!--para 4 -->
15132  The realloc function returns a pointer to the new object (which may have the same
15133  value as a pointer to the old object), or a null pointer if the new object could not be
15134  allocated.
15135 <!--page 327 -->
15136
15137 <h4><a name="7.20.4" href="#7.20.4">7.20.4 Communication with the environment</a></h4>
15138
15139 <h5><a name="7.20.4.1" href="#7.20.4.1">7.20.4.1 The abort function</a></h5>
15140 <h6>Synopsis</h6>
15141 <p><!--para 1 -->
15142 <pre>
15143         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15144         void abort(void);</pre>
15145 <h6>Description</h6>
15146 <p><!--para 2 -->
15147  The abort function causes abnormal program termination to occur, unless the signal
15148  SIGABRT is being caught and the signal handler does not return. Whether open streams
15149  with unwritten buffered data are flushed, open streams are closed, or temporary files are
15150  removed is implementation-defined. An implementation-defined form of the status
15151  unsuccessful termination is returned to the host environment by means of the function
15152  call raise(SIGABRT).
15153 <h6>Returns</h6>
15154 <p><!--para 3 -->
15155  The abort function does not return to its caller.
15156
15157 <h5><a name="7.20.4.2" href="#7.20.4.2">7.20.4.2 The atexit function</a></h5>
15158 <h6>Synopsis</h6>
15159 <p><!--para 1 -->
15160 <pre>
15161         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15162         int atexit(void (*func)(void));</pre>
15163 <h6>Description</h6>
15164 <p><!--para 2 -->
15165  The atexit function registers the function pointed to by func, to be called without
15166  arguments at normal program termination.
15167  Environmental limits
15168 <p><!--para 3 -->
15169  The implementation shall support the registration of at least 32 functions.
15170 <h6>Returns</h6>
15171 <p><!--para 4 -->
15172  The atexit function returns zero if the registration succeeds, nonzero if it fails.
15173 <p><b> Forward references</b>: the exit function (<a href="#7.20.4.3">7.20.4.3</a>).
15174
15175 <h5><a name="7.20.4.3" href="#7.20.4.3">7.20.4.3 The exit function</a></h5>
15176 <h6>Synopsis</h6>
15177 <p><!--para 1 -->
15178 <pre>
15179         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15180         void exit(int status);</pre>
15181 <h6>Description</h6>
15182 <p><!--para 2 -->
15183  The exit function causes normal program termination to occur. If more than one call to
15184  the exit function is executed by a program, the behavior is undefined.
15185 <!--page 328 -->
15186 <p><!--para 3 -->
15187  First, all functions registered by the atexit function are called, in the reverse order of
15188  their registration,<sup><a href="#note262"><b>262)</b></a></sup> except that a function is called after any previously registered
15189  functions that had already been called at the time it was registered. If, during the call to
15190  any such function, a call to the longjmp function is made that would terminate the call
15191  to the registered function, the behavior is undefined.
15192 <p><!--para 4 -->
15193  Next, all open streams with unwritten buffered data are flushed, all open streams are
15194  closed, and all files created by the tmpfile function are removed.
15195 <p><!--para 5 -->
15196  Finally, control is returned to the host environment. If the value of status is zero or
15197  EXIT_SUCCESS, an implementation-defined form of the status successful termination is
15198  returned. If the value of status is EXIT_FAILURE, an implementation-defined form
15199  of the status unsuccessful termination is returned. Otherwise the status returned is
15200  implementation-defined.
15201 <h6>Returns</h6>
15202 <p><!--para 6 -->
15203  The exit function cannot return to its caller.
15204
15205 <h6>footnotes</h6>
15206 <p><small><a name="note262" href="#note262">262)</a> Each function is called as many times as it was registered, and in the correct order with respect to
15207  other registered functions.
15208 </small>
15209
15210 <h5><a name="7.20.4.4" href="#7.20.4.4">7.20.4.4 The _Exit function</a></h5>
15211 <h6>Synopsis</h6>
15212 <p><!--para 1 -->
15213 <pre>
15214          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15215          void _Exit(int status);</pre>
15216 <h6>Description</h6>
15217 <p><!--para 2 -->
15218  The _Exit function causes normal program termination to occur and control to be
15219  returned to the host environment. No functions registered by the atexit function or
15220  signal handlers registered by the signal function are called. The status returned to the
15221  host environment is determined in the same way as for the exit function (<a href="#7.20.4.3">7.20.4.3</a>).
15222  Whether open streams with unwritten buffered data are flushed, open streams are closed,
15223  or temporary files are removed is implementation-defined.
15224 <h6>Returns</h6>
15225 <p><!--para 3 -->
15226  The _Exit function cannot return to its caller.
15227  
15228  
15229  
15230  
15231 <!--page 329 -->
15232
15233 <h5><a name="7.20.4.5" href="#7.20.4.5">7.20.4.5 The getenv function</a></h5>
15234 <h6>Synopsis</h6>
15235 <p><!--para 1 -->
15236 <pre>
15237         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15238         char *getenv(const char *name);</pre>
15239 <h6>Description</h6>
15240 <p><!--para 2 -->
15241  The getenv function searches an environment list, provided by the host environment,
15242  for a string that matches the string pointed to by name. The set of environment names
15243  and the method for altering the environment list are implementation-defined.
15244 <p><!--para 3 -->
15245  The implementation shall behave as if no library function calls the getenv function.
15246 <h6>Returns</h6>
15247 <p><!--para 4 -->
15248  The getenv function returns a pointer to a string associated with the matched list
15249  member. The string pointed to shall not be modified by the program, but may be
15250  overwritten by a subsequent call to the getenv function. If the specified name cannot
15251  be found, a null pointer is returned.
15252
15253 <h5><a name="7.20.4.6" href="#7.20.4.6">7.20.4.6 The system function</a></h5>
15254 <h6>Synopsis</h6>
15255 <p><!--para 1 -->
15256 <pre>
15257         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15258         int system(const char *string);</pre>
15259 <h6>Description</h6>
15260 <p><!--para 2 -->
15261  If string is a null pointer, the system function determines whether the host
15262  environment has a command processor. If string is not a null pointer, the system
15263  function passes the string pointed to by string to that command processor to be
15264  executed in a manner which the implementation shall document; this might then cause the
15265  program calling system to behave in a non-conforming manner or to terminate.
15266 <h6>Returns</h6>
15267 <p><!--para 3 -->
15268  If the argument is a null pointer, the system function returns nonzero only if a
15269  command processor is available. If the argument is not a null pointer, and the system
15270  function does return, it returns an implementation-defined value.
15271 <!--page 330 -->
15272
15273 <h4><a name="7.20.5" href="#7.20.5">7.20.5 Searching and sorting utilities</a></h4>
15274 <p><!--para 1 -->
15275  These utilities make use of a comparison function to search or sort arrays of unspecified
15276  type. Where an argument declared as size_t nmemb specifies the length of the array
15277  for a function, nmemb can have the value zero on a call to that function; the comparison
15278  function is not called, a search finds no matching element, and sorting performs no
15279  rearrangement. Pointer arguments on such a call shall still have valid values, as described
15280  in <a href="#7.1.4">7.1.4</a>.
15281 <p><!--para 2 -->
15282  The implementation shall ensure that the second argument of the comparison function
15283  (when called from bsearch), or both arguments (when called from qsort), are
15284  pointers to elements of the array.<sup><a href="#note263"><b>263)</b></a></sup> The first argument when called from bsearch
15285  shall equal key.
15286 <p><!--para 3 -->
15287  The comparison function shall not alter the contents of the array. The implementation
15288  may reorder elements of the array between calls to the comparison function, but shall not
15289  alter the contents of any individual element.
15290 <p><!--para 4 -->
15291  When the same objects (consisting of size bytes, irrespective of their current positions
15292  in the array) are passed more than once to the comparison function, the results shall be
15293  consistent with one another. That is, for qsort they shall define a total ordering on the
15294  array, and for bsearch the same object shall always compare the same way with the
15295  key.
15296 <p><!--para 5 -->
15297  A sequence point occurs immediately before and immediately after each call to the
15298  comparison function, and also between any call to the comparison function and any
15299  movement of the objects passed as arguments to that call.
15300
15301 <h6>footnotes</h6>
15302 <p><small><a name="note263" href="#note263">263)</a> That is, if the value passed is p, then the following expressions are always nonzero:
15303
15304 <pre>
15305           ((char *)p - (char *)base) % size == 0
15306           (char *)p &gt;= (char *)base
15307           (char *)p &lt; (char *)base + nmemb * size</pre>
15308 </small>
15309
15310 <h5><a name="7.20.5.1" href="#7.20.5.1">7.20.5.1 The bsearch function</a></h5>
15311 <h6>Synopsis</h6>
15312 <p><!--para 1 -->
15313 <pre>
15314           #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15315           void *bsearch(const void *key, const void *base,
15316                size_t nmemb, size_t size,
15317                int (*compar)(const void *, const void *));</pre>
15318 <h6>Description</h6>
15319 <p><!--para 2 -->
15320  The bsearch function searches an array of nmemb objects, the initial element of which
15321  is pointed to by base, for an element that matches the object pointed to by key. The
15322  
15323  
15324 <!--page 331 -->
15325  size of each element of the array is specified by size.
15326 <p><!--para 3 -->
15327  The comparison function pointed to by compar is called with two arguments that point
15328  to the key object and to an array element, in that order. The function shall return an
15329  integer less than, equal to, or greater than zero if the key object is considered,
15330  respectively, to be less than, to match, or to be greater than the array element. The array
15331  shall consist of: all the elements that compare less than, all the elements that compare
15332  equal to, and all the elements that compare greater than the key object, in that order.<sup><a href="#note264"><b>264)</b></a></sup>
15333 <h6>Returns</h6>
15334 <p><!--para 4 -->
15335  The bsearch function returns a pointer to a matching element of the array, or a null
15336  pointer if no match is found. If two elements compare as equal, which element is
15337  matched is unspecified.
15338
15339 <h6>footnotes</h6>
15340 <p><small><a name="note264" href="#note264">264)</a> In practice, the entire array is sorted according to the comparison function.
15341 </small>
15342
15343 <h5><a name="7.20.5.2" href="#7.20.5.2">7.20.5.2 The qsort function</a></h5>
15344 <h6>Synopsis</h6>
15345 <p><!--para 1 -->
15346 <pre>
15347           #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15348           void qsort(void *base, size_t nmemb, size_t size,
15349                int (*compar)(const void *, const void *));</pre>
15350 <h6>Description</h6>
15351 <p><!--para 2 -->
15352  The qsort function sorts an array of nmemb objects, the initial element of which is
15353  pointed to by base. The size of each object is specified by size.
15354 <p><!--para 3 -->
15355  The contents of the array are sorted into ascending order according to a comparison
15356  function pointed to by compar, which is called with two arguments that point to the
15357  objects being compared. The function shall return an integer less than, equal to, or
15358  greater than zero if the first argument is considered to be respectively less than, equal to,
15359  or greater than the second.
15360 <p><!--para 4 -->
15361  If two elements compare as equal, their order in the resulting sorted array is unspecified.
15362 <h6>Returns</h6>
15363 <p><!--para 5 -->
15364  The qsort function returns no value.
15365  
15366  
15367  
15368  
15369 <!--page 332 -->
15370
15371 <h4><a name="7.20.6" href="#7.20.6">7.20.6 Integer arithmetic functions</a></h4>
15372
15373 <h5><a name="7.20.6.1" href="#7.20.6.1">7.20.6.1 The abs, labs and llabs functions</a></h5>
15374 <h6>Synopsis</h6>
15375 <p><!--para 1 -->
15376 <pre>
15377          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15378          int abs(int j);
15379          long int labs(long int j);
15380          long long int llabs(long long int j);</pre>
15381 <h6>Description</h6>
15382 <p><!--para 2 -->
15383  The abs, labs, and llabs functions compute the absolute value of an integer j. If the
15384  result cannot be represented, the behavior is undefined.<sup><a href="#note265"><b>265)</b></a></sup>
15385 <h6>Returns</h6>
15386 <p><!--para 3 -->
15387  The abs, labs, and llabs, functions return the absolute value.
15388
15389 <h6>footnotes</h6>
15390 <p><small><a name="note265" href="#note265">265)</a> The absolute value of the most negative number cannot be represented in two's complement.
15391 </small>
15392
15393 <h5><a name="7.20.6.2" href="#7.20.6.2">7.20.6.2 The div, ldiv, and lldiv functions</a></h5>
15394 <h6>Synopsis</h6>
15395 <p><!--para 1 -->
15396 <pre>
15397          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15398          div_t div(int numer, int denom);
15399          ldiv_t ldiv(long int numer, long int denom);
15400          lldiv_t lldiv(long long int numer, long long int denom);</pre>
15401 <h6>Description</h6>
15402 <p><!--para 2 -->
15403  The div, ldiv, and lldiv, functions compute numer / denom and numer %
15404  denom in a single operation.
15405 <h6>Returns</h6>
15406 <p><!--para 3 -->
15407  The div, ldiv, and lldiv functions return a structure of type div_t, ldiv_t, and
15408  lldiv_t, respectively, comprising both the quotient and the remainder. The structures
15409  shall contain (in either order) the members quot (the quotient) and rem (the remainder),
15410  each of which has the same type as the arguments numer and denom. If either part of
15411  the result cannot be represented, the behavior is undefined.
15412  
15413  
15414  
15415  
15416 <!--page 333 -->
15417
15418 <h4><a name="7.20.7" href="#7.20.7">7.20.7 Multibyte/wide character conversion functions</a></h4>
15419 <p><!--para 1 -->
15420  The behavior of the multibyte character functions is affected by the LC_CTYPE category
15421  of the current locale. For a state-dependent encoding, each function is placed into its
15422  initial conversion state by a call for which its character pointer argument, s, is a null
15423  pointer. Subsequent calls with s as other than a null pointer cause the internal conversion
15424  state of the function to be altered as necessary. A call with s as a null pointer causes
15425  these functions to return a nonzero value if encodings have state dependency, and zero
15426  otherwise.<sup><a href="#note266"><b>266)</b></a></sup> Changing the LC_CTYPE category causes the conversion state of these
15427  functions to be indeterminate.
15428
15429 <h6>footnotes</h6>
15430 <p><small><a name="note266" href="#note266">266)</a> If the locale employs special bytes to change the shift state, these bytes do not produce separate wide
15431  character codes, but are grouped with an adjacent multibyte character.
15432 </small>
15433
15434 <h5><a name="7.20.7.1" href="#7.20.7.1">7.20.7.1 The mblen function</a></h5>
15435 <h6>Synopsis</h6>
15436 <p><!--para 1 -->
15437 <pre>
15438          #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15439          int mblen(const char *s, size_t n);</pre>
15440 <h6>Description</h6>
15441 <p><!--para 2 -->
15442  If s is not a null pointer, the mblen function determines the number of bytes contained
15443  in the multibyte character pointed to by s. Except that the conversion state of the
15444  mbtowc function is not affected, it is equivalent to
15445 <p><!--para 3 -->
15446 <pre>
15447          mbtowc((wchar_t *)0, s, n);</pre>
15448  The implementation shall behave as if no library function calls the mblen function.
15449 <h6>Returns</h6>
15450 <p><!--para 4 -->
15451  If s is a null pointer, the mblen function returns a nonzero or zero value, if multibyte
15452  character encodings, respectively, do or do not have state-dependent encodings. If s is
15453  not a null pointer, the mblen function either returns 0 (if s points to the null character),
15454  or returns the number of bytes that are contained in the multibyte character (if the next n
15455  or fewer bytes form a valid multibyte character), or returns -1 (if they do not form a valid
15456  multibyte character).
15457 <p><b> Forward references</b>: the mbtowc function (<a href="#7.20.7.2">7.20.7.2</a>).
15458  
15459  
15460  
15461  
15462 <!--page 334 -->
15463
15464 <h5><a name="7.20.7.2" href="#7.20.7.2">7.20.7.2 The mbtowc function</a></h5>
15465 <h6>Synopsis</h6>
15466 <p><!--para 1 -->
15467 <pre>
15468         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15469         int mbtowc(wchar_t * restrict pwc,
15470              const char * restrict s,
15471              size_t n);</pre>
15472 <h6>Description</h6>
15473 <p><!--para 2 -->
15474  If s is not a null pointer, the mbtowc function inspects at most n bytes beginning with
15475  the byte pointed to by s to determine the number of bytes needed to complete the next
15476  multibyte character (including any shift sequences). If the function determines that the
15477  next multibyte character is complete and valid, it determines the value of the
15478  corresponding wide character and then, if pwc is not a null pointer, stores that value in
15479  the object pointed to by pwc. If the corresponding wide character is the null wide
15480  character, the function is left in the initial conversion state.
15481 <p><!--para 3 -->
15482  The implementation shall behave as if no library function calls the mbtowc function.
15483 <h6>Returns</h6>
15484 <p><!--para 4 -->
15485  If s is a null pointer, the mbtowc function returns a nonzero or zero value, if multibyte
15486  character encodings, respectively, do or do not have state-dependent encodings. If s is
15487  not a null pointer, the mbtowc function either returns 0 (if s points to the null character),
15488  or returns the number of bytes that are contained in the converted multibyte character (if
15489  the next n or fewer bytes form a valid multibyte character), or returns -1 (if they do not
15490  form a valid multibyte character).
15491 <p><!--para 5 -->
15492  In no case will the value returned be greater than n or the value of the MB_CUR_MAX
15493  macro.
15494
15495 <h5><a name="7.20.7.3" href="#7.20.7.3">7.20.7.3 The wctomb function</a></h5>
15496 <h6>Synopsis</h6>
15497 <p><!--para 1 -->
15498 <pre>
15499         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15500         int wctomb(char *s, wchar_t wc);</pre>
15501 <h6>Description</h6>
15502 <p><!--para 2 -->
15503  The wctomb function determines the number of bytes needed to represent the multibyte
15504  character corresponding to the wide character given by wc (including any shift
15505  sequences), and stores the multibyte character representation in the array whose first
15506  element is pointed to by s (if s is not a null pointer). At most MB_CUR_MAX characters
15507  are stored. If wc is a null wide character, a null byte is stored, preceded by any shift
15508  sequence needed to restore the initial shift state, and the function is left in the initial
15509  conversion state.
15510 <!--page 335 -->
15511 <p><!--para 3 -->
15512  The implementation shall behave as if no library function calls the wctomb function.
15513 <h6>Returns</h6>
15514 <p><!--para 4 -->
15515  If s is a null pointer, the wctomb function returns a nonzero or zero value, if multibyte
15516  character encodings, respectively, do or do not have state-dependent encodings. If s is
15517  not a null pointer, the wctomb function returns -1 if the value of wc does not correspond
15518  to a valid multibyte character, or returns the number of bytes that are contained in the
15519  multibyte character corresponding to the value of wc.
15520 <p><!--para 5 -->
15521  In no case will the value returned be greater than the value of the MB_CUR_MAX macro.
15522
15523 <h4><a name="7.20.8" href="#7.20.8">7.20.8 Multibyte/wide string conversion functions</a></h4>
15524 <p><!--para 1 -->
15525  The behavior of the multibyte string functions is affected by the LC_CTYPE category of
15526  the current locale.
15527
15528 <h5><a name="7.20.8.1" href="#7.20.8.1">7.20.8.1 The mbstowcs function</a></h5>
15529 <h6>Synopsis</h6>
15530 <p><!--para 1 -->
15531 <pre>
15532           #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15533           size_t mbstowcs(wchar_t * restrict pwcs,
15534                const char * restrict s,
15535                size_t n);</pre>
15536 <h6>Description</h6>
15537 <p><!--para 2 -->
15538  The mbstowcs function converts a sequence of multibyte characters that begins in the
15539  initial shift state from the array pointed to by s into a sequence of corresponding wide
15540  characters and stores not more than n wide characters into the array pointed to by pwcs.
15541  No multibyte characters that follow a null character (which is converted into a null wide
15542  character) will be examined or converted. Each multibyte character is converted as if by
15543  a call to the mbtowc function, except that the conversion state of the mbtowc function is
15544  not affected.
15545 <p><!--para 3 -->
15546  No more than n elements will be modified in the array pointed to by pwcs. If copying
15547  takes place between objects that overlap, the behavior is undefined.
15548 <h6>Returns</h6>
15549 <p><!--para 4 -->
15550  If an invalid multibyte character is encountered, the mbstowcs function returns
15551  (size_t)(-1). Otherwise, the mbstowcs function returns the number of array
15552  elements modified, not including a terminating null wide character, if any.<sup><a href="#note267"><b>267)</b></a></sup>
15553  
15554  
15555  
15556  
15557 <!--page 336 -->
15558
15559 <h6>footnotes</h6>
15560 <p><small><a name="note267" href="#note267">267)</a> The array will not be null-terminated if the value returned is n.
15561 </small>
15562
15563 <h5><a name="7.20.8.2" href="#7.20.8.2">7.20.8.2 The wcstombs function</a></h5>
15564 <h6>Synopsis</h6>
15565 <p><!--para 1 -->
15566 <pre>
15567         #include <a href="#7.20">&lt;stdlib.h&gt;</a>
15568         size_t wcstombs(char * restrict s,
15569              const wchar_t * restrict pwcs,
15570              size_t n);</pre>
15571 <h6>Description</h6>
15572 <p><!--para 2 -->
15573  The wcstombs function converts a sequence of wide characters from the array pointed
15574  to by pwcs into a sequence of corresponding multibyte characters that begins in the
15575  initial shift state, and stores these multibyte characters into the array pointed to by s,
15576  stopping if a multibyte character would exceed the limit of n total bytes or if a null
15577  character is stored. Each wide character is converted as if by a call to the wctomb
15578  function, except that the conversion state of the wctomb function is not affected.
15579 <p><!--para 3 -->
15580  No more than n bytes will be modified in the array pointed to by s. If copying takes place
15581  between objects that overlap, the behavior is undefined.
15582 <h6>Returns</h6>
15583 <p><!--para 4 -->
15584  If a wide character is encountered that does not correspond to a valid multibyte character,
15585  the wcstombs function returns (size_t)(-1). Otherwise, the wcstombs function
15586  returns the number of bytes modified, not including a terminating null character, if
15587  any.267)
15588 <!--page 337 -->
15589
15590 <h3><a name="7.21" href="#7.21">7.21 String handling <string.h></a></h3>
15591
15592 <h4><a name="7.21.1" href="#7.21.1">7.21.1 String function conventions</a></h4>
15593 <p><!--para 1 -->
15594  The header <a href="#7.21">&lt;string.h&gt;</a> declares one type and several functions, and defines one
15595  macro useful for manipulating arrays of character type and other objects treated as arrays
15596  of character type.<sup><a href="#note268"><b>268)</b></a></sup> The type is size_t and the macro is NULL (both described in
15597  <a href="#7.17">7.17</a>). Various methods are used for determining the lengths of the arrays, but in all cases
15598  a char * or void * argument points to the initial (lowest addressed) character of the
15599  array. If an array is accessed beyond the end of an object, the behavior is undefined.
15600 <p><!--para 2 -->
15601  Where an argument declared as size_t n specifies the length of the array for a
15602  function, n can have the value zero on a call to that function. Unless explicitly stated
15603  otherwise in the description of a particular function in this subclause, pointer arguments
15604  on such a call shall still have valid values, as described in <a href="#7.1.4">7.1.4</a>. On such a call, a
15605  function that locates a character finds no occurrence, a function that compares two
15606  character sequences returns zero, and a function that copies characters copies zero
15607  characters.
15608 <p><!--para 3 -->
15609  For all functions in this subclause, each character shall be interpreted as if it had the type
15610  unsigned char (and therefore every possible object representation is valid and has a
15611  different value).
15612
15613 <h6>footnotes</h6>
15614 <p><small><a name="note268" href="#note268">268)</a> See ''future library directions'' (<a href="#7.26.11">7.26.11</a>).
15615 </small>
15616
15617 <h4><a name="7.21.2" href="#7.21.2">7.21.2 Copying functions</a></h4>
15618
15619 <h5><a name="7.21.2.1" href="#7.21.2.1">7.21.2.1 The memcpy function</a></h5>
15620 <h6>Synopsis</h6>
15621 <p><!--para 1 -->
15622 <pre>
15623           #include <a href="#7.21">&lt;string.h&gt;</a>
15624           void *memcpy(void * restrict s1,
15625                const void * restrict s2,
15626                size_t n);</pre>
15627 <h6>Description</h6>
15628 <p><!--para 2 -->
15629  The memcpy function copies n characters from the object pointed to by s2 into the
15630  object pointed to by s1. If copying takes place between objects that overlap, the behavior
15631  is undefined.
15632 <h6>Returns</h6>
15633 <p><!--para 3 -->
15634  The memcpy function returns the value of s1.
15635  
15636  
15637  
15638  
15639 <!--page 338 -->
15640
15641 <h5><a name="7.21.2.2" href="#7.21.2.2">7.21.2.2 The memmove function</a></h5>
15642 <h6>Synopsis</h6>
15643 <p><!--para 1 -->
15644 <pre>
15645         #include <a href="#7.21">&lt;string.h&gt;</a>
15646         void *memmove(void *s1, const void *s2, size_t n);</pre>
15647 <h6>Description</h6>
15648 <p><!--para 2 -->
15649  The memmove function copies n characters from the object pointed to by s2 into the
15650  object pointed to by s1. Copying takes place as if the n characters from the object
15651  pointed to by s2 are first copied into a temporary array of n characters that does not
15652  overlap the objects pointed to by s1 and s2, and then the n characters from the
15653  temporary array are copied into the object pointed to by s1.
15654 <h6>Returns</h6>
15655 <p><!--para 3 -->
15656  The memmove function returns the value of s1.
15657
15658 <h5><a name="7.21.2.3" href="#7.21.2.3">7.21.2.3 The strcpy function</a></h5>
15659 <h6>Synopsis</h6>
15660 <p><!--para 1 -->
15661 <pre>
15662         #include <a href="#7.21">&lt;string.h&gt;</a>
15663         char *strcpy(char * restrict s1,
15664              const char * restrict s2);</pre>
15665 <h6>Description</h6>
15666 <p><!--para 2 -->
15667  The strcpy function copies the string pointed to by s2 (including the terminating null
15668  character) into the array pointed to by s1. If copying takes place between objects that
15669  overlap, the behavior is undefined.
15670 <h6>Returns</h6>
15671 <p><!--para 3 -->
15672  The strcpy function returns the value of s1.
15673
15674 <h5><a name="7.21.2.4" href="#7.21.2.4">7.21.2.4 The strncpy function</a></h5>
15675 <h6>Synopsis</h6>
15676 <p><!--para 1 -->
15677 <pre>
15678         #include <a href="#7.21">&lt;string.h&gt;</a>
15679         char *strncpy(char * restrict s1,
15680              const char * restrict s2,
15681              size_t n);</pre>
15682 <h6>Description</h6>
15683 <p><!--para 2 -->
15684  The strncpy function copies not more than n characters (characters that follow a null
15685  character are not copied) from the array pointed to by s2 to the array pointed to by
15686 <!--page 339 -->
15687  s1.<sup><a href="#note269"><b>269)</b></a></sup> If copying takes place between objects that overlap, the behavior is undefined.
15688 <p><!--para 3 -->
15689  If the array pointed to by s2 is a string that is shorter than n characters, null characters
15690  are appended to the copy in the array pointed to by s1, until n characters in all have been
15691  written.
15692 <h6>Returns</h6>
15693 <p><!--para 4 -->
15694  The strncpy function returns the value of s1.
15695
15696 <h6>footnotes</h6>
15697 <p><small><a name="note269" href="#note269">269)</a> Thus, if there is no null character in the first n characters of the array pointed to by s2, the result will
15698  not be null-terminated.
15699 </small>
15700
15701 <h4><a name="7.21.3" href="#7.21.3">7.21.3 Concatenation functions</a></h4>
15702
15703 <h5><a name="7.21.3.1" href="#7.21.3.1">7.21.3.1 The strcat function</a></h5>
15704 <h6>Synopsis</h6>
15705 <p><!--para 1 -->
15706 <pre>
15707           #include <a href="#7.21">&lt;string.h&gt;</a>
15708           char *strcat(char * restrict s1,
15709                const char * restrict s2);</pre>
15710 <h6>Description</h6>
15711 <p><!--para 2 -->
15712  The strcat function appends a copy of the string pointed to by s2 (including the
15713  terminating null character) to the end of the string pointed to by s1. The initial character
15714  of s2 overwrites the null character at the end of s1. If copying takes place between
15715  objects that overlap, the behavior is undefined.
15716 <h6>Returns</h6>
15717 <p><!--para 3 -->
15718  The strcat function returns the value of s1.
15719
15720 <h5><a name="7.21.3.2" href="#7.21.3.2">7.21.3.2 The strncat function</a></h5>
15721 <h6>Synopsis</h6>
15722 <p><!--para 1 -->
15723 <pre>
15724           #include <a href="#7.21">&lt;string.h&gt;</a>
15725           char *strncat(char * restrict s1,
15726                const char * restrict s2,
15727                size_t n);</pre>
15728 <h6>Description</h6>
15729 <p><!--para 2 -->
15730  The strncat function appends not more than n characters (a null character and
15731  characters that follow it are not appended) from the array pointed to by s2 to the end of
15732  the string pointed to by s1. The initial character of s2 overwrites the null character at the
15733  end of s1. A terminating null character is always appended to the result.<sup><a href="#note270"><b>270)</b></a></sup> If copying
15734  
15735 <!--page 340 -->
15736  takes place between objects that overlap, the behavior is undefined.
15737 <h6>Returns</h6>
15738 <p><!--para 3 -->
15739  The strncat function returns the value of s1.
15740 <p><b> Forward references</b>: the strlen function (<a href="#7.21.6.3">7.21.6.3</a>).
15741
15742 <h6>footnotes</h6>
15743 <p><small><a name="note270" href="#note270">270)</a> Thus, the maximum number of characters that can end up in the array pointed to by s1 is
15744  strlen(s1)+n+1.
15745 </small>
15746
15747 <h4><a name="7.21.4" href="#7.21.4">7.21.4 Comparison functions</a></h4>
15748 <p><!--para 1 -->
15749  The sign of a nonzero value returned by the comparison functions memcmp, strcmp,
15750  and strncmp is determined by the sign of the difference between the values of the first
15751  pair of characters (both interpreted as unsigned char) that differ in the objects being
15752  compared.
15753
15754 <h5><a name="7.21.4.1" href="#7.21.4.1">7.21.4.1 The memcmp function</a></h5>
15755 <h6>Synopsis</h6>
15756 <p><!--para 1 -->
15757 <pre>
15758          #include <a href="#7.21">&lt;string.h&gt;</a>
15759          int memcmp(const void *s1, const void *s2, size_t n);</pre>
15760 <h6>Description</h6>
15761 <p><!--para 2 -->
15762  The memcmp function compares the first n characters of the object pointed to by s1 to
15763  the first n characters of the object pointed to by s2.<sup><a href="#note271"><b>271)</b></a></sup>
15764 <h6>Returns</h6>
15765 <p><!--para 3 -->
15766  The memcmp function returns an integer greater than, equal to, or less than zero,
15767  accordingly as the object pointed to by s1 is greater than, equal to, or less than the object
15768  pointed to by s2.
15769
15770 <h6>footnotes</h6>
15771 <p><small><a name="note271" href="#note271">271)</a> The contents of ''holes'' used as padding for purposes of alignment within structure objects are
15772  indeterminate. Strings shorter than their allocated space and unions may also cause problems in
15773  comparison.
15774 </small>
15775
15776 <h5><a name="7.21.4.2" href="#7.21.4.2">7.21.4.2 The strcmp function</a></h5>
15777 <h6>Synopsis</h6>
15778 <p><!--para 1 -->
15779 <pre>
15780          #include <a href="#7.21">&lt;string.h&gt;</a>
15781          int strcmp(const char *s1, const char *s2);</pre>
15782 <h6>Description</h6>
15783 <p><!--para 2 -->
15784  The strcmp function compares the string pointed to by s1 to the string pointed to by
15785  s2.
15786 <h6>Returns</h6>
15787 <p><!--para 3 -->
15788  The strcmp function returns an integer greater than, equal to, or less than zero,
15789  accordingly as the string pointed to by s1 is greater than, equal to, or less than the string
15790  
15791 <!--page 341 -->
15792  pointed to by s2.
15793
15794 <h5><a name="7.21.4.3" href="#7.21.4.3">7.21.4.3 The strcoll function</a></h5>
15795 <h6>Synopsis</h6>
15796 <p><!--para 1 -->
15797 <pre>
15798         #include <a href="#7.21">&lt;string.h&gt;</a>
15799         int strcoll(const char *s1, const char *s2);</pre>
15800 <h6>Description</h6>
15801 <p><!--para 2 -->
15802  The strcoll function compares the string pointed to by s1 to the string pointed to by
15803  s2, both interpreted as appropriate to the LC_COLLATE category of the current locale.
15804 <h6>Returns</h6>
15805 <p><!--para 3 -->
15806  The strcoll function returns an integer greater than, equal to, or less than zero,
15807  accordingly as the string pointed to by s1 is greater than, equal to, or less than the string
15808  pointed to by s2 when both are interpreted as appropriate to the current locale.
15809
15810 <h5><a name="7.21.4.4" href="#7.21.4.4">7.21.4.4 The strncmp function</a></h5>
15811 <h6>Synopsis</h6>
15812 <p><!--para 1 -->
15813 <pre>
15814         #include <a href="#7.21">&lt;string.h&gt;</a>
15815         int strncmp(const char *s1, const char *s2, size_t n);</pre>
15816 <h6>Description</h6>
15817 <p><!--para 2 -->
15818  The strncmp function compares not more than n characters (characters that follow a
15819  null character are not compared) from the array pointed to by s1 to the array pointed to
15820  by s2.
15821 <h6>Returns</h6>
15822 <p><!--para 3 -->
15823  The strncmp function returns an integer greater than, equal to, or less than zero,
15824  accordingly as the possibly null-terminated array pointed to by s1 is greater than, equal
15825  to, or less than the possibly null-terminated array pointed to by s2.
15826
15827 <h5><a name="7.21.4.5" href="#7.21.4.5">7.21.4.5 The strxfrm function</a></h5>
15828 <h6>Synopsis</h6>
15829 <p><!--para 1 -->
15830 <pre>
15831         #include <a href="#7.21">&lt;string.h&gt;</a>
15832         size_t strxfrm(char * restrict s1,
15833              const char * restrict s2,
15834              size_t n);</pre>
15835 <h6>Description</h6>
15836 <p><!--para 2 -->
15837  The strxfrm function transforms the string pointed to by s2 and places the resulting
15838  string into the array pointed to by s1. The transformation is such that if the strcmp
15839  function is applied to two transformed strings, it returns a value greater than, equal to, or
15840 <!--page 342 -->
15841  less than zero, corresponding to the result of the strcoll function applied to the same
15842  two original strings. No more than n characters are placed into the resulting array
15843  pointed to by s1, including the terminating null character. If n is zero, s1 is permitted to
15844  be a null pointer. If copying takes place between objects that overlap, the behavior is
15845  undefined.
15846 <h6>Returns</h6>
15847 <p><!--para 3 -->
15848  The strxfrm function returns the length of the transformed string (not including the
15849  terminating null character). If the value returned is n or more, the contents of the array
15850  pointed to by s1 are indeterminate.
15851 <p><!--para 4 -->
15852  EXAMPLE The value of the following expression is the size of the array needed to hold the
15853  transformation of the string pointed to by s.
15854 <pre>
15855         1 + strxfrm(NULL, s, 0)</pre>
15856  
15857
15858 <h4><a name="7.21.5" href="#7.21.5">7.21.5 Search functions</a></h4>
15859
15860 <h5><a name="7.21.5.1" href="#7.21.5.1">7.21.5.1 The memchr function</a></h5>
15861 <h6>Synopsis</h6>
15862 <p><!--para 1 -->
15863 <pre>
15864         #include <a href="#7.21">&lt;string.h&gt;</a>
15865         void *memchr(const void *s, int c, size_t n);</pre>
15866 <h6>Description</h6>
15867 <p><!--para 2 -->
15868  The memchr function locates the first occurrence of c (converted to an unsigned
15869  char) in the initial n characters (each interpreted as unsigned char) of the object
15870  pointed to by s.
15871 <h6>Returns</h6>
15872 <p><!--para 3 -->
15873  The memchr function returns a pointer to the located character, or a null pointer if the
15874  character does not occur in the object.
15875
15876 <h5><a name="7.21.5.2" href="#7.21.5.2">7.21.5.2 The strchr function</a></h5>
15877 <h6>Synopsis</h6>
15878 <p><!--para 1 -->
15879 <pre>
15880         #include <a href="#7.21">&lt;string.h&gt;</a>
15881         char *strchr(const char *s, int c);</pre>
15882 <h6>Description</h6>
15883 <p><!--para 2 -->
15884  The strchr function locates the first occurrence of c (converted to a char) in the
15885  string pointed to by s. The terminating null character is considered to be part of the
15886  string.
15887 <h6>Returns</h6>
15888 <p><!--para 3 -->
15889  The strchr function returns a pointer to the located character, or a null pointer if the
15890  character does not occur in the string.
15891 <!--page 343 -->
15892
15893 <h5><a name="7.21.5.3" href="#7.21.5.3">7.21.5.3 The strcspn function</a></h5>
15894 <h6>Synopsis</h6>
15895 <p><!--para 1 -->
15896 <pre>
15897         #include <a href="#7.21">&lt;string.h&gt;</a>
15898         size_t strcspn(const char *s1, const char *s2);</pre>
15899 <h6>Description</h6>
15900 <p><!--para 2 -->
15901  The strcspn function computes the length of the maximum initial segment of the string
15902  pointed to by s1 which consists entirely of characters not from the string pointed to by
15903  s2.
15904 <h6>Returns</h6>
15905 <p><!--para 3 -->
15906  The strcspn function returns the length of the segment.
15907
15908 <h5><a name="7.21.5.4" href="#7.21.5.4">7.21.5.4 The strpbrk function</a></h5>
15909 <h6>Synopsis</h6>
15910 <p><!--para 1 -->
15911 <pre>
15912         #include <a href="#7.21">&lt;string.h&gt;</a>
15913         char *strpbrk(const char *s1, const char *s2);</pre>
15914 <h6>Description</h6>
15915 <p><!--para 2 -->
15916  The strpbrk function locates the first occurrence in the string pointed to by s1 of any
15917  character from the string pointed to by s2.
15918 <h6>Returns</h6>
15919 <p><!--para 3 -->
15920  The strpbrk function returns a pointer to the character, or a null pointer if no character
15921  from s2 occurs in s1.
15922
15923 <h5><a name="7.21.5.5" href="#7.21.5.5">7.21.5.5 The strrchr function</a></h5>
15924 <h6>Synopsis</h6>
15925 <p><!--para 1 -->
15926 <pre>
15927         #include <a href="#7.21">&lt;string.h&gt;</a>
15928         char *strrchr(const char *s, int c);</pre>
15929 <h6>Description</h6>
15930 <p><!--para 2 -->
15931  The strrchr function locates the last occurrence of c (converted to a char) in the
15932  string pointed to by s. The terminating null character is considered to be part of the
15933  string.
15934 <h6>Returns</h6>
15935 <p><!--para 3 -->
15936  The strrchr function returns a pointer to the character, or a null pointer if c does not
15937  occur in the string.
15938 <!--page 344 -->
15939
15940 <h5><a name="7.21.5.6" href="#7.21.5.6">7.21.5.6 The strspn function</a></h5>
15941 <h6>Synopsis</h6>
15942 <p><!--para 1 -->
15943 <pre>
15944         #include <a href="#7.21">&lt;string.h&gt;</a>
15945         size_t strspn(const char *s1, const char *s2);</pre>
15946 <h6>Description</h6>
15947 <p><!--para 2 -->
15948  The strspn function computes the length of the maximum initial segment of the string
15949  pointed to by s1 which consists entirely of characters from the string pointed to by s2.
15950 <h6>Returns</h6>
15951 <p><!--para 3 -->
15952  The strspn function returns the length of the segment.
15953
15954 <h5><a name="7.21.5.7" href="#7.21.5.7">7.21.5.7 The strstr function</a></h5>
15955 <h6>Synopsis</h6>
15956 <p><!--para 1 -->
15957 <pre>
15958         #include <a href="#7.21">&lt;string.h&gt;</a>
15959         char *strstr(const char *s1, const char *s2);</pre>
15960 <h6>Description</h6>
15961 <p><!--para 2 -->
15962  The strstr function locates the first occurrence in the string pointed to by s1 of the
15963  sequence of characters (excluding the terminating null character) in the string pointed to
15964  by s2.
15965 <h6>Returns</h6>
15966 <p><!--para 3 -->
15967  The strstr function returns a pointer to the located string, or a null pointer if the string
15968  is not found. If s2 points to a string with zero length, the function returns s1.
15969
15970 <h5><a name="7.21.5.8" href="#7.21.5.8">7.21.5.8 The strtok function</a></h5>
15971 <h6>Synopsis</h6>
15972 <p><!--para 1 -->
15973 <pre>
15974         #include <a href="#7.21">&lt;string.h&gt;</a>
15975         char *strtok(char * restrict s1,
15976              const char * restrict s2);</pre>
15977 <h6>Description</h6>
15978 <p><!--para 2 -->
15979  A sequence of calls to the strtok function breaks the string pointed to by s1 into a
15980  sequence of tokens, each of which is delimited by a character from the string pointed to
15981  by s2. The first call in the sequence has a non-null first argument; subsequent calls in the
15982  sequence have a null first argument. The separator string pointed to by s2 may be
15983  different from call to call.
15984 <p><!--para 3 -->
15985  The first call in the sequence searches the string pointed to by s1 for the first character
15986  that is not contained in the current separator string pointed to by s2. If no such character
15987  is found, then there are no tokens in the string pointed to by s1 and the strtok function
15988 <!--page 345 -->
15989  returns a null pointer. If such a character is found, it is the start of the first token.
15990 <p><!--para 4 -->
15991  The strtok function then searches from there for a character that is contained in the
15992  current separator string. If no such character is found, the current token extends to the
15993  end of the string pointed to by s1, and subsequent searches for a token will return a null
15994  pointer. If such a character is found, it is overwritten by a null character, which
15995  terminates the current token. The strtok function saves a pointer to the following
15996  character, from which the next search for a token will start.
15997 <p><!--para 5 -->
15998  Each subsequent call, with a null pointer as the value of the first argument, starts
15999  searching from the saved pointer and behaves as described above.
16000 <p><!--para 6 -->
16001  The implementation shall behave as if no library function calls the strtok function.
16002 <h6>Returns</h6>
16003 <p><!--para 7 -->
16004  The strtok function returns a pointer to the first character of a token, or a null pointer
16005  if there is no token.
16006 <p><!--para 8 -->
16007  EXAMPLE
16008 <pre>
16009          #include <a href="#7.21">&lt;string.h&gt;</a>
16010          static char str[] = "?a???b,,,#c";
16011          char *t;
16012          t   =   strtok(str, "?");       //   t   points to the token "a"
16013          t   =   strtok(NULL, ",");      //   t   points to the token "??b"
16014          t   =   strtok(NULL, "#,");     //   t   points to the token "c"
16015          t   =   strtok(NULL, "?");      //   t   is a null pointer</pre>
16016  
16017
16018 <h4><a name="7.21.6" href="#7.21.6">7.21.6 Miscellaneous functions</a></h4>
16019
16020 <h5><a name="7.21.6.1" href="#7.21.6.1">7.21.6.1 The memset function</a></h5>
16021 <h6>Synopsis</h6>
16022 <p><!--para 1 -->
16023 <pre>
16024          #include <a href="#7.21">&lt;string.h&gt;</a>
16025          void *memset(void *s, int c, size_t n);</pre>
16026 <h6>Description</h6>
16027 <p><!--para 2 -->
16028  The memset function copies the value of c (converted to an unsigned char) into
16029  each of the first n characters of the object pointed to by s.
16030 <h6>Returns</h6>
16031 <p><!--para 3 -->
16032  The memset function returns the value of s.
16033 <!--page 346 -->
16034
16035 <h5><a name="7.21.6.2" href="#7.21.6.2">7.21.6.2 The strerror function</a></h5>
16036 <h6>Synopsis</h6>
16037 <p><!--para 1 -->
16038 <pre>
16039         #include <a href="#7.21">&lt;string.h&gt;</a>
16040         char *strerror(int errnum);</pre>
16041 <h6>Description</h6>
16042 <p><!--para 2 -->
16043  The strerror function maps the number in errnum to a message string. Typically,
16044  the values for errnum come from errno, but strerror shall map any value of type
16045  int to a message.
16046 <p><!--para 3 -->
16047  The implementation shall behave as if no library function calls the strerror function.
16048 <h6>Returns</h6>
16049 <p><!--para 4 -->
16050  The strerror function returns a pointer to the string, the contents of which are locale-
16051  specific. The array pointed to shall not be modified by the program, but may be
16052  overwritten by a subsequent call to the strerror function.
16053
16054 <h5><a name="7.21.6.3" href="#7.21.6.3">7.21.6.3 The strlen function</a></h5>
16055 <h6>Synopsis</h6>
16056 <p><!--para 1 -->
16057 <pre>
16058         #include <a href="#7.21">&lt;string.h&gt;</a>
16059         size_t strlen(const char *s);</pre>
16060 <h6>Description</h6>
16061 <p><!--para 2 -->
16062  The strlen function computes the length of the string pointed to by s.
16063 <h6>Returns</h6>
16064 <p><!--para 3 -->
16065  The strlen function returns the number of characters that precede the terminating null
16066  character.
16067 <!--page 347 -->
16068
16069 <h3><a name="7.22" href="#7.22">7.22 Type-generic math <tgmath.h></a></h3>
16070 <p><!--para 1 -->
16071  The header <a href="#7.22">&lt;tgmath.h&gt;</a> includes the headers <a href="#7.12">&lt;math.h&gt;</a> and <a href="#7.3">&lt;complex.h&gt;</a> and
16072  defines several type-generic macros.
16073 <p><!--para 2 -->
16074  Of the <a href="#7.12">&lt;math.h&gt;</a> and <a href="#7.3">&lt;complex.h&gt;</a> functions without an f (float) or l (long
16075  double) suffix, several have one or more parameters whose corresponding real type is
16076  double. For each such function, except modf, there is a corresponding type-generic
16077  macro.<sup><a href="#note272"><b>272)</b></a></sup> The parameters whose corresponding real type is double in the function
16078  synopsis are generic parameters. Use of the macro invokes a function whose
16079  corresponding real type and type domain are determined by the arguments for the generic
16080  parameters.<sup><a href="#note273"><b>273)</b></a></sup>
16081 <p><!--para 3 -->
16082  Use of the macro invokes a function whose generic parameters have the corresponding
16083  real type determined as follows:
16084 <ul>
16085 <li>  First, if any argument for generic parameters has type long double, the type
16086  determined is long double.
16087 <li>  Otherwise, if any argument for generic parameters has type double or is of integer
16088  type, the type determined is double.
16089 <li>  Otherwise, the type determined is float.
16090 </ul>
16091 <p><!--para 4 -->
16092  For each unsuffixed function in <a href="#7.12">&lt;math.h&gt;</a> for which there is a function in
16093  <a href="#7.3">&lt;complex.h&gt;</a> with the same name except for a c prefix, the corresponding type-
16094  generic macro (for both functions) has the same name as the function in <a href="#7.12">&lt;math.h&gt;</a>. The
16095  corresponding type-generic macro for fabs and cabs is fabs.
16096  
16097  
16098  
16099  
16100 <!--page 348 -->
16101 <pre>
16102          <a href="#7.12">&lt;math.h&gt;</a>          <a href="#7.3">&lt;complex.h&gt;</a>           type-generic
16103           function            function              macro
16104            acos               cacos                acos
16105            asin               casin                asin
16106            atan               catan                atan
16107            acosh              cacosh               acosh
16108            asinh              casinh               asinh
16109            atanh              catanh               atanh
16110            cos                ccos                 cos
16111            sin                csin                 sin
16112            tan                ctan                 tan
16113            cosh               ccosh                cosh
16114            sinh               csinh                sinh
16115            tanh               ctanh                tanh
16116            exp                cexp                 exp
16117            log                clog                 log
16118            pow                cpow                 pow
16119            sqrt               csqrt                sqrt
16120            fabs               cabs                 fabs</pre>
16121  If at least one argument for a generic parameter is complex, then use of the macro invokes
16122  a complex function; otherwise, use of the macro invokes a real function.
16123 <p><!--para 5 -->
16124  For each unsuffixed function in <a href="#7.12">&lt;math.h&gt;</a> without a c-prefixed counterpart in
16125  <a href="#7.3">&lt;complex.h&gt;</a> (except modf), the corresponding type-generic macro has the same
16126  name as the function. These type-generic macros are:
16127 <pre>
16128        atan2                fma                  llround              remainder
16129        cbrt                 fmax                 log10                remquo
16130        ceil                 fmin                 log1p                rint
16131        copysign             fmod                 log2                 round
16132        erf                  frexp                logb                 scalbn
16133        erfc                 hypot                lrint                scalbln
16134        exp2                 ilogb                lround               tgamma
16135        expm1                ldexp                nearbyint            trunc
16136        fdim                 lgamma               nextafter
16137        floor                llrint               nexttoward</pre>
16138  If all arguments for generic parameters are real, then use of the macro invokes a real
16139  function; otherwise, use of the macro results in undefined behavior.
16140 <p><!--para 6 -->
16141  For each unsuffixed function in <a href="#7.3">&lt;complex.h&gt;</a> that is not a c-prefixed counterpart to a
16142  function in <a href="#7.12">&lt;math.h&gt;</a>, the corresponding type-generic macro has the same name as the
16143  function. These type-generic macros are:
16144 <!--page 349 -->
16145 <pre>
16146          carg                    conj                     creal
16147          cimag                   cproj</pre>
16148  Use of the macro with any real or complex argument invokes a complex function.
16149 <p><!--para 7 -->
16150  EXAMPLE       With the declarations
16151 <pre>
16152          #include <a href="#7.22">&lt;tgmath.h&gt;</a>
16153          int n;
16154          float f;
16155          double d;
16156          long double ld;
16157          float complex fc;
16158          double complex dc;
16159          long double complex ldc;</pre>
16160  functions invoked by use of type-generic macros are shown in the following table:
16161 <!--page 350 -->
16162 <pre>
16163                   macro use                                  invokes
16164              exp(n)                              exp(n), the function
16165              acosh(f)                            acoshf(f)
16166              sin(d)                              sin(d), the function
16167              atan(ld)                            atanl(ld)
16168              log(fc)                             clogf(fc)
16169              sqrt(dc)                            csqrt(dc)
16170              pow(ldc, f)                         cpowl(ldc, f)
16171              remainder(n, n)                     remainder(n, n), the function
16172              nextafter(d, f)                     nextafter(d, f), the function
16173              nexttoward(f, ld)                   nexttowardf(f, ld)
16174              copysign(n, ld)                     copysignl(n, ld)
16175              ceil(fc)                            undefined behavior
16176              rint(dc)                            undefined behavior
16177              fmax(ldc, ld)                       undefined behavior
16178              carg(n)                             carg(n), the function
16179              cproj(f)                            cprojf(f)
16180              creal(d)                            creal(d), the function
16181              cimag(ld)                           cimagl(ld)
16182              fabs(fc)                            cabsf(fc)
16183              carg(dc)                            carg(dc), the function
16184              cproj(ldc)                          cprojl(ldc)</pre>
16185
16186 <h6>footnotes</h6>
16187 <p><small><a name="note272" href="#note272">272)</a> Like other function-like macros in Standard libraries, each type-generic macro can be suppressed to
16188  make available the corresponding ordinary function.
16189 </small>
16190 <p><small><a name="note273" href="#note273">273)</a> If the type of the argument is not compatible with the type of the parameter for the selected function,
16191  the behavior is undefined.
16192 </small>
16193
16194 <h3><a name="7.23" href="#7.23">7.23 Date and time <time.h></a></h3>
16195
16196 <h4><a name="7.23.1" href="#7.23.1">7.23.1 Components of time</a></h4>
16197 <p><!--para 1 -->
16198  The header <a href="#7.23">&lt;time.h&gt;</a> defines two macros, and declares several types and functions for
16199  manipulating time. Many functions deal with a calendar time that represents the current
16200  date (according to the Gregorian calendar) and time. Some functions deal with local
16201  time, which is the calendar time expressed for some specific time zone, and with Daylight
16202  Saving Time, which is a temporary change in the algorithm for determining local time.
16203  The local time zone and Daylight Saving Time are implementation-defined.
16204 <p><!--para 2 -->
16205  The macros defined are NULL (described in <a href="#7.17">7.17</a>); and
16206 <pre>
16207          CLOCKS_PER_SEC</pre>
16208  which expands to an expression with type clock_t (described below) that is the
16209  number per second of the value returned by the clock function.
16210 <p><!--para 3 -->
16211  The types declared are size_t (described in <a href="#7.17">7.17</a>);
16212 <pre>
16213          clock_t</pre>
16214  and
16215 <pre>
16216          time_t</pre>
16217  which are arithmetic types capable of representing times; and
16218 <pre>
16219          struct tm</pre>
16220  which holds the components of a calendar time, called the broken-down time.
16221 <p><!--para 4 -->
16222  The range and precision of times representable in clock_t and time_t are
16223  implementation-defined. The tm structure shall contain at least the following members,
16224  in any order. The semantics of the members and their normal ranges are expressed in the
16225  comments.<sup><a href="#note274"><b>274)</b></a></sup>
16226 <pre>
16227          int    tm_sec;           //   seconds after the minute -- [0, 60]
16228          int    tm_min;           //   minutes after the hour -- [0, 59]
16229          int    tm_hour;          //   hours since midnight -- [0, 23]
16230          int    tm_mday;          //   day of the month -- [1, 31]
16231          int    tm_mon;           //   months since January -- [0, 11]
16232          int    tm_year;          //   years since 1900
16233          int    tm_wday;          //   days since Sunday -- [0, 6]
16234          int    tm_yday;          //   days since January 1 -- [0, 365]
16235          int    tm_isdst;         //   Daylight Saving Time flag</pre>
16236  
16237  
16238  
16239 <!--page 351 -->
16240  The value of tm_isdst is positive if Daylight Saving Time is in effect, zero if Daylight
16241  Saving Time is not in effect, and negative if the information is not available.
16242
16243 <h6>footnotes</h6>
16244 <p><small><a name="note274" href="#note274">274)</a> The range [0, 60] for tm_sec allows for a positive leap second.
16245 </small>
16246
16247 <h4><a name="7.23.2" href="#7.23.2">7.23.2 Time manipulation functions</a></h4>
16248
16249 <h5><a name="7.23.2.1" href="#7.23.2.1">7.23.2.1 The clock function</a></h5>
16250 <h6>Synopsis</h6>
16251 <p><!--para 1 -->
16252 <pre>
16253          #include <a href="#7.23">&lt;time.h&gt;</a>
16254          clock_t clock(void);</pre>
16255 <h6>Description</h6>
16256 <p><!--para 2 -->
16257  The clock function determines the processor time used.
16258 <h6>Returns</h6>
16259 <p><!--para 3 -->
16260  The clock function returns the implementation's best approximation to the processor
16261  time used by the program since the beginning of an implementation-defined era related
16262  only to the program invocation. To determine the time in seconds, the value returned by
16263  the clock function should be divided by the value of the macro CLOCKS_PER_SEC. If
16264  the processor time used is not available or its value cannot be represented, the function
16265  returns the value (clock_t)(-1).<sup><a href="#note275"><b>275)</b></a></sup>
16266
16267 <h6>footnotes</h6>
16268 <p><small><a name="note275" href="#note275">275)</a> In order to measure the time spent in a program, the clock function should be called at the start of
16269  the program and its return value subtracted from the value returned by subsequent calls.
16270 </small>
16271
16272 <h5><a name="7.23.2.2" href="#7.23.2.2">7.23.2.2 The difftime function</a></h5>
16273 <h6>Synopsis</h6>
16274 <p><!--para 1 -->
16275 <pre>
16276          #include <a href="#7.23">&lt;time.h&gt;</a>
16277          double difftime(time_t time1, time_t time0);</pre>
16278 <h6>Description</h6>
16279 <p><!--para 2 -->
16280  The difftime function computes the difference between two calendar times: time1 -
16281  time0.
16282 <h6>Returns</h6>
16283 <p><!--para 3 -->
16284  The difftime function returns the difference expressed in seconds as a double.
16285  
16286  
16287  
16288  
16289 <!--page 352 -->
16290
16291 <h5><a name="7.23.2.3" href="#7.23.2.3">7.23.2.3 The mktime function</a></h5>
16292 <h6>Synopsis</h6>
16293 <p><!--para 1 -->
16294 <pre>
16295          #include <a href="#7.23">&lt;time.h&gt;</a>
16296          time_t mktime(struct tm *timeptr);</pre>
16297 <h6>Description</h6>
16298 <p><!--para 2 -->
16299  The mktime function converts the broken-down time, expressed as local time, in the
16300  structure pointed to by timeptr into a calendar time value with the same encoding as
16301  that of the values returned by the time function. The original values of the tm_wday
16302  and tm_yday components of the structure are ignored, and the original values of the
16303  other components are not restricted to the ranges indicated above.<sup><a href="#note276"><b>276)</b></a></sup> On successful
16304  completion, the values of the tm_wday and tm_yday components of the structure are
16305  set appropriately, and the other components are set to represent the specified calendar
16306  time, but with their values forced to the ranges indicated above; the final value of
16307  tm_mday is not set until tm_mon and tm_year are determined.
16308 <h6>Returns</h6>
16309 <p><!--para 3 -->
16310  The mktime function returns the specified calendar time encoded as a value of type
16311  time_t. If the calendar time cannot be represented, the function returns the value
16312  (time_t)(-1).
16313 <p><!--para 4 -->
16314  EXAMPLE       What day of the week is July 4, 2001?
16315 <pre>
16316          #include <a href="#7.19">&lt;stdio.h&gt;</a>
16317          #include <a href="#7.23">&lt;time.h&gt;</a>
16318          static const char *const wday[] = {
16319                  "Sunday", "Monday", "Tuesday", "Wednesday",
16320                  "Thursday", "Friday", "Saturday", "-unknown-"
16321          };
16322          struct tm time_str;
16323          /* ... */</pre>
16324  
16325  
16326  
16327  
16328 <!--page 353 -->
16329 <pre>
16330         time_str.tm_year   = 2001 - 1900;
16331         time_str.tm_mon    = 7 - 1;
16332         time_str.tm_mday   = 4;
16333         time_str.tm_hour   = 0;
16334         time_str.tm_min    = 0;
16335         time_str.tm_sec    = 1;
16336         time_str.tm_isdst = -1;
16337         if (mktime(&amp;time_str) == (time_t)(-1))
16338               time_str.tm_wday = 7;
16339         printf("%s\n", wday[time_str.tm_wday]);</pre>
16340  
16341
16342 <h6>footnotes</h6>
16343 <p><small><a name="note276" href="#note276">276)</a> Thus, a positive or zero value for tm_isdst causes the mktime function to presume initially that
16344  Daylight Saving Time, respectively, is or is not in effect for the specified time. A negative value
16345  causes it to attempt to determine whether Daylight Saving Time is in effect for the specified time.
16346 </small>
16347
16348 <h5><a name="7.23.2.4" href="#7.23.2.4">7.23.2.4 The time function</a></h5>
16349 <h6>Synopsis</h6>
16350 <p><!--para 1 -->
16351 <pre>
16352         #include <a href="#7.23">&lt;time.h&gt;</a>
16353         time_t time(time_t *timer);</pre>
16354 <h6>Description</h6>
16355 <p><!--para 2 -->
16356  The time function determines the current calendar time. The encoding of the value is
16357  unspecified.
16358 <h6>Returns</h6>
16359 <p><!--para 3 -->
16360  The time function returns the implementation's best approximation to the current
16361  calendar time. The value (time_t)(-1) is returned if the calendar time is not
16362  available. If timer is not a null pointer, the return value is also assigned to the object it
16363  points to.
16364
16365 <h4><a name="7.23.3" href="#7.23.3">7.23.3 Time conversion functions</a></h4>
16366 <p><!--para 1 -->
16367  Except for the strftime function, these functions each return a pointer to one of two
16368  types of static objects: a broken-down time structure or an array of char. Execution of
16369  any of the functions that return a pointer to one of these object types may overwrite the
16370  information in any object of the same type pointed to by the value returned from any
16371  previous call to any of them. The implementation shall behave as if no other library
16372  functions call these functions.
16373
16374 <h5><a name="7.23.3.1" href="#7.23.3.1">7.23.3.1 The asctime function</a></h5>
16375 <h6>Synopsis</h6>
16376 <p><!--para 1 -->
16377 <pre>
16378         #include <a href="#7.23">&lt;time.h&gt;</a>
16379         char *asctime(const struct tm *timeptr);</pre>
16380 <h6>Description</h6>
16381 <p><!--para 2 -->
16382  The asctime function converts the broken-down time in the structure pointed to by
16383  timeptr into a string in the form
16384 <!--page 354 -->
16385 <pre>
16386         Sun Sep 16 01:03:52 1973\n\0</pre>
16387  using the equivalent of the following algorithm.
16388  char *asctime(const struct tm *timeptr)
16389  {
16390 <pre>
16391       static const char wday_name[7][3] = {
16392            "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
16393       };
16394       static const char mon_name[12][3] = {
16395            "Jan", "Feb", "Mar", "Apr", "May", "Jun",
16396            "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
16397       };
16398       static char result[26];
16399         sprintf(result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
16400              wday_name[timeptr-&gt;tm_wday],
16401              mon_name[timeptr-&gt;tm_mon],
16402              timeptr-&gt;tm_mday, timeptr-&gt;tm_hour,
16403              timeptr-&gt;tm_min, timeptr-&gt;tm_sec,
16404              1900 + timeptr-&gt;tm_year);
16405         return result;</pre>
16406  }
16407 <h6>Returns</h6>
16408 <p><!--para 3 -->
16409  The asctime function returns a pointer to the string.
16410
16411 <h5><a name="7.23.3.2" href="#7.23.3.2">7.23.3.2 The ctime function</a></h5>
16412 <h6>Synopsis</h6>
16413 <p><!--para 1 -->
16414 <pre>
16415         #include <a href="#7.23">&lt;time.h&gt;</a>
16416         char *ctime(const time_t *timer);</pre>
16417 <h6>Description</h6>
16418 <p><!--para 2 -->
16419  The ctime function converts the calendar time pointed to by timer to local time in the
16420  form of a string. It is equivalent to
16421 <pre>
16422         asctime(localtime(timer))</pre>
16423 <h6>Returns</h6>
16424 <p><!--para 3 -->
16425  The ctime function returns the pointer returned by the asctime function with that
16426  broken-down time as argument.
16427 <p><b> Forward references</b>: the localtime function (<a href="#7.23.3.4">7.23.3.4</a>).
16428 <!--page 355 -->
16429
16430 <h5><a name="7.23.3.3" href="#7.23.3.3">7.23.3.3 The gmtime function</a></h5>
16431 <h6>Synopsis</h6>
16432 <p><!--para 1 -->
16433 <pre>
16434         #include <a href="#7.23">&lt;time.h&gt;</a>
16435         struct tm *gmtime(const time_t *timer);</pre>
16436 <h6>Description</h6>
16437 <p><!--para 2 -->
16438  The gmtime function converts the calendar time pointed to by timer into a broken-
16439  down time, expressed as UTC.
16440 <h6>Returns</h6>
16441 <p><!--para 3 -->
16442  The gmtime function returns a pointer to the broken-down time, or a null pointer if the
16443  specified time cannot be converted to UTC.
16444
16445 <h5><a name="7.23.3.4" href="#7.23.3.4">7.23.3.4 The localtime function</a></h5>
16446 <h6>Synopsis</h6>
16447 <p><!--para 1 -->
16448 <pre>
16449         #include <a href="#7.23">&lt;time.h&gt;</a>
16450         struct tm *localtime(const time_t *timer);</pre>
16451 <h6>Description</h6>
16452 <p><!--para 2 -->
16453  The localtime function converts the calendar time pointed to by timer into a
16454  broken-down time, expressed as local time.
16455 <h6>Returns</h6>
16456 <p><!--para 3 -->
16457  The localtime function returns a pointer to the broken-down time, or a null pointer if
16458  the specified time cannot be converted to local time.
16459
16460 <h5><a name="7.23.3.5" href="#7.23.3.5">7.23.3.5 The strftime function</a></h5>
16461 <h6>Synopsis</h6>
16462 <p><!--para 1 -->
16463 <pre>
16464         #include <a href="#7.23">&lt;time.h&gt;</a>
16465         size_t strftime(char * restrict s,
16466              size_t maxsize,
16467              const char * restrict format,
16468              const struct tm * restrict timeptr);</pre>
16469 <h6>Description</h6>
16470 <p><!--para 2 -->
16471  The strftime function places characters into the array pointed to by s as controlled by
16472  the string pointed to by format. The format shall be a multibyte character sequence,
16473  beginning and ending in its initial shift state. The format string consists of zero or
16474  more conversion specifiers and ordinary multibyte characters. A conversion specifier
16475  consists of a % character, possibly followed by an E or O modifier character (described
16476  below), followed by a character that determines the behavior of the conversion specifier.
16477  All ordinary multibyte characters (including the terminating null character) are copied
16478 <!--page 356 -->
16479  unchanged into the array. If copying takes place between objects that overlap, the
16480  behavior is undefined. No more than maxsize characters are placed into the array.
16481 <p><!--para 3 -->
16482  Each conversion specifier is replaced by appropriate characters as described in the
16483  following list. The appropriate characters are determined using the LC_TIME category
16484  of the current locale and by the values of zero or more members of the broken-down time
16485  structure pointed to by timeptr, as specified in brackets in the description. If any of
16486  the specified values is outside the normal range, the characters stored are unspecified.
16487  %a    is replaced by the locale's abbreviated weekday name. [tm_wday]
16488  %A    is replaced by the locale's full weekday name. [tm_wday]
16489  %b    is replaced by the locale's abbreviated month name. [tm_mon]
16490  %B    is replaced by the locale's full month name. [tm_mon]
16491  %c    is replaced by the locale's appropriate date and time representation. [all specified
16492 <pre>
16493        in <a href="#7.23.1">7.23.1</a>]</pre>
16494  %C    is replaced by the year divided by 100 and truncated to an integer, as a decimal
16495 <pre>
16496        number (00-99). [tm_year]</pre>
16497  %d    is replaced by the day of the month as a decimal number (01-31). [tm_mday]
16498  %D    is equivalent to ''%m/%d/%y''. [tm_mon, tm_mday, tm_year]
16499  %e    is replaced by the day of the month as a decimal number (1-31); a single digit is
16500 <pre>
16501        preceded by a space. [tm_mday]</pre>
16502  %F    is equivalent to ''%Y-%m-%d'' (the ISO 8601 date format). [tm_year, tm_mon,
16503 <pre>
16504        tm_mday]</pre>
16505  %g    is replaced by the last 2 digits of the week-based year (see below) as a decimal
16506 <pre>
16507        number (00-99). [tm_year, tm_wday, tm_yday]</pre>
16508  %G    is replaced by the week-based year (see below) as a decimal number (e.g., 1997).
16509 <pre>
16510        [tm_year, tm_wday, tm_yday]</pre>
16511  %h    is equivalent to ''%b''. [tm_mon]
16512  %H    is replaced by the hour (24-hour clock) as a decimal number (00-23). [tm_hour]
16513  %I    is replaced by the hour (12-hour clock) as a decimal number (01-12). [tm_hour]
16514  %j    is replaced by the day of the year as a decimal number (001-366). [tm_yday]
16515  %m    is replaced by the month as a decimal number (01-12). [tm_mon]
16516  %M    is replaced by the minute as a decimal number (00-59). [tm_min]
16517  %n    is replaced by a new-line character.
16518  %p    is replaced by the locale's equivalent of the AM/PM designations associated with a
16519 <pre>
16520        12-hour clock. [tm_hour]</pre>
16521  %r    is replaced by the locale's 12-hour clock time. [tm_hour, tm_min, tm_sec]
16522  %R    is equivalent to ''%H:%M''. [tm_hour, tm_min]
16523  %S    is replaced by the second as a decimal number (00-60). [tm_sec]
16524  %t    is replaced by a horizontal-tab character.
16525  %T    is equivalent to ''%H:%M:%S'' (the ISO 8601 time format). [tm_hour, tm_min,
16526 <!--page 357 -->
16527 <pre>
16528        tm_sec]</pre>
16529  %u   is replaced by the ISO 8601 weekday as a decimal number (1-7), where Monday
16530 <pre>
16531       is 1. [tm_wday]</pre>
16532  %U   is replaced by the week number of the year (the first Sunday as the first day of week
16533 <pre>
16534       1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday]</pre>
16535  %V   is replaced by the ISO 8601 week number (see below) as a decimal number
16536 <pre>
16537       (01-53). [tm_year, tm_wday, tm_yday]</pre>
16538  %w   is replaced by the weekday as a decimal number (0-6), where Sunday is 0.
16539 <pre>
16540       [tm_wday]</pre>
16541  %W   is replaced by the week number of the year (the first Monday as the first day of
16542 <pre>
16543       week 1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday]</pre>
16544  %x   is replaced by the locale's appropriate date representation. [all specified in <a href="#7.23.1">7.23.1</a>]
16545  %X   is replaced by the locale's appropriate time representation. [all specified in <a href="#7.23.1">7.23.1</a>]
16546  %y   is replaced by the last 2 digits of the year as a decimal number (00-99).
16547 <pre>
16548       [tm_year]</pre>
16549  %Y   is replaced by the year as a decimal number (e.g., 1997). [tm_year]
16550  %z   is replaced by the offset from UTC in the ISO 8601 format ''-0430'' (meaning 4
16551 <pre>
16552       hours 30 minutes behind UTC, west of Greenwich), or by no characters if no time
16553       zone is determinable. [tm_isdst]</pre>
16554  %Z   is replaced by the locale's time zone name or abbreviation, or by no characters if no
16555 <pre>
16556       time zone is determinable. [tm_isdst]</pre>
16557  %%   is replaced by %.
16558 <p><!--para 4 -->
16559  Some conversion specifiers can be modified by the inclusion of an E or O modifier
16560  character to indicate an alternative format or specification. If the alternative format or
16561  specification does not exist for the current locale, the modifier is ignored.
16562  %Ec is replaced by the locale's alternative date and time representation.
16563  %EC is replaced by the name of the base year (period) in the locale's alternative
16564 <pre>
16565      representation.</pre>
16566  %Ex is replaced by the locale's alternative date representation.
16567  %EX is replaced by the locale's alternative time representation.
16568  %Ey is replaced by the offset from %EC (year only) in the locale's alternative
16569 <pre>
16570      representation.</pre>
16571  %EY is replaced by the locale's full alternative year representation.
16572  %Od is replaced by the day of the month, using the locale's alternative numeric symbols
16573 <pre>
16574      (filled as needed with leading zeros, or with leading spaces if there is no alternative
16575      symbol for zero).</pre>
16576  %Oe is replaced by the day of the month, using the locale's alternative numeric symbols
16577 <pre>
16578      (filled as needed with leading spaces).</pre>
16579  %OH is replaced by the hour (24-hour clock), using the locale's alternative numeric
16580 <!--page 358 -->
16581 <pre>
16582      symbols.</pre>
16583  %OI is replaced by the hour (12-hour clock), using the locale's alternative numeric
16584 <pre>
16585      symbols.</pre>
16586  %Om is replaced by the month, using the locale's alternative numeric symbols.
16587  %OM is replaced by the minutes, using the locale's alternative numeric symbols.
16588  %OS is replaced by the seconds, using the locale's alternative numeric symbols.
16589  %Ou is replaced by the ISO 8601 weekday as a number in the locale's alternative
16590 <pre>
16591      representation, where Monday is 1.</pre>
16592  %OU is replaced by the week number, using the locale's alternative numeric symbols.
16593  %OV is replaced by the ISO 8601 week number, using the locale's alternative numeric
16594 <pre>
16595      symbols.</pre>
16596  %Ow is replaced by the weekday as a number, using the locale's alternative numeric
16597 <pre>
16598      symbols.</pre>
16599  %OW is replaced by the week number of the year, using the locale's alternative numeric
16600 <pre>
16601      symbols.</pre>
16602  %Oy is replaced by the last 2 digits of the year, using the locale's alternative numeric
16603 <p><!--para 5 -->
16604 <pre>
16605      symbols.</pre>
16606  %g, %G, and %V give values according to the ISO 8601 week-based year. In this system,
16607  weeks begin on a Monday and week 1 of the year is the week that includes January 4th,
16608  which is also the week that includes the first Thursday of the year, and is also the first
16609  week that contains at least four days in the year. If the first Monday of January is the
16610  2nd, 3rd, or 4th, the preceding days are part of the last week of the preceding year; thus,
16611  for Saturday 2nd January 1999, %G is replaced by 1998 and %V is replaced by 53. If
16612  December 29th, 30th, or 31st is a Monday, it and any following days are part of week 1 of
16613  the following year. Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and
16614  %V is replaced by 01.
16615 <p><!--para 6 -->
16616  If a conversion specifier is not one of the above, the behavior is undefined.
16617 <p><!--para 7 -->
16618  In the "C" locale, the E and O modifiers are ignored and the replacement strings for the
16619  following specifiers are:
16620  %a    the first three characters of %A.
16621  %A    one of ''Sunday'', ''Monday'', ... , ''Saturday''.
16622  %b    the first three characters of %B.
16623  %B    one of ''January'', ''February'', ... , ''December''.
16624  %c    equivalent to ''%a %b %e %T %Y''.
16625  %p    one of ''AM'' or ''PM''.
16626  %r    equivalent to ''%I:%M:%S %p''.
16627  %x    equivalent to ''%m/%d/%y''.
16628  %X    equivalent to %T.
16629  %Z    implementation-defined.
16630 <!--page 359 -->
16631 <h6>Returns</h6>
16632 <p><!--para 8 -->
16633  If the total number of resulting characters including the terminating null character is not
16634  more than maxsize, the strftime function returns the number of characters placed
16635  into the array pointed to by s not including the terminating null character. Otherwise,
16636  zero is returned and the contents of the array are indeterminate.
16637 <!--page 360 -->
16638
16639 <h3><a name="7.24" href="#7.24">7.24 Extended multibyte and wide character utilities <wchar.h></a></h3>
16640
16641 <h4><a name="7.24.1" href="#7.24.1">7.24.1 Introduction</a></h4>
16642 <p><!--para 1 -->
16643  The header <a href="#7.24">&lt;wchar.h&gt;</a> declares four data types, one tag, four macros, and many
16644  functions.<sup><a href="#note277"><b>277)</b></a></sup>
16645 <p><!--para 2 -->
16646  The types declared are wchar_t and size_t (both described in <a href="#7.17">7.17</a>);
16647 <pre>
16648           mbstate_t</pre>
16649  which is an object type other than an array type that can hold the conversion state
16650  information necessary to convert between sequences of multibyte characters and wide
16651  characters;
16652 <pre>
16653           wint_t</pre>
16654  which is an integer type unchanged by default argument promotions that can hold any
16655  value corresponding to members of the extended character set, as well as at least one
16656  value that does not correspond to any member of the extended character set (see WEOF
16657  below);<sup><a href="#note278"><b>278)</b></a></sup> and
16658 <pre>
16659           struct tm</pre>
16660  which is declared as an incomplete structure type (the contents are described in <a href="#7.23.1">7.23.1</a>).
16661 <p><!--para 3 -->
16662  The macros defined are NULL (described in <a href="#7.17">7.17</a>); WCHAR_MIN and WCHAR_MAX
16663  (described in <a href="#7.18.3">7.18.3</a>); and
16664 <pre>
16665           WEOF</pre>
16666  which expands to a constant expression of type wint_t whose value does not
16667  correspond to any member of the extended character set.<sup><a href="#note279"><b>279)</b></a></sup> It is accepted (and returned)
16668  by several functions in this subclause to indicate end-of-file, that is, no more input from a
16669  stream. It is also used as a wide character value that does not correspond to any member
16670  of the extended character set.
16671 <p><!--para 4 -->
16672  The functions declared are grouped as follows:
16673 <ul>
16674 <li>  Functions that perform input and output of wide characters, or multibyte characters,
16675  or both;
16676 <li>  Functions that provide wide string numeric conversion;
16677 <li>  Functions that perform general wide string manipulation;
16678  
16679  
16680 <!--page 361 -->
16681 <li>  Functions for wide string date and time conversion; and
16682 <li>  Functions that provide extended capabilities for conversion between multibyte and
16683  wide character sequences.
16684 </ul>
16685 <p><!--para 5 -->
16686  Unless explicitly stated otherwise, if the execution of a function described in this
16687  subclause causes copying to take place between objects that overlap, the behavior is
16688  undefined.
16689
16690 <h6>footnotes</h6>
16691 <p><small><a name="note277" href="#note277">277)</a> See ''future library directions'' (<a href="#7.26.12">7.26.12</a>).
16692 </small>
16693 <p><small><a name="note278" href="#note278">278)</a> wchar_t and wint_t can be the same integer type.
16694 </small>
16695 <p><small><a name="note279" href="#note279">279)</a> The value of the macro WEOF may differ from that of EOF and need not be negative.
16696 </small>
16697
16698 <h4><a name="7.24.2" href="#7.24.2">7.24.2 Formatted wide character input/output functions</a></h4>
16699 <p><!--para 1 -->
16700  The formatted wide character input/output functions shall behave as if there is a sequence
16701  point after the actions associated with each specifier.<sup><a href="#note280"><b>280)</b></a></sup>
16702
16703 <h6>footnotes</h6>
16704 <p><small><a name="note280" href="#note280">280)</a> The fwprintf functions perform writes to memory for the %n specifier.
16705 </small>
16706
16707 <h5><a name="7.24.2.1" href="#7.24.2.1">7.24.2.1 The fwprintf function</a></h5>
16708 <h6>Synopsis</h6>
16709 <p><!--para 1 -->
16710 <pre>
16711          #include <a href="#7.19">&lt;stdio.h&gt;</a>
16712          #include <a href="#7.24">&lt;wchar.h&gt;</a>
16713          int fwprintf(FILE * restrict stream,
16714               const wchar_t * restrict format, ...);</pre>
16715 <h6>Description</h6>
16716 <p><!--para 2 -->
16717  The fwprintf function writes output to the stream pointed to by stream, under
16718  control of the wide string pointed to by format that specifies how subsequent arguments
16719  are converted for output. If there are insufficient arguments for the format, the behavior
16720  is undefined. If the format is exhausted while arguments remain, the excess arguments
16721  are evaluated (as always) but are otherwise ignored. The fwprintf function returns
16722  when the end of the format string is encountered.
16723 <p><!--para 3 -->
16724  The format is composed of zero or more directives: ordinary wide characters (not %),
16725  which are copied unchanged to the output stream; and conversion specifications, each of
16726  which results in fetching zero or more subsequent arguments, converting them, if
16727  applicable, according to the corresponding conversion specifier, and then writing the
16728  result to the output stream.
16729 <p><!--para 4 -->
16730  Each conversion specification is introduced by the wide character %. After the %, the
16731  following appear in sequence:
16732 <ul>
16733 <li>  Zero or more flags (in any order) that modify the meaning of the conversion
16734  specification.
16735 <li>  An optional minimum field width. If the converted value has fewer wide characters
16736  than the field width, it is padded with spaces (by default) on the left (or right, if the
16737  
16738  
16739 <!--page 362 -->
16740    left adjustment flag, described later, has been given) to the field width. The field
16741    width takes the form of an asterisk * (described later) or a nonnegative decimal
16742    integer.<sup><a href="#note281"><b>281)</b></a></sup>
16743 <li>  An optional precision that gives the minimum number of digits to appear for the d, i,
16744  o, u, x, and X conversions, the number of digits to appear after the decimal-point
16745  wide character for a, A, e, E, f, and F conversions, the maximum number of
16746  significant digits for the g and G conversions, or the maximum number of wide
16747  characters to be written for s conversions. The precision takes the form of a period
16748  (.) followed either by an asterisk * (described later) or by an optional decimal
16749  integer; if only the period is specified, the precision is taken as zero. If a precision
16750  appears with any other conversion specifier, the behavior is undefined.
16751 <li>  An optional length modifier that specifies the size of the argument.
16752 <li>  A conversion specifier wide character that specifies the type of conversion to be
16753  applied.
16754 </ul>
16755 <p><!--para 5 -->
16756  As noted above, a field width, or precision, or both, may be indicated by an asterisk. In
16757  this case, an int argument supplies the field width or precision. The arguments
16758  specifying field width, or precision, or both, shall appear (in that order) before the
16759  argument (if any) to be converted. A negative field width argument is taken as a - flag
16760  followed by a positive field width. A negative precision argument is taken as if the
16761  precision were omitted.
16762 <p><!--para 6 -->
16763  The flag wide characters and their meanings are:
16764  -        The result of the conversion is left-justified within the field. (It is right-justified if
16765 <pre>
16766           this flag is not specified.)</pre>
16767  +        The result of a signed conversion always begins with a plus or minus sign. (It
16768 <pre>
16769           begins with a sign only when a negative value is converted if this flag is not
16770           specified.)<sup><a href="#note282"><b>282)</b></a></sup></pre>
16771  space If the first wide character of a signed conversion is not a sign, or if a signed
16772 <pre>
16773        conversion results in no wide characters, a space is prefixed to the result. If the
16774        space and + flags both appear, the space flag is ignored.</pre>
16775  #        The result is converted to an ''alternative form''. For o conversion, it increases
16776 <pre>
16777           the precision, if and only if necessary, to force the first digit of the result to be a
16778           zero (if the value and precision are both 0, a single 0 is printed). For x (or X)
16779           conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g,</pre>
16780  
16781 <!--page 363 -->
16782 <pre>
16783            and G conversions, the result of converting a floating-point number always
16784            contains a decimal-point wide character, even if no digits follow it. (Normally, a
16785            decimal-point wide character appears in the result of these conversions only if a
16786            digit follows it.) For g and G conversions, trailing zeros are not removed from the
16787            result. For other conversions, the behavior is undefined.</pre>
16788  0         For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros
16789 <p><!--para 7 -->
16790 <pre>
16791            (following any indication of sign or base) are used to pad to the field width rather
16792            than performing space padding, except when converting an infinity or NaN. If the
16793            0 and - flags both appear, the 0 flag is ignored. For d, i, o, u, x, and X
16794            conversions, if a precision is specified, the 0 flag is ignored. For other
16795            conversions, the behavior is undefined.</pre>
16796  The length modifiers and their meanings are:
16797  hh             Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
16798 <pre>
16799                 signed char or unsigned char argument (the argument will have
16800                 been promoted according to the integer promotions, but its value shall be
16801                 converted to signed char or unsigned char before printing); or that
16802                 a following n conversion specifier applies to a pointer to a signed char
16803                 argument.</pre>
16804  h              Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
16805 <pre>
16806                 short int or unsigned short int argument (the argument will
16807                 have been promoted according to the integer promotions, but its value shall
16808                 be converted to short int or unsigned short int before printing);
16809                 or that a following n conversion specifier applies to a pointer to a short
16810                 int argument.</pre>
16811  l (ell)        Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
16812 <pre>
16813                 long int or unsigned long int argument; that a following n
16814                 conversion specifier applies to a pointer to a long int argument; that a
16815                 following c conversion specifier applies to a wint_t argument; that a
16816                 following s conversion specifier applies to a pointer to a wchar_t
16817                 argument; or has no effect on a following a, A, e, E, f, F, g, or G conversion
16818                 specifier.</pre>
16819  ll (ell-ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
16820 <pre>
16821               long long int or unsigned long long int argument; or that a
16822               following n conversion specifier applies to a pointer to a long long int
16823               argument.</pre>
16824  j              Specifies that a following d, i, o, u, x, or X conversion specifier applies to
16825 <!--page 364 -->
16826 <pre>
16827                 an intmax_t or uintmax_t argument; or that a following n conversion
16828                 specifier applies to a pointer to an intmax_t argument.</pre>
16829  z           Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
16830 <pre>
16831              size_t or the corresponding signed integer type argument; or that a
16832              following n conversion specifier applies to a pointer to a signed integer type
16833              corresponding to size_t argument.</pre>
16834  t           Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
16835 <pre>
16836              ptrdiff_t or the corresponding unsigned integer type argument; or that a
16837              following n conversion specifier applies to a pointer to a ptrdiff_t
16838              argument.</pre>
16839  L           Specifies that a following a, A, e, E, f, F, g, or G conversion specifier
16840 <pre>
16841              applies to a long double argument.</pre>
16842  If a length modifier appears with any conversion specifier other than as specified above,
16843  the behavior is undefined.
16844 <p><!--para 8 -->
16845  The conversion specifiers and their meanings are:
16846  d,i        The int argument is converted to signed decimal in the style [-]dddd. The
16847 <pre>
16848             precision specifies the minimum number of digits to appear; if the value
16849             being converted can be represented in fewer digits, it is expanded with
16850             leading zeros. The default precision is 1. The result of converting a zero
16851             value with a precision of zero is no wide characters.</pre>
16852  o,u,x,X The unsigned int argument is converted to unsigned octal (o), unsigned
16853 <pre>
16854          decimal (u), or unsigned hexadecimal notation (x or X) in the style dddd; the
16855          letters abcdef are used for x conversion and the letters ABCDEF for X
16856          conversion. The precision specifies the minimum number of digits to appear;
16857          if the value being converted can be represented in fewer digits, it is expanded
16858          with leading zeros. The default precision is 1. The result of converting a
16859          zero value with a precision of zero is no wide characters.</pre>
16860  f,F        A double argument representing a floating-point number is converted to
16861 <!--page 365 -->
16862 <pre>
16863             decimal notation in the style [-]ddd.ddd, where the number of digits after
16864             the decimal-point wide character is equal to the precision specification. If the
16865             precision is missing, it is taken as 6; if the precision is zero and the # flag is
16866             not specified, no decimal-point wide character appears. If a decimal-point
16867             wide character appears, at least one digit appears before it. The value is
16868             rounded to the appropriate number of digits.
16869             A double argument representing an infinity is converted in one of the styles
16870             [-]inf or [-]infinity -- which style is implementation-defined. A
16871             double argument representing a NaN is converted in one of the styles
16872             [-]nan or [-]nan(n-wchar-sequence) -- which style, and the meaning of
16873             any n-wchar-sequence, is implementation-defined. The F conversion
16874             specifier produces INF, INFINITY, or NAN instead of inf, infinity, or
16875               nan, respectively.<sup><a href="#note283"><b>283)</b></a></sup></pre>
16876  e,E          A double argument representing a floating-point number is converted in the
16877 <pre>
16878               style [-]d.ddd e(+-)dd, where there is one digit (which is nonzero if the
16879               argument is nonzero) before the decimal-point wide character and the number
16880               of digits after it is equal to the precision; if the precision is missing, it is taken
16881               as 6; if the precision is zero and the # flag is not specified, no decimal-point
16882               wide character appears. The value is rounded to the appropriate number of
16883               digits. The E conversion specifier produces a number with E instead of e
16884               introducing the exponent. The exponent always contains at least two digits,
16885               and only as many more digits as necessary to represent the exponent. If the
16886               value is zero, the exponent is zero.
16887               A double argument representing an infinity or NaN is converted in the style
16888               of an f or F conversion specifier.</pre>
16889  g,G          A double argument representing a floating-point number is converted in
16890 <pre>
16891               style f or e (or in style F or E in the case of a G conversion specifier),
16892               depending on the value converted and the precision. Let P equal the
16893               precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero.
16894               Then, if a conversion with style E would have an exponent of X :
16895               -- if P &gt; X &gt;= -4, the conversion is with style f (or F) and precision
16896                 P - (X + 1).
16897               -- otherwise, the conversion is with style e (or E) and precision P - 1.
16898               Finally, unless the # flag is used, any trailing zeros are removed from the
16899               fractional portion of the result and the decimal-point wide character is
16900               removed if there is no fractional portion remaining.
16901               A double argument representing an infinity or NaN is converted in the style
16902               of an f or F conversion specifier.</pre>
16903  a,A          A double argument representing a floating-point number is converted in the
16904 <pre>
16905               style [-]0xh.hhhh p(+-)d, where there is one hexadecimal digit (which is
16906               nonzero if the argument is a normalized floating-point number and is
16907               otherwise unspecified) before the decimal-point wide character<sup><a href="#note284"><b>284)</b></a></sup> and the
16908               number of hexadecimal digits after it is equal to the precision; if the precision
16909               is missing and FLT_RADIX is a power of 2, then the precision is sufficient</pre>
16910  
16911  
16912 <!--page 366 -->
16913 <pre>
16914               for an exact representation of the value; if the precision is missing and
16915               FLT_RADIX is not a power of 2, then the precision is sufficient to
16916               distinguish<sup><a href="#note285"><b>285)</b></a></sup> values of type double, except that trailing zeros may be
16917               omitted; if the precision is zero and the # flag is not specified, no decimal-
16918               point wide character appears. The letters abcdef are used for a conversion
16919               and the letters ABCDEF for A conversion. The A conversion specifier
16920               produces a number with X and P instead of x and p. The exponent always
16921               contains at least one digit, and only as many more digits as necessary to
16922               represent the decimal exponent of 2. If the value is zero, the exponent is
16923               zero.
16924               A double argument representing an infinity or NaN is converted in the style
16925               of an f or F conversion specifier.</pre>
16926  c            If no l length modifier is present, the int argument is converted to a wide
16927 <pre>
16928               character as if by calling btowc and the resulting wide character is written.
16929               If an l length modifier is present, the wint_t argument is converted to
16930               wchar_t and written.</pre>
16931  s            If no l length modifier is present, the argument shall be a pointer to the initial
16932 <pre>
16933               element of a character array containing a multibyte character sequence
16934               beginning in the initial shift state. Characters from the array are converted as
16935               if by repeated calls to the mbrtowc function, with the conversion state
16936               described by an mbstate_t object initialized to zero before the first
16937               multibyte character is converted, and written up to (but not including) the
16938               terminating null wide character. If the precision is specified, no more than
16939               that many wide characters are written. If the precision is not specified or is
16940               greater than the size of the converted array, the converted array shall contain a
16941               null wide character.
16942               If an l length modifier is present, the argument shall be a pointer to the initial
16943               element of an array of wchar_t type. Wide characters from the array are
16944               written up to (but not including) a terminating null wide character. If the
16945               precision is specified, no more than that many wide characters are written. If
16946               the precision is not specified or is greater than the size of the array, the array
16947               shall contain a null wide character.</pre>
16948  p            The argument shall be a pointer to void. The value of the pointer is
16949 <pre>
16950               converted to a sequence of printing wide characters, in an implementation-</pre>
16951  
16952 <!--page 367 -->
16953 <pre>
16954                 defined manner.</pre>
16955  n              The argument shall be a pointer to signed integer into which is written the
16956 <pre>
16957                 number of wide characters written to the output stream so far by this call to
16958                 fwprintf. No argument is converted, but one is consumed. If the
16959                 conversion specification includes any flags, a field width, or a precision, the
16960                 behavior is undefined.</pre>
16961  %              A % wide character is written. No argument is converted. The complete
16962 <p><!--para 9 -->
16963 <pre>
16964                 conversion specification shall be %%.</pre>
16965  If a conversion specification is invalid, the behavior is undefined.<sup><a href="#note286"><b>286)</b></a></sup> If any argument is
16966  not the correct type for the corresponding conversion specification, the behavior is
16967  undefined.
16968 <p><!--para 10 -->
16969  In no case does a nonexistent or small field width cause truncation of a field; if the result
16970  of a conversion is wider than the field width, the field is expanded to contain the
16971  conversion result.
16972 <p><!--para 11 -->
16973  For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded
16974  to a hexadecimal floating number with the given precision.
16975 <h6> Recommended practice</h6>
16976 <p><!--para 12 -->
16977  For a and A conversions, if FLT_RADIX is not a power of 2 and the result is not exactly
16978  representable in the given precision, the result should be one of the two adjacent numbers
16979  in hexadecimal floating style with the given precision, with the extra stipulation that the
16980  error should have a correct sign for the current rounding direction.
16981 <p><!--para 13 -->
16982  For e, E, f, F, g, and G conversions, if the number of significant decimal digits is at most
16983  DECIMAL_DIG, then the result should be correctly rounded.<sup><a href="#note287"><b>287)</b></a></sup> If the number of
16984  significant decimal digits is more than DECIMAL_DIG but the source value is exactly
16985  representable with DECIMAL_DIG digits, then the result should be an exact
16986  representation with trailing zeros. Otherwise, the source value is bounded by two
16987  adjacent decimal strings L &lt; U, both having DECIMAL_DIG significant digits; the value
16988  of the resultant decimal string D should satisfy L &lt;= D &lt;= U, with the extra stipulation that
16989  the error should have a correct sign for the current rounding direction.
16990 <h6>Returns</h6>
16991 <p><!--para 14 -->
16992  The fwprintf function returns the number of wide characters transmitted, or a negative
16993  value if an output or encoding error occurred.
16994  
16995 <!--page 368 -->
16996  Environmental limits
16997 <p><!--para 15 -->
16998  The number of wide characters that can be produced by any single conversion shall be at
16999  least 4095.
17000 <p><!--para 16 -->
17001  EXAMPLE       To print a date and time in the form ''Sunday, July 3, 10:02'' followed by pi to five decimal
17002  places:
17003 <pre>
17004         #include <a href="#7.12">&lt;math.h&gt;</a>
17005         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17006         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17007         /* ... */
17008         wchar_t *weekday, *month; // pointers to wide strings
17009         int day, hour, min;
17010         fwprintf(stdout, L"%ls, %ls %d, %.2d:%.2d\n",
17011                 weekday, month, day, hour, min);
17012         fwprintf(stdout, L"pi = %.5f\n", 4 * atan(1.0));</pre>
17013  
17014 <p><b> Forward references</b>:          the btowc function (<a href="#7.24.6.1.1">7.24.6.1.1</a>), the mbrtowc function
17015  (<a href="#7.24.6.3.2">7.24.6.3.2</a>).
17016
17017 <h6>footnotes</h6>
17018 <p><small><a name="note281" href="#note281">281)</a> Note that 0 is taken as a flag, not as the beginning of a field width.
17019 </small>
17020 <p><small><a name="note282" href="#note282">282)</a> The results of all floating conversions of a negative zero, and of negative values that round to zero,
17021  include a minus sign.
17022 </small>
17023 <p><small><a name="note283" href="#note283">283)</a> When applied to infinite and NaN values, the -, +, and space flag wide characters have their usual
17024  meaning; the # and 0 flag wide characters have no effect.
17025 </small>
17026 <p><small><a name="note284" href="#note284">284)</a> Binary implementations can choose the hexadecimal digit to the left of the decimal-point wide
17027  character so that subsequent digits align to nibble (4-bit) boundaries.
17028 </small>
17029 <p><small><a name="note285" href="#note285">285)</a> The precision p is sufficient to distinguish values of the source type if 16 p-1 &gt; b n where b is
17030  FLT_RADIX and n is the number of base-b digits in the significand of the source type. A smaller p
17031  might suffice depending on the implementation's scheme for determining the digit to the left of the
17032  decimal-point wide character.
17033 </small>
17034 <p><small><a name="note286" href="#note286">286)</a> See ''future library directions'' (<a href="#7.26.12">7.26.12</a>).
17035 </small>
17036 <p><small><a name="note287" href="#note287">287)</a> For binary-to-decimal conversion, the result format's values are the numbers representable with the
17037  given format specifier. The number of significant digits is determined by the format specifier, and in
17038  the case of fixed-point conversion by the source value as well.
17039 </small>
17040
17041 <h5><a name="7.24.2.2" href="#7.24.2.2">7.24.2.2 The fwscanf function</a></h5>
17042 <h6>Synopsis</h6>
17043 <p><!--para 1 -->
17044 <pre>
17045         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17046         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17047         int fwscanf(FILE * restrict stream,
17048              const wchar_t * restrict format, ...);</pre>
17049 <h6>Description</h6>
17050 <p><!--para 2 -->
17051  The fwscanf function reads input from the stream pointed to by stream, under
17052  control of the wide string pointed to by format that specifies the admissible input
17053  sequences and how they are to be converted for assignment, using subsequent arguments
17054  as pointers to the objects to receive the converted input. If there are insufficient
17055  arguments for the format, the behavior is undefined. If the format is exhausted while
17056  arguments remain, the excess arguments are evaluated (as always) but are otherwise
17057  ignored.
17058 <p><!--para 3 -->
17059  The format is composed of zero or more directives: one or more white-space wide
17060  characters, an ordinary wide character (neither % nor a white-space wide character), or a
17061  conversion specification. Each conversion specification is introduced by the wide
17062  character %. After the %, the following appear in sequence:
17063 <ul>
17064 <li>  An optional assignment-suppressing wide character *.
17065 <li>  An optional decimal integer greater than zero that specifies the maximum field width
17066  (in wide characters).
17067 <!--page 369 -->
17068 <li>  An optional length modifier that specifies the size of the receiving object.
17069 <li>  A conversion specifier wide character that specifies the type of conversion to be
17070  applied.
17071 </ul>
17072 <p><!--para 4 -->
17073  The fwscanf function executes each directive of the format in turn. If a directive fails,
17074  as detailed below, the function returns. Failures are described as input failures (due to the
17075  occurrence of an encoding error or the unavailability of input characters), or matching
17076  failures (due to inappropriate input).
17077 <p><!--para 5 -->
17078  A directive composed of white-space wide character(s) is executed by reading input up to
17079  the first non-white-space wide character (which remains unread), or until no more wide
17080  characters can be read.
17081 <p><!--para 6 -->
17082  A directive that is an ordinary wide character is executed by reading the next wide
17083  character of the stream. If that wide character differs from the directive, the directive
17084  fails and the differing and subsequent wide characters remain unread. Similarly, if end-
17085  of-file, an encoding error, or a read error prevents a wide character from being read, the
17086  directive fails.
17087 <p><!--para 7 -->
17088  A directive that is a conversion specification defines a set of matching input sequences, as
17089  described below for each specifier. A conversion specification is executed in the
17090  following steps:
17091 <p><!--para 8 -->
17092  Input white-space wide characters (as specified by the iswspace function) are skipped,
17093  unless the specification includes a [, c, or n specifier.<sup><a href="#note288"><b>288)</b></a></sup>
17094 <p><!--para 9 -->
17095  An input item is read from the stream, unless the specification includes an n specifier. An
17096  input item is defined as the longest sequence of input wide characters which does not
17097  exceed any specified field width and which is, or is a prefix of, a matching input
17098  sequence.<sup><a href="#note289"><b>289)</b></a></sup> The first wide character, if any, after the input item remains unread. If the
17099  length of the input item is zero, the execution of the directive fails; this condition is a
17100  matching failure unless end-of-file, an encoding error, or a read error prevented input
17101  from the stream, in which case it is an input failure.
17102 <p><!--para 10 -->
17103  Except in the case of a % specifier, the input item (or, in the case of a %n directive, the
17104  count of input wide characters) is converted to a type appropriate to the conversion
17105  specifier. If the input item is not a matching sequence, the execution of the directive fails:
17106  this condition is a matching failure. Unless assignment suppression was indicated by a *,
17107  the result of the conversion is placed in the object pointed to by the first argument
17108  following the format argument that has not already received a conversion result. If this
17109  
17110  
17111 <!--page 370 -->
17112  object does not have an appropriate type, or if the result of the conversion cannot be
17113  represented in the object, the behavior is undefined.
17114 <p><!--para 11 -->
17115  The length modifiers and their meanings are:
17116  hh          Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17117 <pre>
17118              to an argument with type pointer to signed char or unsigned char.</pre>
17119  h           Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17120 <pre>
17121              to an argument with type pointer to short int or unsigned short
17122              int.</pre>
17123  l (ell)     Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17124 <pre>
17125              to an argument with type pointer to long int or unsigned long
17126              int; that a following a, A, e, E, f, F, g, or G conversion specifier applies to
17127              an argument with type pointer to double; or that a following c, s, or [
17128              conversion specifier applies to an argument with type pointer to wchar_t.</pre>
17129  ll (ell-ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17130 <pre>
17131               to an argument with type pointer to long long int or unsigned
17132               long long int.</pre>
17133  j           Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17134 <pre>
17135              to an argument with type pointer to intmax_t or uintmax_t.</pre>
17136  z           Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17137 <pre>
17138              to an argument with type pointer to size_t or the corresponding signed
17139              integer type.</pre>
17140  t           Specifies that a following d, i, o, u, x, X, or n conversion specifier applies
17141 <pre>
17142              to an argument with type pointer to ptrdiff_t or the corresponding
17143              unsigned integer type.</pre>
17144  L           Specifies that a following a, A, e, E, f, F, g, or G conversion specifier
17145 <pre>
17146              applies to an argument with type pointer to long double.</pre>
17147  If a length modifier appears with any conversion specifier other than as specified above,
17148  the behavior is undefined.
17149 <p><!--para 12 -->
17150  The conversion specifiers and their meanings are:
17151  d          Matches an optionally signed decimal integer, whose format is the same as
17152 <pre>
17153             expected for the subject sequence of the wcstol function with the value 10
17154             for the base argument. The corresponding argument shall be a pointer to
17155             signed integer.</pre>
17156  i          Matches an optionally signed integer, whose format is the same as expected
17157 <!--page 371 -->
17158 <pre>
17159             for the subject sequence of the wcstol function with the value 0 for the
17160             base argument. The corresponding argument shall be a pointer to signed
17161              integer.</pre>
17162  o           Matches an optionally signed octal integer, whose format is the same as
17163 <pre>
17164              expected for the subject sequence of the wcstoul function with the value 8
17165              for the base argument. The corresponding argument shall be a pointer to
17166              unsigned integer.</pre>
17167  u           Matches an optionally signed decimal integer, whose format is the same as
17168 <pre>
17169              expected for the subject sequence of the wcstoul function with the value 10
17170              for the base argument. The corresponding argument shall be a pointer to
17171              unsigned integer.</pre>
17172  x           Matches an optionally signed hexadecimal integer, whose format is the same
17173 <pre>
17174              as expected for the subject sequence of the wcstoul function with the value
17175              16 for the base argument. The corresponding argument shall be a pointer to
17176              unsigned integer.</pre>
17177  a,e,f,g Matches an optionally signed floating-point number, infinity, or NaN, whose
17178 <pre>
17179          format is the same as expected for the subject sequence of the wcstod
17180          function. The corresponding argument shall be a pointer to floating.</pre>
17181  c           Matches a sequence of wide characters of exactly the number specified by the
17182 <pre>
17183              field width (1 if no field width is present in the directive).
17184              If no l length modifier is present, characters from the input field are
17185              converted as if by repeated calls to the wcrtomb function, with the
17186              conversion state described by an mbstate_t object initialized to zero
17187              before the first wide character is converted. The corresponding argument
17188              shall be a pointer to the initial element of a character array large enough to
17189              accept the sequence. No null character is added.
17190              If an l length modifier is present, the corresponding argument shall be a
17191              pointer to the initial element of an array of wchar_t large enough to accept
17192              the sequence. No null wide character is added.</pre>
17193  s           Matches a sequence of non-white-space wide characters.
17194 <!--page 372 -->
17195 <pre>
17196              If no l length modifier is present, characters from the input field are
17197              converted as if by repeated calls to the wcrtomb function, with the
17198              conversion state described by an mbstate_t object initialized to zero
17199              before the first wide character is converted. The corresponding argument
17200              shall be a pointer to the initial element of a character array large enough to
17201              accept the sequence and a terminating null character, which will be added
17202              automatically.
17203              If an l length modifier is present, the corresponding argument shall be a
17204              pointer to the initial element of an array of wchar_t large enough to accept
17205           the sequence and the terminating null wide character, which will be added
17206           automatically.</pre>
17207  [        Matches a nonempty sequence of wide characters from a set of expected
17208 <pre>
17209           characters (the scanset).
17210           If no l length modifier is present, characters from the input field are
17211           converted as if by repeated calls to the wcrtomb function, with the
17212           conversion state described by an mbstate_t object initialized to zero
17213           before the first wide character is converted. The corresponding argument
17214           shall be a pointer to the initial element of a character array large enough to
17215           accept the sequence and a terminating null character, which will be added
17216           automatically.
17217           If an l length modifier is present, the corresponding argument shall be a
17218           pointer to the initial element of an array of wchar_t large enough to accept
17219           the sequence and the terminating null wide character, which will be added
17220           automatically.
17221           The conversion specifier includes all subsequent wide characters in the
17222           format string, up to and including the matching right bracket (]). The wide
17223           characters between the brackets (the scanlist) compose the scanset, unless the
17224           wide character after the left bracket is a circumflex (^), in which case the
17225           scanset contains all wide characters that do not appear in the scanlist between
17226           the circumflex and the right bracket. If the conversion specifier begins with
17227           [] or [^], the right bracket wide character is in the scanlist and the next
17228           following right bracket wide character is the matching right bracket that ends
17229           the specification; otherwise the first following right bracket wide character is
17230           the one that ends the specification. If a - wide character is in the scanlist and
17231           is not the first, nor the second where the first wide character is a ^, nor the
17232           last character, the behavior is implementation-defined.</pre>
17233  p        Matches an implementation-defined set of sequences, which should be the
17234 <pre>
17235           same as the set of sequences that may be produced by the %p conversion of
17236           the fwprintf function. The corresponding argument shall be a pointer to a
17237           pointer to void. The input item is converted to a pointer value in an
17238           implementation-defined manner. If the input item is a value converted earlier
17239           during the same program execution, the pointer that results shall compare
17240           equal to that value; otherwise the behavior of the %p conversion is undefined.</pre>
17241  n        No input is consumed. The corresponding argument shall be a pointer to
17242 <!--page 373 -->
17243 <pre>
17244           signed integer into which is to be written the number of wide characters read
17245           from the input stream so far by this call to the fwscanf function. Execution
17246           of a %n directive does not increment the assignment count returned at the
17247           completion of execution of the fwscanf function. No argument is
17248                 converted, but one is consumed. If the conversion specification includes an
17249                 assignment-suppressing wide character or a field width, the behavior is
17250                 undefined.</pre>
17251  %              Matches a single % wide character; no conversion or assignment occurs. The
17252 <p><!--para 13 -->
17253 <pre>
17254                 complete conversion specification shall be %%.</pre>
17255  If a conversion specification is invalid, the behavior is undefined.<sup><a href="#note290"><b>290)</b></a></sup>
17256 <p><!--para 14 -->
17257  The conversion specifiers A, E, F, G, and X are also valid and behave the same as,
17258  respectively, a, e, f, g, and x.
17259 <p><!--para 15 -->
17260  Trailing white space (including new-line wide characters) is left unread unless matched
17261  by a directive. The success of literal matches and suppressed assignments is not directly
17262  determinable other than via the %n directive.
17263 <h6>Returns</h6>
17264 <p><!--para 16 -->
17265  The fwscanf function returns the value of the macro EOF if an input failure occurs
17266  before any conversion. Otherwise, the function returns the number of input items
17267  assigned, which can be fewer than provided for, or even zero, in the event of an early
17268  matching failure.
17269 <p><!--para 17 -->
17270  EXAMPLE 1        The call:
17271 <pre>
17272           #include <a href="#7.19">&lt;stdio.h&gt;</a>
17273           #include <a href="#7.24">&lt;wchar.h&gt;</a>
17274           /* ... */
17275           int n, i; float x; wchar_t name[50];
17276           n = fwscanf(stdin, L"%d%f%ls", &amp;i, &amp;x, name);</pre>
17277  with the input line:
17278 <pre>
17279           25 54.32E-1 thompson</pre>
17280  will assign to n the value 3, to i the value 25, to x the value 5.432, and to name the sequence
17281  thompson\0.
17282  
17283 <p><!--para 18 -->
17284  EXAMPLE 2        The call:
17285 <pre>
17286           #include <a href="#7.19">&lt;stdio.h&gt;</a>
17287           #include <a href="#7.24">&lt;wchar.h&gt;</a>
17288           /* ... */
17289           int i; float x; double y;
17290           fwscanf(stdin, L"%2d%f%*d %lf", &amp;i, &amp;x, &amp;y);</pre>
17291  with input:
17292 <pre>
17293           56789 0123 56a72</pre>
17294  will assign to i the value 56 and to x the value 789.0, will skip past 0123, and will assign to y the value
17295  56.0. The next wide character read from the input stream will be a.
17296  
17297  
17298 <!--page 374 -->
17299 <p><b> Forward references</b>: the wcstod, wcstof, and wcstold functions (<a href="#7.24.4.1.1">7.24.4.1.1</a>), the
17300  wcstol, wcstoll, wcstoul, and wcstoull functions (<a href="#7.24.4.1.2">7.24.4.1.2</a>), the wcrtomb
17301  function (<a href="#7.24.6.3.3">7.24.6.3.3</a>).
17302
17303 <h6>footnotes</h6>
17304 <p><small><a name="note288" href="#note288">288)</a> These white-space wide characters are not counted against a specified field width.
17305 </small>
17306 <p><small><a name="note289" href="#note289">289)</a> fwscanf pushes back at most one input wide character onto the input stream. Therefore, some
17307  sequences that are acceptable to wcstod, wcstol, etc., are unacceptable to fwscanf.
17308 </small>
17309 <p><small><a name="note290" href="#note290">290)</a> See ''future library directions'' (<a href="#7.26.12">7.26.12</a>).
17310 </small>
17311
17312 <h5><a name="7.24.2.3" href="#7.24.2.3">7.24.2.3 The swprintf function</a></h5>
17313 <h6>Synopsis</h6>
17314 <p><!--para 1 -->
17315 <pre>
17316         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17317         int swprintf(wchar_t * restrict s,
17318              size_t n,
17319              const wchar_t * restrict format, ...);</pre>
17320 <h6>Description</h6>
17321 <p><!--para 2 -->
17322  The swprintf function is equivalent to fwprintf, except that the argument s
17323  specifies an array of wide characters into which the generated output is to be written,
17324  rather than written to a stream. No more than n wide characters are written, including a
17325  terminating null wide character, which is always added (unless n is zero).
17326 <h6>Returns</h6>
17327 <p><!--para 3 -->
17328  The swprintf function returns the number of wide characters written in the array, not
17329  counting the terminating null wide character, or a negative value if an encoding error
17330  occurred or if n or more wide characters were requested to be written.
17331
17332 <h5><a name="7.24.2.4" href="#7.24.2.4">7.24.2.4 The swscanf function</a></h5>
17333 <h6>Synopsis</h6>
17334 <p><!--para 1 -->
17335 <pre>
17336         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17337         int swscanf(const wchar_t * restrict s,
17338              const wchar_t * restrict format, ...);</pre>
17339 <h6>Description</h6>
17340 <p><!--para 2 -->
17341  The swscanf function is equivalent to fwscanf, except that the argument s specifies a
17342  wide string from which the input is to be obtained, rather than from a stream. Reaching
17343  the end of the wide string is equivalent to encountering end-of-file for the fwscanf
17344  function.
17345 <h6>Returns</h6>
17346 <p><!--para 3 -->
17347  The swscanf function returns the value of the macro EOF if an input failure occurs
17348  before any conversion. Otherwise, the swscanf function returns the number of input
17349  items assigned, which can be fewer than provided for, or even zero, in the event of an
17350  early matching failure.
17351 <!--page 375 -->
17352
17353 <h5><a name="7.24.2.5" href="#7.24.2.5">7.24.2.5 The vfwprintf function</a></h5>
17354 <h6>Synopsis</h6>
17355 <p><!--para 1 -->
17356 <pre>
17357         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17358         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17359         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17360         int vfwprintf(FILE * restrict stream,
17361              const wchar_t * restrict format,
17362              va_list arg);</pre>
17363 <h6>Description</h6>
17364 <p><!--para 2 -->
17365  The vfwprintf function is equivalent to fwprintf, with the variable argument list
17366  replaced by arg, which shall have been initialized by the va_start macro (and
17367  possibly subsequent va_arg calls). The vfwprintf function does not invoke the
17368  va_end macro.<sup><a href="#note291"><b>291)</b></a></sup>
17369 <h6>Returns</h6>
17370 <p><!--para 3 -->
17371  The vfwprintf function returns the number of wide characters transmitted, or a
17372  negative value if an output or encoding error occurred.
17373 <p><!--para 4 -->
17374  EXAMPLE       The following shows the use of the vfwprintf function in a general error-reporting
17375  routine.
17376 <pre>
17377         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17378         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17379         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17380         void error(char *function_name, wchar_t *format, ...)
17381         {
17382               va_list args;
17383                  va_start(args, format);
17384                  // print out name of function causing error
17385                  fwprintf(stderr, L"ERROR in %s: ", function_name);
17386                  // print out remainder of message
17387                  vfwprintf(stderr, format, args);
17388                  va_end(args);
17389         }</pre>
17390  
17391  
17392  
17393  
17394 <!--page 376 -->
17395
17396 <h6>footnotes</h6>
17397 <p><small><a name="note291" href="#note291">291)</a> As the functions vfwprintf, vswprintf, vfwscanf, vwprintf, vwscanf, and vswscanf
17398  invoke the va_arg macro, the value of arg after the return is indeterminate.
17399 </small>
17400
17401 <h5><a name="7.24.2.6" href="#7.24.2.6">7.24.2.6 The vfwscanf function</a></h5>
17402 <h6>Synopsis</h6>
17403 <p><!--para 1 -->
17404 <pre>
17405         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17406         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17407         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17408         int vfwscanf(FILE * restrict stream,
17409              const wchar_t * restrict format,
17410              va_list arg);</pre>
17411 <h6>Description</h6>
17412 <p><!--para 2 -->
17413  The vfwscanf function is equivalent to fwscanf, with the variable argument list
17414  replaced by arg, which shall have been initialized by the va_start macro (and
17415  possibly subsequent va_arg calls). The vfwscanf function does not invoke the
17416  va_end macro.291)
17417 <h6>Returns</h6>
17418 <p><!--para 3 -->
17419  The vfwscanf function returns the value of the macro EOF if an input failure occurs
17420  before any conversion. Otherwise, the vfwscanf function returns the number of input
17421  items assigned, which can be fewer than provided for, or even zero, in the event of an
17422  early matching failure.
17423
17424 <h5><a name="7.24.2.7" href="#7.24.2.7">7.24.2.7 The vswprintf function</a></h5>
17425 <h6>Synopsis</h6>
17426 <p><!--para 1 -->
17427 <pre>
17428         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17429         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17430         int vswprintf(wchar_t * restrict s,
17431              size_t n,
17432              const wchar_t * restrict format,
17433              va_list arg);</pre>
17434 <h6>Description</h6>
17435 <p><!--para 2 -->
17436  The vswprintf function is equivalent to swprintf, with the variable argument list
17437  replaced by arg, which shall have been initialized by the va_start macro (and
17438  possibly subsequent va_arg calls). The vswprintf function does not invoke the
17439  va_end macro.291)
17440 <h6>Returns</h6>
17441 <p><!--para 3 -->
17442  The vswprintf function returns the number of wide characters written in the array, not
17443  counting the terminating null wide character, or a negative value if an encoding error
17444  occurred or if n or more wide characters were requested to be generated.
17445 <!--page 377 -->
17446
17447 <h5><a name="7.24.2.8" href="#7.24.2.8">7.24.2.8 The vswscanf function</a></h5>
17448 <h6>Synopsis</h6>
17449 <p><!--para 1 -->
17450 <pre>
17451         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17452         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17453         int vswscanf(const wchar_t * restrict s,
17454              const wchar_t * restrict format,
17455              va_list arg);</pre>
17456 <h6>Description</h6>
17457 <p><!--para 2 -->
17458  The vswscanf function is equivalent to swscanf, with the variable argument list
17459  replaced by arg, which shall have been initialized by the va_start macro (and
17460  possibly subsequent va_arg calls). The vswscanf function does not invoke the
17461  va_end macro.291)
17462 <h6>Returns</h6>
17463 <p><!--para 3 -->
17464  The vswscanf function returns the value of the macro EOF if an input failure occurs
17465  before any conversion. Otherwise, the vswscanf function returns the number of input
17466  items assigned, which can be fewer than provided for, or even zero, in the event of an
17467  early matching failure.
17468
17469 <h5><a name="7.24.2.9" href="#7.24.2.9">7.24.2.9 The vwprintf function</a></h5>
17470 <h6>Synopsis</h6>
17471 <p><!--para 1 -->
17472 <pre>
17473         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17474         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17475         int vwprintf(const wchar_t * restrict format,
17476              va_list arg);</pre>
17477 <h6>Description</h6>
17478 <p><!--para 2 -->
17479  The vwprintf function is equivalent to wprintf, with the variable argument list
17480  replaced by arg, which shall have been initialized by the va_start macro (and
17481  possibly subsequent va_arg calls). The vwprintf function does not invoke the
17482  va_end macro.291)
17483 <h6>Returns</h6>
17484 <p><!--para 3 -->
17485  The vwprintf function returns the number of wide characters transmitted, or a negative
17486  value if an output or encoding error occurred.
17487 <!--page 378 -->
17488
17489 <h5><a name="7.24.2.10" href="#7.24.2.10">7.24.2.10 The vwscanf function</a></h5>
17490 <h6>Synopsis</h6>
17491 <p><!--para 1 -->
17492 <pre>
17493         #include <a href="#7.15">&lt;stdarg.h&gt;</a>
17494         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17495         int vwscanf(const wchar_t * restrict format,
17496              va_list arg);</pre>
17497 <h6>Description</h6>
17498 <p><!--para 2 -->
17499  The vwscanf function is equivalent to wscanf, with the variable argument list
17500  replaced by arg, which shall have been initialized by the va_start macro (and
17501  possibly subsequent va_arg calls). The vwscanf function does not invoke the
17502  va_end macro.291)
17503 <h6>Returns</h6>
17504 <p><!--para 3 -->
17505  The vwscanf function returns the value of the macro EOF if an input failure occurs
17506  before any conversion. Otherwise, the vwscanf function returns the number of input
17507  items assigned, which can be fewer than provided for, or even zero, in the event of an
17508  early matching failure.
17509
17510 <h5><a name="7.24.2.11" href="#7.24.2.11">7.24.2.11 The wprintf function</a></h5>
17511 <h6>Synopsis</h6>
17512 <p><!--para 1 -->
17513 <pre>
17514         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17515         int wprintf(const wchar_t * restrict format, ...);</pre>
17516 <h6>Description</h6>
17517 <p><!--para 2 -->
17518  The wprintf function is equivalent to fwprintf with the argument stdout
17519  interposed before the arguments to wprintf.
17520 <h6>Returns</h6>
17521 <p><!--para 3 -->
17522  The wprintf function returns the number of wide characters transmitted, or a negative
17523  value if an output or encoding error occurred.
17524
17525 <h5><a name="7.24.2.12" href="#7.24.2.12">7.24.2.12 The wscanf function</a></h5>
17526 <h6>Synopsis</h6>
17527 <p><!--para 1 -->
17528 <pre>
17529         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17530         int wscanf(const wchar_t * restrict format, ...);</pre>
17531 <h6>Description</h6>
17532 <p><!--para 2 -->
17533  The wscanf function is equivalent to fwscanf with the argument stdin interposed
17534  before the arguments to wscanf.
17535 <!--page 379 -->
17536 <h6>Returns</h6>
17537 <p><!--para 3 -->
17538  The wscanf function returns the value of the macro EOF if an input failure occurs
17539  before any conversion. Otherwise, the wscanf function returns the number of input
17540  items assigned, which can be fewer than provided for, or even zero, in the event of an
17541  early matching failure.
17542
17543 <h4><a name="7.24.3" href="#7.24.3">7.24.3 Wide character input/output functions</a></h4>
17544
17545 <h5><a name="7.24.3.1" href="#7.24.3.1">7.24.3.1 The fgetwc function</a></h5>
17546 <h6>Synopsis</h6>
17547 <p><!--para 1 -->
17548 <pre>
17549          #include <a href="#7.19">&lt;stdio.h&gt;</a>
17550          #include <a href="#7.24">&lt;wchar.h&gt;</a>
17551          wint_t fgetwc(FILE *stream);</pre>
17552 <h6>Description</h6>
17553 <p><!--para 2 -->
17554  If the end-of-file indicator for the input stream pointed to by stream is not set and a
17555  next wide character is present, the fgetwc function obtains that wide character as a
17556  wchar_t converted to a wint_t and advances the associated file position indicator for
17557  the stream (if defined).
17558 <h6>Returns</h6>
17559 <p><!--para 3 -->
17560  If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-
17561  of-file indicator for the stream is set and the fgetwc function returns WEOF. Otherwise,
17562  the fgetwc function returns the next wide character from the input stream pointed to by
17563  stream. If a read error occurs, the error indicator for the stream is set and the fgetwc
17564  function returns WEOF. If an encoding error occurs (including too few bytes), the value of
17565  the macro EILSEQ is stored in errno and the fgetwc function returns WEOF.<sup><a href="#note292"><b>292)</b></a></sup>
17566
17567 <h6>footnotes</h6>
17568 <p><small><a name="note292" href="#note292">292)</a> An end-of-file and a read error can be distinguished by use of the feof and ferror functions.
17569  Also, errno will be set to EILSEQ by input/output functions only if an encoding error occurs.
17570 </small>
17571
17572 <h5><a name="7.24.3.2" href="#7.24.3.2">7.24.3.2 The fgetws function</a></h5>
17573 <h6>Synopsis</h6>
17574 <p><!--para 1 -->
17575 <pre>
17576          #include <a href="#7.19">&lt;stdio.h&gt;</a>
17577          #include <a href="#7.24">&lt;wchar.h&gt;</a>
17578          wchar_t *fgetws(wchar_t * restrict s,
17579               int n, FILE * restrict stream);</pre>
17580 <h6>Description</h6>
17581 <p><!--para 2 -->
17582  The fgetws function reads at most one less than the number of wide characters
17583  specified by n from the stream pointed to by stream into the array pointed to by s. No
17584  
17585  
17586 <!--page 380 -->
17587  additional wide characters are read after a new-line wide character (which is retained) or
17588  after end-of-file. A null wide character is written immediately after the last wide
17589  character read into the array.
17590 <h6>Returns</h6>
17591 <p><!--para 3 -->
17592  The fgetws function returns s if successful. If end-of-file is encountered and no
17593  characters have been read into the array, the contents of the array remain unchanged and a
17594  null pointer is returned. If a read or encoding error occurs during the operation, the array
17595  contents are indeterminate and a null pointer is returned.
17596
17597 <h5><a name="7.24.3.3" href="#7.24.3.3">7.24.3.3 The fputwc function</a></h5>
17598 <h6>Synopsis</h6>
17599 <p><!--para 1 -->
17600 <pre>
17601         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17602         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17603         wint_t fputwc(wchar_t c, FILE *stream);</pre>
17604 <h6>Description</h6>
17605 <p><!--para 2 -->
17606  The fputwc function writes the wide character specified by c to the output stream
17607  pointed to by stream, at the position indicated by the associated file position indicator
17608  for the stream (if defined), and advances the indicator appropriately. If the file cannot
17609  support positioning requests, or if the stream was opened with append mode, the
17610  character is appended to the output stream.
17611 <h6>Returns</h6>
17612 <p><!--para 3 -->
17613  The fputwc function returns the wide character written. If a write error occurs, the
17614  error indicator for the stream is set and fputwc returns WEOF. If an encoding error
17615  occurs, the value of the macro EILSEQ is stored in errno and fputwc returns WEOF.
17616
17617 <h5><a name="7.24.3.4" href="#7.24.3.4">7.24.3.4 The fputws function</a></h5>
17618 <h6>Synopsis</h6>
17619 <p><!--para 1 -->
17620 <pre>
17621         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17622         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17623         int fputws(const wchar_t * restrict s,
17624              FILE * restrict stream);</pre>
17625 <h6>Description</h6>
17626 <p><!--para 2 -->
17627  The fputws function writes the wide string pointed to by s to the stream pointed to by
17628  stream. The terminating null wide character is not written.
17629 <h6>Returns</h6>
17630 <p><!--para 3 -->
17631  The fputws function returns EOF if a write or encoding error occurs; otherwise, it
17632  returns a nonnegative value.
17633 <!--page 381 -->
17634
17635 <h5><a name="7.24.3.5" href="#7.24.3.5">7.24.3.5 The fwide function</a></h5>
17636 <h6>Synopsis</h6>
17637 <p><!--para 1 -->
17638 <pre>
17639          #include <a href="#7.19">&lt;stdio.h&gt;</a>
17640          #include <a href="#7.24">&lt;wchar.h&gt;</a>
17641          int fwide(FILE *stream, int mode);</pre>
17642 <h6>Description</h6>
17643 <p><!--para 2 -->
17644  The fwide function determines the orientation of the stream pointed to by stream. If
17645  mode is greater than zero, the function first attempts to make the stream wide oriented. If
17646  mode is less than zero, the function first attempts to make the stream byte oriented.<sup><a href="#note293"><b>293)</b></a></sup>
17647  Otherwise, mode is zero and the function does not alter the orientation of the stream.
17648 <h6>Returns</h6>
17649 <p><!--para 3 -->
17650  The fwide function returns a value greater than zero if, after the call, the stream has
17651  wide orientation, a value less than zero if the stream has byte orientation, or zero if the
17652  stream has no orientation.
17653
17654 <h6>footnotes</h6>
17655 <p><small><a name="note293" href="#note293">293)</a> If the orientation of the stream has already been determined, fwide does not change it.
17656 </small>
17657
17658 <h5><a name="7.24.3.6" href="#7.24.3.6">7.24.3.6 The getwc function</a></h5>
17659 <h6>Synopsis</h6>
17660 <p><!--para 1 -->
17661 <pre>
17662          #include <a href="#7.19">&lt;stdio.h&gt;</a>
17663          #include <a href="#7.24">&lt;wchar.h&gt;</a>
17664          wint_t getwc(FILE *stream);</pre>
17665 <h6>Description</h6>
17666 <p><!--para 2 -->
17667  The getwc function is equivalent to fgetwc, except that if it is implemented as a
17668  macro, it may evaluate stream more than once, so the argument should never be an
17669  expression with side effects.
17670 <h6>Returns</h6>
17671 <p><!--para 3 -->
17672  The getwc function returns the next wide character from the input stream pointed to by
17673  stream, or WEOF.
17674
17675 <h5><a name="7.24.3.7" href="#7.24.3.7">7.24.3.7 The getwchar function</a></h5>
17676 <h6>Synopsis</h6>
17677 <p><!--para 1 -->
17678 <pre>
17679          #include <a href="#7.24">&lt;wchar.h&gt;</a>
17680          wint_t getwchar(void);</pre>
17681  
17682  
17683  
17684  
17685 <!--page 382 -->
17686 <h6>Description</h6>
17687 <p><!--para 2 -->
17688  The getwchar function is equivalent to getwc with the argument stdin.
17689 <h6>Returns</h6>
17690 <p><!--para 3 -->
17691  The getwchar function returns the next wide character from the input stream pointed to
17692  by stdin, or WEOF.
17693
17694 <h5><a name="7.24.3.8" href="#7.24.3.8">7.24.3.8 The putwc function</a></h5>
17695 <h6>Synopsis</h6>
17696 <p><!--para 1 -->
17697 <pre>
17698         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17699         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17700         wint_t putwc(wchar_t c, FILE *stream);</pre>
17701 <h6>Description</h6>
17702 <p><!--para 2 -->
17703  The putwc function is equivalent to fputwc, except that if it is implemented as a
17704  macro, it may evaluate stream more than once, so that argument should never be an
17705  expression with side effects.
17706 <h6>Returns</h6>
17707 <p><!--para 3 -->
17708  The putwc function returns the wide character written, or WEOF.
17709
17710 <h5><a name="7.24.3.9" href="#7.24.3.9">7.24.3.9 The putwchar function</a></h5>
17711 <h6>Synopsis</h6>
17712 <p><!--para 1 -->
17713 <pre>
17714         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17715         wint_t putwchar(wchar_t c);</pre>
17716 <h6>Description</h6>
17717 <p><!--para 2 -->
17718  The putwchar function is equivalent to putwc with the second argument stdout.
17719 <h6>Returns</h6>
17720 <p><!--para 3 -->
17721  The putwchar function returns the character written, or WEOF.
17722
17723 <h5><a name="7.24.3.10" href="#7.24.3.10">7.24.3.10 The ungetwc function</a></h5>
17724 <h6>Synopsis</h6>
17725 <p><!--para 1 -->
17726 <pre>
17727         #include <a href="#7.19">&lt;stdio.h&gt;</a>
17728         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17729         wint_t ungetwc(wint_t c, FILE *stream);</pre>
17730 <h6>Description</h6>
17731 <p><!--para 2 -->
17732  The ungetwc function pushes the wide character specified by c back onto the input
17733  stream pointed to by stream. Pushed-back wide characters will be returned by
17734  subsequent reads on that stream in the reverse order of their pushing. A successful
17735 <!--page 383 -->
17736  intervening call (with the stream pointed to by stream) to a file positioning function
17737  (fseek, fsetpos, or rewind) discards any pushed-back wide characters for the
17738  stream. The external storage corresponding to the stream is unchanged.
17739 <p><!--para 3 -->
17740  One wide character of pushback is guaranteed, even if the call to the ungetwc function
17741  follows just after a call to a formatted wide character input function fwscanf,
17742  vfwscanf, vwscanf, or wscanf. If the ungetwc function is called too many times
17743  on the same stream without an intervening read or file positioning operation on that
17744  stream, the operation may fail.
17745 <p><!--para 4 -->
17746  If the value of c equals that of the macro WEOF, the operation fails and the input stream is
17747  unchanged.
17748 <p><!--para 5 -->
17749  A successful call to the ungetwc function clears the end-of-file indicator for the stream.
17750  The value of the file position indicator for the stream after reading or discarding all
17751  pushed-back wide characters is the same as it was before the wide characters were pushed
17752  back. For a text or binary stream, the value of its file position indicator after a successful
17753  call to the ungetwc function is unspecified until all pushed-back wide characters are
17754  read or discarded.
17755 <h6>Returns</h6>
17756 <p><!--para 6 -->
17757  The ungetwc function returns the wide character pushed back, or WEOF if the operation
17758  fails.
17759
17760 <h4><a name="7.24.4" href="#7.24.4">7.24.4 General wide string utilities</a></h4>
17761 <p><!--para 1 -->
17762  The header <a href="#7.24">&lt;wchar.h&gt;</a> declares a number of functions useful for wide string
17763  manipulation. Various methods are used for determining the lengths of the arrays, but in
17764  all cases a wchar_t * argument points to the initial (lowest addressed) element of the
17765  array. If an array is accessed beyond the end of an object, the behavior is undefined.
17766 <p><!--para 2 -->
17767  Where an argument declared as size_t n determines the length of the array for a
17768  function, n can have the value zero on a call to that function. Unless explicitly stated
17769  otherwise in the description of a particular function in this subclause, pointer arguments
17770  on such a call shall still have valid values, as described in <a href="#7.1.4">7.1.4</a>. On such a call, a
17771  function that locates a wide character finds no occurrence, a function that compares two
17772  wide character sequences returns zero, and a function that copies wide characters copies
17773  zero wide characters.
17774 <!--page 384 -->
17775
17776 <h5><a name="7.24.4.1" href="#7.24.4.1">7.24.4.1 Wide string numeric conversion functions</a></h5>
17777
17778 <h5><a name="7.24.4.1.1" href="#7.24.4.1.1">7.24.4.1.1 The wcstod, wcstof, and wcstold functions</a></h5>
17779 <h6>Synopsis</h6>
17780 <p><!--para 1 -->
17781 <pre>
17782         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17783         double wcstod(const wchar_t * restrict nptr,
17784              wchar_t ** restrict endptr);
17785         float wcstof(const wchar_t * restrict nptr,
17786              wchar_t ** restrict endptr);
17787         long double wcstold(const wchar_t * restrict nptr,
17788              wchar_t ** restrict endptr);</pre>
17789 <h6>Description</h6>
17790 <p><!--para 2 -->
17791  The wcstod, wcstof, and wcstold functions convert the initial portion of the wide
17792  string pointed to by nptr to double, float, and long double representation,
17793  respectively. First, they decompose the input string into three parts: an initial, possibly
17794  empty, sequence of white-space wide characters (as specified by the iswspace
17795  function), a subject sequence resembling a floating-point constant or representing an
17796  infinity or NaN; and a final wide string of one or more unrecognized wide characters,
17797  including the terminating null wide character of the input wide string. Then, they attempt
17798  to convert the subject sequence to a floating-point number, and return the result.
17799 <p><!--para 3 -->
17800  The expected form of the subject sequence is an optional plus or minus sign, then one of
17801  the following:
17802 <ul>
17803 <li>  a nonempty sequence of decimal digits optionally containing a decimal-point wide
17804  character, then an optional exponent part as defined for the corresponding single-byte
17805  characters in <a href="#6.4.4.2">6.4.4.2</a>;
17806 <li>  a 0x or 0X, then a nonempty sequence of hexadecimal digits optionally containing a
17807  decimal-point wide character, then an optional binary exponent part as defined in
17808  <a href="#6.4.4.2">6.4.4.2</a>;
17809 <li>  INF or INFINITY, or any other wide string equivalent except for case
17810 <li>  NAN or NAN(n-wchar-sequenceopt), or any other wide string equivalent except for
17811  case in the NAN part, where:
17812 <pre>
17813           n-wchar-sequence:
17814                 digit
17815                 nondigit
17816                 n-wchar-sequence digit
17817                 n-wchar-sequence nondigit</pre>
17818 </ul>
17819  The subject sequence is defined as the longest initial subsequence of the input wide
17820  string, starting with the first non-white-space wide character, that is of the expected form.
17821 <!--page 385 -->
17822  The subject sequence contains no wide characters if the input wide string is not of the
17823  expected form.
17824 <p><!--para 4 -->
17825  If the subject sequence has the expected form for a floating-point number, the sequence of
17826  wide characters starting with the first digit or the decimal-point wide character
17827  (whichever occurs first) is interpreted as a floating constant according to the rules of
17828  <a href="#6.4.4.2">6.4.4.2</a>, except that the decimal-point wide character is used in place of a period, and that
17829  if neither an exponent part nor a decimal-point wide character appears in a decimal
17830  floating point number, or if a binary exponent part does not appear in a hexadecimal
17831  floating point number, an exponent part of the appropriate type with value zero is
17832  assumed to follow the last digit in the string. If the subject sequence begins with a minus
17833  sign, the sequence is interpreted as negated.<sup><a href="#note294"><b>294)</b></a></sup> A wide character sequence INF or
17834  INFINITY is interpreted as an infinity, if representable in the return type, else like a
17835  floating constant that is too large for the range of the return type. A wide character
17836  sequence NAN or NAN(n-wchar-sequenceopt) is interpreted as a quiet NaN, if supported
17837  in the return type, else like a subject sequence part that does not have the expected form;
17838  the meaning of the n-wchar sequences is implementation-defined.<sup><a href="#note295"><b>295)</b></a></sup> A pointer to the
17839  final wide string is stored in the object pointed to by endptr, provided that endptr is
17840  not a null pointer.
17841 <p><!--para 5 -->
17842  If the subject sequence has the hexadecimal form and FLT_RADIX is a power of 2, the
17843  value resulting from the conversion is correctly rounded.
17844 <p><!--para 6 -->
17845  In other than the "C" locale, additional locale-specific subject sequence forms may be
17846  accepted.
17847 <p><!--para 7 -->
17848  If the subject sequence is empty or does not have the expected form, no conversion is
17849  performed; the value of nptr is stored in the object pointed to by endptr, provided
17850  that endptr is not a null pointer.
17851 <h6> Recommended practice</h6>
17852 <p><!--para 8 -->
17853  If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, and
17854  the result is not exactly representable, the result should be one of the two numbers in the
17855  appropriate internal format that are adjacent to the hexadecimal floating source value,
17856  with the extra stipulation that the error should have a correct sign for the current rounding
17857  direction.
17858  
17859  
17860  
17861 <!--page 386 -->
17862 <p><!--para 9 -->
17863  If the subject sequence has the decimal form and at most DECIMAL_DIG (defined in
17864  <a href="#7.7">&lt;float.h&gt;</a>) significant digits, the result should be correctly rounded. If the subject
17865  sequence D has the decimal form and more than DECIMAL_DIG significant digits,
17866  consider the two bounding, adjacent decimal strings L and U, both having
17867  DECIMAL_DIG significant digits, such that the values of L, D, and U satisfy L &lt;= D &lt;= U.
17868  The result should be one of the (equal or adjacent) values that would be obtained by
17869  correctly rounding L and U according to the current rounding direction, with the extra
17870  stipulation that the error with respect to D should have a correct sign for the current
17871  rounding direction.<sup><a href="#note296"><b>296)</b></a></sup>
17872 <h6>Returns</h6>
17873 <p><!--para 10 -->
17874  The functions return the converted value, if any. If no conversion could be performed,
17875  zero is returned. If the correct value is outside the range of representable values, plus or
17876  minus HUGE_VAL, HUGE_VALF, or HUGE_VALL is returned (according to the return
17877  type and sign of the value), and the value of the macro ERANGE is stored in errno. If
17878  the result underflows (<a href="#7.12.1">7.12.1</a>), the functions return a value whose magnitude is no greater
17879  than the smallest normalized positive number in the return type; whether errno acquires
17880  the value ERANGE is implementation-defined.
17881  
17882  
17883  
17884  
17885 <!--page 387 -->
17886
17887 <h6>footnotes</h6>
17888 <p><small><a name="note294" href="#note294">294)</a> It is unspecified whether a minus-signed sequence is converted to a negative number directly or by
17889  negating the value resulting from converting the corresponding unsigned sequence (see <a href="#F.5">F.5</a>); the two
17890  methods may yield different results if rounding is toward positive or negative infinity. In either case,
17891  the functions honor the sign of zero if floating-point arithmetic supports signed zeros.
17892 </small>
17893 <p><small><a name="note295" href="#note295">295)</a> An implementation may use the n-wchar sequence to determine extra information to be represented in
17894  the NaN's significand.
17895 </small>
17896 <p><small><a name="note296" href="#note296">296)</a> DECIMAL_DIG, defined in <a href="#7.7">&lt;float.h&gt;</a>, should be sufficiently large that L and U will usually round
17897  to the same internal floating value, but if not will round to adjacent values.
17898 </small>
17899
17900 <h5><a name="7.24.4.1.2" href="#7.24.4.1.2">7.24.4.1.2 The wcstol, wcstoll, wcstoul, and wcstoull functions</a></h5>
17901 <h6>Synopsis</h6>
17902 <p><!--para 1 -->
17903 <pre>
17904         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17905         long int wcstol(
17906              const wchar_t * restrict nptr,
17907              wchar_t ** restrict endptr,
17908              int base);
17909         long long int wcstoll(
17910              const wchar_t * restrict nptr,
17911              wchar_t ** restrict endptr,
17912              int base);
17913         unsigned long int wcstoul(
17914              const wchar_t * restrict nptr,
17915              wchar_t ** restrict endptr,
17916              int base);
17917         unsigned long long int wcstoull(
17918              const wchar_t * restrict nptr,
17919              wchar_t ** restrict endptr,
17920              int base);</pre>
17921 <h6>Description</h6>
17922 <p><!--para 2 -->
17923  The wcstol, wcstoll, wcstoul, and wcstoull functions convert the initial
17924  portion of the wide string pointed to by nptr to long int, long long int,
17925  unsigned long int, and unsigned long long int representation,
17926  respectively. First, they decompose the input string into three parts: an initial, possibly
17927  empty, sequence of white-space wide characters (as specified by the iswspace
17928  function), a subject sequence resembling an integer represented in some radix determined
17929  by the value of base, and a final wide string of one or more unrecognized wide
17930  characters, including the terminating null wide character of the input wide string. Then,
17931  they attempt to convert the subject sequence to an integer, and return the result.
17932 <p><!--para 3 -->
17933  If the value of base is zero, the expected form of the subject sequence is that of an
17934  integer constant as described for the corresponding single-byte characters in <a href="#6.4.4.1">6.4.4.1</a>,
17935  optionally preceded by a plus or minus sign, but not including an integer suffix. If the
17936  value of base is between 2 and 36 (inclusive), the expected form of the subject sequence
17937  is a sequence of letters and digits representing an integer with the radix specified by
17938  base, optionally preceded by a plus or minus sign, but not including an integer suffix.
17939  The letters from a (or A) through z (or Z) are ascribed the values 10 through 35; only
17940  letters and digits whose ascribed values are less than that of base are permitted. If the
17941  value of base is 16, the wide characters 0x or 0X may optionally precede the sequence
17942  of letters and digits, following the sign if present.
17943 <!--page 388 -->
17944 <p><!--para 4 -->
17945  The subject sequence is defined as the longest initial subsequence of the input wide
17946  string, starting with the first non-white-space wide character, that is of the expected form.
17947  The subject sequence contains no wide characters if the input wide string is empty or
17948  consists entirely of white space, or if the first non-white-space wide character is other
17949  than a sign or a permissible letter or digit.
17950 <p><!--para 5 -->
17951  If the subject sequence has the expected form and the value of base is zero, the sequence
17952  of wide characters starting with the first digit is interpreted as an integer constant
17953  according to the rules of <a href="#6.4.4.1">6.4.4.1</a>. If the subject sequence has the expected form and the
17954  value of base is between 2 and 36, it is used as the base for conversion, ascribing to each
17955  letter its value as given above. If the subject sequence begins with a minus sign, the value
17956  resulting from the conversion is negated (in the return type). A pointer to the final wide
17957  string is stored in the object pointed to by endptr, provided that endptr is not a null
17958  pointer.
17959 <p><!--para 6 -->
17960  In other than the "C" locale, additional locale-specific subject sequence forms may be
17961  accepted.
17962 <p><!--para 7 -->
17963  If the subject sequence is empty or does not have the expected form, no conversion is
17964  performed; the value of nptr is stored in the object pointed to by endptr, provided
17965  that endptr is not a null pointer.
17966 <h6>Returns</h6>
17967 <p><!--para 8 -->
17968  The wcstol, wcstoll, wcstoul, and wcstoull functions return the converted
17969  value, if any. If no conversion could be performed, zero is returned. If the correct value
17970  is outside the range of representable values, LONG_MIN, LONG_MAX, LLONG_MIN,
17971  LLONG_MAX, ULONG_MAX, or ULLONG_MAX is returned (according to the return type
17972  sign of the value, if any), and the value of the macro ERANGE is stored in errno.
17973
17974 <h5><a name="7.24.4.2" href="#7.24.4.2">7.24.4.2 Wide string copying functions</a></h5>
17975
17976 <h5><a name="7.24.4.2.1" href="#7.24.4.2.1">7.24.4.2.1 The wcscpy function</a></h5>
17977 <h6>Synopsis</h6>
17978 <p><!--para 1 -->
17979 <pre>
17980         #include <a href="#7.24">&lt;wchar.h&gt;</a>
17981         wchar_t *wcscpy(wchar_t * restrict s1,
17982              const wchar_t * restrict s2);</pre>
17983 <h6>Description</h6>
17984 <p><!--para 2 -->
17985  The wcscpy function copies the wide string pointed to by s2 (including the terminating
17986  null wide character) into the array pointed to by s1.
17987 <h6>Returns</h6>
17988 <p><!--para 3 -->
17989  The wcscpy function returns the value of s1.
17990 <!--page 389 -->
17991
17992 <h5><a name="7.24.4.2.2" href="#7.24.4.2.2">7.24.4.2.2 The wcsncpy function</a></h5>
17993 <h6>Synopsis</h6>
17994 <p><!--para 1 -->
17995 <pre>
17996           #include <a href="#7.24">&lt;wchar.h&gt;</a>
17997           wchar_t *wcsncpy(wchar_t * restrict s1,
17998                const wchar_t * restrict s2,
17999                size_t n);</pre>
18000 <h6>Description</h6>
18001 <p><!--para 2 -->
18002  The wcsncpy function copies not more than n wide characters (those that follow a null
18003  wide character are not copied) from the array pointed to by s2 to the array pointed to by
18004  s1.<sup><a href="#note297"><b>297)</b></a></sup>
18005 <p><!--para 3 -->
18006  If the array pointed to by s2 is a wide string that is shorter than n wide characters, null
18007  wide characters are appended to the copy in the array pointed to by s1, until n wide
18008  characters in all have been written.
18009 <h6>Returns</h6>
18010 <p><!--para 4 -->
18011  The wcsncpy function returns the value of s1.
18012
18013 <h6>footnotes</h6>
18014 <p><small><a name="note297" href="#note297">297)</a> Thus, if there is no null wide character in the first n wide characters of the array pointed to by s2, the
18015  result will not be null-terminated.
18016 </small>
18017
18018 <h5><a name="7.24.4.2.3" href="#7.24.4.2.3">7.24.4.2.3 The wmemcpy function</a></h5>
18019 <h6>Synopsis</h6>
18020 <p><!--para 1 -->
18021 <pre>
18022           #include <a href="#7.24">&lt;wchar.h&gt;</a>
18023           wchar_t *wmemcpy(wchar_t * restrict s1,
18024                const wchar_t * restrict s2,
18025                size_t n);</pre>
18026 <h6>Description</h6>
18027 <p><!--para 2 -->
18028  The wmemcpy function copies n wide characters from the object pointed to by s2 to the
18029  object pointed to by s1.
18030 <h6>Returns</h6>
18031 <p><!--para 3 -->
18032  The wmemcpy function returns the value of s1.
18033  
18034  
18035  
18036  
18037 <!--page 390 -->
18038
18039 <h5><a name="7.24.4.2.4" href="#7.24.4.2.4">7.24.4.2.4 The wmemmove function</a></h5>
18040 <h6>Synopsis</h6>
18041 <p><!--para 1 -->
18042 <pre>
18043         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18044         wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2,
18045              size_t n);</pre>
18046 <h6>Description</h6>
18047 <p><!--para 2 -->
18048  The wmemmove function copies n wide characters from the object pointed to by s2 to
18049  the object pointed to by s1. Copying takes place as if the n wide characters from the
18050  object pointed to by s2 are first copied into a temporary array of n wide characters that
18051  does not overlap the objects pointed to by s1 or s2, and then the n wide characters from
18052  the temporary array are copied into the object pointed to by s1.
18053 <h6>Returns</h6>
18054 <p><!--para 3 -->
18055  The wmemmove function returns the value of s1.
18056
18057 <h5><a name="7.24.4.3" href="#7.24.4.3">7.24.4.3 Wide string concatenation functions</a></h5>
18058
18059 <h5><a name="7.24.4.3.1" href="#7.24.4.3.1">7.24.4.3.1 The wcscat function</a></h5>
18060 <h6>Synopsis</h6>
18061 <p><!--para 1 -->
18062 <pre>
18063         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18064         wchar_t *wcscat(wchar_t * restrict s1,
18065              const wchar_t * restrict s2);</pre>
18066 <h6>Description</h6>
18067 <p><!--para 2 -->
18068  The wcscat function appends a copy of the wide string pointed to by s2 (including the
18069  terminating null wide character) to the end of the wide string pointed to by s1. The initial
18070  wide character of s2 overwrites the null wide character at the end of s1.
18071 <h6>Returns</h6>
18072 <p><!--para 3 -->
18073  The wcscat function returns the value of s1.
18074
18075 <h5><a name="7.24.4.3.2" href="#7.24.4.3.2">7.24.4.3.2 The wcsncat function</a></h5>
18076 <h6>Synopsis</h6>
18077 <p><!--para 1 -->
18078 <pre>
18079         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18080         wchar_t *wcsncat(wchar_t * restrict s1,
18081              const wchar_t * restrict s2,
18082              size_t n);</pre>
18083 <h6>Description</h6>
18084 <p><!--para 2 -->
18085  The wcsncat function appends not more than n wide characters (a null wide character
18086  and those that follow it are not appended) from the array pointed to by s2 to the end of
18087 <!--page 391 -->
18088  the wide string pointed to by s1. The initial wide character of s2 overwrites the null
18089  wide character at the end of s1. A terminating null wide character is always appended to
18090  the result.<sup><a href="#note298"><b>298)</b></a></sup>
18091 <h6>Returns</h6>
18092 <p><!--para 3 -->
18093  The wcsncat function returns the value of s1.
18094
18095 <h6>footnotes</h6>
18096 <p><small><a name="note298" href="#note298">298)</a> Thus, the maximum number of wide characters that can end up in the array pointed to by s1 is
18097  wcslen(s1)+n+1.
18098 </small>
18099
18100 <h5><a name="7.24.4.4" href="#7.24.4.4">7.24.4.4 Wide string comparison functions</a></h5>
18101 <p><!--para 1 -->
18102  Unless explicitly stated otherwise, the functions described in this subclause order two
18103  wide characters the same way as two integers of the underlying integer type designated
18104  by wchar_t.
18105
18106 <h5><a name="7.24.4.4.1" href="#7.24.4.4.1">7.24.4.4.1 The wcscmp function</a></h5>
18107 <h6>Synopsis</h6>
18108 <p><!--para 1 -->
18109 <pre>
18110          #include <a href="#7.24">&lt;wchar.h&gt;</a>
18111          int wcscmp(const wchar_t *s1, const wchar_t *s2);</pre>
18112 <h6>Description</h6>
18113 <p><!--para 2 -->
18114  The wcscmp function compares the wide string pointed to by s1 to the wide string
18115  pointed to by s2.
18116 <h6>Returns</h6>
18117 <p><!--para 3 -->
18118  The wcscmp function returns an integer greater than, equal to, or less than zero,
18119  accordingly as the wide string pointed to by s1 is greater than, equal to, or less than the
18120  wide string pointed to by s2.
18121
18122 <h5><a name="7.24.4.4.2" href="#7.24.4.4.2">7.24.4.4.2 The wcscoll function</a></h5>
18123 <h6>Synopsis</h6>
18124 <p><!--para 1 -->
18125 <pre>
18126          #include <a href="#7.24">&lt;wchar.h&gt;</a>
18127          int wcscoll(const wchar_t *s1, const wchar_t *s2);</pre>
18128 <h6>Description</h6>
18129 <p><!--para 2 -->
18130  The wcscoll function compares the wide string pointed to by s1 to the wide string
18131  pointed to by s2, both interpreted as appropriate to the LC_COLLATE category of the
18132  current locale.
18133 <h6>Returns</h6>
18134 <p><!--para 3 -->
18135  The wcscoll function returns an integer greater than, equal to, or less than zero,
18136  accordingly as the wide string pointed to by s1 is greater than, equal to, or less than the
18137  
18138  
18139 <!--page 392 -->
18140  wide string pointed to by s2 when both are interpreted as appropriate to the current
18141  locale.
18142
18143 <h5><a name="7.24.4.4.3" href="#7.24.4.4.3">7.24.4.4.3 The wcsncmp function</a></h5>
18144 <h6>Synopsis</h6>
18145 <p><!--para 1 -->
18146 <pre>
18147         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18148         int wcsncmp(const wchar_t *s1, const wchar_t *s2,
18149              size_t n);</pre>
18150 <h6>Description</h6>
18151 <p><!--para 2 -->
18152  The wcsncmp function compares not more than n wide characters (those that follow a
18153  null wide character are not compared) from the array pointed to by s1 to the array
18154  pointed to by s2.
18155 <h6>Returns</h6>
18156 <p><!--para 3 -->
18157  The wcsncmp function returns an integer greater than, equal to, or less than zero,
18158  accordingly as the possibly null-terminated array pointed to by s1 is greater than, equal
18159  to, or less than the possibly null-terminated array pointed to by s2.
18160
18161 <h5><a name="7.24.4.4.4" href="#7.24.4.4.4">7.24.4.4.4 The wcsxfrm function</a></h5>
18162 <h6>Synopsis</h6>
18163 <p><!--para 1 -->
18164 <pre>
18165         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18166         size_t wcsxfrm(wchar_t * restrict s1,
18167              const wchar_t * restrict s2,
18168              size_t n);</pre>
18169 <h6>Description</h6>
18170 <p><!--para 2 -->
18171  The wcsxfrm function transforms the wide string pointed to by s2 and places the
18172  resulting wide string into the array pointed to by s1. The transformation is such that if
18173  the wcscmp function is applied to two transformed wide strings, it returns a value greater
18174  than, equal to, or less than zero, corresponding to the result of the wcscoll function
18175  applied to the same two original wide strings. No more than n wide characters are placed
18176  into the resulting array pointed to by s1, including the terminating null wide character. If
18177  n is zero, s1 is permitted to be a null pointer.
18178 <h6>Returns</h6>
18179 <p><!--para 3 -->
18180  The wcsxfrm function returns the length of the transformed wide string (not including
18181  the terminating null wide character). If the value returned is n or greater, the contents of
18182  the array pointed to by s1 are indeterminate.
18183 <p><!--para 4 -->
18184  EXAMPLE The value of the following expression is the length of the array needed to hold the
18185  transformation of the wide string pointed to by s:
18186 <!--page 393 -->
18187 <pre>
18188         1 + wcsxfrm(NULL, s, 0)</pre>
18189  
18190
18191 <h5><a name="7.24.4.4.5" href="#7.24.4.4.5">7.24.4.4.5 The wmemcmp function</a></h5>
18192 <h6>Synopsis</h6>
18193 <p><!--para 1 -->
18194 <pre>
18195         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18196         int wmemcmp(const wchar_t *s1, const wchar_t *s2,
18197              size_t n);</pre>
18198 <h6>Description</h6>
18199 <p><!--para 2 -->
18200  The wmemcmp function compares the first n wide characters of the object pointed to by
18201  s1 to the first n wide characters of the object pointed to by s2.
18202 <h6>Returns</h6>
18203 <p><!--para 3 -->
18204  The wmemcmp function returns an integer greater than, equal to, or less than zero,
18205  accordingly as the object pointed to by s1 is greater than, equal to, or less than the object
18206  pointed to by s2.
18207
18208 <h5><a name="7.24.4.5" href="#7.24.4.5">7.24.4.5 Wide string search functions</a></h5>
18209
18210 <h5><a name="7.24.4.5.1" href="#7.24.4.5.1">7.24.4.5.1 The wcschr function</a></h5>
18211 <h6>Synopsis</h6>
18212 <p><!--para 1 -->
18213 <pre>
18214         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18215         wchar_t *wcschr(const wchar_t *s, wchar_t c);</pre>
18216 <h6>Description</h6>
18217 <p><!--para 2 -->
18218  The wcschr function locates the first occurrence of c in the wide string pointed to by s.
18219  The terminating null wide character is considered to be part of the wide string.
18220 <h6>Returns</h6>
18221 <p><!--para 3 -->
18222  The wcschr function returns a pointer to the located wide character, or a null pointer if
18223  the wide character does not occur in the wide string.
18224
18225 <h5><a name="7.24.4.5.2" href="#7.24.4.5.2">7.24.4.5.2 The wcscspn function</a></h5>
18226 <h6>Synopsis</h6>
18227 <p><!--para 1 -->
18228 <pre>
18229         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18230         size_t wcscspn(const wchar_t *s1, const wchar_t *s2);</pre>
18231 <h6>Description</h6>
18232 <p><!--para 2 -->
18233  The wcscspn function computes the length of the maximum initial segment of the wide
18234  string pointed to by s1 which consists entirely of wide characters not from the wide
18235  string pointed to by s2.
18236 <!--page 394 -->
18237 <h6>Returns</h6>
18238 <p><!--para 3 -->
18239  The wcscspn function returns the length of the segment.
18240
18241 <h5><a name="7.24.4.5.3" href="#7.24.4.5.3">7.24.4.5.3 The wcspbrk function</a></h5>
18242 <h6>Synopsis</h6>
18243 <p><!--para 1 -->
18244 <pre>
18245         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18246         wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2);</pre>
18247 <h6>Description</h6>
18248 <p><!--para 2 -->
18249  The wcspbrk function locates the first occurrence in the wide string pointed to by s1 of
18250  any wide character from the wide string pointed to by s2.
18251 <h6>Returns</h6>
18252 <p><!--para 3 -->
18253  The wcspbrk function returns a pointer to the wide character in s1, or a null pointer if
18254  no wide character from s2 occurs in s1.
18255
18256 <h5><a name="7.24.4.5.4" href="#7.24.4.5.4">7.24.4.5.4 The wcsrchr function</a></h5>
18257 <h6>Synopsis</h6>
18258 <p><!--para 1 -->
18259 <pre>
18260         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18261         wchar_t *wcsrchr(const wchar_t *s, wchar_t c);</pre>
18262 <h6>Description</h6>
18263 <p><!--para 2 -->
18264  The wcsrchr function locates the last occurrence of c in the wide string pointed to by
18265  s. The terminating null wide character is considered to be part of the wide string.
18266 <h6>Returns</h6>
18267 <p><!--para 3 -->
18268  The wcsrchr function returns a pointer to the wide character, or a null pointer if c does
18269  not occur in the wide string.
18270
18271 <h5><a name="7.24.4.5.5" href="#7.24.4.5.5">7.24.4.5.5 The wcsspn function</a></h5>
18272 <h6>Synopsis</h6>
18273 <p><!--para 1 -->
18274 <pre>
18275         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18276         size_t wcsspn(const wchar_t *s1, const wchar_t *s2);</pre>
18277 <h6>Description</h6>
18278 <p><!--para 2 -->
18279  The wcsspn function computes the length of the maximum initial segment of the wide
18280  string pointed to by s1 which consists entirely of wide characters from the wide string
18281  pointed to by s2.
18282 <h6>Returns</h6>
18283 <p><!--para 3 -->
18284  The wcsspn function returns the length of the segment.
18285 <!--page 395 -->
18286
18287 <h5><a name="7.24.4.5.6" href="#7.24.4.5.6">7.24.4.5.6 The wcsstr function</a></h5>
18288 <h6>Synopsis</h6>
18289 <p><!--para 1 -->
18290 <pre>
18291         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18292         wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);</pre>
18293 <h6>Description</h6>
18294 <p><!--para 2 -->
18295  The wcsstr function locates the first occurrence in the wide string pointed to by s1 of
18296  the sequence of wide characters (excluding the terminating null wide character) in the
18297  wide string pointed to by s2.
18298 <h6>Returns</h6>
18299 <p><!--para 3 -->
18300  The wcsstr function returns a pointer to the located wide string, or a null pointer if the
18301  wide string is not found. If s2 points to a wide string with zero length, the function
18302  returns s1.
18303
18304 <h5><a name="7.24.4.5.7" href="#7.24.4.5.7">7.24.4.5.7 The wcstok function</a></h5>
18305 <h6>Synopsis</h6>
18306 <p><!--para 1 -->
18307 <pre>
18308         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18309         wchar_t *wcstok(wchar_t * restrict s1,
18310              const wchar_t * restrict s2,
18311              wchar_t ** restrict ptr);</pre>
18312 <h6>Description</h6>
18313 <p><!--para 2 -->
18314  A sequence of calls to the wcstok function breaks the wide string pointed to by s1 into
18315  a sequence of tokens, each of which is delimited by a wide character from the wide string
18316  pointed to by s2. The third argument points to a caller-provided wchar_t pointer into
18317  which the wcstok function stores information necessary for it to continue scanning the
18318  same wide string.
18319 <p><!--para 3 -->
18320  The first call in a sequence has a non-null first argument and stores an initial value in the
18321  object pointed to by ptr. Subsequent calls in the sequence have a null first argument and
18322  the object pointed to by ptr is required to have the value stored by the previous call in
18323  the sequence, which is then updated. The separator wide string pointed to by s2 may be
18324  different from call to call.
18325 <p><!--para 4 -->
18326  The first call in the sequence searches the wide string pointed to by s1 for the first wide
18327  character that is not contained in the current separator wide string pointed to by s2. If no
18328  such wide character is found, then there are no tokens in the wide string pointed to by s1
18329  and the wcstok function returns a null pointer. If such a wide character is found, it is
18330  the start of the first token.
18331 <p><!--para 5 -->
18332  The wcstok function then searches from there for a wide character that is contained in
18333  the current separator wide string. If no such wide character is found, the current token
18334 <!--page 396 -->
18335  extends to the end of the wide string pointed to by s1, and subsequent searches in the
18336  same wide string for a token return a null pointer. If such a wide character is found, it is
18337  overwritten by a null wide character, which terminates the current token.
18338 <p><!--para 6 -->
18339  In all cases, the wcstok function stores sufficient information in the pointer pointed to
18340  by ptr so that subsequent calls, with a null pointer for s1 and the unmodified pointer
18341  value for ptr, shall start searching just past the element overwritten by a null wide
18342  character (if any).
18343 <h6>Returns</h6>
18344 <p><!--para 7 -->
18345  The wcstok function returns a pointer to the first wide character of a token, or a null
18346  pointer if there is no token.
18347 <p><!--para 8 -->
18348  EXAMPLE
18349 <pre>
18350         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18351         static wchar_t str1[] = L"?a???b,,,#c";
18352         static wchar_t str2[] = L"\t \t";
18353         wchar_t *t, *ptr1, *ptr2;
18354         t   =   wcstok(str1,   L"?", &amp;ptr1);          //   t   points to the token L"a"
18355         t   =   wcstok(NULL,   L",", &amp;ptr1);          //   t   points to the token L"??b"
18356         t   =   wcstok(str2,   L" \t", &amp;ptr2);        //   t   is a null pointer
18357         t   =   wcstok(NULL,   L"#,", &amp;ptr1);         //   t   points to the token L"c"
18358         t   =   wcstok(NULL,   L"?", &amp;ptr1);          //   t   is a null pointer</pre>
18359  
18360
18361 <h5><a name="7.24.4.5.8" href="#7.24.4.5.8">7.24.4.5.8 The wmemchr function</a></h5>
18362 <h6>Synopsis</h6>
18363 <p><!--para 1 -->
18364 <pre>
18365         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18366         wchar_t *wmemchr(const wchar_t *s, wchar_t c,
18367              size_t n);</pre>
18368 <h6>Description</h6>
18369 <p><!--para 2 -->
18370  The wmemchr function locates the first occurrence of c in the initial n wide characters of
18371  the object pointed to by s.
18372 <h6>Returns</h6>
18373 <p><!--para 3 -->
18374  The wmemchr function returns a pointer to the located wide character, or a null pointer if
18375  the wide character does not occur in the object.
18376 <!--page 397 -->
18377
18378 <h5><a name="7.24.4.6" href="#7.24.4.6">7.24.4.6 Miscellaneous functions</a></h5>
18379
18380 <h5><a name="7.24.4.6.1" href="#7.24.4.6.1">7.24.4.6.1 The wcslen function</a></h5>
18381 <h6>Synopsis</h6>
18382 <p><!--para 1 -->
18383 <pre>
18384         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18385         size_t wcslen(const wchar_t *s);</pre>
18386 <h6>Description</h6>
18387 <p><!--para 2 -->
18388  The wcslen function computes the length of the wide string pointed to by s.
18389 <h6>Returns</h6>
18390 <p><!--para 3 -->
18391  The wcslen function returns the number of wide characters that precede the terminating
18392  null wide character.
18393
18394 <h5><a name="7.24.4.6.2" href="#7.24.4.6.2">7.24.4.6.2 The wmemset function</a></h5>
18395 <h6>Synopsis</h6>
18396 <p><!--para 1 -->
18397 <pre>
18398         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18399         wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);</pre>
18400 <h6>Description</h6>
18401 <p><!--para 2 -->
18402  The wmemset function copies the value of c into each of the first n wide characters of
18403  the object pointed to by s.
18404 <h6>Returns</h6>
18405 <p><!--para 3 -->
18406  The wmemset function returns the value of s.
18407
18408 <h4><a name="7.24.5" href="#7.24.5">7.24.5 Wide character time conversion functions</a></h4>
18409
18410 <h5><a name="7.24.5.1" href="#7.24.5.1">7.24.5.1 The wcsftime function</a></h5>
18411 <h6>Synopsis</h6>
18412 <p><!--para 1 -->
18413 <pre>
18414         #include <a href="#7.23">&lt;time.h&gt;</a>
18415         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18416         size_t wcsftime(wchar_t * restrict s,
18417              size_t maxsize,
18418              const wchar_t * restrict format,
18419              const struct tm * restrict timeptr);</pre>
18420 <h6>Description</h6>
18421 <p><!--para 2 -->
18422  The wcsftime function is equivalent to the strftime function, except that:
18423 <ul>
18424 <li>  The argument s points to the initial element of an array of wide characters into which
18425  the generated output is to be placed.
18426 <!--page 398 -->
18427 <li>  The argument maxsize indicates the limiting number of wide characters.
18428 <li>  The argument format is a wide string and the conversion specifiers are replaced by
18429  corresponding sequences of wide characters.
18430 <li>  The return value indicates the number of wide characters.
18431 </ul>
18432 <h6>Returns</h6>
18433 <p><!--para 3 -->
18434  If the total number of resulting wide characters including the terminating null wide
18435  character is not more than maxsize, the wcsftime function returns the number of
18436  wide characters placed into the array pointed to by s not including the terminating null
18437  wide character. Otherwise, zero is returned and the contents of the array are
18438  indeterminate.
18439
18440 <h4><a name="7.24.6" href="#7.24.6">7.24.6 Extended multibyte/wide character conversion utilities</a></h4>
18441 <p><!--para 1 -->
18442  The header <a href="#7.24">&lt;wchar.h&gt;</a> declares an extended set of functions useful for conversion
18443  between multibyte characters and wide characters.
18444 <p><!--para 2 -->
18445  Most of the following functions -- those that are listed as ''restartable'', <a href="#7.24.6.3">7.24.6.3</a> and
18446  <a href="#7.24.6.4">7.24.6.4</a> -- take as a last argument a pointer to an object of type mbstate_t that is used
18447  to describe the current conversion state from a particular multibyte character sequence to
18448  a wide character sequence (or the reverse) under the rules of a particular setting for the
18449  LC_CTYPE category of the current locale.
18450 <p><!--para 3 -->
18451  The initial conversion state corresponds, for a conversion in either direction, to the
18452  beginning of a new multibyte character in the initial shift state. A zero-valued
18453  mbstate_t object is (at least) one way to describe an initial conversion state. A zero-
18454  valued mbstate_t object can be used to initiate conversion involving any multibyte
18455  character sequence, in any LC_CTYPE category setting. If an mbstate_t object has
18456  been altered by any of the functions described in this subclause, and is then used with a
18457  different multibyte character sequence, or in the other conversion direction, or with a
18458  different LC_CTYPE category setting than on earlier function calls, the behavior is
18459  undefined.<sup><a href="#note299"><b>299)</b></a></sup>
18460 <p><!--para 4 -->
18461  On entry, each function takes the described conversion state (either internal or pointed to
18462  by an argument) as current. The conversion state described by the pointed-to object is
18463  altered as needed to track the shift state, and the position within a multibyte character, for
18464  the associated multibyte character sequence.
18465  
18466  
18467  
18468  
18469 <!--page 399 -->
18470
18471 <h6>footnotes</h6>
18472 <p><small><a name="note299" href="#note299">299)</a> Thus, a particular mbstate_t object can be used, for example, with both the mbrtowc and
18473  mbsrtowcs functions as long as they are used to step sequentially through the same multibyte
18474  character string.
18475 </small>
18476
18477 <h5><a name="7.24.6.1" href="#7.24.6.1">7.24.6.1 Single-byte/wide character conversion functions</a></h5>
18478
18479 <h5><a name="7.24.6.1.1" href="#7.24.6.1.1">7.24.6.1.1 The btowc function</a></h5>
18480 <h6>Synopsis</h6>
18481 <p><!--para 1 -->
18482 <pre>
18483         #include <a href="#7.19">&lt;stdio.h&gt;</a>
18484         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18485         wint_t btowc(int c);</pre>
18486 <h6>Description</h6>
18487 <p><!--para 2 -->
18488  The btowc function determines whether c constitutes a valid single-byte character in the
18489  initial shift state.
18490 <h6>Returns</h6>
18491 <p><!--para 3 -->
18492  The btowc function returns WEOF if c has the value EOF or if (unsigned char)c
18493  does not constitute a valid single-byte character in the initial shift state. Otherwise, it
18494  returns the wide character representation of that character.
18495
18496 <h5><a name="7.24.6.1.2" href="#7.24.6.1.2">7.24.6.1.2 The wctob function</a></h5>
18497 <h6>Synopsis</h6>
18498 <p><!--para 1 -->
18499 <pre>
18500         #include <a href="#7.19">&lt;stdio.h&gt;</a>
18501         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18502         int wctob(wint_t c);</pre>
18503 <h6>Description</h6>
18504 <p><!--para 2 -->
18505  The wctob function determines whether c corresponds to a member of the extended
18506  character set whose multibyte character representation is a single byte when in the initial
18507  shift state.
18508 <h6>Returns</h6>
18509 <p><!--para 3 -->
18510  The wctob function returns EOF if c does not correspond to a multibyte character with
18511  length one in the initial shift state. Otherwise, it returns the single-byte representation of
18512  that character as an unsigned char converted to an int.
18513
18514 <h5><a name="7.24.6.2" href="#7.24.6.2">7.24.6.2 Conversion state functions</a></h5>
18515
18516 <h5><a name="7.24.6.2.1" href="#7.24.6.2.1">7.24.6.2.1 The mbsinit function</a></h5>
18517 <h6>Synopsis</h6>
18518 <p><!--para 1 -->
18519 <pre>
18520         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18521         int mbsinit(const mbstate_t *ps);</pre>
18522 <h6>Description</h6>
18523 <p><!--para 2 -->
18524  If ps is not a null pointer, the mbsinit function determines whether the pointed-to
18525  mbstate_t object describes an initial conversion state.
18526 <!--page 400 -->
18527 <h6>Returns</h6>
18528 <p><!--para 3 -->
18529  The mbsinit function returns nonzero if ps is a null pointer or if the pointed-to object
18530  describes an initial conversion state; otherwise, it returns zero.
18531
18532 <h5><a name="7.24.6.3" href="#7.24.6.3">7.24.6.3 Restartable multibyte/wide character conversion functions</a></h5>
18533 <p><!--para 1 -->
18534  These functions differ from the corresponding multibyte character functions of <a href="#7.20.7">7.20.7</a>
18535  (mblen, mbtowc, and wctomb) in that they have an extra parameter, ps, of type
18536  pointer to mbstate_t that points to an object that can completely describe the current
18537  conversion state of the associated multibyte character sequence. If ps is a null pointer,
18538  each function uses its own internal mbstate_t object instead, which is initialized at
18539  program startup to the initial conversion state. The implementation behaves as if no
18540  library function calls these functions with a null pointer for ps.
18541 <p><!--para 2 -->
18542  Also unlike their corresponding functions, the return value does not represent whether the
18543  encoding is state-dependent.
18544
18545 <h5><a name="7.24.6.3.1" href="#7.24.6.3.1">7.24.6.3.1 The mbrlen function</a></h5>
18546 <h6>Synopsis</h6>
18547 <p><!--para 1 -->
18548 <pre>
18549         #include <a href="#7.24">&lt;wchar.h&gt;</a>
18550         size_t mbrlen(const char * restrict s,
18551              size_t n,
18552              mbstate_t * restrict ps);</pre>
18553 <h6>Description</h6>
18554 <p><!--para 2 -->
18555  The mbrlen function is equivalent to the call:
18556 <pre>
18557         mbrtowc(NULL, s, n, ps != NULL ? ps : &amp;internal)</pre>
18558  where internal is the mbstate_t object for the mbrlen function, except that the
18559  expression designated by ps is evaluated only once.
18560 <h6>Returns</h6>
18561 <p><!--para 3 -->
18562  The mbrlen function returns a value between zero and n, inclusive, (size_t)(-2),
18563  or (size_t)(-1).
18564 <p><b> Forward references</b>: the mbrtowc function (<a href="#7.24.6.3.2">7.24.6.3.2</a>).
18565 <!--page 401 -->
18566
18567 <h5><a name="7.24.6.3.2" href="#7.24.6.3.2">7.24.6.3.2 The mbrtowc function</a></h5>
18568 <h6>Synopsis</h6>
18569 <p><!--para 1 -->
18570 <pre>
18571          #include <a href="#7.24">&lt;wchar.h&gt;</a>
18572          size_t mbrtowc(wchar_t * restrict pwc,
18573               const char * restrict s,
18574               size_t n,
18575               mbstate_t * restrict ps);</pre>
18576 <h6>Description</h6>
18577 <p><!--para 2 -->
18578  If s is a null pointer, the mbrtowc function is equivalent to the call:
18579 <pre>
18580                  mbrtowc(NULL, "", 1, ps)</pre>
18581  In this case, the values of the parameters pwc and n are ignored.
18582 <p><!--para 3 -->
18583  If s is not a null pointer, the mbrtowc function inspects at most n bytes beginning with
18584  the byte pointed to by s to determine the number of bytes needed to complete the next
18585  multibyte character (including any shift sequences). If the function determines that the
18586  next multibyte character is complete and valid, it determines the value of the
18587  corresponding wide character and then, if pwc is not a null pointer, stores that value in
18588  the object pointed to by pwc. If the corresponding wide character is the null wide
18589  character, the resulting state described is the initial conversion state.
18590 <h6>Returns</h6>
18591 <p><!--para 4 -->
18592  The mbrtowc function returns the first of the following that applies (given the current
18593  conversion state):
18594  0                     if the next n or fewer bytes complete the multibyte character that
18595 <pre>
18596                        corresponds to the null wide character (which is the value stored).</pre>
18597  between 1 and n inclusive if the next n or fewer bytes complete a valid multibyte
18598 <pre>
18599                     character (which is the value stored); the value returned is the number
18600                     of bytes that complete the multibyte character.</pre>
18601  (size_t)(-2) if the next n bytes contribute to an incomplete (but potentially valid)
18602 <pre>
18603               multibyte character, and all n bytes have been processed (no value is
18604               stored).<sup><a href="#note300"><b>300)</b></a></sup></pre>
18605  (size_t)(-1) if an encoding error occurs, in which case the next n or fewer bytes
18606 <pre>
18607               do not contribute to a complete and valid multibyte character (no
18608               value is stored); the value of the macro EILSEQ is stored in errno,
18609               and the conversion state is unspecified.</pre>
18610  
18611 <!--page 402 -->
18612
18613 <h6>footnotes</h6>
18614 <p><small><a name="note300" href="#note300">300)</a> When n has at least the value of the MB_CUR_MAX macro, this case can only occur if s points at a
18615  sequence of redundant shift sequences (for implementations with state-dependent encodings).
18616 </small>
18617
18618 <h5><a name="7.24.6.3.3" href="#7.24.6.3.3">7.24.6.3.3 The wcrtomb function</a></h5>
18619 <h6>Synopsis</h6>
18620 <p><!--para 1 -->
18621 <pre>
18622          #include <a href="#7.24">&lt;wchar.h&gt;</a>
18623          size_t wcrtomb(char * restrict s,
18624               wchar_t wc,
18625               mbstate_t * restrict ps);</pre>
18626 <h6>Description</h6>
18627 <p><!--para 2 -->
18628  If s is a null pointer, the wcrtomb function is equivalent to the call
18629 <pre>
18630                  wcrtomb(buf, L'\0', ps)</pre>
18631  where buf is an internal buffer.
18632 <p><!--para 3 -->
18633  If s is not a null pointer, the wcrtomb function determines the number of bytes needed
18634  to represent the multibyte character that corresponds to the wide character given by wc
18635  (including any shift sequences), and stores the multibyte character representation in the
18636  array whose first element is pointed to by s. At most MB_CUR_MAX bytes are stored. If
18637  wc is a null wide character, a null byte is stored, preceded by any shift sequence needed
18638  to restore the initial shift state; the resulting state described is the initial conversion state.
18639 <h6>Returns</h6>
18640 <p><!--para 4 -->
18641  The wcrtomb function returns the number of bytes stored in the array object (including
18642  any shift sequences). When wc is not a valid wide character, an encoding error occurs:
18643  the function stores the value of the macro EILSEQ in errno and returns
18644  (size_t)(-1); the conversion state is unspecified.
18645
18646 <h5><a name="7.24.6.4" href="#7.24.6.4">7.24.6.4 Restartable multibyte/wide string conversion functions</a></h5>
18647 <p><!--para 1 -->
18648  These functions differ from the corresponding multibyte string functions of <a href="#7.20.8">7.20.8</a>
18649  (mbstowcs and wcstombs) in that they have an extra parameter, ps, of type pointer to
18650  mbstate_t that points to an object that can completely describe the current conversion
18651  state of the associated multibyte character sequence. If ps is a null pointer, each function
18652  uses its own internal mbstate_t object instead, which is initialized at program startup
18653  to the initial conversion state. The implementation behaves as if no library function calls
18654  these functions with a null pointer for ps.
18655 <p><!--para 2 -->
18656  Also unlike their corresponding functions, the conversion source parameter, src, has a
18657  pointer-to-pointer type. When the function is storing the results of conversions (that is,
18658  when dst is not a null pointer), the pointer object pointed to by this parameter is updated
18659  to reflect the amount of the source processed by that invocation.
18660 <!--page 403 -->
18661
18662 <h5><a name="7.24.6.4.1" href="#7.24.6.4.1">7.24.6.4.1 The mbsrtowcs function</a></h5>
18663 <h6>Synopsis</h6>
18664 <p><!--para 1 -->
18665 <pre>
18666           #include <a href="#7.24">&lt;wchar.h&gt;</a>
18667           size_t mbsrtowcs(wchar_t * restrict dst,
18668                const char ** restrict src,
18669                size_t len,
18670                mbstate_t * restrict ps);</pre>
18671 <h6>Description</h6>
18672 <p><!--para 2 -->
18673  The mbsrtowcs function converts a sequence of multibyte characters that begins in the
18674  conversion state described by the object pointed to by ps, from the array indirectly
18675  pointed to by src into a sequence of corresponding wide characters. If dst is not a null
18676  pointer, the converted characters are stored into the array pointed to by dst. Conversion
18677  continues up to and including a terminating null character, which is also stored.
18678  Conversion stops earlier in two cases: when a sequence of bytes is encountered that does
18679  not form a valid multibyte character, or (if dst is not a null pointer) when len wide
18680  characters have been stored into the array pointed to by dst.<sup><a href="#note301"><b>301)</b></a></sup> Each conversion takes
18681  place as if by a call to the mbrtowc function.
18682 <p><!--para 3 -->
18683  If dst is not a null pointer, the pointer object pointed to by src is assigned either a null
18684  pointer (if conversion stopped due to reaching a terminating null character) or the address
18685  just past the last multibyte character converted (if any). If conversion stopped due to
18686  reaching a terminating null character and if dst is not a null pointer, the resulting state
18687  described is the initial conversion state.
18688 <h6>Returns</h6>
18689 <p><!--para 4 -->
18690  If the input conversion encounters a sequence of bytes that do not form a valid multibyte
18691  character, an encoding error occurs: the mbsrtowcs function stores the value of the
18692  macro EILSEQ in errno and returns (size_t)(-1); the conversion state is
18693  unspecified. Otherwise, it returns the number of multibyte characters successfully
18694  converted, not including the terminating null character (if any).
18695  
18696  
18697  
18698  
18699 <!--page 404 -->
18700
18701 <h6>footnotes</h6>
18702 <p><small><a name="note301" href="#note301">301)</a> Thus, the value of len is ignored if dst is a null pointer.
18703 </small>
18704
18705 <h5><a name="7.24.6.4.2" href="#7.24.6.4.2">7.24.6.4.2 The wcsrtombs function</a></h5>
18706 <h6>Synopsis</h6>
18707 <p><!--para 1 -->
18708 <pre>
18709          #include <a href="#7.24">&lt;wchar.h&gt;</a>
18710          size_t wcsrtombs(char * restrict dst,
18711               const wchar_t ** restrict src,
18712               size_t len,
18713               mbstate_t * restrict ps);</pre>
18714 <h6>Description</h6>
18715 <p><!--para 2 -->
18716  The wcsrtombs function converts a sequence of wide characters from the array
18717  indirectly pointed to by src into a sequence of corresponding multibyte characters that
18718  begins in the conversion state described by the object pointed to by ps. If dst is not a
18719  null pointer, the converted characters are then stored into the array pointed to by dst.
18720  Conversion continues up to and including a terminating null wide character, which is also
18721  stored. Conversion stops earlier in two cases: when a wide character is reached that does
18722  not correspond to a valid multibyte character, or (if dst is not a null pointer) when the
18723  next multibyte character would exceed the limit of len total bytes to be stored into the
18724  array pointed to by dst. Each conversion takes place as if by a call to the wcrtomb
18725  function.<sup><a href="#note302"><b>302)</b></a></sup>
18726 <p><!--para 3 -->
18727  If dst is not a null pointer, the pointer object pointed to by src is assigned either a null
18728  pointer (if conversion stopped due to reaching a terminating null wide character) or the
18729  address just past the last wide character converted (if any). If conversion stopped due to
18730  reaching a terminating null wide character, the resulting state described is the initial
18731  conversion state.
18732 <h6>Returns</h6>
18733 <p><!--para 4 -->
18734  If conversion stops because a wide character is reached that does not correspond to a
18735  valid multibyte character, an encoding error occurs: the wcsrtombs function stores the
18736  value of the macro EILSEQ in errno and returns (size_t)(-1); the conversion
18737  state is unspecified. Otherwise, it returns the number of bytes in the resulting multibyte
18738  character sequence, not including the terminating null character (if any).
18739  
18740  
18741  
18742  
18743 <!--page 405 -->
18744
18745 <h6>footnotes</h6>
18746 <p><small><a name="note302" href="#note302">302)</a> If conversion stops because a terminating null wide character has been reached, the bytes stored
18747  include those necessary to reach the initial shift state immediately before the null byte.
18748 </small>
18749
18750 <h3><a name="7.25" href="#7.25">7.25 Wide character classification and mapping utilities <wctype.h></a></h3>
18751
18752 <h4><a name="7.25.1" href="#7.25.1">7.25.1 Introduction</a></h4>
18753 <p><!--para 1 -->
18754  The header <a href="#7.25">&lt;wctype.h&gt;</a> declares three data types, one macro, and many functions.<sup><a href="#note303"><b>303)</b></a></sup>
18755 <p><!--para 2 -->
18756  The types declared are
18757 <pre>
18758           wint_t</pre>
18759  described in <a href="#7.24.1">7.24.1</a>;
18760 <pre>
18761           wctrans_t</pre>
18762  which is a scalar type that can hold values which represent locale-specific character
18763  mappings; and
18764 <pre>
18765           wctype_t</pre>
18766  which is a scalar type that can hold values which represent locale-specific character
18767  classifications.
18768 <p><!--para 3 -->
18769  The macro defined is WEOF (described in <a href="#7.24.1">7.24.1</a>).
18770 <p><!--para 4 -->
18771  The functions declared are grouped as follows:
18772 <ul>
18773 <li>  Functions that provide wide character classification;
18774 <li>  Extensible functions that provide wide character classification;
18775 <li>  Functions that provide wide character case mapping;
18776 <li>  Extensible functions that provide wide character mapping.
18777 </ul>
18778 <p><!--para 5 -->
18779  For all functions described in this subclause that accept an argument of type wint_t, the
18780  value shall be representable as a wchar_t or shall equal the value of the macro WEOF. If
18781  this argument has any other value, the behavior is undefined.
18782 <p><!--para 6 -->
18783  The behavior of these functions is affected by the LC_CTYPE category of the current
18784  locale.
18785  
18786  
18787  
18788  
18789 <!--page 406 -->
18790
18791 <h6>footnotes</h6>
18792 <p><small><a name="note303" href="#note303">303)</a> See ''future library directions'' (<a href="#7.26.13">7.26.13</a>).
18793 </small>
18794
18795 <h4><a name="7.25.2" href="#7.25.2">7.25.2 Wide character classification utilities</a></h4>
18796 <p><!--para 1 -->
18797  The header <a href="#7.25">&lt;wctype.h&gt;</a> declares several functions useful for classifying wide
18798  characters.
18799 <p><!--para 2 -->
18800  The term printing wide character refers to a member of a locale-specific set of wide
18801  characters, each of which occupies at least one printing position on a display device. The
18802  term control wide character refers to a member of a locale-specific set of wide characters
18803  that are not printing wide characters.
18804
18805 <h5><a name="7.25.2.1" href="#7.25.2.1">7.25.2.1 Wide character classification functions</a></h5>
18806 <p><!--para 1 -->
18807  The functions in this subclause return nonzero (true) if and only if the value of the
18808  argument wc conforms to that in the description of the function.
18809 <p><!--para 2 -->
18810  Each of the following functions returns true for each wide character that corresponds (as
18811  if by a call to the wctob function) to a single-byte character for which the corresponding
18812  character classification function from <a href="#7.4.1">7.4.1</a> returns true, except that the iswgraph and
18813  iswpunct functions may differ with respect to wide characters other than L' ' that are
18814  both printing and white-space wide characters.<sup><a href="#note304"><b>304)</b></a></sup>
18815 <p><b> Forward references</b>: the wctob function (<a href="#7.24.6.1.2">7.24.6.1.2</a>).
18816
18817 <h6>footnotes</h6>
18818 <p><small><a name="note304" href="#note304">304)</a> For example, if the expression isalpha(wctob(wc)) evaluates to true, then the call
18819  iswalpha(wc) also returns true. But, if the expression isgraph(wctob(wc)) evaluates to true
18820  (which cannot occur for wc == L' ' of course), then either iswgraph(wc) or iswprint(wc)
18821  &amp;&amp; iswspace(wc) is true, but not both.
18822 </small>
18823
18824 <h5><a name="7.25.2.1.1" href="#7.25.2.1.1">7.25.2.1.1 The iswalnum function</a></h5>
18825 <h6>Synopsis</h6>
18826 <p><!--para 1 -->
18827 <pre>
18828         #include <a href="#7.25">&lt;wctype.h&gt;</a>
18829         int iswalnum(wint_t wc);</pre>
18830 <h6>Description</h6>
18831 <p><!--para 2 -->
18832  The iswalnum function tests for any wide character for which iswalpha or
18833  iswdigit is true.
18834
18835 <h5><a name="7.25.2.1.2" href="#7.25.2.1.2">7.25.2.1.2 The iswalpha function</a></h5>
18836 <h6>Synopsis</h6>
18837 <p><!--para 1 -->
18838 <pre>
18839         #include <a href="#7.25">&lt;wctype.h&gt;</a>
18840         int iswalpha(wint_t wc);</pre>
18841 <h6>Description</h6>
18842 <p><!--para 2 -->
18843  The iswalpha function tests for any wide character for which iswupper or
18844  iswlower is true, or any wide character that is one of a locale-specific set of alphabetic
18845  
18846 <!--page 407 -->
18847  wide characters for which none of iswcntrl, iswdigit, iswpunct, or iswspace
18848  is true.<sup><a href="#note305"><b>305)</b></a></sup>
18849
18850 <h6>footnotes</h6>
18851 <p><small><a name="note305" href="#note305">305)</a> The functions iswlower and iswupper test true or false separately for each of these additional
18852  wide characters; all four combinations are possible.
18853 </small>
18854
18855 <h5><a name="7.25.2.1.3" href="#7.25.2.1.3">7.25.2.1.3 The iswblank function</a></h5>
18856 <h6>Synopsis</h6>
18857 <p><!--para 1 -->
18858 <pre>
18859          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18860          int iswblank(wint_t wc);</pre>
18861 <h6>Description</h6>
18862 <p><!--para 2 -->
18863  The iswblank function tests for any wide character that is a standard blank wide
18864  character or is one of a locale-specific set of wide characters for which iswspace is true
18865  and that is used to separate words within a line of text. The standard blank wide
18866  characters are the following: space (L' '), and horizontal tab (L'\t'). In the "C"
18867  locale, iswblank returns true only for the standard blank characters.
18868
18869 <h5><a name="7.25.2.1.4" href="#7.25.2.1.4">7.25.2.1.4 The iswcntrl function</a></h5>
18870 <h6>Synopsis</h6>
18871 <p><!--para 1 -->
18872 <pre>
18873          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18874          int iswcntrl(wint_t wc);</pre>
18875 <h6>Description</h6>
18876 <p><!--para 2 -->
18877  The iswcntrl function tests for any control wide character.
18878
18879 <h5><a name="7.25.2.1.5" href="#7.25.2.1.5">7.25.2.1.5 The iswdigit function</a></h5>
18880 <h6>Synopsis</h6>
18881 <p><!--para 1 -->
18882 <pre>
18883          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18884          int iswdigit(wint_t wc);</pre>
18885 <h6>Description</h6>
18886 <p><!--para 2 -->
18887  The iswdigit function tests for any wide character that corresponds to a decimal-digit
18888  character (as defined in <a href="#5.2.1">5.2.1</a>).
18889
18890 <h5><a name="7.25.2.1.6" href="#7.25.2.1.6">7.25.2.1.6 The iswgraph function</a></h5>
18891 <h6>Synopsis</h6>
18892 <p><!--para 1 -->
18893 <pre>
18894          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18895          int iswgraph(wint_t wc);</pre>
18896  
18897  
18898  
18899  
18900 <!--page 408 -->
18901 <h6>Description</h6>
18902 <p><!--para 2 -->
18903  The iswgraph function tests for any wide character for which iswprint is true and
18904  iswspace is false.<sup><a href="#note306"><b>306)</b></a></sup>
18905
18906 <h6>footnotes</h6>
18907 <p><small><a name="note306" href="#note306">306)</a> Note that the behavior of the iswgraph and iswpunct functions may differ from their
18908  corresponding functions in <a href="#7.4.1">7.4.1</a> with respect to printing, white-space, single-byte execution
18909  characters other than ' '.
18910 </small>
18911
18912 <h5><a name="7.25.2.1.7" href="#7.25.2.1.7">7.25.2.1.7 The iswlower function</a></h5>
18913 <h6>Synopsis</h6>
18914 <p><!--para 1 -->
18915 <pre>
18916          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18917          int iswlower(wint_t wc);</pre>
18918 <h6>Description</h6>
18919 <p><!--para 2 -->
18920  The iswlower function tests for any wide character that corresponds to a lowercase
18921  letter or is one of a locale-specific set of wide characters for which none of iswcntrl,
18922  iswdigit, iswpunct, or iswspace is true.
18923
18924 <h5><a name="7.25.2.1.8" href="#7.25.2.1.8">7.25.2.1.8 The iswprint function</a></h5>
18925 <h6>Synopsis</h6>
18926 <p><!--para 1 -->
18927 <pre>
18928          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18929          int iswprint(wint_t wc);</pre>
18930 <h6>Description</h6>
18931 <p><!--para 2 -->
18932  The iswprint function tests for any printing wide character.
18933
18934 <h5><a name="7.25.2.1.9" href="#7.25.2.1.9">7.25.2.1.9 The iswpunct function</a></h5>
18935 <h6>Synopsis</h6>
18936 <p><!--para 1 -->
18937 <pre>
18938          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18939          int iswpunct(wint_t wc);</pre>
18940 <h6>Description</h6>
18941 <p><!--para 2 -->
18942  The iswpunct function tests for any printing wide character that is one of a locale-
18943  specific set of punctuation wide characters for which neither iswspace nor iswalnum
18944  is true.306)
18945
18946 <h5><a name="7.25.2.1.10" href="#7.25.2.1.10">7.25.2.1.10 The iswspace function</a></h5>
18947 <h6>Synopsis</h6>
18948 <p><!--para 1 -->
18949 <pre>
18950          #include <a href="#7.25">&lt;wctype.h&gt;</a>
18951          int iswspace(wint_t wc);</pre>
18952  
18953  
18954  
18955 <!--page 409 -->
18956 <h6>Description</h6>
18957 <p><!--para 2 -->
18958  The iswspace function tests for any wide character that corresponds to a locale-specific
18959  set of white-space wide characters for which none of iswalnum, iswgraph, or
18960  iswpunct is true.
18961
18962 <h5><a name="7.25.2.1.11" href="#7.25.2.1.11">7.25.2.1.11 The iswupper function</a></h5>
18963 <h6>Synopsis</h6>
18964 <p><!--para 1 -->
18965 <pre>
18966         #include <a href="#7.25">&lt;wctype.h&gt;</a>
18967         int iswupper(wint_t wc);</pre>
18968 <h6>Description</h6>
18969 <p><!--para 2 -->
18970  The iswupper function tests for any wide character that corresponds to an uppercase
18971  letter or is one of a locale-specific set of wide characters for which none of iswcntrl,
18972  iswdigit, iswpunct, or iswspace is true.
18973
18974 <h5><a name="7.25.2.1.12" href="#7.25.2.1.12">7.25.2.1.12 The iswxdigit function</a></h5>
18975 <h6>Synopsis</h6>
18976 <p><!--para 1 -->
18977 <pre>
18978         #include <a href="#7.25">&lt;wctype.h&gt;</a>
18979         int iswxdigit(wint_t wc);</pre>
18980 <h6>Description</h6>
18981 <p><!--para 2 -->
18982  The iswxdigit function tests for any wide character that corresponds to a
18983  hexadecimal-digit character (as defined in <a href="#6.4.4.1">6.4.4.1</a>).
18984
18985 <h5><a name="7.25.2.2" href="#7.25.2.2">7.25.2.2 Extensible wide character classification functions</a></h5>
18986 <p><!--para 1 -->
18987  The functions wctype and iswctype provide extensible wide character classification
18988  as well as testing equivalent to that performed by the functions described in the previous
18989  subclause (<a href="#7.25.2.1">7.25.2.1</a>).
18990
18991 <h5><a name="7.25.2.2.1" href="#7.25.2.2.1">7.25.2.2.1 The iswctype function</a></h5>
18992 <h6>Synopsis</h6>
18993 <p><!--para 1 -->
18994 <pre>
18995         #include <a href="#7.25">&lt;wctype.h&gt;</a>
18996         int iswctype(wint_t wc, wctype_t desc);</pre>
18997 <h6>Description</h6>
18998 <p><!--para 2 -->
18999  The iswctype function determines whether the wide character wc has the property
19000  described by desc. The current setting of the LC_CTYPE category shall be the same as
19001  during the call to wctype that returned the value desc.
19002 <p><!--para 3 -->
19003  Each of the following expressions has a truth-value equivalent to the call to the wide
19004  character classification function (<a href="#7.25.2.1">7.25.2.1</a>) in the comment that follows the expression:
19005 <!--page 410 -->
19006 <pre>
19007         iswctype(wc,       wctype("alnum"))             //   iswalnum(wc)
19008         iswctype(wc,       wctype("alpha"))             //   iswalpha(wc)
19009         iswctype(wc,       wctype("blank"))             //   iswblank(wc)
19010         iswctype(wc,       wctype("cntrl"))             //   iswcntrl(wc)
19011         iswctype(wc,       wctype("digit"))             //   iswdigit(wc)
19012         iswctype(wc,       wctype("graph"))             //   iswgraph(wc)
19013         iswctype(wc,       wctype("lower"))             //   iswlower(wc)
19014         iswctype(wc,       wctype("print"))             //   iswprint(wc)
19015         iswctype(wc,       wctype("punct"))             //   iswpunct(wc)
19016         iswctype(wc,       wctype("space"))             //   iswspace(wc)
19017         iswctype(wc,       wctype("upper"))             //   iswupper(wc)
19018         iswctype(wc,       wctype("xdigit"))            //   iswxdigit(wc)</pre>
19019 <h6>Returns</h6>
19020 <p><!--para 4 -->
19021  The iswctype function returns nonzero (true) if and only if the value of the wide
19022  character wc has the property described by desc.
19023 <p><b> Forward references</b>: the wctype function (<a href="#7.25.2.2.2">7.25.2.2.2</a>).
19024
19025 <h5><a name="7.25.2.2.2" href="#7.25.2.2.2">7.25.2.2.2 The wctype function</a></h5>
19026 <h6>Synopsis</h6>
19027 <p><!--para 1 -->
19028 <pre>
19029         #include <a href="#7.25">&lt;wctype.h&gt;</a>
19030         wctype_t wctype(const char *property);</pre>
19031 <h6>Description</h6>
19032 <p><!--para 2 -->
19033  The wctype function constructs a value with type wctype_t that describes a class of
19034  wide characters identified by the string argument property.
19035 <p><!--para 3 -->
19036  The strings listed in the description of the iswctype function shall be valid in all
19037  locales as property arguments to the wctype function.
19038 <h6>Returns</h6>
19039 <p><!--para 4 -->
19040  If property identifies a valid class of wide characters according to the LC_CTYPE
19041  category of the current locale, the wctype function returns a nonzero value that is valid
19042  as the second argument to the iswctype function; otherwise, it returns zero.              *
19043 <!--page 411 -->
19044
19045 <h4><a name="7.25.3" href="#7.25.3">7.25.3 Wide character case mapping utilities</a></h4>
19046 <p><!--para 1 -->
19047  The header <a href="#7.25">&lt;wctype.h&gt;</a> declares several functions useful for mapping wide characters.
19048
19049 <h5><a name="7.25.3.1" href="#7.25.3.1">7.25.3.1 Wide character case mapping functions</a></h5>
19050
19051 <h5><a name="7.25.3.1.1" href="#7.25.3.1.1">7.25.3.1.1 The towlower function</a></h5>
19052 <h6>Synopsis</h6>
19053 <p><!--para 1 -->
19054 <pre>
19055         #include <a href="#7.25">&lt;wctype.h&gt;</a>
19056         wint_t towlower(wint_t wc);</pre>
19057 <h6>Description</h6>
19058 <p><!--para 2 -->
19059  The towlower function converts an uppercase letter to a corresponding lowercase letter.
19060 <h6>Returns</h6>
19061 <p><!--para 3 -->
19062  If the argument is a wide character for which iswupper is true and there are one or
19063  more corresponding wide characters, as specified by the current locale, for which
19064  iswlower is true, the towlower function returns one of the corresponding wide
19065  characters (always the same one for any given locale); otherwise, the argument is
19066  returned unchanged.
19067
19068 <h5><a name="7.25.3.1.2" href="#7.25.3.1.2">7.25.3.1.2 The towupper function</a></h5>
19069 <h6>Synopsis</h6>
19070 <p><!--para 1 -->
19071 <pre>
19072         #include <a href="#7.25">&lt;wctype.h&gt;</a>
19073         wint_t towupper(wint_t wc);</pre>
19074 <h6>Description</h6>
19075 <p><!--para 2 -->
19076  The towupper function converts a lowercase letter to a corresponding uppercase letter.
19077 <h6>Returns</h6>
19078 <p><!--para 3 -->
19079  If the argument is a wide character for which iswlower is true and there are one or
19080  more corresponding wide characters, as specified by the current locale, for which
19081  iswupper is true, the towupper function returns one of the corresponding wide
19082  characters (always the same one for any given locale); otherwise, the argument is
19083  returned unchanged.
19084
19085 <h5><a name="7.25.3.2" href="#7.25.3.2">7.25.3.2 Extensible wide character case mapping functions</a></h5>
19086 <p><!--para 1 -->
19087  The functions wctrans and towctrans provide extensible wide character mapping as
19088  well as case mapping equivalent to that performed by the functions described in the
19089  previous subclause (<a href="#7.25.3.1">7.25.3.1</a>).
19090 <!--page 412 -->
19091
19092 <h5><a name="7.25.3.2.1" href="#7.25.3.2.1">7.25.3.2.1 The towctrans function</a></h5>
19093 <h6>Synopsis</h6>
19094 <p><!--para 1 -->
19095 <pre>
19096         #include <a href="#7.25">&lt;wctype.h&gt;</a>
19097         wint_t towctrans(wint_t wc, wctrans_t desc);</pre>
19098 <h6>Description</h6>
19099 <p><!--para 2 -->
19100  The towctrans function maps the wide character wc using the mapping described by
19101  desc. The current setting of the LC_CTYPE category shall be the same as during the call
19102  to wctrans that returned the value desc.
19103 <p><!--para 3 -->
19104  Each of the following expressions behaves the same as the call to the wide character case
19105  mapping function (<a href="#7.25.3.1">7.25.3.1</a>) in the comment that follows the expression:
19106 <pre>
19107         towctrans(wc, wctrans("tolower"))                      // towlower(wc)
19108         towctrans(wc, wctrans("toupper"))                      // towupper(wc)</pre>
19109 <h6>Returns</h6>
19110 <p><!--para 4 -->
19111  The towctrans function returns the mapped value of wc using the mapping described
19112  by desc.
19113
19114 <h5><a name="7.25.3.2.2" href="#7.25.3.2.2">7.25.3.2.2 The wctrans function</a></h5>
19115 <h6>Synopsis</h6>
19116 <p><!--para 1 -->
19117 <pre>
19118         #include <a href="#7.25">&lt;wctype.h&gt;</a>
19119         wctrans_t wctrans(const char *property);</pre>
19120 <h6>Description</h6>
19121 <p><!--para 2 -->
19122  The wctrans function constructs a value with type wctrans_t that describes a
19123  mapping between wide characters identified by the string argument property.
19124 <p><!--para 3 -->
19125  The strings listed in the description of the towctrans function shall be valid in all
19126  locales as property arguments to the wctrans function.
19127 <h6>Returns</h6>
19128 <p><!--para 4 -->
19129  If property identifies a valid mapping of wide characters according to the LC_CTYPE
19130  category of the current locale, the wctrans function returns a nonzero value that is valid
19131  as the second argument to the towctrans function; otherwise, it returns zero.
19132 <!--page 413 -->
19133
19134 <h3><a name="7.26" href="#7.26">7.26 Future library directions</a></h3>
19135 <p><!--para 1 -->
19136  The following names are grouped under individual headers for convenience. All external
19137  names described below are reserved no matter what headers are included by the program.
19138
19139 <h4><a name="7.26.1" href="#7.26.1">7.26.1 Complex arithmetic <complex.h></a></h4>
19140 <p><!--para 1 -->
19141  The function names
19142 <pre>
19143       cerf                cexpm1              clog2
19144       cerfc               clog10              clgamma
19145       cexp2               clog1p              ctgamma</pre>
19146  and the same names suffixed with f or l may be added to the declarations in the
19147  <a href="#7.3">&lt;complex.h&gt;</a> header.
19148
19149 <h4><a name="7.26.2" href="#7.26.2">7.26.2 Character handling <ctype.h></a></h4>
19150 <p><!--para 1 -->
19151  Function names that begin with either is or to, and a lowercase letter may be added to
19152  the declarations in the <a href="#7.4">&lt;ctype.h&gt;</a> header.
19153
19154 <h4><a name="7.26.3" href="#7.26.3">7.26.3 Errors <errno.h></a></h4>
19155 <p><!--para 1 -->
19156  Macros that begin with E and a digit or E and an uppercase letter may be added to the
19157  declarations in the <a href="#7.5">&lt;errno.h&gt;</a> header.
19158
19159 <h4><a name="7.26.4" href="#7.26.4">7.26.4 Format conversion of integer types <inttypes.h></a></h4>
19160 <p><!--para 1 -->
19161  Macro names beginning with PRI or SCN followed by any lowercase letter or X may be
19162  added to the macros defined in the <a href="#7.8">&lt;inttypes.h&gt;</a> header.
19163
19164 <h4><a name="7.26.5" href="#7.26.5">7.26.5 Localization <locale.h></a></h4>
19165 <p><!--para 1 -->
19166  Macros that begin with LC_ and an uppercase letter may be added to the definitions in
19167  the <a href="#7.11">&lt;locale.h&gt;</a> header.
19168
19169 <h4><a name="7.26.6" href="#7.26.6">7.26.6 Signal handling <signal.h></a></h4>
19170 <p><!--para 1 -->
19171  Macros that begin with either SIG and an uppercase letter or SIG_ and an uppercase
19172  letter may be added to the definitions in the <a href="#7.14">&lt;signal.h&gt;</a> header.
19173
19174 <h4><a name="7.26.7" href="#7.26.7">7.26.7 Boolean type and values <stdbool.h></a></h4>
19175 <p><!--para 1 -->
19176  The ability to undefine and perhaps then redefine the macros bool, true, and false is
19177  an obsolescent feature.
19178
19179 <h4><a name="7.26.8" href="#7.26.8">7.26.8 Integer types <stdint.h></a></h4>
19180 <p><!--para 1 -->
19181  Typedef names beginning with int or uint and ending with _t may be added to the
19182  types defined in the <a href="#7.18">&lt;stdint.h&gt;</a> header. Macro names beginning with INT or UINT
19183  and ending with _MAX, _MIN, or _C may be added to the macros defined in the
19184  <a href="#7.18">&lt;stdint.h&gt;</a> header.
19185 <!--page 414 -->
19186
19187 <h4><a name="7.26.9" href="#7.26.9">7.26.9 Input/output <stdio.h></a></h4>
19188 <p><!--para 1 -->
19189  Lowercase letters may be added to the conversion specifiers and length modifiers in
19190  fprintf and fscanf. Other characters may be used in extensions.
19191 <p><!--para 2 -->
19192  The gets function is obsolescent, and is deprecated.
19193 <p><!--para 3 -->
19194  The use of ungetc on a binary stream where the file position indicator is zero prior to
19195  the call is an obsolescent feature.
19196
19197 <h4><a name="7.26.10" href="#7.26.10">7.26.10 General utilities <stdlib.h></a></h4>
19198 <p><!--para 1 -->
19199  Function names that begin with str and a lowercase letter may be added to the
19200  declarations in the <a href="#7.20">&lt;stdlib.h&gt;</a> header.
19201
19202 <h4><a name="7.26.11" href="#7.26.11">7.26.11 String handling <string.h></a></h4>
19203 <p><!--para 1 -->
19204  Function names that begin with str, mem, or wcs and a lowercase letter may be added
19205  to the declarations in the <a href="#7.21">&lt;string.h&gt;</a> header.
19206
19207 <h4><a name="7.26.12" href="#7.26.12">7.26.12 Extended multibyte and wide character utilities <wchar.h></a></h4>
19208 <p><!--para 1 -->
19209  Function names that begin with wcs and a lowercase letter may be added to the
19210  declarations in the <a href="#7.24">&lt;wchar.h&gt;</a> header.
19211 <p><!--para 2 -->
19212  Lowercase letters may be added to the conversion specifiers and length modifiers in
19213  fwprintf and fwscanf. Other characters may be used in extensions.
19214
19215 <h4><a name="7.26.13" href="#7.26.13">7.26.13 Wide character classification and mapping utilities</a></h4>
19216  <a href="#7.25">&lt;wctype.h&gt;</a>
19217 <p><!--para 1 -->
19218  Function names that begin with is or to and a lowercase letter may be added to the
19219  declarations in the <a href="#7.25">&lt;wctype.h&gt;</a> header.
19220 <!--page 415 -->
19221
19222 <h2><a name="A" href="#A">Annex A</a></h2>
19223 <p><!--para 1 -->
19224 <pre>
19225                                               (informative)
19226                                Language syntax summary</pre>
19227  NOTE     The notation is described in <a href="#6.1">6.1</a>.
19228  
19229
19230 <h3><a name="A.1" href="#A.1">A.1 Lexical grammar</a></h3>
19231
19232 <h4><a name="A.1.1" href="#A.1.1">A.1.1 Lexical elements</a></h4>
19233  (<a href="#6.4">6.4</a>) token:
19234 <pre>
19235                   keyword
19236                   identifier
19237                   constant
19238                   string-literal
19239                   punctuator</pre>
19240  (<a href="#6.4">6.4</a>) preprocessing-token:
19241 <pre>
19242                header-name
19243                identifier
19244                pp-number
19245                character-constant
19246                string-literal
19247                punctuator
19248                each non-white-space character that cannot be one of the above</pre>
19249
19250 <h4><a name="A.1.2" href="#A.1.2">A.1.2 Keywords</a></h4>
19251  (<a href="#6.4.1">6.4.1</a>) keyword: one of
19252 <!--page 416 -->
19253 <pre>
19254                auto                      enum             restrict    unsigned
19255                break                     extern           return      void
19256                case                      float            short       volatile
19257                char                      for              signed      while
19258                const                     goto             sizeof      _Bool
19259                continue                  if               static      _Complex
19260                default                   inline           struct      _Imaginary
19261                do                        int              switch
19262                double                    long             typedef
19263                else                      register         union</pre>
19264
19265 <h4><a name="A.1.3" href="#A.1.3">A.1.3 Identifiers</a></h4>
19266  (<a href="#6.4.2.1">6.4.2.1</a>) identifier:
19267 <pre>
19268                 identifier-nondigit
19269                 identifier identifier-nondigit
19270                 identifier digit</pre>
19271  (<a href="#6.4.2.1">6.4.2.1</a>) identifier-nondigit:
19272 <pre>
19273                 nondigit
19274                 universal-character-name
19275                 other implementation-defined characters</pre>
19276  (<a href="#6.4.2.1">6.4.2.1</a>) nondigit: one of
19277 <pre>
19278                _ a b          c    d   e   f   g   h     i   j   k   l   m
19279                     n o       p    q   r   s   t   u     v   w   x   y   z
19280                     A B       C    D   E   F   G   H     I   J   K   L   M
19281                     N O       P    Q   R   S   T   U     V   W   X   Y   Z</pre>
19282  (<a href="#6.4.2.1">6.4.2.1</a>) digit: one of
19283 <pre>
19284                 0 1 2         3    4   5   6   7   8     9</pre>
19285
19286 <h4><a name="A.1.4" href="#A.1.4">A.1.4 Universal character names</a></h4>
19287  (<a href="#6.4.3">6.4.3</a>) universal-character-name:
19288 <pre>
19289                \u hex-quad
19290                \U hex-quad hex-quad</pre>
19291  (<a href="#6.4.3">6.4.3</a>) hex-quad:
19292 <pre>
19293                hexadecimal-digit hexadecimal-digit
19294                             hexadecimal-digit hexadecimal-digit</pre>
19295
19296 <h4><a name="A.1.5" href="#A.1.5">A.1.5 Constants</a></h4>
19297  (<a href="#6.4.4">6.4.4</a>) constant:
19298 <pre>
19299                integer-constant
19300                floating-constant
19301                enumeration-constant
19302                character-constant</pre>
19303  (<a href="#6.4.4.1">6.4.4.1</a>) integer-constant:
19304 <pre>
19305                 decimal-constant integer-suffixopt
19306                 octal-constant integer-suffixopt
19307                 hexadecimal-constant integer-suffixopt</pre>
19308  (<a href="#6.4.4.1">6.4.4.1</a>) decimal-constant:
19309 <!--page 417 -->
19310 <pre>
19311                nonzero-digit
19312                decimal-constant digit</pre>
19313  (<a href="#6.4.4.1">6.4.4.1</a>) octal-constant:
19314 <pre>
19315                 0
19316                 octal-constant octal-digit</pre>
19317  (<a href="#6.4.4.1">6.4.4.1</a>) hexadecimal-constant:
19318 <pre>
19319                hexadecimal-prefix hexadecimal-digit
19320                hexadecimal-constant hexadecimal-digit</pre>
19321  (<a href="#6.4.4.1">6.4.4.1</a>) hexadecimal-prefix: one of
19322 <pre>
19323                0x 0X</pre>
19324  (<a href="#6.4.4.1">6.4.4.1</a>) nonzero-digit: one of
19325 <pre>
19326                1 2 3 4 5              6      7   8   9</pre>
19327  (<a href="#6.4.4.1">6.4.4.1</a>) octal-digit: one of
19328 <pre>
19329                 0 1 2 3           4   5      6   7</pre>
19330  (<a href="#6.4.4.1">6.4.4.1</a>) hexadecimal-digit: one of
19331 <pre>
19332                0 1 2 3 4 5                   6   7   8   9
19333                a b c d e f
19334                A B C D E F</pre>
19335  (<a href="#6.4.4.1">6.4.4.1</a>) integer-suffix:
19336 <pre>
19337                 unsigned-suffix long-suffixopt
19338                 unsigned-suffix long-long-suffix
19339                 long-suffix unsigned-suffixopt
19340                 long-long-suffix unsigned-suffixopt</pre>
19341  (<a href="#6.4.4.1">6.4.4.1</a>) unsigned-suffix: one of
19342 <pre>
19343                 u U</pre>
19344  (<a href="#6.4.4.1">6.4.4.1</a>) long-suffix: one of
19345 <pre>
19346                 l L</pre>
19347  (<a href="#6.4.4.1">6.4.4.1</a>) long-long-suffix: one of
19348 <pre>
19349                 ll LL</pre>
19350  (<a href="#6.4.4.2">6.4.4.2</a>) floating-constant:
19351 <pre>
19352                 decimal-floating-constant
19353                 hexadecimal-floating-constant</pre>
19354  (<a href="#6.4.4.2">6.4.4.2</a>) decimal-floating-constant:
19355 <!--page 418 -->
19356 <pre>
19357                fractional-constant exponent-partopt floating-suffixopt
19358                digit-sequence exponent-part floating-suffixopt</pre>
19359  (<a href="#6.4.4.2">6.4.4.2</a>) hexadecimal-floating-constant:
19360 <pre>
19361                hexadecimal-prefix hexadecimal-fractional-constant
19362                              binary-exponent-part floating-suffixopt
19363                hexadecimal-prefix hexadecimal-digit-sequence
19364                              binary-exponent-part floating-suffixopt</pre>
19365  (<a href="#6.4.4.2">6.4.4.2</a>) fractional-constant:
19366 <pre>
19367                 digit-sequenceopt . digit-sequence
19368                 digit-sequence .</pre>
19369  (<a href="#6.4.4.2">6.4.4.2</a>) exponent-part:
19370 <pre>
19371                e signopt digit-sequence
19372                E signopt digit-sequence</pre>
19373  (<a href="#6.4.4.2">6.4.4.2</a>) sign: one of
19374 <pre>
19375                 + -</pre>
19376  (<a href="#6.4.4.2">6.4.4.2</a>) digit-sequence:
19377 <pre>
19378                 digit
19379                 digit-sequence digit</pre>
19380  (<a href="#6.4.4.2">6.4.4.2</a>) hexadecimal-fractional-constant:
19381 <pre>
19382                hexadecimal-digit-sequenceopt .
19383                               hexadecimal-digit-sequence
19384                hexadecimal-digit-sequence .</pre>
19385  (<a href="#6.4.4.2">6.4.4.2</a>) binary-exponent-part:
19386 <pre>
19387                 p signopt digit-sequence
19388                 P signopt digit-sequence</pre>
19389  (<a href="#6.4.4.2">6.4.4.2</a>) hexadecimal-digit-sequence:
19390 <pre>
19391                hexadecimal-digit
19392                hexadecimal-digit-sequence hexadecimal-digit</pre>
19393  (<a href="#6.4.4.2">6.4.4.2</a>) floating-suffix: one of
19394 <pre>
19395                 f l F L</pre>
19396  (<a href="#6.4.4.3">6.4.4.3</a>) enumeration-constant:
19397 <pre>
19398                identifier</pre>
19399  (<a href="#6.4.4.4">6.4.4.4</a>) character-constant:
19400 <!--page 419 -->
19401 <pre>
19402                ' c-char-sequence '
19403                L' c-char-sequence '</pre>
19404  (<a href="#6.4.4.4">6.4.4.4</a>) c-char-sequence:
19405 <pre>
19406                 c-char
19407                 c-char-sequence c-char</pre>
19408  (<a href="#6.4.4.4">6.4.4.4</a>) c-char:
19409 <pre>
19410                 any member of the source character set except
19411                              the single-quote ', backslash \, or new-line character
19412                 escape-sequence</pre>
19413  (<a href="#6.4.4.4">6.4.4.4</a>) escape-sequence:
19414 <pre>
19415                simple-escape-sequence
19416                octal-escape-sequence
19417                hexadecimal-escape-sequence
19418                universal-character-name</pre>
19419  (<a href="#6.4.4.4">6.4.4.4</a>) simple-escape-sequence: one of
19420 <pre>
19421                \' \" \? \\
19422                \a \b \f \n \r \t                   \v</pre>
19423  (<a href="#6.4.4.4">6.4.4.4</a>) octal-escape-sequence:
19424 <pre>
19425                 \ octal-digit
19426                 \ octal-digit octal-digit
19427                 \ octal-digit octal-digit octal-digit</pre>
19428  (<a href="#6.4.4.4">6.4.4.4</a>) hexadecimal-escape-sequence:
19429 <pre>
19430                \x hexadecimal-digit
19431                hexadecimal-escape-sequence hexadecimal-digit</pre>
19432
19433 <h4><a name="A.1.6" href="#A.1.6">A.1.6 String literals</a></h4>
19434  (<a href="#6.4.5">6.4.5</a>) string-literal:
19435 <pre>
19436                 " s-char-sequenceopt "
19437                 L" s-char-sequenceopt "</pre>
19438  (<a href="#6.4.5">6.4.5</a>) s-char-sequence:
19439 <pre>
19440                 s-char
19441                 s-char-sequence s-char</pre>
19442  (<a href="#6.4.5">6.4.5</a>) s-char:
19443 <!--page 420 -->
19444 <pre>
19445                 any member of the source character set except
19446                              the double-quote ", backslash \, or new-line character
19447                 escape-sequence</pre>
19448
19449 <h4><a name="A.1.7" href="#A.1.7">A.1.7 Punctuators</a></h4>
19450  (<a href="#6.4.6">6.4.6</a>) punctuator: one of
19451 <pre>
19452                [ ] ( ) { } . -&gt;
19453                ++ -- &amp; * + - ~ !
19454                / % &lt;&lt; &gt;&gt; &lt; &gt; &lt;= &gt;=                     ==      !=    ^    |    &amp;&amp;   ||
19455                ? : ; ...
19456                = *= /= %= += -= &lt;&lt;=                    &gt;&gt;=      &amp;=       ^=   |=
19457                , # ##
19458                &lt;: :&gt; &lt;% %&gt; %: %:%:</pre>
19459
19460 <h4><a name="A.1.8" href="#A.1.8">A.1.8 Header names</a></h4>
19461  (<a href="#6.4.7">6.4.7</a>) header-name:
19462 <pre>
19463                &lt; h-char-sequence &gt;
19464                " q-char-sequence "</pre>
19465  (<a href="#6.4.7">6.4.7</a>) h-char-sequence:
19466 <pre>
19467                h-char
19468                h-char-sequence h-char</pre>
19469  (<a href="#6.4.7">6.4.7</a>) h-char:
19470 <pre>
19471                any member of the source character set except
19472                             the new-line character and &gt;</pre>
19473  (<a href="#6.4.7">6.4.7</a>) q-char-sequence:
19474 <pre>
19475                q-char
19476                q-char-sequence q-char</pre>
19477  (<a href="#6.4.7">6.4.7</a>) q-char:
19478 <pre>
19479                any member of the source character set except
19480                             the new-line character and "</pre>
19481
19482 <h4><a name="A.1.9" href="#A.1.9">A.1.9 Preprocessing numbers</a></h4>
19483  (<a href="#6.4.8">6.4.8</a>) pp-number:
19484 <!--page 421 -->
19485 <pre>
19486                digit
19487                . digit
19488                pp-number   digit
19489                pp-number   identifier-nondigit
19490                pp-number   e sign
19491                pp-number   E sign
19492                pp-number   p sign
19493                pp-number   P sign
19494                pp-number   .</pre>
19495
19496 <h3><a name="A.2" href="#A.2">A.2 Phrase structure grammar</a></h3>
19497
19498 <h4><a name="A.2.1" href="#A.2.1">A.2.1 Expressions</a></h4>
19499  (<a href="#6.5.1">6.5.1</a>) primary-expression:
19500 <pre>
19501                identifier
19502                constant
19503                string-literal
19504                ( expression )</pre>
19505  (<a href="#6.5.2">6.5.2</a>) postfix-expression:
19506 <pre>
19507                primary-expression
19508                postfix-expression [ expression ]
19509                postfix-expression ( argument-expression-listopt )
19510                postfix-expression . identifier
19511                postfix-expression -&gt; identifier
19512                postfix-expression ++
19513                postfix-expression --
19514                ( type-name ) { initializer-list }
19515                ( type-name ) { initializer-list , }</pre>
19516  (<a href="#6.5.2">6.5.2</a>) argument-expression-list:
19517 <pre>
19518               assignment-expression
19519               argument-expression-list , assignment-expression</pre>
19520  (<a href="#6.5.3">6.5.3</a>) unary-expression:
19521 <pre>
19522                postfix-expression
19523                ++ unary-expression
19524                -- unary-expression
19525                unary-operator cast-expression
19526                sizeof unary-expression
19527                sizeof ( type-name )</pre>
19528  (<a href="#6.5.3">6.5.3</a>) unary-operator: one of
19529 <pre>
19530                &amp; * + - ~             !</pre>
19531  (<a href="#6.5.4">6.5.4</a>) cast-expression:
19532 <pre>
19533                 unary-expression
19534                 ( type-name ) cast-expression</pre>
19535  (<a href="#6.5.5">6.5.5</a>) multiplicative-expression:
19536 <!--page 422 -->
19537 <pre>
19538                 cast-expression
19539                 multiplicative-expression * cast-expression
19540                 multiplicative-expression / cast-expression
19541                 multiplicative-expression % cast-expression</pre>
19542  (<a href="#6.5.6">6.5.6</a>) additive-expression:
19543 <pre>
19544                 multiplicative-expression
19545                 additive-expression + multiplicative-expression
19546                 additive-expression - multiplicative-expression</pre>
19547  (<a href="#6.5.7">6.5.7</a>) shift-expression:
19548 <pre>
19549                  additive-expression
19550                  shift-expression &lt;&lt; additive-expression
19551                  shift-expression &gt;&gt; additive-expression</pre>
19552  (<a href="#6.5.8">6.5.8</a>) relational-expression:
19553 <pre>
19554                 shift-expression
19555                 relational-expression   &lt;    shift-expression
19556                 relational-expression   &gt;    shift-expression
19557                 relational-expression   &lt;=   shift-expression
19558                 relational-expression   &gt;=   shift-expression</pre>
19559  (<a href="#6.5.9">6.5.9</a>) equality-expression:
19560 <pre>
19561                 relational-expression
19562                 equality-expression == relational-expression
19563                 equality-expression != relational-expression</pre>
19564  (<a href="#6.5.10">6.5.10</a>) AND-expression:
19565 <pre>
19566               equality-expression
19567               AND-expression &amp; equality-expression</pre>
19568  (<a href="#6.5.11">6.5.11</a>) exclusive-OR-expression:
19569 <pre>
19570                AND-expression
19571                exclusive-OR-expression ^ AND-expression</pre>
19572  (<a href="#6.5.12">6.5.12</a>) inclusive-OR-expression:
19573 <pre>
19574                 exclusive-OR-expression
19575                 inclusive-OR-expression | exclusive-OR-expression</pre>
19576  (<a href="#6.5.13">6.5.13</a>) logical-AND-expression:
19577 <pre>
19578                inclusive-OR-expression
19579                logical-AND-expression &amp;&amp; inclusive-OR-expression</pre>
19580  (<a href="#6.5.14">6.5.14</a>) logical-OR-expression:
19581 <pre>
19582                logical-AND-expression
19583                logical-OR-expression || logical-AND-expression</pre>
19584  (<a href="#6.5.15">6.5.15</a>) conditional-expression:
19585 <!--page 423 -->
19586 <pre>
19587                logical-OR-expression
19588                logical-OR-expression ? expression : conditional-expression</pre>
19589  (<a href="#6.5.16">6.5.16</a>) assignment-expression:
19590 <pre>
19591                conditional-expression
19592                unary-expression assignment-operator assignment-expression</pre>
19593  (<a href="#6.5.16">6.5.16</a>) assignment-operator: one of
19594 <pre>
19595                = *= /= %= +=                -=    &lt;&lt;=    &gt;&gt;=      &amp;=   ^=   |=</pre>
19596  (<a href="#6.5.17">6.5.17</a>) expression:
19597 <pre>
19598                assignment-expression
19599                expression , assignment-expression</pre>
19600  (<a href="#6.6">6.6</a>) constant-expression:
19601 <pre>
19602                conditional-expression</pre>
19603
19604 <h4><a name="A.2.2" href="#A.2.2">A.2.2 Declarations</a></h4>
19605  (<a href="#6.7">6.7</a>) declaration:
19606 <pre>
19607                 declaration-specifiers init-declarator-listopt ;</pre>
19608  (<a href="#6.7">6.7</a>) declaration-specifiers:
19609 <pre>
19610                 storage-class-specifier declaration-specifiersopt
19611                 type-specifier declaration-specifiersopt
19612                 type-qualifier declaration-specifiersopt
19613                 function-specifier declaration-specifiersopt</pre>
19614  (<a href="#6.7">6.7</a>) init-declarator-list:
19615 <pre>
19616                 init-declarator
19617                 init-declarator-list , init-declarator</pre>
19618  (<a href="#6.7">6.7</a>) init-declarator:
19619 <pre>
19620                 declarator
19621                 declarator = initializer</pre>
19622  (<a href="#6.7.1">6.7.1</a>) storage-class-specifier:
19623 <!--page 424 -->
19624 <pre>
19625                typedef
19626                extern
19627                static
19628                auto
19629                register</pre>
19630  (<a href="#6.7.2">6.7.2</a>) type-specifier:
19631 <pre>
19632                 void
19633                 char
19634                 short
19635                 int
19636                 long
19637                 float
19638                 double
19639                 signed
19640                 unsigned
19641                 _Bool
19642                 _Complex
19643                 struct-or-union-specifier                                                 *
19644                 enum-specifier
19645                 typedef-name</pre>
19646  (<a href="#6.7.2.1">6.7.2.1</a>) struct-or-union-specifier:
19647 <pre>
19648                 struct-or-union identifieropt { struct-declaration-list }
19649                 struct-or-union identifier</pre>
19650  (<a href="#6.7.2.1">6.7.2.1</a>) struct-or-union:
19651 <pre>
19652                 struct
19653                 union</pre>
19654  (<a href="#6.7.2.1">6.7.2.1</a>) struct-declaration-list:
19655 <pre>
19656                 struct-declaration
19657                 struct-declaration-list struct-declaration</pre>
19658  (<a href="#6.7.2.1">6.7.2.1</a>) struct-declaration:
19659 <pre>
19660                 specifier-qualifier-list struct-declarator-list ;</pre>
19661  (<a href="#6.7.2.1">6.7.2.1</a>) specifier-qualifier-list:
19662 <pre>
19663                 type-specifier specifier-qualifier-listopt
19664                 type-qualifier specifier-qualifier-listopt</pre>
19665  (<a href="#6.7.2.1">6.7.2.1</a>) struct-declarator-list:
19666 <pre>
19667                 struct-declarator
19668                 struct-declarator-list , struct-declarator</pre>
19669  (<a href="#6.7.2.1">6.7.2.1</a>) struct-declarator:
19670 <!--page 425 -->
19671 <pre>
19672                 declarator
19673                 declaratoropt : constant-expression</pre>
19674  (<a href="#6.7.2.2">6.7.2.2</a>) enum-specifier:
19675 <pre>
19676                enum identifieropt { enumerator-list }
19677                enum identifieropt { enumerator-list , }
19678                enum identifier</pre>
19679  (<a href="#6.7.2.2">6.7.2.2</a>) enumerator-list:
19680 <pre>
19681                enumerator
19682                enumerator-list , enumerator</pre>
19683  (<a href="#6.7.2.2">6.7.2.2</a>) enumerator:
19684 <pre>
19685                enumeration-constant
19686                enumeration-constant = constant-expression</pre>
19687  (<a href="#6.7.3">6.7.3</a>) type-qualifier:
19688 <pre>
19689                const
19690                restrict
19691                volatile</pre>
19692  (<a href="#6.7.4">6.7.4</a>) function-specifier:
19693 <pre>
19694                 inline</pre>
19695  (<a href="#6.7.5">6.7.5</a>) declarator:
19696 <pre>
19697                pointeropt direct-declarator</pre>
19698  (<a href="#6.7.5">6.7.5</a>) direct-declarator:
19699 <pre>
19700                 identifier
19701                 ( declarator )
19702                 direct-declarator [ type-qualifier-listopt assignment-expressionopt ]
19703                 direct-declarator [ static type-qualifier-listopt assignment-expression ]
19704                 direct-declarator [ type-qualifier-list static assignment-expression ]
19705                 direct-declarator [ type-qualifier-listopt * ]
19706                 direct-declarator ( parameter-type-list )
19707                 direct-declarator ( identifier-listopt )</pre>
19708  (<a href="#6.7.5">6.7.5</a>) pointer:
19709 <pre>
19710                 * type-qualifier-listopt
19711                 * type-qualifier-listopt pointer</pre>
19712  (<a href="#6.7.5">6.7.5</a>) type-qualifier-list:
19713 <pre>
19714                type-qualifier
19715                type-qualifier-list type-qualifier</pre>
19716  (<a href="#6.7.5">6.7.5</a>) parameter-type-list:
19717 <!--page 426 -->
19718 <pre>
19719               parameter-list
19720               parameter-list , ...</pre>
19721  (<a href="#6.7.5">6.7.5</a>) parameter-list:
19722 <pre>
19723               parameter-declaration
19724               parameter-list , parameter-declaration</pre>
19725  (<a href="#6.7.5">6.7.5</a>) parameter-declaration:
19726 <pre>
19727               declaration-specifiers declarator
19728               declaration-specifiers abstract-declaratoropt</pre>
19729  (<a href="#6.7.5">6.7.5</a>) identifier-list:
19730 <pre>
19731                 identifier
19732                 identifier-list , identifier</pre>
19733  (<a href="#6.7.6">6.7.6</a>) type-name:
19734 <pre>
19735                specifier-qualifier-list abstract-declaratoropt</pre>
19736  (<a href="#6.7.6">6.7.6</a>) abstract-declarator:
19737 <pre>
19738                pointer
19739                pointeropt direct-abstract-declarator</pre>
19740  (<a href="#6.7.6">6.7.6</a>) direct-abstract-declarator:
19741 <pre>
19742                 ( abstract-declarator )
19743                 direct-abstract-declaratoropt [ type-qualifier-listopt
19744                                assignment-expressionopt ]
19745                 direct-abstract-declaratoropt [ static type-qualifier-listopt
19746                                assignment-expression ]
19747                 direct-abstract-declaratoropt [ type-qualifier-list static
19748                                assignment-expression ]
19749                 direct-abstract-declaratoropt [ * ]
19750                 direct-abstract-declaratoropt ( parameter-type-listopt )</pre>
19751  (<a href="#6.7.7">6.7.7</a>) typedef-name:
19752 <pre>
19753                identifier</pre>
19754  (<a href="#6.7.8">6.7.8</a>) initializer:
19755 <pre>
19756                  assignment-expression
19757                  { initializer-list }
19758                  { initializer-list , }</pre>
19759  (<a href="#6.7.8">6.7.8</a>) initializer-list:
19760 <pre>
19761                  designationopt initializer
19762                  initializer-list , designationopt initializer</pre>
19763  (<a href="#6.7.8">6.7.8</a>) designation:
19764 <!--page 427 -->
19765 <pre>
19766                designator-list =</pre>
19767  (<a href="#6.7.8">6.7.8</a>) designator-list:
19768 <pre>
19769                designator
19770                designator-list designator</pre>
19771  (<a href="#6.7.8">6.7.8</a>) designator:
19772 <pre>
19773                [ constant-expression ]
19774                . identifier</pre>
19775
19776 <h4><a name="A.2.3" href="#A.2.3">A.2.3 Statements</a></h4>
19777  (<a href="#6.8">6.8</a>) statement:
19778 <pre>
19779                labeled-statement
19780                compound-statement
19781                expression-statement
19782                selection-statement
19783                iteration-statement
19784                jump-statement</pre>
19785  (<a href="#6.8.1">6.8.1</a>) labeled-statement:
19786 <pre>
19787                 identifier : statement
19788                 case constant-expression : statement
19789                 default : statement</pre>
19790  (<a href="#6.8.2">6.8.2</a>) compound-statement:
19791 <pre>
19792               { block-item-listopt }</pre>
19793  (<a href="#6.8.2">6.8.2</a>) block-item-list:
19794 <pre>
19795                 block-item
19796                 block-item-list block-item</pre>
19797  (<a href="#6.8.2">6.8.2</a>) block-item:
19798 <pre>
19799                 declaration
19800                 statement</pre>
19801  (<a href="#6.8.3">6.8.3</a>) expression-statement:
19802 <pre>
19803                expressionopt ;</pre>
19804  (<a href="#6.8.4">6.8.4</a>) selection-statement:
19805 <!--page 428 -->
19806 <pre>
19807                 if ( expression ) statement
19808                 if ( expression ) statement else statement
19809                 switch ( expression ) statement</pre>
19810  (<a href="#6.8.5">6.8.5</a>) iteration-statement:
19811 <pre>
19812                  while ( expression ) statement
19813                  do statement while ( expression ) ;
19814                  for ( expressionopt ; expressionopt ; expressionopt ) statement
19815                  for ( declaration expressionopt ; expressionopt ) statement</pre>
19816  (<a href="#6.8.6">6.8.6</a>) jump-statement:
19817 <pre>
19818                goto identifier ;
19819                continue ;
19820                break ;
19821                return expressionopt ;</pre>
19822
19823 <h4><a name="A.2.4" href="#A.2.4">A.2.4 External definitions</a></h4>
19824  (<a href="#6.9">6.9</a>) translation-unit:
19825 <pre>
19826                 external-declaration
19827                 translation-unit external-declaration</pre>
19828  (<a href="#6.9">6.9</a>) external-declaration:
19829 <pre>
19830                 function-definition
19831                 declaration</pre>
19832  (<a href="#6.9.1">6.9.1</a>) function-definition:
19833 <pre>
19834                 declaration-specifiers declarator declaration-listopt compound-statement</pre>
19835  (<a href="#6.9.1">6.9.1</a>) declaration-list:
19836 <pre>
19837                declaration
19838                declaration-list declaration</pre>
19839
19840 <h3><a name="A.3" href="#A.3">A.3 Preprocessing directives</a></h3>
19841  (<a href="#6.10">6.10</a>) preprocessing-file:
19842 <pre>
19843                groupopt</pre>
19844  (<a href="#6.10">6.10</a>) group:
19845 <pre>
19846                  group-part
19847                  group group-part</pre>
19848  (<a href="#6.10">6.10</a>) group-part:
19849 <pre>
19850                if-section
19851                control-line
19852                text-line
19853                # non-directive</pre>
19854  (<a href="#6.10">6.10</a>) if-section:
19855 <!--page 429 -->
19856 <pre>
19857                  if-group elif-groupsopt else-groupopt endif-line</pre>
19858  (<a href="#6.10">6.10</a>) if-group:
19859 <pre>
19860                 # if     constant-expression new-line groupopt
19861                 # ifdef identifier new-line groupopt
19862                 # ifndef identifier new-line groupopt</pre>
19863  (<a href="#6.10">6.10</a>) elif-groups:
19864 <pre>
19865                 elif-group
19866                 elif-groups elif-group</pre>
19867  (<a href="#6.10">6.10</a>) elif-group:
19868 <pre>
19869                 # elif        constant-expression new-line groupopt</pre>
19870  (<a href="#6.10">6.10</a>) else-group:
19871 <pre>
19872                 # else        new-line groupopt</pre>
19873  (<a href="#6.10">6.10</a>) endif-line:
19874 <pre>
19875                 # endif       new-line</pre>
19876  (<a href="#6.10">6.10</a>) control-line:
19877 <pre>
19878                # include pp-tokens new-line
19879                # define identifier replacement-list new-line
19880                # define identifier lparen identifier-listopt )
19881                                                replacement-list new-line
19882                # define identifier lparen ... ) replacement-list new-line
19883                # define identifier lparen identifier-list , ... )
19884                                                replacement-list new-line
19885                # undef   identifier new-line
19886                # line    pp-tokens new-line
19887                # error   pp-tokensopt new-line
19888                # pragma pp-tokensopt new-line
19889                #         new-line</pre>
19890  (<a href="#6.10">6.10</a>) text-line:
19891 <pre>
19892                 pp-tokensopt new-line</pre>
19893  (<a href="#6.10">6.10</a>) non-directive:
19894 <pre>
19895                pp-tokens new-line</pre>
19896  (<a href="#6.10">6.10</a>) lparen:
19897 <pre>
19898                   a ( character not immediately preceded by white-space</pre>
19899  (<a href="#6.10">6.10</a>) replacement-list:
19900 <!--page 430 -->
19901 <pre>
19902                pp-tokensopt</pre>
19903  (<a href="#6.10">6.10</a>) pp-tokens:
19904 <pre>
19905                preprocessing-token
19906                pp-tokens preprocessing-token</pre>
19907  (<a href="#6.10">6.10</a>) new-line:
19908 <!--page 431 -->
19909 <pre>
19910                the new-line character</pre>
19911
19912 <h2><a name="B" href="#B">Annex B</a></h2>
19913 <pre>
19914                                (informative)
19915                            Library summary</pre>
19916
19917 <h3><a name="B.1" href="#B.1">B.1 Diagnostics <assert.h></a></h3>
19918 <pre>
19919         NDEBUG
19920         void assert(scalar expression);</pre>
19921
19922 <h3><a name="B.2" href="#B.2">B.2 Complex <complex.h></a></h3>
19923 <!--page 432 -->
19924 <!--page 433 -->
19925 <pre>
19926         complex               imaginary               I
19927         _Complex_I            _Imaginary_I
19928         #pragma STDC CX_LIMITED_RANGE on-off-switch
19929         double complex cacos(double complex z);
19930         float complex cacosf(float complex z);
19931         long double complex cacosl(long double complex z);
19932         double complex casin(double complex z);
19933         float complex casinf(float complex z);
19934         long double complex casinl(long double complex z);
19935         double complex catan(double complex z);
19936         float complex catanf(float complex z);
19937         long double complex catanl(long double complex z);
19938         double complex ccos(double complex z);
19939         float complex ccosf(float complex z);
19940         long double complex ccosl(long double complex z);
19941         double complex csin(double complex z);
19942         float complex csinf(float complex z);
19943         long double complex csinl(long double complex z);
19944         double complex ctan(double complex z);
19945         float complex ctanf(float complex z);
19946         long double complex ctanl(long double complex z);
19947         double complex cacosh(double complex z);
19948         float complex cacoshf(float complex z);
19949         long double complex cacoshl(long double complex z);
19950         double complex casinh(double complex z);
19951         float complex casinhf(float complex z);
19952         long double complex casinhl(long double complex z);
19953         double complex catanh(double complex z);
19954         float complex catanhf(float complex z);
19955         long double complex catanhl(long double complex z);
19956        double complex ccosh(double complex z);
19957        float complex ccoshf(float complex z);
19958        long double complex ccoshl(long double complex z);
19959        double complex csinh(double complex z);
19960        float complex csinhf(float complex z);
19961        long double complex csinhl(long double complex z);
19962        double complex ctanh(double complex z);
19963        float complex ctanhf(float complex z);
19964        long double complex ctanhl(long double complex z);
19965        double complex cexp(double complex z);
19966        float complex cexpf(float complex z);
19967        long double complex cexpl(long double complex z);
19968        double complex clog(double complex z);
19969        float complex clogf(float complex z);
19970        long double complex clogl(long double complex z);
19971        double cabs(double complex z);
19972        float cabsf(float complex z);
19973        long double cabsl(long double complex z);
19974        double complex cpow(double complex x, double complex y);
19975        float complex cpowf(float complex x, float complex y);
19976        long double complex cpowl(long double complex x,
19977             long double complex y);
19978        double complex csqrt(double complex z);
19979        float complex csqrtf(float complex z);
19980        long double complex csqrtl(long double complex z);
19981        double carg(double complex z);
19982        float cargf(float complex z);
19983        long double cargl(long double complex z);
19984        double cimag(double complex z);
19985        float cimagf(float complex z);
19986        long double cimagl(long double complex z);
19987        double complex conj(double complex z);
19988        float complex conjf(float complex z);
19989        long double complex conjl(long double complex z);
19990        double complex cproj(double complex z);
19991        float complex cprojf(float complex z);
19992        long double complex cprojl(long double complex z);
19993        double creal(double complex z);
19994        float crealf(float complex z);
19995        long double creall(long double complex z);</pre>
19996
19997 <h3><a name="B.3" href="#B.3">B.3 Character handling <ctype.h></a></h3>
19998 <pre>
19999         int    isalnum(int c);
20000         int    isalpha(int c);
20001         int    isblank(int c);
20002         int    iscntrl(int c);
20003         int    isdigit(int c);
20004         int    isgraph(int c);
20005         int    islower(int c);
20006         int    isprint(int c);
20007         int    ispunct(int c);
20008         int    isspace(int c);
20009         int    isupper(int c);
20010         int    isxdigit(int c);
20011         int    tolower(int c);
20012         int    toupper(int c);</pre>
20013
20014 <h3><a name="B.4" href="#B.4">B.4 Errors <errno.h></a></h3>
20015 <pre>
20016         EDOM            EILSEQ             ERANGE            errno</pre>
20017
20018 <h3><a name="B.5" href="#B.5">B.5 Floating-point environment <fenv.h></a></h3>
20019 <!--page 434 -->
20020 <pre>
20021         fenv_t                 FE_OVERFLOW             FE_TOWARDZERO
20022         fexcept_t              FE_UNDERFLOW            FE_UPWARD
20023         FE_DIVBYZERO           FE_ALL_EXCEPT           FE_DFL_ENV
20024         FE_INEXACT             FE_DOWNWARD
20025         FE_INVALID             FE_TONEAREST
20026         #pragma STDC FENV_ACCESS on-off-switch
20027         int feclearexcept(int excepts);
20028         int fegetexceptflag(fexcept_t *flagp, int excepts);
20029         int feraiseexcept(int excepts);
20030         int fesetexceptflag(const fexcept_t *flagp,
20031              int excepts);
20032         int fetestexcept(int excepts);
20033         int fegetround(void);
20034         int fesetround(int round);
20035         int fegetenv(fenv_t *envp);
20036         int feholdexcept(fenv_t *envp);
20037         int fesetenv(const fenv_t *envp);
20038         int feupdateenv(const fenv_t *envp);</pre>
20039
20040 <h3><a name="B.6" href="#B.6">B.6 Characteristics of floating types <float.h></a></h3>
20041 <pre>
20042        FLT_ROUNDS              DBL_MIN_EXP             FLT_MAX
20043        FLT_EVAL_METHOD         LDBL_MIN_EXP            DBL_MAX
20044        FLT_RADIX               FLT_MIN_10_EXP          LDBL_MAX
20045        FLT_MANT_DIG            DBL_MIN_10_EXP          FLT_EPSILON
20046        DBL_MANT_DIG            LDBL_MIN_10_EXP         DBL_EPSILON
20047        LDBL_MANT_DIG           FLT_MAX_EXP             LDBL_EPSILON
20048        DECIMAL_DIG             DBL_MAX_EXP             FLT_MIN
20049        FLT_DIG                 LDBL_MAX_EXP            DBL_MIN
20050        DBL_DIG                 FLT_MAX_10_EXP          LDBL_MIN
20051        LDBL_DIG                DBL_MAX_10_EXP
20052        FLT_MIN_EXP             LDBL_MAX_10_EXP</pre>
20053
20054 <h3><a name="B.7" href="#B.7">B.7 Format conversion of integer types <inttypes.h></a></h3>
20055 <!--page 435 -->
20056 <pre>
20057        imaxdiv_t
20058        PRIdN        PRIdLEASTN        PRIdFASTN        PRIdMAX     PRIdPTR
20059        PRIiN        PRIiLEASTN        PRIiFASTN        PRIiMAX     PRIiPTR
20060        PRIoN        PRIoLEASTN        PRIoFASTN        PRIoMAX     PRIoPTR
20061        PRIuN        PRIuLEASTN        PRIuFASTN        PRIuMAX     PRIuPTR
20062        PRIxN        PRIxLEASTN        PRIxFASTN        PRIxMAX     PRIxPTR
20063        PRIXN        PRIXLEASTN        PRIXFASTN        PRIXMAX     PRIXPTR
20064        SCNdN        SCNdLEASTN        SCNdFASTN        SCNdMAX     SCNdPTR
20065        SCNiN        SCNiLEASTN        SCNiFASTN        SCNiMAX     SCNiPTR
20066        SCNoN        SCNoLEASTN        SCNoFASTN        SCNoMAX     SCNoPTR
20067        SCNuN        SCNuLEASTN        SCNuFASTN        SCNuMAX     SCNuPTR
20068        SCNxN        SCNxLEASTN        SCNxFASTN        SCNxMAX     SCNxPTR
20069        intmax_t imaxabs(intmax_t j);
20070        imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
20071        intmax_t strtoimax(const char * restrict nptr,
20072                char ** restrict endptr, int base);
20073        uintmax_t strtoumax(const char * restrict nptr,
20074                char ** restrict endptr, int base);
20075        intmax_t wcstoimax(const wchar_t * restrict nptr,
20076                wchar_t ** restrict endptr, int base);
20077        uintmax_t wcstoumax(const wchar_t * restrict nptr,
20078                wchar_t ** restrict endptr, int base);</pre>
20079
20080 <h3><a name="B.8" href="#B.8">B.8 Alternative spellings <iso646.h></a></h3>
20081 <pre>
20082       and             bitor             not_eq            xor
20083       and_eq          compl             or                xor_eq
20084       bitand          not               or_eq</pre>
20085
20086 <h3><a name="B.9" href="#B.9">B.9 Sizes of integer types <limits.h></a></h3>
20087 <pre>
20088       CHAR_BIT        CHAR_MAX          INT_MIN           ULONG_MAX
20089       SCHAR_MIN       MB_LEN_MAX        INT_MAX           LLONG_MIN
20090       SCHAR_MAX       SHRT_MIN          UINT_MAX          LLONG_MAX
20091       UCHAR_MAX       SHRT_MAX          LONG_MIN          ULLONG_MAX
20092       CHAR_MIN        USHRT_MAX         LONG_MAX</pre>
20093
20094 <h3><a name="B.10" href="#B.10">B.10 Localization <locale.h></a></h3>
20095 <pre>
20096       struct lconv    LC_ALL            LC_CTYPE          LC_NUMERIC
20097       NULL            LC_COLLATE        LC_MONETARY       LC_TIME
20098       char *setlocale(int category, const char *locale);
20099       struct lconv *localeconv(void);</pre>
20100
20101 <h3><a name="B.11" href="#B.11">B.11 Mathematics <math.h></a></h3>
20102 <!--page 436 -->
20103 <!--page 437 -->
20104 <!--page 438 -->
20105 <!--page 439 -->
20106 <!--page 440 -->
20107 <pre>
20108       float_t               FP_INFINITE             FP_FAST_FMAL
20109       double_t              FP_NAN                  FP_ILOGB0
20110       HUGE_VAL              FP_NORMAL               FP_ILOGBNAN
20111       HUGE_VALF             FP_SUBNORMAL            MATH_ERRNO
20112       HUGE_VALL             FP_ZERO                 MATH_ERREXCEPT
20113       INFINITY              FP_FAST_FMA             math_errhandling
20114       NAN                   FP_FAST_FMAF
20115        #pragma STDC FP_CONTRACT on-off-switch
20116        int fpclassify(real-floating x);
20117        int isfinite(real-floating x);
20118        int isinf(real-floating x);
20119        int isnan(real-floating x);
20120        int isnormal(real-floating x);
20121        int signbit(real-floating x);
20122        double acos(double x);
20123        float acosf(float x);
20124        long double acosl(long double x);
20125        double asin(double x);
20126        float asinf(float x);
20127        long double asinl(long double x);
20128        double atan(double x);
20129        float atanf(float x);
20130        long double atanl(long double x);
20131        double atan2(double y, double x);
20132        float atan2f(float y, float x);
20133        long double atan2l(long double y, long double x);
20134        double cos(double x);
20135        float cosf(float x);
20136        long double cosl(long double x);
20137        double sin(double x);
20138        float sinf(float x);
20139        long double sinl(long double x);
20140        double tan(double x);
20141        float tanf(float x);
20142        long double tanl(long double x);
20143        double acosh(double x);
20144        float acoshf(float x);
20145        long double acoshl(long double x);
20146        double asinh(double x);
20147        float asinhf(float x);
20148        long double asinhl(long double x);
20149        double atanh(double x);
20150        float atanhf(float x);
20151        long double atanhl(long double x);
20152        double cosh(double x);
20153        float coshf(float x);
20154        long double coshl(long double x);
20155        double sinh(double x);
20156        float sinhf(float x);
20157        long double sinhl(long double x);
20158        double tanh(double x);
20159        float tanhf(float x);
20160        long double tanhl(long double x);
20161        double exp(double x);
20162        float expf(float x);
20163        long double expl(long double x);
20164        double exp2(double x);
20165        float exp2f(float x);
20166        long double exp2l(long double x);
20167        double expm1(double x);
20168        float expm1f(float x);
20169        long double expm1l(long double x);
20170          double frexp(double value, int *exp);
20171          float frexpf(float value, int *exp);
20172          long double frexpl(long double value, int *exp);
20173          int ilogb(double x);
20174          int ilogbf(float x);
20175          int ilogbl(long double x);
20176          double ldexp(double x, int exp);
20177          float ldexpf(float x, int exp);
20178          long double ldexpl(long double x, int exp);
20179          double log(double x);
20180          float logf(float x);
20181          long double logl(long double x);
20182          double log10(double x);
20183          float log10f(float x);
20184          long double log10l(long double x);
20185          double log1p(double x);
20186          float log1pf(float x);
20187          long double log1pl(long double x);
20188          double log2(double x);
20189          float log2f(float x);
20190          long double log2l(long double x);
20191          double logb(double x);
20192          float logbf(float x);
20193          long double logbl(long double x);
20194          double modf(double value, double *iptr);
20195          float modff(float value, float *iptr);
20196          long double modfl(long double value, long double *iptr);
20197          double scalbn(double x, int n);
20198          float scalbnf(float x, int n);
20199          long double scalbnl(long double x, int n);
20200          double scalbln(double x, long int n);
20201          float scalblnf(float x, long int n);
20202          long double scalblnl(long double x, long int n);
20203          double cbrt(double x);
20204          float cbrtf(float x);
20205          long double cbrtl(long double x);
20206          double fabs(double x);
20207          float fabsf(float x);
20208          long double fabsl(long double x);
20209          double hypot(double x, double y);
20210          float hypotf(float x, float y);
20211        long double hypotl(long double x, long double y);
20212        double pow(double x, double y);
20213        float powf(float x, float y);
20214        long double powl(long double x, long double y);
20215        double sqrt(double x);
20216        float sqrtf(float x);
20217        long double sqrtl(long double x);
20218        double erf(double x);
20219        float erff(float x);
20220        long double erfl(long double x);
20221        double erfc(double x);
20222        float erfcf(float x);
20223        long double erfcl(long double x);
20224        double lgamma(double x);
20225        float lgammaf(float x);
20226        long double lgammal(long double x);
20227        double tgamma(double x);
20228        float tgammaf(float x);
20229        long double tgammal(long double x);
20230        double ceil(double x);
20231        float ceilf(float x);
20232        long double ceill(long double x);
20233        double floor(double x);
20234        float floorf(float x);
20235        long double floorl(long double x);
20236        double nearbyint(double x);
20237        float nearbyintf(float x);
20238        long double nearbyintl(long double x);
20239        double rint(double x);
20240        float rintf(float x);
20241        long double rintl(long double x);
20242        long int lrint(double x);
20243        long int lrintf(float x);
20244        long int lrintl(long double x);
20245        long long int llrint(double x);
20246        long long int llrintf(float x);
20247        long long int llrintl(long double x);
20248        double round(double x);
20249        float roundf(float x);
20250        long double roundl(long double x);
20251        long int lround(double x);
20252          long int lroundf(float x);
20253          long int lroundl(long double x);
20254          long long int llround(double x);
20255          long long int llroundf(float x);
20256          long long int llroundl(long double x);
20257          double trunc(double x);
20258          float truncf(float x);
20259          long double truncl(long double x);
20260          double fmod(double x, double y);
20261          float fmodf(float x, float y);
20262          long double fmodl(long double x, long double y);
20263          double remainder(double x, double y);
20264          float remainderf(float x, float y);
20265          long double remainderl(long double x, long double y);
20266          double remquo(double x, double y, int *quo);
20267          float remquof(float x, float y, int *quo);
20268          long double remquol(long double x, long double y,
20269               int *quo);
20270          double copysign(double x, double y);
20271          float copysignf(float x, float y);
20272          long double copysignl(long double x, long double y);
20273          double nan(const char *tagp);
20274          float nanf(const char *tagp);
20275          long double nanl(const char *tagp);
20276          double nextafter(double x, double y);
20277          float nextafterf(float x, float y);
20278          long double nextafterl(long double x, long double y);
20279          double nexttoward(double x, long double y);
20280          float nexttowardf(float x, long double y);
20281          long double nexttowardl(long double x, long double y);
20282          double fdim(double x, double y);
20283          float fdimf(float x, float y);
20284          long double fdiml(long double x, long double y);
20285          double fmax(double x, double y);
20286          float fmaxf(float x, float y);
20287          long double fmaxl(long double x, long double y);
20288          double fmin(double x, double y);
20289          float fminf(float x, float y);
20290          long double fminl(long double x, long double y);
20291          double fma(double x, double y, double z);
20292          float fmaf(float x, float y, float z);
20293        long double fmal(long double x, long double y,
20294             long double z);
20295        int isgreater(real-floating x, real-floating y);
20296        int isgreaterequal(real-floating x, real-floating y);
20297        int isless(real-floating x, real-floating y);
20298        int islessequal(real-floating x, real-floating y);
20299        int islessgreater(real-floating x, real-floating y);
20300        int isunordered(real-floating x, real-floating y);</pre>
20301
20302 <h3><a name="B.12" href="#B.12">B.12 Nonlocal jumps <setjmp.h></a></h3>
20303 <pre>
20304        jmp_buf
20305        int setjmp(jmp_buf env);
20306        void longjmp(jmp_buf env, int val);</pre>
20307
20308 <h3><a name="B.13" href="#B.13">B.13 Signal handling <signal.h></a></h3>
20309 <pre>
20310        sig_atomic_t   SIG_IGN            SIGILL            SIGTERM
20311        SIG_DFL        SIGABRT            SIGINT
20312        SIG_ERR        SIGFPE             SIGSEGV
20313        void (*signal(int sig, void (*func)(int)))(int);
20314        int raise(int sig);</pre>
20315
20316 <h3><a name="B.14" href="#B.14">B.14 Variable arguments <stdarg.h></a></h3>
20317 <pre>
20318        va_list
20319        type va_arg(va_list ap, type);
20320        void va_copy(va_list dest, va_list src);
20321        void va_end(va_list ap);
20322        void va_start(va_list ap, parmN);</pre>
20323
20324 <h3><a name="B.15" href="#B.15">B.15 Boolean type and values <stdbool.h></a></h3>
20325 <!--page 441 -->
20326 <pre>
20327        bool
20328        true
20329        false
20330        __bool_true_false_are_defined</pre>
20331
20332 <h3><a name="B.16" href="#B.16">B.16 Common definitions <stddef.h></a></h3>
20333 <pre>
20334          ptrdiff_t       size_t            wchar_t           NULL
20335          offsetof(type, member-designator)</pre>
20336
20337 <h3><a name="B.17" href="#B.17">B.17 Integer types <stdint.h></a></h3>
20338 <pre>
20339          intN_t                INT_LEASTN_MIN          PTRDIFF_MAX
20340          uintN_t               INT_LEASTN_MAX          SIG_ATOMIC_MIN
20341          int_leastN_t          UINT_LEASTN_MAX         SIG_ATOMIC_MAX
20342          uint_leastN_t         INT_FASTN_MIN           SIZE_MAX
20343          int_fastN_t           INT_FASTN_MAX           WCHAR_MIN
20344          uint_fastN_t          UINT_FASTN_MAX          WCHAR_MAX
20345          intptr_t              INTPTR_MIN              WINT_MIN
20346          uintptr_t             INTPTR_MAX              WINT_MAX
20347          intmax_t              UINTPTR_MAX             INTN_C(value)
20348          uintmax_t             INTMAX_MIN              UINTN_C(value)
20349          INTN_MIN              INTMAX_MAX              INTMAX_C(value)
20350          INTN_MAX              UINTMAX_MAX             UINTMAX_C(value)
20351          UINTN_MAX             PTRDIFF_MIN</pre>
20352
20353 <h3><a name="B.18" href="#B.18">B.18 Input/output <stdio.h></a></h3>
20354 <!--page 442 -->
20355 <!--page 443 -->
20356 <pre>
20357          size_t          _IOLBF            FILENAME_MAX      TMP_MAX
20358          FILE            _IONBF            L_tmpnam          stderr
20359          fpos_t          BUFSIZ            SEEK_CUR          stdin
20360          NULL            EOF               SEEK_END          stdout
20361          _IOFBF          FOPEN_MAX         SEEK_SET
20362          int remove(const char *filename);
20363          int rename(const char *old, const char *new);
20364          FILE *tmpfile(void);
20365          char *tmpnam(char *s);
20366          int fclose(FILE *stream);
20367          int fflush(FILE *stream);
20368          FILE *fopen(const char * restrict filename,
20369               const char * restrict mode);
20370          FILE *freopen(const char * restrict filename,
20371               const char * restrict mode,
20372               FILE * restrict stream);
20373          void setbuf(FILE * restrict stream,
20374               char * restrict buf);
20375        int setvbuf(FILE * restrict stream,
20376             char * restrict buf,
20377             int mode, size_t size);
20378        int fprintf(FILE * restrict stream,
20379             const char * restrict format, ...);
20380        int fscanf(FILE * restrict stream,
20381             const char * restrict format, ...);
20382        int printf(const char * restrict format, ...);
20383        int scanf(const char * restrict format, ...);
20384        int snprintf(char * restrict s, size_t n,
20385             const char * restrict format, ...);
20386        int sprintf(char * restrict s,
20387             const char * restrict format, ...);
20388        int sscanf(const char * restrict s,
20389             const char * restrict format, ...);
20390        int vfprintf(FILE * restrict stream,
20391             const char * restrict format, va_list arg);
20392        int vfscanf(FILE * restrict stream,
20393             const char * restrict format, va_list arg);
20394        int vprintf(const char * restrict format, va_list arg);
20395        int vscanf(const char * restrict format, va_list arg);
20396        int vsnprintf(char * restrict s, size_t n,
20397             const char * restrict format, va_list arg);
20398        int vsprintf(char * restrict s,
20399             const char * restrict format, va_list arg);
20400        int vsscanf(const char * restrict s,
20401             const char * restrict format, va_list arg);
20402        int fgetc(FILE *stream);
20403        char *fgets(char * restrict s, int n,
20404             FILE * restrict stream);
20405        int fputc(int c, FILE *stream);
20406        int fputs(const char * restrict s,
20407             FILE * restrict stream);
20408        int getc(FILE *stream);
20409        int getchar(void);
20410        char *gets(char *s);
20411        int putc(int c, FILE *stream);
20412        int putchar(int c);
20413        int puts(const char *s);
20414        int ungetc(int c, FILE *stream);
20415          size_t fread(void * restrict ptr,
20416               size_t size, size_t nmemb,
20417               FILE * restrict stream);
20418          size_t fwrite(const void * restrict ptr,
20419               size_t size, size_t nmemb,
20420               FILE * restrict stream);
20421          int fgetpos(FILE * restrict stream,
20422               fpos_t * restrict pos);
20423          int fseek(FILE *stream, long int offset, int whence);
20424          int fsetpos(FILE *stream, const fpos_t *pos);
20425          long int ftell(FILE *stream);
20426          void rewind(FILE *stream);
20427          void clearerr(FILE *stream);
20428          int feof(FILE *stream);
20429          int ferror(FILE *stream);
20430          void perror(const char *s);</pre>
20431
20432 <h3><a name="B.19" href="#B.19">B.19 General utilities <stdlib.h></a></h3>
20433 <!--page 444 -->
20434 <!--page 445 -->
20435 <pre>
20436          size_t       ldiv_t             EXIT_FAILURE      MB_CUR_MAX
20437          wchar_t      lldiv_t            EXIT_SUCCESS
20438          div_t        NULL               RAND_MAX
20439          double atof(const char *nptr);
20440          int atoi(const char *nptr);
20441          long int atol(const char *nptr);
20442          long long int atoll(const char *nptr);
20443          double strtod(const char * restrict nptr,
20444               char ** restrict endptr);
20445          float strtof(const char * restrict nptr,
20446               char ** restrict endptr);
20447          long double strtold(const char * restrict nptr,
20448               char ** restrict endptr);
20449          long int strtol(const char * restrict nptr,
20450               char ** restrict endptr, int base);
20451          long long int strtoll(const char * restrict nptr,
20452               char ** restrict endptr, int base);
20453          unsigned long int strtoul(
20454               const char * restrict nptr,
20455               char ** restrict endptr, int base);
20456        unsigned long long int strtoull(
20457             const char * restrict nptr,
20458             char ** restrict endptr, int base);
20459        int rand(void);
20460        void srand(unsigned int seed);
20461        void *calloc(size_t nmemb, size_t size);
20462        void free(void *ptr);
20463        void *malloc(size_t size);
20464        void *realloc(void *ptr, size_t size);
20465        void abort(void);
20466        int atexit(void (*func)(void));
20467        void exit(int status);
20468        void _Exit(int status);
20469        char *getenv(const char *name);
20470        int system(const char *string);
20471        void *bsearch(const void *key, const void *base,
20472             size_t nmemb, size_t size,
20473             int (*compar)(const void *, const void *));
20474        void qsort(void *base, size_t nmemb, size_t size,
20475             int (*compar)(const void *, const void *));
20476        int abs(int j);
20477        long int labs(long int j);
20478        long long int llabs(long long int j);
20479        div_t div(int numer, int denom);
20480        ldiv_t ldiv(long int numer, long int denom);
20481        lldiv_t lldiv(long long int numer,
20482             long long int denom);
20483        int mblen(const char *s, size_t n);
20484        int mbtowc(wchar_t * restrict pwc,
20485             const char * restrict s, size_t n);
20486        int wctomb(char *s, wchar_t wchar);
20487        size_t mbstowcs(wchar_t * restrict pwcs,
20488             const char * restrict s, size_t n);
20489        size_t wcstombs(char * restrict s,
20490             const wchar_t * restrict pwcs, size_t n);</pre>
20491
20492 <h3><a name="B.20" href="#B.20">B.20 String handling <string.h></a></h3>
20493 <!--page 446 -->
20494 <pre>
20495          size_t
20496          NULL
20497          void *memcpy(void * restrict s1,
20498               const void * restrict s2, size_t n);
20499          void *memmove(void *s1, const void *s2, size_t n);
20500          char *strcpy(char * restrict s1,
20501               const char * restrict s2);
20502          char *strncpy(char * restrict s1,
20503               const char * restrict s2, size_t n);
20504          char *strcat(char * restrict s1,
20505               const char * restrict s2);
20506          char *strncat(char * restrict s1,
20507               const char * restrict s2, size_t n);
20508          int memcmp(const void *s1, const void *s2, size_t n);
20509          int strcmp(const char *s1, const char *s2);
20510          int strcoll(const char *s1, const char *s2);
20511          int strncmp(const char *s1, const char *s2, size_t n);
20512          size_t strxfrm(char * restrict s1,
20513               const char * restrict s2, size_t n);
20514          void *memchr(const void *s, int c, size_t n);
20515          char *strchr(const char *s, int c);
20516          size_t strcspn(const char *s1, const char *s2);
20517          char *strpbrk(const char *s1, const char *s2);
20518          char *strrchr(const char *s, int c);
20519          size_t strspn(const char *s1, const char *s2);
20520          char *strstr(const char *s1, const char *s2);
20521          char *strtok(char * restrict s1,
20522               const char * restrict s2);
20523          void *memset(void *s, int c, size_t n);
20524          char *strerror(int errnum);
20525          size_t strlen(const char *s);</pre>
20526
20527 <h3><a name="B.21" href="#B.21">B.21 Type-generic math <tgmath.h></a></h3>
20528 <pre>
20529        acos           sqrt               fmod              nextafter
20530        asin           fabs               frexp             nexttoward
20531        atan           atan2              hypot             remainder
20532        acosh          cbrt               ilogb             remquo
20533        asinh          ceil               ldexp             rint
20534        atanh          copysign           lgamma            round
20535        cos            erf                llrint            scalbn
20536        sin            erfc               llround           scalbln
20537        tan            exp2               log10             tgamma
20538        cosh           expm1              log1p             trunc
20539        sinh           fdim               log2              carg
20540        tanh           floor              logb              cimag
20541        exp            fma                lrint             conj
20542        log            fmax               lround            cproj
20543        pow            fmin               nearbyint         creal</pre>
20544
20545 <h3><a name="B.22" href="#B.22">B.22 Date and time <time.h></a></h3>
20546 <!--page 447 -->
20547 <pre>
20548        NULL                  size_t                  time_t
20549        CLOCKS_PER_SEC        clock_t                 struct tm
20550        clock_t clock(void);
20551        double difftime(time_t time1, time_t time0);
20552        time_t mktime(struct tm *timeptr);
20553        time_t time(time_t *timer);
20554        char *asctime(const struct tm *timeptr);
20555        char *ctime(const time_t *timer);
20556        struct tm *gmtime(const time_t *timer);
20557        struct tm *localtime(const time_t *timer);
20558        size_t strftime(char * restrict s,
20559             size_t maxsize,
20560             const char * restrict format,
20561             const struct tm * restrict timeptr);</pre>
20562
20563 <h3><a name="B.23" href="#B.23">B.23 Extended multibyte/wide character utilities <wchar.h></a></h3>
20564 <!--page 448 -->
20565 <!--page 449 -->
20566 <pre>
20567          wchar_t       wint_t             WCHAR_MAX
20568          size_t        struct tm          WCHAR_MIN
20569          mbstate_t     NULL               WEOF
20570          int fwprintf(FILE * restrict stream,
20571               const wchar_t * restrict format, ...);
20572          int fwscanf(FILE * restrict stream,
20573               const wchar_t * restrict format, ...);
20574          int swprintf(wchar_t * restrict s, size_t n,
20575               const wchar_t * restrict format, ...);
20576          int swscanf(const wchar_t * restrict s,
20577               const wchar_t * restrict format, ...);
20578          int vfwprintf(FILE * restrict stream,
20579               const wchar_t * restrict format, va_list arg);
20580          int vfwscanf(FILE * restrict stream,
20581               const wchar_t * restrict format, va_list arg);
20582          int vswprintf(wchar_t * restrict s, size_t n,
20583               const wchar_t * restrict format, va_list arg);
20584          int vswscanf(const wchar_t * restrict s,
20585               const wchar_t * restrict format, va_list arg);
20586          int vwprintf(const wchar_t * restrict format,
20587               va_list arg);
20588          int vwscanf(const wchar_t * restrict format,
20589               va_list arg);
20590          int wprintf(const wchar_t * restrict format, ...);
20591          int wscanf(const wchar_t * restrict format, ...);
20592          wint_t fgetwc(FILE *stream);
20593          wchar_t *fgetws(wchar_t * restrict s, int n,
20594               FILE * restrict stream);
20595          wint_t fputwc(wchar_t c, FILE *stream);
20596          int fputws(const wchar_t * restrict s,
20597               FILE * restrict stream);
20598          int fwide(FILE *stream, int mode);
20599          wint_t getwc(FILE *stream);
20600          wint_t getwchar(void);
20601          wint_t putwc(wchar_t c, FILE *stream);
20602          wint_t putwchar(wchar_t c);
20603          wint_t ungetwc(wint_t c, FILE *stream);
20604        double wcstod(const wchar_t * restrict nptr,
20605             wchar_t ** restrict endptr);
20606        float wcstof(const wchar_t * restrict nptr,
20607             wchar_t ** restrict endptr);
20608        long double wcstold(const wchar_t * restrict nptr,
20609             wchar_t ** restrict endptr);
20610        long int wcstol(const wchar_t * restrict nptr,
20611             wchar_t ** restrict endptr, int base);
20612        long long int wcstoll(const wchar_t * restrict nptr,
20613             wchar_t ** restrict endptr, int base);
20614        unsigned long int wcstoul(const wchar_t * restrict nptr,
20615             wchar_t ** restrict endptr, int base);
20616        unsigned long long int wcstoull(
20617             const wchar_t * restrict nptr,
20618             wchar_t ** restrict endptr, int base);
20619        wchar_t *wcscpy(wchar_t * restrict s1,
20620             const wchar_t * restrict s2);
20621        wchar_t *wcsncpy(wchar_t * restrict s1,
20622             const wchar_t * restrict s2, size_t n);
20623        wchar_t *wmemcpy(wchar_t * restrict s1,
20624             const wchar_t * restrict s2, size_t n);
20625        wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2,
20626             size_t n);
20627        wchar_t *wcscat(wchar_t * restrict s1,
20628             const wchar_t * restrict s2);
20629        wchar_t *wcsncat(wchar_t * restrict s1,
20630             const wchar_t * restrict s2, size_t n);
20631        int wcscmp(const wchar_t *s1, const wchar_t *s2);
20632        int wcscoll(const wchar_t *s1, const wchar_t *s2);
20633        int wcsncmp(const wchar_t *s1, const wchar_t *s2,
20634             size_t n);
20635        size_t wcsxfrm(wchar_t * restrict s1,
20636             const wchar_t * restrict s2, size_t n);
20637        int wmemcmp(const wchar_t *s1, const wchar_t *s2,
20638             size_t n);
20639        wchar_t *wcschr(const wchar_t *s, wchar_t c);
20640        size_t wcscspn(const wchar_t *s1, const wchar_t *s2);
20641        wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2); *
20642        wchar_t *wcsrchr(const wchar_t *s, wchar_t c);
20643        size_t wcsspn(const wchar_t *s1, const wchar_t *s2);
20644        wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);
20645          wchar_t *wcstok(wchar_t * restrict s1,
20646               const wchar_t * restrict s2,
20647               wchar_t ** restrict ptr);
20648          wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
20649          size_t wcslen(const wchar_t *s);
20650          wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);
20651          size_t wcsftime(wchar_t * restrict s, size_t maxsize,
20652               const wchar_t * restrict format,
20653               const struct tm * restrict timeptr);
20654          wint_t btowc(int c);
20655          int wctob(wint_t c);
20656          int mbsinit(const mbstate_t *ps);
20657          size_t mbrlen(const char * restrict s, size_t n,
20658               mbstate_t * restrict ps);
20659          size_t mbrtowc(wchar_t * restrict pwc,
20660               const char * restrict s, size_t n,
20661               mbstate_t * restrict ps);
20662          size_t wcrtomb(char * restrict s, wchar_t wc,
20663               mbstate_t * restrict ps);
20664          size_t mbsrtowcs(wchar_t * restrict dst,
20665               const char ** restrict src, size_t len,
20666               mbstate_t * restrict ps);
20667          size_t wcsrtombs(char * restrict dst,
20668               const wchar_t ** restrict src, size_t len,
20669               mbstate_t * restrict ps);</pre>
20670
20671 <h3><a name="B.24" href="#B.24">B.24 Wide character classification and mapping utilities <wctype.h></a></h3>
20672 <!--page 450 -->
20673 <!--page 451 -->
20674 <pre>
20675          wint_t         wctrans_t          wctype_t          WEOF
20676          int   iswalnum(wint_t wc);
20677          int   iswalpha(wint_t wc);
20678          int   iswblank(wint_t wc);
20679          int   iswcntrl(wint_t wc);
20680          int   iswdigit(wint_t wc);
20681          int   iswgraph(wint_t wc);
20682          int   iswlower(wint_t wc);
20683          int   iswprint(wint_t wc);
20684          int   iswpunct(wint_t wc);
20685          int   iswspace(wint_t wc);
20686          int   iswupper(wint_t wc);
20687          int   iswxdigit(wint_t wc);
20688          int   iswctype(wint_t wc, wctype_t desc);
20689        wctype_t wctype(const char *property);
20690        wint_t towlower(wint_t wc);
20691        wint_t towupper(wint_t wc);
20692        wint_t towctrans(wint_t wc, wctrans_t desc);
20693        wctrans_t wctrans(const char *property);</pre>
20694
20695 <h2><a name="C" href="#C">Annex C</a></h2>
20696 <p><!--para 1 -->
20697 <pre>
20698                                      (informative)
20699                                    Sequence points</pre>
20700  The following are the sequence points described in <a href="#5.1.2.3">5.1.2.3</a>:
20701 <ul>
20702 <li>  The call to a function, after the arguments have been evaluated (<a href="#6.5.2.2">6.5.2.2</a>).
20703 <li>  The end of the first operand of the following operators: logical AND &amp;&amp; (<a href="#6.5.13">6.5.13</a>);
20704  logical OR || (<a href="#6.5.14">6.5.14</a>); conditional ? (<a href="#6.5.15">6.5.15</a>); comma , (<a href="#6.5.17">6.5.17</a>).
20705 <li>  The end of a full declarator: declarators (<a href="#6.7.5">6.7.5</a>);
20706 <li>  The end of a full expression: an initializer (<a href="#6.7.8">6.7.8</a>); the expression in an expression
20707  statement (<a href="#6.8.3">6.8.3</a>); the controlling expression of a selection statement (if or switch)
20708  (<a href="#6.8.4">6.8.4</a>); the controlling expression of a while or do statement (<a href="#6.8.5">6.8.5</a>); each of the
20709  expressions of a for statement (<a href="#6.8.5.3">6.8.5.3</a>); the expression in a return statement
20710  (<a href="#6.8.6.4">6.8.6.4</a>).
20711 <li>  Immediately before a library function returns (<a href="#7.1.4">7.1.4</a>).
20712 <li>  After the actions associated with each formatted input/output function conversion
20713  specifier (<a href="#7.19.6">7.19.6</a>, <a href="#7.24.2">7.24.2</a>).
20714 <li>  Immediately before and immediately after each call to a comparison function, and
20715  also between any call to a comparison function and any movement of the objects
20716  passed as arguments to that call (<a href="#7.20.5">7.20.5</a>).
20717 <!--page 452 -->
20718 </ul>
20719
20720 <h2><a name="D" href="#D">Annex D</a></h2>
20721 <p><!--para 1 -->
20722 <pre>
20723                                      (normative)
20724                 Universal character names for identifiers</pre>
20725  This clause lists the hexadecimal code values that are valid in universal character names
20726  in identifiers.
20727 <p><!--para 2 -->
20728  This table is reproduced unchanged from ISO/IEC TR 10176:1998, produced by ISO/IEC
20729  JTC 1/SC 22/WG 20, except for the omission of ranges that are part of the basic character
20730  sets.
20731  Latin:            00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217,
20732 <pre>
20733                    0250-02A8, 1E00-1E9B, 1EA0-1EF9, 207F</pre>
20734  Greek:            0386, 0388-038A, 038C, 038E-03A1, 03A3-03CE, 03D0-03D6,
20735 <pre>
20736                    03DA, 03DC, 03DE, 03E0, 03E2-03F3, 1F00-1F15, 1F18-1F1D,
20737                    1F20-1F45, 1F48-1F4D, 1F50-1F57, 1F59, 1F5B, 1F5D,
20738                    1F5F-1F7D, 1F80-1FB4, 1FB6-1FBC, 1FC2-1FC4, 1FC6-1FCC,
20739                    1FD0-1FD3, 1FD6-1FDB, 1FE0-1FEC, 1FF2-1FF4, 1FF6-1FFC</pre>
20740  Cyrillic:         0401-040C, 040E-044F, 0451-045C, 045E-0481, 0490-04C4,
20741 <pre>
20742                    04C7-04C8, 04CB-04CC, 04D0-04EB, 04EE-04F5, 04F8-04F9</pre>
20743  Armenian:         0531-0556, 0561-0587
20744  Hebrew:           05B0-05B9,      05BB-05BD,       05BF,   05C1-05C2,      05D0-05EA,
20745 <pre>
20746                    05F0-05F2</pre>
20747  Arabic:           0621-063A, 0640-0652, 0670-06B7, 06BA-06BE, 06C0-06CE,
20748 <pre>
20749                    06D0-06DC, 06E5-06E8, 06EA-06ED</pre>
20750  Devanagari:       0901-0903, 0905-0939, 093E-094D, 0950-0952, 0958-0963
20751  Bengali:          0981-0983, 0985-098C, 098F-0990, 0993-09A8, 09AA-09B0,
20752 <pre>
20753                    09B2, 09B6-09B9, 09BE-09C4, 09C7-09C8, 09CB-09CD,
20754                    09DC-09DD, 09DF-09E3, 09F0-09F1</pre>
20755  Gurmukhi:         0A02, 0A05-0A0A, 0A0F-0A10, 0A13-0A28, 0A2A-0A30,
20756 <pre>
20757                    0A32-0A33, 0A35-0A36, 0A38-0A39, 0A3E-0A42, 0A47-0A48,
20758                    0A4B-0A4D, 0A59-0A5C, 0A5E, 0A74</pre>
20759  Gujarati:         0A81-0A83, 0A85-0A8B, 0A8D, 0A8F-0A91, 0A93-0AA8,
20760 <pre>
20761                    0AAA-0AB0,    0AB2-0AB3,     0AB5-0AB9, 0ABD-0AC5,
20762                    0AC7-0AC9, 0ACB-0ACD, 0AD0, 0AE0</pre>
20763  Oriya:            0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30,
20764 <!--page 453 -->
20765 <pre>
20766                    0B32-0B33, 0B36-0B39, 0B3E-0B43, 0B47-0B48, 0B4B-0B4D,
20767                  0B5C-0B5D, 0B5F-0B61</pre>
20768  Tamil:          0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A,
20769 <pre>
20770                  0B9C, 0B9E-0B9F, 0BA3-0BA4, 0BA8-0BAA, 0BAE-0BB5,
20771                  0BB7-0BB9, 0BBE-0BC2, 0BC6-0BC8, 0BCA-0BCD</pre>
20772  Telugu:         0C01-0C03, 0C05-0C0C, 0C0E-0C10, 0C12-0C28, 0C2A-0C33,
20773 <pre>
20774                  0C35-0C39, 0C3E-0C44, 0C46-0C48, 0C4A-0C4D, 0C60-0C61</pre>
20775  Kannada:        0C82-0C83, 0C85-0C8C, 0C8E-0C90, 0C92-0CA8, 0CAA-0CB3,
20776 <pre>
20777                  0CB5-0CB9, 0CBE-0CC4, 0CC6-0CC8, 0CCA-0CCD, 0CDE,
20778                  0CE0-0CE1</pre>
20779  Malayalam:      0D02-0D03, 0D05-0D0C, 0D0E-0D10, 0D12-0D28, 0D2A-0D39,
20780 <pre>
20781                  0D3E-0D43, 0D46-0D48, 0D4A-0D4D, 0D60-0D61</pre>
20782  Thai:           0E01-0E3A, 0E40-0E5B
20783  Lao:            0E81-0E82, 0E84, 0E87-0E88, 0E8A, 0E8D, 0E94-0E97,
20784 <pre>
20785                  0E99-0E9F,   0EA1-0EA3,  0EA5,  0EA7,  0EAA-0EAB,
20786                  0EAD-0EAE, 0EB0-0EB9, 0EBB-0EBD, 0EC0-0EC4, 0EC6,
20787                  0EC8-0ECD, 0EDC-0EDD</pre>
20788  Tibetan:        0F00, 0F18-0F19, 0F35, 0F37, 0F39, 0F3E-0F47, 0F49-0F69,
20789 <pre>
20790                  0F71-0F84, 0F86-0F8B, 0F90-0F95, 0F97, 0F99-0FAD,
20791                  0FB1-0FB7, 0FB9</pre>
20792  Georgian:       10A0-10C5, 10D0-10F6
20793  Hiragana:       3041-3093, 309B-309C
20794  Katakana:       30A1-30F6, 30FB-30FC
20795  Bopomofo:       3105-312C
20796  CJK Unified Ideographs: 4E00-9FA5
20797  Hangul:         AC00-D7A3
20798  Digits:         0660-0669, 06F0-06F9, 0966-096F, 09E6-09EF, 0A66-0A6F,
20799 <pre>
20800                  0AE6-0AEF, 0B66-0B6F, 0BE7-0BEF, 0C66-0C6F, 0CE6-0CEF,
20801                  0D66-0D6F, 0E50-0E59, 0ED0-0ED9, 0F20-0F33</pre>
20802  Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1,
20803 <!--page 454 -->
20804 <pre>
20805                     02E0-02E4, 037A, 0559, 093D, 0B3D, 1FBE, 203F-2040, 2102,
20806                     2107, 210A-2113, 2115, 2118-211D, 2124, 2126, 2128, 212A-2131,
20807                     2133-2138, 2160-2182, 3005-3007, 3021-3029</pre>
20808
20809 <h2><a name="E" href="#E">Annex E</a></h2>
20810 <p><!--para 1 -->
20811 <pre>
20812                                     (informative)
20813 <h6>                             Implementation limits</h6></pre>
20814  The contents of the header <a href="#7.10">&lt;limits.h&gt;</a> are given below, in alphabetical order. The
20815  minimum magnitudes shown shall be replaced by implementation-defined magnitudes
20816  with the same sign. The values shall all be constant expressions suitable for use in #if
20817  preprocessing directives. The components are described further in <a href="#5.2.4.2.1">5.2.4.2.1</a>.
20818 <p><!--para 2 -->
20819 <pre>
20820         #define     CHAR_BIT                               8
20821         #define     CHAR_MAX          UCHAR_MAX or SCHAR_MAX
20822         #define     CHAR_MIN                  0 or SCHAR_MIN
20823         #define     INT_MAX                           +32767
20824         #define     INT_MIN                           -32767
20825         #define     LONG_MAX                     +2147483647
20826         #define     LONG_MIN                     -2147483647
20827         #define     LLONG_MAX           +9223372036854775807
20828         #define     LLONG_MIN           -9223372036854775807
20829         #define     MB_LEN_MAX                             1
20830         #define     SCHAR_MAX                           +127
20831         #define     SCHAR_MIN                           -127
20832         #define     SHRT_MAX                          +32767
20833         #define     SHRT_MIN                          -32767
20834         #define     UCHAR_MAX                            255
20835         #define     USHRT_MAX                          65535
20836         #define     UINT_MAX                           65535
20837         #define     ULONG_MAX                     4294967295
20838         #define     ULLONG_MAX          18446744073709551615</pre>
20839  The contents of the header <a href="#7.7">&lt;float.h&gt;</a> are given below. All integer values, except
20840  FLT_ROUNDS, shall be constant expressions suitable for use in #if preprocessing
20841  directives; all floating values shall be constant expressions. The components are
20842  described further in <a href="#5.2.4.2.2">5.2.4.2.2</a>.
20843 <p><!--para 3 -->
20844  The values given in the following list shall be replaced by implementation-defined
20845  expressions:
20846 <p><!--para 4 -->
20847 <pre>
20848         #define FLT_EVAL_METHOD
20849         #define FLT_ROUNDS</pre>
20850  The values given in the following list shall be replaced by implementation-defined
20851  constant expressions that are greater or equal in magnitude (absolute value) to those
20852  shown, with the same sign:
20853 <!--page 455 -->
20854 <p><!--para 5 -->
20855 <pre>
20856         #define    DBL_DIG                                        10
20857         #define    DBL_MANT_DIG
20858         #define    DBL_MAX_10_EXP                               +37
20859         #define    DBL_MAX_EXP
20860         #define    DBL_MIN_10_EXP                               -37
20861         #define    DBL_MIN_EXP
20862         #define    DECIMAL_DIG                                    10
20863         #define    FLT_DIG                                         6
20864         #define    FLT_MANT_DIG
20865         #define    FLT_MAX_10_EXP                               +37
20866         #define    FLT_MAX_EXP
20867         #define    FLT_MIN_10_EXP                               -37
20868         #define    FLT_MIN_EXP
20869         #define    FLT_RADIX                                       2
20870         #define    LDBL_DIG                                       10
20871         #define    LDBL_MANT_DIG
20872         #define    LDBL_MAX_10_EXP                              +37
20873         #define    LDBL_MAX_EXP
20874         #define    LDBL_MIN_10_EXP                              -37
20875         #define    LDBL_MIN_EXP</pre>
20876  The values given in the following list shall be replaced by implementation-defined
20877  constant expressions with values that are greater than or equal to those shown:
20878 <p><!--para 6 -->
20879 <pre>
20880         #define DBL_MAX                                      1E+37
20881         #define FLT_MAX                                      1E+37
20882         #define LDBL_MAX                                     1E+37</pre>
20883  The values given in the following list shall be replaced by implementation-defined
20884  constant expressions with (positive) values that are less than or equal to those shown:
20885 <!--page 456 -->
20886 <pre>
20887         #define    DBL_EPSILON                                1E-9
20888         #define    DBL_MIN                                   1E-37
20889         #define    FLT_EPSILON                                1E-5
20890         #define    FLT_MIN                                   1E-37
20891         #define    LDBL_EPSILON                               1E-9
20892         #define    LDBL_MIN                                  1E-37</pre>
20893
20894 <h2><a name="F" href="#F">Annex F</a></h2>
20895 <pre>
20896                                            (normative)
20897                        IEC 60559 floating-point arithmetic</pre>
20898
20899 <h3><a name="F.1" href="#F.1">F.1 Introduction</a></h3>
20900 <p><!--para 1 -->
20901  This annex specifies C language support for the IEC 60559 floating-point standard. The
20902  IEC 60559 floating-point standard is specifically Binary floating-point arithmetic for
20903  microprocessor systems, second edition (IEC 60559:1989), previously designated
20904  IEC 559:1989 and as IEEE Standard for Binary Floating-Point Arithmetic
20905  (ANSI/IEEE 754-1985). IEEE Standard for Radix-Independent Floating-Point
20906  Arithmetic (ANSI/IEEE 854-1987) generalizes the binary standard to remove
20907  dependencies on radix and word length. IEC 60559 generally refers to the floating-point
20908  standard, as in IEC 60559 operation, IEC 60559 format, etc. An implementation that
20909  defines __STDC_IEC_559__ shall conform to the specifications in this annex. Where
20910  a binding between the C language and IEC 60559 is indicated, the IEC 60559-specified
20911  behavior is adopted by reference, unless stated otherwise.
20912
20913 <h3><a name="F.2" href="#F.2">F.2 Types</a></h3>
20914 <p><!--para 1 -->
20915  The C floating types match the IEC 60559 formats as follows:
20916 <ul>
20917 <li>  The float type matches the IEC 60559 single format.
20918 <li>  The double type matches the IEC 60559 double format.
20919 <li>  The long double type matches an IEC 60559 extended format,<sup><a href="#note307"><b>307)</b></a></sup> else a
20920  non-IEC 60559 extended format, else the IEC 60559 double format.
20921 </ul>
20922  Any non-IEC 60559 extended format used for the long double type shall have more
20923  precision than IEC 60559 double and at least the range of IEC 60559 double.<sup><a href="#note308"><b>308)</b></a></sup>
20924 <h6> Recommended practice</h6>
20925 <p><!--para 2 -->
20926  The long double type should match an IEC 60559 extended format.
20927  
20928  
20929  
20930  
20931 <!--page 457 -->
20932
20933 <h6>footnotes</h6>
20934 <p><small><a name="note307" href="#note307">307)</a> ''Extended'' is IEC 60559's double-extended data format. Extended refers to both the common 80-bit
20935  and quadruple 128-bit IEC 60559 formats.
20936 </small>
20937 <p><small><a name="note308" href="#note308">308)</a> A non-IEC 60559 long double type is required to provide infinity and NaNs, as its values include
20938  all double values.
20939 </small>
20940
20941 <h4><a name="F.2.1" href="#F.2.1">F.2.1 Infinities, signed zeros, and NaNs</a></h4>
20942 <p><!--para 1 -->
20943  This specification does not define the behavior of signaling NaNs.<sup><a href="#note309"><b>309)</b></a></sup> It generally uses
20944  the term NaN to denote quiet NaNs. The NAN and INFINITY macros and the nan
20945  functions in <a href="#7.12">&lt;math.h&gt;</a> provide designations for IEC 60559 NaNs and infinities.
20946
20947 <h6>footnotes</h6>
20948 <p><small><a name="note309" href="#note309">309)</a> Since NaNs created by IEC 60559 operations are always quiet, quiet NaNs (along with infinities) are
20949  sufficient for closure of the arithmetic.
20950 </small>
20951
20952 <h3><a name="F.3" href="#F.3">F.3 Operators and functions</a></h3>
20953 <p><!--para 1 -->
20954  C operators and functions provide IEC 60559 required and recommended facilities as
20955  listed below.
20956 <ul>
20957 <li>  The +, -, *, and / operators provide the IEC 60559 add, subtract, multiply, and
20958  divide operations.
20959 <li>  The sqrt functions in <a href="#7.12">&lt;math.h&gt;</a> provide the IEC 60559 square root operation.
20960 <li>  The remainder functions in <a href="#7.12">&lt;math.h&gt;</a> provide the IEC 60559 remainder
20961  operation. The remquo functions in <a href="#7.12">&lt;math.h&gt;</a> provide the same operation but
20962  with additional information.
20963 <li>  The rint functions in <a href="#7.12">&lt;math.h&gt;</a> provide the IEC 60559 operation that rounds a
20964  floating-point number to an integer value (in the same precision). The nearbyint
20965  functions in <a href="#7.12">&lt;math.h&gt;</a> provide the nearbyinteger function recommended in the
20966  Appendix to ANSI/IEEE 854.
20967 <li>  The conversions for floating types provide the IEC 60559 conversions between
20968  floating-point precisions.
20969 <li>  The conversions from integer to floating types provide the IEC 60559 conversions
20970  from integer to floating point.
20971 <li>  The conversions from floating to integer types provide IEC 60559-like conversions
20972  but always round toward zero.
20973 <li>  The lrint and llrint functions in <a href="#7.12">&lt;math.h&gt;</a> provide the IEC 60559
20974  conversions, which honor the directed rounding mode, from floating point to the
20975  long int and long long int integer formats. The lrint and llrint
20976  functions can be used to implement IEC 60559 conversions from floating to other
20977  integer formats.
20978 <li>  The translation time conversion of floating constants and the strtod, strtof,
20979  strtold, fprintf, fscanf, and related library functions in <a href="#7.20">&lt;stdlib.h&gt;</a>,
20980  <a href="#7.19">&lt;stdio.h&gt;</a>, and <a href="#7.24">&lt;wchar.h&gt;</a> provide IEC 60559 binary-decimal conversions. The
20981  strtold function in <a href="#7.20">&lt;stdlib.h&gt;</a> provides the conv function recommended in the
20982  Appendix to ANSI/IEEE 854.
20983  
20984 <!--page 458 -->
20985 <li>  The relational and equality operators provide IEC 60559 comparisons. IEC 60559
20986  identifies a need for additional comparison predicates to facilitate writing code that
20987  accounts for NaNs. The comparison macros (isgreater, isgreaterequal,
20988  isless, islessequal, islessgreater, and isunordered) in <a href="#7.12">&lt;math.h&gt;</a>
20989  supplement the language operators to address this need. The islessgreater and
20990  isunordered macros provide respectively a quiet version of the &lt;&gt; predicate and
20991  the unordered predicate recommended in the Appendix to IEC 60559.
20992 <li>  The feclearexcept, feraiseexcept, and fetestexcept functions in
20993  <a href="#7.6">&lt;fenv.h&gt;</a> provide the facility to test and alter the IEC 60559 floating-point
20994  exception status flags. The fegetexceptflag and fesetexceptflag
20995  functions in <a href="#7.6">&lt;fenv.h&gt;</a> provide the facility to save and restore all five status flags at
20996  one time. These functions are used in conjunction with the type fexcept_t and the
20997  floating-point     exception      macros      (FE_INEXACT,         FE_DIVBYZERO,
20998  FE_UNDERFLOW, FE_OVERFLOW, FE_INVALID) also in <a href="#7.6">&lt;fenv.h&gt;</a>.
20999 <li>  The fegetround and fesetround functions in <a href="#7.6">&lt;fenv.h&gt;</a> provide the facility
21000  to select among the IEC 60559 directed rounding modes represented by the rounding
21001  direction macros in <a href="#7.6">&lt;fenv.h&gt;</a> (FE_TONEAREST, FE_UPWARD, FE_DOWNWARD,
21002  FE_TOWARDZERO) and the values 0, 1, 2, and 3 of FLT_ROUNDS are the
21003  IEC 60559 directed rounding modes.
21004 <li>  The fegetenv, feholdexcept, fesetenv, and feupdateenv functions in
21005  <a href="#7.6">&lt;fenv.h&gt;</a> provide a facility to manage the floating-point environment, comprising
21006  the IEC 60559 status flags and control modes.
21007 <li>  The copysign functions in <a href="#7.12">&lt;math.h&gt;</a> provide the copysign function
21008  recommended in the Appendix to IEC 60559.
21009 <li>  The unary minus (-) operator provides the minus (-) operation recommended in the
21010  Appendix to IEC 60559.
21011 <li>  The scalbn and scalbln functions in <a href="#7.12">&lt;math.h&gt;</a> provide the scalb function
21012  recommended in the Appendix to IEC 60559.
21013 <li>  The logb functions in <a href="#7.12">&lt;math.h&gt;</a> provide the logb function recommended in the
21014  Appendix to IEC 60559, but following the newer specifications in ANSI/IEEE 854.
21015 <li>  The nextafter and nexttoward functions in <a href="#7.12">&lt;math.h&gt;</a> provide the nextafter
21016  function recommended in the Appendix to IEC 60559 (but with a minor change to
21017  better handle signed zeros).
21018 <li>  The isfinite macro in <a href="#7.12">&lt;math.h&gt;</a> provides the finite function recommended in
21019  the Appendix to IEC 60559.
21020 <li>  The isnan macro in <a href="#7.12">&lt;math.h&gt;</a> provides the isnan function recommended in the
21021  Appendix to IEC 60559.
21022 <!--page 459 -->
21023 <li>  The signbit macro and the fpclassify macro in <a href="#7.12">&lt;math.h&gt;</a>, used in
21024  conjunction with the number classification macros (FP_NAN, FP_INFINITE,
21025  FP_NORMAL, FP_SUBNORMAL, FP_ZERO), provide the facility of the class
21026  function recommended in the Appendix to IEC 60559 (except that the classification
21027  macros defined in <a href="#7.12.3">7.12.3</a> do not distinguish signaling from quiet NaNs).
21028 </ul>
21029
21030 <h3><a name="F.4" href="#F.4">F.4 Floating to integer conversion</a></h3>
21031 <p><!--para 1 -->
21032  If the floating value is infinite or NaN or if the integral part of the floating value exceeds
21033  the range of the integer type, then the ''invalid'' floating-point exception is raised and the
21034  resulting value is unspecified. Whether conversion of non-integer floating values whose
21035  integral part is within the range of the integer type raises the ''inexact'' floating-point
21036  exception is unspecified.<sup><a href="#note310"><b>310)</b></a></sup>
21037
21038 <h6>footnotes</h6>
21039 <p><small><a name="note310" href="#note310">310)</a> ANSI/IEEE 854, but not IEC 60559 (ANSI/IEEE 754), directly specifies that floating-to-integer
21040  conversions raise the ''inexact'' floating-point exception for non-integer in-range values. In those
21041  cases where it matters, library functions can be used to effect such conversions with or without raising
21042  the ''inexact'' floating-point exception. See rint, lrint, llrint, and nearbyint in
21043  <a href="#7.12">&lt;math.h&gt;</a>.
21044 </small>
21045
21046 <h3><a name="F.5" href="#F.5">F.5 Binary-decimal conversion</a></h3>
21047 <p><!--para 1 -->
21048  Conversion from the widest supported IEC 60559 format to decimal with
21049  DECIMAL_DIG digits and back is the identity function.<sup><a href="#note311"><b>311)</b></a></sup>
21050 <p><!--para 2 -->
21051  Conversions involving IEC 60559 formats follow all pertinent recommended practice. In
21052  particular, conversion between any supported IEC 60559 format and decimal with
21053  DECIMAL_DIG or fewer significant digits is correctly rounded (honoring the current
21054  rounding mode), which assures that conversion from the widest supported IEC 60559
21055  format to decimal with DECIMAL_DIG digits and back is the identity function.
21056 <p><!--para 3 -->
21057  Functions such as strtod that convert character sequences to floating types honor the
21058  rounding direction. Hence, if the rounding direction might be upward or downward, the
21059  implementation cannot convert a minus-signed sequence by negating the converted
21060  unsigned sequence.
21061  
21062  
21063  
21064  
21065 <!--page 460 -->
21066
21067 <h6>footnotes</h6>
21068 <p><small><a name="note311" href="#note311">311)</a> If the minimum-width IEC 60559 extended format (64 bits of precision) is supported,
21069  DECIMAL_DIG shall be at least 21. If IEC 60559 double (53 bits of precision) is the widest
21070  IEC 60559 format supported, then DECIMAL_DIG shall be at least 17. (By contrast, LDBL_DIG and
21071  DBL_DIG are 18 and 15, respectively, for these formats.)
21072 </small>
21073
21074 <h3><a name="F.6" href="#F.6">F.6 Contracted expressions</a></h3>
21075 <p><!--para 1 -->
21076  A contracted expression treats infinities, NaNs, signed zeros, subnormals, and the
21077  rounding directions in a manner consistent with the basic arithmetic operations covered
21078  by IEC 60559.
21079 <h6> Recommended practice</h6>
21080 <p><!--para 2 -->
21081  A contracted expression should raise floating-point exceptions in a manner generally
21082  consistent with the basic arithmetic operations. A contracted expression should deliver
21083  the same value as its uncontracted counterpart, else should be correctly rounded (once).
21084
21085 <h3><a name="F.7" href="#F.7">F.7 Floating-point environment</a></h3>
21086 <p><!--para 1 -->
21087  The floating-point environment defined in <a href="#7.6">&lt;fenv.h&gt;</a> includes the IEC 60559 floating-
21088  point exception status flags and directed-rounding control modes. It includes also
21089  IEC 60559 dynamic rounding precision and trap enablement modes, if the
21090  implementation supports them.<sup><a href="#note312"><b>312)</b></a></sup>
21091
21092 <h6>footnotes</h6>
21093 <p><small><a name="note312" href="#note312">312)</a> This specification does not require dynamic rounding precision nor trap enablement modes.
21094 </small>
21095
21096 <h4><a name="F.7.1" href="#F.7.1">F.7.1 Environment management</a></h4>
21097 <p><!--para 1 -->
21098  IEC 60559 requires that floating-point operations implicitly raise floating-point exception
21099  status flags, and that rounding control modes can be set explicitly to affect result values of
21100  floating-point operations. When the state for the FENV_ACCESS pragma (defined in
21101  <a href="#7.6">&lt;fenv.h&gt;</a>) is ''on'', these changes to the floating-point state are treated as side effects
21102  which respect sequence points.<sup><a href="#note313"><b>313)</b></a></sup>
21103
21104 <h6>footnotes</h6>
21105 <p><small><a name="note313" href="#note313">313)</a> If the state for the FENV_ACCESS pragma is ''off'', the implementation is free to assume the floating-
21106  point control modes will be the default ones and the floating-point status flags will not be tested,
21107  which allows certain optimizations (see <a href="#F.8">F.8</a>).
21108 </small>
21109
21110 <h4><a name="F.7.2" href="#F.7.2">F.7.2 Translation</a></h4>
21111 <p><!--para 1 -->
21112  During translation the IEC 60559 default modes are in effect:
21113 <ul>
21114 <li>  The rounding direction mode is rounding to nearest.
21115 <li>  The rounding precision mode (if supported) is set so that results are not shortened.
21116 <li>  Trapping or stopping (if supported) is disabled on all floating-point exceptions.
21117 </ul>
21118 <h6> Recommended practice</h6>
21119 <p><!--para 2 -->
21120  The implementation should produce a diagnostic message for each translation-time
21121  
21122  
21123  
21124  
21125 <!--page 461 -->
21126  floating-point exception, other than ''inexact'';<sup><a href="#note314"><b>314)</b></a></sup> the implementation should then
21127  proceed with the translation of the program.
21128
21129 <h6>footnotes</h6>
21130 <p><small><a name="note314" href="#note314">314)</a> As floating constants are converted to appropriate internal representations at translation time, their
21131  conversion is subject to default rounding modes and raises no execution-time floating-point exceptions
21132  (even where the state of the FENV_ACCESS pragma is ''on''). Library functions, for example
21133  strtod, provide execution-time conversion of numeric strings.
21134 </small>
21135
21136 <h4><a name="F.7.3" href="#F.7.3">F.7.3 Execution</a></h4>
21137 <p><!--para 1 -->
21138  At program startup the floating-point environment is initialized as prescribed by
21139  IEC 60559:
21140 <ul>
21141 <li>  All floating-point exception status flags are cleared.
21142 <li>  The rounding direction mode is rounding to nearest.
21143 <li>  The dynamic rounding precision mode (if supported) is set so that results are not
21144  shortened.
21145 <li>  Trapping or stopping (if supported) is disabled on all floating-point exceptions.
21146 </ul>
21147
21148 <h4><a name="F.7.4" href="#F.7.4">F.7.4 Constant expressions</a></h4>
21149 <p><!--para 1 -->
21150  An arithmetic constant expression of floating type, other than one in an initializer for an
21151  object that has static storage duration, is evaluated (as if) during execution; thus, it is
21152  affected by any operative floating-point control modes and raises floating-point
21153  exceptions as required by IEC 60559 (provided the state for the FENV_ACCESS pragma
21154  is ''on'').<sup><a href="#note315"><b>315)</b></a></sup>
21155 <p><!--para 2 -->
21156  EXAMPLE
21157 <p><!--para 3 -->
21158 <pre>
21159           #include <a href="#7.6">&lt;fenv.h&gt;</a>
21160           #pragma STDC FENV_ACCESS ON
21161           void f(void)
21162           {
21163                 float w[] = { 0.0/0.0 };                  //   raises an exception
21164                 static float x = 0.0/0.0;                 //   does not raise an exception
21165                 float y = 0.0/0.0;                        //   raises an exception
21166                 double z = 0.0/0.0;                       //   raises an exception
21167                 /* ... */
21168           }</pre>
21169  For the static initialization, the division is done at translation time, raising no (execution-time) floating-
21170  point exceptions. On the other hand, for the three automatic initializations the invalid division occurs at
21171  
21172  
21173 <!--page 462 -->
21174  execution time.
21175  
21176
21177 <h6>footnotes</h6>
21178 <p><small><a name="note315" href="#note315">315)</a> Where the state for the FENV_ACCESS pragma is ''on'', results of inexact expressions like 1.0/3.0
21179  are affected by rounding modes set at execution time, and expressions such as 0.0/0.0 and
21180  1.0/0.0 generate execution-time floating-point exceptions. The programmer can achieve the
21181  efficiency of translation-time evaluation through static initialization, such as
21182
21183 <pre>
21184           const static double one_third = 1.0/3.0;</pre>
21185 </small>
21186
21187 <h4><a name="F.7.5" href="#F.7.5">F.7.5 Initialization</a></h4>
21188 <p><!--para 1 -->
21189  All computation for automatic initialization is done (as if) at execution time; thus, it is
21190  affected by any operative modes and raises floating-point exceptions as required by
21191  IEC 60559 (provided the state for the FENV_ACCESS pragma is ''on''). All computation
21192  for initialization of objects that have static storage duration is done (as if) at translation
21193  time.
21194 <p><!--para 2 -->
21195  EXAMPLE
21196 <p><!--para 3 -->
21197 <pre>
21198           #include <a href="#7.6">&lt;fenv.h&gt;</a>
21199           #pragma STDC FENV_ACCESS ON
21200           void f(void)
21201           {
21202                 float u[] = { 1.1e75 };                  //   raises exceptions
21203                 static float v = 1.1e75;                 //   does not raise exceptions
21204                 float w = 1.1e75;                        //   raises exceptions
21205                 double x = 1.1e75;                       //   may raise exceptions
21206                 float y = 1.1e75f;                       //   may raise exceptions
21207                 long double z = 1.1e75;                  //   does not raise exceptions
21208                 /* ... */
21209           }</pre>
21210  The static initialization of v raises no (execution-time) floating-point exceptions because its computation is
21211  done at translation time. The automatic initialization of u and w require an execution-time conversion to
21212  float of the wider value 1.1e75, which raises floating-point exceptions. The automatic initializations
21213  of x and y entail execution-time conversion; however, in some expression evaluation methods, the
21214  conversions is not to a narrower format, in which case no floating-point exception is raised.<sup><a href="#note316"><b>316)</b></a></sup> The
21215  automatic initialization of z entails execution-time conversion, but not to a narrower format, so no floating-
21216  point exception is raised. Note that the conversions of the floating constants 1.1e75 and 1.1e75f to
21217  their internal representations occur at translation time in all cases.
21218  
21219  
21220  
21221  
21222 <!--page 463 -->
21223
21224 <h6>footnotes</h6>
21225 <p><small><a name="note316" href="#note316">316)</a> Use of float_t and double_t variables increases the likelihood of translation-time computation.
21226  For example, the automatic initialization
21227
21228 <pre>
21229            double_t x = 1.1e75;</pre>
21230   could be done at translation time, regardless of the expression evaluation method.
21231 </small>
21232
21233 <h4><a name="F.7.6" href="#F.7.6">F.7.6 Changing the environment</a></h4>
21234 <p><!--para 1 -->
21235  Operations defined in <a href="#6.5">6.5</a> and functions and macros defined for the standard libraries
21236  change floating-point status flags and control modes just as indicated by their
21237  specifications (including conformance to IEC 60559). They do not change flags or modes
21238  (so as to be detectable by the user) in any other cases.
21239 <p><!--para 2 -->
21240  If the argument to the feraiseexcept function in <a href="#7.6">&lt;fenv.h&gt;</a> represents IEC 60559
21241  valid coincident floating-point exceptions for atomic operations (namely ''overflow'' and
21242  ''inexact'', or ''underflow'' and ''inexact''), then ''overflow'' or ''underflow'' is raised
21243  before ''inexact''.
21244
21245 <h3><a name="F.8" href="#F.8">F.8 Optimization</a></h3>
21246 <p><!--para 1 -->
21247  This section identifies code transformations that might subvert IEC 60559-specified
21248  behavior, and others that do not.
21249
21250 <h4><a name="F.8.1" href="#F.8.1">F.8.1 Global transformations</a></h4>
21251 <p><!--para 1 -->
21252  Floating-point arithmetic operations and external function calls may entail side effects
21253  which optimization shall honor, at least where the state of the FENV_ACCESS pragma is
21254  ''on''. The flags and modes in the floating-point environment may be regarded as global
21255  variables; floating-point operations (+, *, etc.) implicitly read the modes and write the
21256  flags.
21257 <p><!--para 2 -->
21258  Concern about side effects may inhibit code motion and removal of seemingly useless
21259  code. For example, in
21260 <pre>
21261           #include <a href="#7.6">&lt;fenv.h&gt;</a>
21262           #pragma STDC FENV_ACCESS ON
21263           void f(double x)
21264           {
21265                /* ... */
21266                for (i = 0; i &lt; n; i++) x + 1;
21267                /* ... */
21268           }</pre>
21269  x + 1 might raise floating-point exceptions, so cannot be removed. And since the loop
21270  body might not execute (maybe 0 &gt;= n), x + 1 cannot be moved out of the loop. (Of
21271  course these optimizations are valid if the implementation can rule out the nettlesome
21272  cases.)
21273 <p><!--para 3 -->
21274  This specification does not require support for trap handlers that maintain information
21275  about the order or count of floating-point exceptions. Therefore, between function calls,
21276  floating-point exceptions need not be precise: the actual order and number of occurrences
21277  of floating-point exceptions (&gt; 1) may vary from what the source code expresses. Thus,
21278  the preceding loop could be treated as
21279 <!--page 464 -->
21280 <pre>
21281          if (0 &lt; n) x + 1;</pre>
21282
21283 <h4><a name="F.8.2" href="#F.8.2">F.8.2 Expression transformations</a></h4>
21284 <p><!--para 1 -->
21285  x / 2 &lt;-&gt; x * 0.5                         Although similar transformations involving inexact
21286 <pre>
21287                                          constants generally do not yield numerically equivalent
21288                                          expressions, if the constants are exact then such
21289                                          transformations can be made on IEC 60559 machines
21290                                          and others that round perfectly.</pre>
21291  1 * x and x / 1 -&gt; x                     The expressions 1 * x, x / 1, and x are equivalent
21292 <pre>
21293                                          (on IEC 60559 machines, among others).<sup><a href="#note317"><b>317)</b></a></sup></pre>
21294  x / x -&gt; 1.0                             The expressions x / x and 1.0 are not equivalent if x
21295 <pre>
21296                                          can be zero, infinite, or NaN.</pre>
21297  x - y &lt;-&gt; x + (-y)                        The expressions x - y, x + (-y), and (-y) + x
21298 <pre>
21299                                          are equivalent (on IEC 60559 machines, among others).</pre>
21300  x - y &lt;-&gt; -(y - x)                        The expressions x - y and -(y - x) are not
21301 <pre>
21302                                          equivalent because 1 - 1 is +0 but -(1 - 1) is -0 (in the
21303                                          default rounding direction).<sup><a href="#note318"><b>318)</b></a></sup></pre>
21304  x - x -&gt; 0.0                             The expressions x - x and 0.0 are not equivalent if
21305 <pre>
21306                                          x is a NaN or infinite.</pre>
21307  0 * x -&gt; 0.0                             The expressions 0 * x and 0.0 are not equivalent if
21308 <pre>
21309                                          x is a NaN, infinite, or -0.</pre>
21310  x + 0-&gt;x                                 The expressions x + 0 and x are not equivalent if x is
21311 <pre>
21312                                          -0, because (-0) + (+0) yields +0 (in the default
21313                                          rounding direction), not -0.</pre>
21314  x - 0-&gt;x                                 (+0) - (+0) yields -0 when rounding is downward
21315 <pre>
21316                                          (toward -(inf)), but +0 otherwise, and (-0) - (+0) always
21317                                          yields -0; so, if the state of the FENV_ACCESS pragma
21318                                          is ''off'', promising default rounding, then the
21319                                          implementation can replace x - 0 by x, even if x</pre>
21320  
21321  
21322 <!--page 465 -->
21323 <pre>
21324                                           might be zero.</pre>
21325  -x &lt;-&gt; 0 - x                               The expressions -x and 0 - x are not equivalent if x
21326 <pre>
21327                                           is +0, because -(+0) yields -0, but 0 - (+0) yields +0
21328                                           (unless rounding is downward).</pre>
21329
21330 <h6>footnotes</h6>
21331 <p><small><a name="note317" href="#note317">317)</a> Strict support for signaling NaNs -- not required by this specification -- would invalidate these and
21332  other transformations that remove arithmetic operators.
21333 </small>
21334 <p><small><a name="note318" href="#note318">318)</a> IEC 60559 prescribes a signed zero to preserve mathematical identities across certain discontinuities.
21335  Examples include:
21336
21337 <pre>
21338     1/(1/ (+-) (inf)) is (+-) (inf)</pre>
21339  and
21340
21341 <pre>
21342     conj(csqrt(z)) is csqrt(conj(z)),</pre>
21343  for complex z.
21344 </small>
21345
21346 <h4><a name="F.8.3" href="#F.8.3">F.8.3 Relational operators</a></h4>
21347 <p><!--para 1 -->
21348  x != x -&gt; false                           The statement x != x is true if x is a NaN.
21349  x == x -&gt; true                            The statement x == x is false if x is a NaN.
21350  x &lt; y -&gt; isless(x,y)                      (and similarly for &lt;=, &gt;, &gt;=) Though numerically
21351 <pre>
21352                                           equal, these expressions are not equivalent because of
21353                                           side effects when x or y is a NaN and the state of the
21354                                           FENV_ACCESS pragma is ''on''. This transformation,
21355                                           which would be desirable if extra code were required to
21356                                           cause the ''invalid'' floating-point exception for
21357                                           unordered cases, could be performed provided the state
21358                                           of the FENV_ACCESS pragma is ''off''.</pre>
21359  The sense of relational operators shall be maintained. This includes handling unordered
21360  cases as expressed by the source code.
21361 <p><!--para 2 -->
21362  EXAMPLE
21363 <pre>
21364           // calls g and raises ''invalid'' if a and b are unordered
21365           if (a &lt; b)
21366                   f();
21367           else
21368                   g();</pre>
21369  is not equivalent to
21370 <pre>
21371           // calls f and raises ''invalid'' if a and b are unordered
21372           if (a &gt;= b)
21373                   g();
21374           else
21375                   f();</pre>
21376  nor to
21377 <pre>
21378           // calls f without raising ''invalid'' if a and b are unordered
21379           if (isgreaterequal(a,b))
21380                   g();
21381           else
21382                   f();</pre>
21383  nor, unless the state of the FENV_ACCESS pragma is ''off'', to
21384 <!--page 466 -->
21385 <pre>
21386           // calls g without raising ''invalid'' if a and b are unordered
21387           if (isless(a,b))
21388                   f();
21389           else
21390                   g();</pre>
21391  but is equivalent to
21392 <pre>
21393           if (!(a &lt; b))
21394                 g();
21395           else
21396                 f();</pre>
21397  
21398
21399 <h4><a name="F.8.4" href="#F.8.4">F.8.4 Constant arithmetic</a></h4>
21400 <p><!--para 1 -->
21401  The implementation shall honor floating-point exceptions raised by execution-time
21402  constant arithmetic wherever the state of the FENV_ACCESS pragma is ''on''. (See <a href="#F.7.4">F.7.4</a>
21403  and <a href="#F.7.5">F.7.5</a>.) An operation on constants that raises no floating-point exception can be
21404  folded during translation, except, if the state of the FENV_ACCESS pragma is ''on'', a
21405  further check is required to assure that changing the rounding direction to downward does
21406  not alter the sign of the result,<sup><a href="#note319"><b>319)</b></a></sup> and implementations that support dynamic rounding
21407  precision modes shall assure further that the result of the operation raises no floating-
21408  point exception when converted to the semantic type of the operation.
21409
21410 <h6>footnotes</h6>
21411 <p><small><a name="note319" href="#note319">319)</a> 0 - 0 yields -0 instead of +0 just when the rounding direction is downward.
21412 </small>
21413
21414 <h3><a name="F.9" href="#F.9">F.9 Mathematics <math.h></a></h3>
21415 <p><!--para 1 -->
21416  This subclause contains specifications of <a href="#7.12">&lt;math.h&gt;</a> facilities that are particularly suited
21417  for IEC 60559 implementations.
21418 <p><!--para 2 -->
21419  The Standard C macro HUGE_VAL and its float and long double analogs,
21420  HUGE_VALF and HUGE_VALL, expand to expressions whose values are positive
21421  infinities.
21422 <p><!--para 3 -->
21423  Special cases for functions in <a href="#7.12">&lt;math.h&gt;</a> are covered directly or indirectly by
21424  IEC 60559. The functions that IEC 60559 specifies directly are identified in <a href="#F.3">F.3</a>. The
21425  other functions in <a href="#7.12">&lt;math.h&gt;</a> treat infinities, NaNs, signed zeros, subnormals, and
21426  (provided the state of the FENV_ACCESS pragma is ''on'') the floating-point status flags
21427  in a manner consistent with the basic arithmetic operations covered by IEC 60559.
21428 <p><!--para 4 -->
21429  The expression math_errhandling &amp; MATH_ERREXCEPT shall evaluate to a
21430  nonzero value.
21431 <p><!--para 5 -->
21432  The ''invalid'' and ''divide-by-zero'' floating-point exceptions are raised as specified in
21433  subsequent subclauses of this annex.
21434 <p><!--para 6 -->
21435  The ''overflow'' floating-point exception is raised whenever an infinity -- or, because of
21436  rounding direction, a maximal-magnitude finite number -- is returned in lieu of a value
21437  
21438  
21439 <!--page 467 -->
21440  whose magnitude is too large.
21441 <p><!--para 7 -->
21442  The ''underflow'' floating-point exception is raised whenever a result is tiny (essentially
21443  subnormal or zero) and suffers loss of accuracy.<sup><a href="#note320"><b>320)</b></a></sup>
21444 <p><!--para 8 -->
21445  Whether or when library functions raise the ''inexact'' floating-point exception is
21446  unspecified, unless explicitly specified otherwise.
21447 <p><!--para 9 -->
21448  Whether or when library functions raise an undeserved ''underflow'' floating-point
21449  exception is unspecified.<sup><a href="#note321"><b>321)</b></a></sup> Otherwise, as implied by <a href="#F.7.6">F.7.6</a>, the <a href="#7.12">&lt;math.h&gt;</a> functions do
21450  not raise spurious floating-point exceptions (detectable by the user), other than the
21451  ''inexact'' floating-point exception.
21452 <p><!--para 10 -->
21453  Whether the functions honor the rounding direction mode is implementation-defined,
21454  unless explicitly specified otherwise.
21455 <p><!--para 11 -->
21456  Functions with a NaN argument return a NaN result and raise no floating-point exception,
21457  except where stated otherwise.
21458 <p><!--para 12 -->
21459  The specifications in the following subclauses append to the definitions in <a href="#7.12">&lt;math.h&gt;</a>.
21460  For families of functions, the specifications apply to all of the functions even though only
21461  the principal function is shown. Unless otherwise specified, where the symbol ''(+-)''
21462  occurs in both an argument and the result, the result has the same sign as the argument.
21463 <h6> Recommended practice</h6>
21464 <p><!--para 13 -->
21465  If a function with one or more NaN arguments returns a NaN result, the result should be
21466  the same as one of the NaN arguments (after possible type conversion), except perhaps
21467  for the sign.
21468
21469 <h6>footnotes</h6>
21470 <p><small><a name="note320" href="#note320">320)</a> IEC 60559 allows different definitions of underflow. They all result in the same values, but differ on
21471  when the floating-point exception is raised.
21472 </small>
21473 <p><small><a name="note321" href="#note321">321)</a> It is intended that undeserved ''underflow'' and ''inexact'' floating-point exceptions are raised only if
21474  avoiding them would be too costly.
21475 </small>
21476
21477 <h4><a name="F.9.1" href="#F.9.1">F.9.1 Trigonometric functions</a></h4>
21478
21479 <h5><a name="F.9.1.1" href="#F.9.1.1">F.9.1.1 The acos functions</a></h5>
21480 <p><!--para 1 -->
21481 <ul>
21482 <li>  acos(1) returns +0.
21483 <li>  acos(x) returns a NaN and raises the ''invalid'' floating-point exception for
21484  | x | &gt; 1.
21485  
21486  
21487  
21488  
21489 <!--page 468 -->
21490 </ul>
21491
21492 <h5><a name="F.9.1.2" href="#F.9.1.2">F.9.1.2 The asin functions</a></h5>
21493 <p><!--para 1 -->
21494 <ul>
21495 <li>  asin((+-)0) returns (+-)0.
21496 <li>  asin(x) returns a NaN and raises the ''invalid'' floating-point exception for
21497  | x | &gt; 1.
21498 </ul>
21499
21500 <h5><a name="F.9.1.3" href="#F.9.1.3">F.9.1.3 The atan functions</a></h5>
21501 <p><!--para 1 -->
21502 <ul>
21503 <li>  atan((+-)0) returns (+-)0.
21504 <li>  atan((+-)(inf)) returns (+-)pi /2.
21505 </ul>
21506
21507 <h5><a name="F.9.1.4" href="#F.9.1.4">F.9.1.4 The atan2 functions</a></h5>
21508 <p><!--para 1 -->
21509 <ul>
21510 <li>  atan2((+-)0, -0) returns (+-)pi .<sup><a href="#note322"><b>322)</b></a></sup>
21511 <li>  atan2((+-)0, +0) returns (+-)0.
21512 <li>  atan2((+-)0, x) returns (+-)pi for x &lt; 0.
21513 <li>  atan2((+-)0, x) returns (+-)0 for x &gt; 0.
21514 <li>  atan2(y, (+-)0) returns -pi /2 for y &lt; 0.
21515 <li>  atan2(y, (+-)0) returns pi /2 for y &gt; 0.
21516 <li>  atan2((+-)y, -(inf)) returns (+-)pi for finite y &gt; 0.
21517 <li>  atan2((+-)y, +(inf)) returns (+-)0 for finite y &gt; 0.
21518 <li>  atan2((+-)(inf), x) returns (+-)pi /2 for finite x.
21519 <li>  atan2((+-)(inf), -(inf)) returns (+-)3pi /4.
21520 <li>  atan2((+-)(inf), +(inf)) returns (+-)pi /4.
21521 </ul>
21522
21523 <h6>footnotes</h6>
21524 <p><small><a name="note322" href="#note322">322)</a> atan2(0, 0) does not raise the ''invalid'' floating-point exception, nor does atan2( y ,    0) raise
21525  the ''divide-by-zero'' floating-point exception.
21526 </small>
21527
21528 <h5><a name="F.9.1.5" href="#F.9.1.5">F.9.1.5 The cos functions</a></h5>
21529 <p><!--para 1 -->
21530 <ul>
21531 <li>  cos((+-)0) returns 1.
21532 <li>  cos((+-)(inf)) returns a NaN and raises the ''invalid'' floating-point exception.
21533 </ul>
21534
21535 <h5><a name="F.9.1.6" href="#F.9.1.6">F.9.1.6 The sin functions</a></h5>
21536 <p><!--para 1 -->
21537 <ul>
21538 <li>  sin((+-)0) returns (+-)0.
21539 <li>  sin((+-)(inf)) returns a NaN and raises the ''invalid'' floating-point exception.
21540  
21541  
21542  
21543  
21544 <!--page 469 -->
21545 </ul>
21546
21547 <h5><a name="F.9.1.7" href="#F.9.1.7">F.9.1.7 The tan functions</a></h5>
21548 <p><!--para 1 -->
21549 <ul>
21550 <li>  tan((+-)0) returns (+-)0.
21551 <li>  tan((+-)(inf)) returns a NaN and raises the ''invalid'' floating-point exception.
21552 </ul>
21553
21554 <h4><a name="F.9.2" href="#F.9.2">F.9.2 Hyperbolic functions</a></h4>
21555
21556 <h5><a name="F.9.2.1" href="#F.9.2.1">F.9.2.1 The acosh functions</a></h5>
21557 <p><!--para 1 -->
21558 <ul>
21559 <li>  acosh(1) returns +0.
21560 <li>  acosh(x) returns a NaN and raises the ''invalid'' floating-point exception for x &lt; 1.
21561 <li>  acosh(+(inf)) returns +(inf).
21562 </ul>
21563
21564 <h5><a name="F.9.2.2" href="#F.9.2.2">F.9.2.2 The asinh functions</a></h5>
21565 <p><!--para 1 -->
21566 <ul>
21567 <li>  asinh((+-)0) returns (+-)0.
21568 <li>  asinh((+-)(inf)) returns (+-)(inf).
21569 </ul>
21570
21571 <h5><a name="F.9.2.3" href="#F.9.2.3">F.9.2.3 The atanh functions</a></h5>
21572 <p><!--para 1 -->
21573 <ul>
21574 <li>  atanh((+-)0) returns (+-)0.
21575 <li>  atanh((+-)1) returns (+-)(inf) and raises the ''divide-by-zero'' floating-point exception.
21576 <li>  atanh(x) returns a NaN and raises the ''invalid'' floating-point exception for
21577  | x | &gt; 1.
21578 </ul>
21579
21580 <h5><a name="F.9.2.4" href="#F.9.2.4">F.9.2.4 The cosh functions</a></h5>
21581 <p><!--para 1 -->
21582 <ul>
21583 <li>  cosh((+-)0) returns 1.
21584 <li>  cosh((+-)(inf)) returns +(inf).
21585 </ul>
21586
21587 <h5><a name="F.9.2.5" href="#F.9.2.5">F.9.2.5 The sinh functions</a></h5>
21588 <p><!--para 1 -->
21589 <ul>
21590 <li>  sinh((+-)0) returns (+-)0.
21591 <li>  sinh((+-)(inf)) returns (+-)(inf).
21592 </ul>
21593
21594 <h5><a name="F.9.2.6" href="#F.9.2.6">F.9.2.6 The tanh functions</a></h5>
21595 <p><!--para 1 -->
21596 <ul>
21597 <li>  tanh((+-)0) returns (+-)0.
21598 <li>  tanh((+-)(inf)) returns (+-)1.
21599 <!--page 470 -->
21600 </ul>
21601
21602 <h4><a name="F.9.3" href="#F.9.3">F.9.3 Exponential and logarithmic functions</a></h4>
21603
21604 <h5><a name="F.9.3.1" href="#F.9.3.1">F.9.3.1 The exp functions</a></h5>
21605 <p><!--para 1 -->
21606 <ul>
21607 <li>  exp((+-)0) returns 1.
21608 <li>  exp(-(inf)) returns +0.
21609 <li>  exp(+(inf)) returns +(inf).
21610 </ul>
21611
21612 <h5><a name="F.9.3.2" href="#F.9.3.2">F.9.3.2 The exp2 functions</a></h5>
21613 <p><!--para 1 -->
21614 <ul>
21615 <li>  exp2((+-)0) returns 1.
21616 <li>  exp2(-(inf)) returns +0.
21617 <li>  exp2(+(inf)) returns +(inf).
21618 </ul>
21619
21620 <h5><a name="F.9.3.3" href="#F.9.3.3">F.9.3.3 The expm1 functions</a></h5>
21621 <p><!--para 1 -->
21622 <ul>
21623 <li>  expm1((+-)0) returns (+-)0.
21624 <li>  expm1(-(inf)) returns -1.
21625 <li>  expm1(+(inf)) returns +(inf).
21626 </ul>
21627
21628 <h5><a name="F.9.3.4" href="#F.9.3.4">F.9.3.4 The frexp functions</a></h5>
21629 <p><!--para 1 -->
21630 <ul>
21631 <li>  frexp((+-)0, exp) returns (+-)0, and stores 0 in the object pointed to by exp.
21632 <li>  frexp((+-)(inf), exp) returns (+-)(inf), and stores an unspecified value in the object
21633  pointed to by exp.
21634 <li>  frexp(NaN, exp) stores an unspecified value in the object pointed to by exp
21635  (and returns a NaN).
21636 </ul>
21637 <p><!--para 2 -->
21638  frexp raises no floating-point exceptions.
21639 <p><!--para 3 -->
21640  On a binary system, the body of the frexp function might be
21641 <pre>
21642         {
21643                *exp = (value == 0) ? 0 : (int)(1 + logb(value));
21644                return scalbn(value, -(*exp));
21645         }</pre>
21646
21647 <h5><a name="F.9.3.5" href="#F.9.3.5">F.9.3.5 The ilogb functions</a></h5>
21648 <p><!--para 1 -->
21649  If the correct result is outside the range of the return type, the numeric result is
21650  unspecified and the ''invalid'' floating-point exception is raised.
21651 <!--page 471 -->
21652
21653 <h5><a name="F.9.3.6" href="#F.9.3.6">F.9.3.6 The ldexp functions</a></h5>
21654 <p><!--para 1 -->
21655  On a binary system, ldexp(x, exp) is equivalent to scalbn(x, exp).
21656
21657 <h5><a name="F.9.3.7" href="#F.9.3.7">F.9.3.7 The log functions</a></h5>
21658 <p><!--para 1 -->
21659 <ul>
21660 <li>  log((+-)0) returns -(inf) and raises the ''divide-by-zero'' floating-point exception.
21661 <li>  log(1) returns +0.
21662 <li>  log(x) returns a NaN and raises the ''invalid'' floating-point exception for x &lt; 0.
21663 <li>  log(+(inf)) returns +(inf).
21664 </ul>
21665
21666 <h5><a name="F.9.3.8" href="#F.9.3.8">F.9.3.8 The log10 functions</a></h5>
21667 <p><!--para 1 -->
21668 <ul>
21669 <li>  log10((+-)0) returns -(inf) and raises the ''divide-by-zero'' floating-point exception.
21670 <li>  log10(1) returns +0.
21671 <li>  log10(x) returns a NaN and raises the ''invalid'' floating-point exception for x &lt; 0.
21672 <li>  log10(+(inf)) returns +(inf).
21673 </ul>
21674
21675 <h5><a name="F.9.3.9" href="#F.9.3.9">F.9.3.9 The log1p functions</a></h5>
21676 <p><!--para 1 -->
21677 <ul>
21678 <li>  log1p((+-)0) returns (+-)0.
21679 <li>  log1p(-1) returns -(inf) and raises the ''divide-by-zero'' floating-point exception.
21680 <li>  log1p(x) returns a NaN and raises the ''invalid'' floating-point exception for
21681  x &lt; -1.
21682 <li>  log1p(+(inf)) returns +(inf).
21683 </ul>
21684
21685 <h5><a name="F.9.3.10" href="#F.9.3.10">F.9.3.10 The log2 functions</a></h5>
21686 <p><!--para 1 -->
21687 <ul>
21688 <li>  log2((+-)0) returns -(inf) and raises the ''divide-by-zero'' floating-point exception.
21689 <li>  log2(1) returns +0.
21690 <li>  log2(x) returns a NaN and raises the ''invalid'' floating-point exception for x &lt; 0.
21691 <li>  log2(+(inf)) returns +(inf).
21692 </ul>
21693
21694 <h5><a name="F.9.3.11" href="#F.9.3.11">F.9.3.11 The logb functions</a></h5>
21695 <p><!--para 1 -->
21696 <ul>
21697 <li>  logb((+-)0) returns -(inf) and raises the ''divide-by-zero'' floating-point exception.
21698 <li>  logb((+-)(inf)) returns +(inf).
21699 <!--page 472 -->
21700 </ul>
21701
21702 <h5><a name="F.9.3.12" href="#F.9.3.12">F.9.3.12 The modf functions</a></h5>
21703 <p><!--para 1 -->
21704 <ul>
21705 <li>  modf((+-)x, iptr) returns a result with the same sign as x.
21706 <li>  modf((+-)(inf), iptr) returns (+-)0 and stores (+-)(inf) in the object pointed to by iptr.
21707 <li>  modf(NaN, iptr) stores a NaN in the object pointed to by iptr (and returns a
21708  NaN).
21709 </ul>
21710 <p><!--para 2 -->
21711  modf behaves as though implemented by
21712 <pre>
21713        #include <a href="#7.12">&lt;math.h&gt;</a>
21714        #include <a href="#7.6">&lt;fenv.h&gt;</a>
21715        #pragma STDC FENV_ACCESS ON
21716        double modf(double value, double *iptr)
21717        {
21718             int save_round = fegetround();
21719             fesetround(FE_TOWARDZERO);
21720             *iptr = nearbyint(value);
21721             fesetround(save_round);
21722             return copysign(
21723                  isinf(value) ? 0.0 :
21724                       value - (*iptr), value);
21725        }</pre>
21726
21727 <h5><a name="F.9.3.13" href="#F.9.3.13">F.9.3.13 The scalbn and scalbln functions</a></h5>
21728 <p><!--para 1 -->
21729 <ul>
21730 <li>  scalbn((+-)0, n) returns (+-)0.
21731 <li>  scalbn(x, 0) returns x.
21732 <li>  scalbn((+-)(inf), n) returns (+-)(inf).
21733 </ul>
21734
21735 <h4><a name="F.9.4" href="#F.9.4">F.9.4 Power and absolute value functions</a></h4>
21736
21737 <h5><a name="F.9.4.1" href="#F.9.4.1">F.9.4.1 The cbrt functions</a></h5>
21738 <p><!--para 1 -->
21739 <ul>
21740 <li>  cbrt((+-)0) returns (+-)0.
21741 <li>  cbrt((+-)(inf)) returns (+-)(inf).
21742 </ul>
21743
21744 <h5><a name="F.9.4.2" href="#F.9.4.2">F.9.4.2 The fabs functions</a></h5>
21745 <p><!--para 1 -->
21746 <ul>
21747 <li>  fabs((+-)0) returns +0.
21748 <li>  fabs((+-)(inf)) returns +(inf).
21749 <!--page 473 -->
21750 </ul>
21751
21752 <h5><a name="F.9.4.3" href="#F.9.4.3">F.9.4.3 The hypot functions</a></h5>
21753 <p><!--para 1 -->
21754 <ul>
21755 <li>  hypot(x, y), hypot(y, x), and hypot(x, -y) are equivalent.
21756 <li>  hypot(x, (+-)0) is equivalent to fabs(x).
21757 <li>  hypot((+-)(inf), y) returns +(inf), even if y is a NaN.
21758 </ul>
21759
21760 <h5><a name="F.9.4.4" href="#F.9.4.4">F.9.4.4 The pow functions</a></h5>
21761 <p><!--para 1 -->
21762 <ul>
21763 <li>  pow((+-)0, y) returns (+-)(inf) and raises the ''divide-by-zero'' floating-point exception
21764  for y an odd integer &lt; 0.
21765 <li>  pow((+-)0, y) returns +(inf) and raises the ''divide-by-zero'' floating-point exception
21766  for y &lt; 0 and not an odd integer.
21767 <li>  pow((+-)0, y) returns (+-)0 for y an odd integer &gt; 0.
21768 <li>  pow((+-)0, y) returns +0 for y &gt; 0 and not an odd integer.
21769 <li>  pow(-1, (+-)(inf)) returns 1.
21770 <li>  pow(+1, y) returns 1 for any y, even a NaN.
21771 <li>  pow(x, (+-)0) returns 1 for any x, even a NaN.
21772 <li>  pow(x, y) returns a NaN and raises the ''invalid'' floating-point exception for
21773  finite x &lt; 0 and finite non-integer y.
21774 <li>  pow(x, -(inf)) returns +(inf) for | x | &lt; 1.
21775 <li>  pow(x, -(inf)) returns +0 for | x | &gt; 1.
21776 <li>  pow(x, +(inf)) returns +0 for | x | &lt; 1.
21777 <li>  pow(x, +(inf)) returns +(inf) for | x | &gt; 1.
21778 <li>  pow(-(inf), y) returns -0 for y an odd integer &lt; 0.
21779 <li>  pow(-(inf), y) returns +0 for y &lt; 0 and not an odd integer.
21780 <li>  pow(-(inf), y) returns -(inf) for y an odd integer &gt; 0.
21781 <li>  pow(-(inf), y) returns +(inf) for y &gt; 0 and not an odd integer.
21782 <li>  pow(+(inf), y) returns +0 for y &lt; 0.
21783 <li>  pow(+(inf), y) returns +(inf) for y &gt; 0.
21784 <!--page 474 -->
21785 </ul>
21786
21787 <h5><a name="F.9.4.5" href="#F.9.4.5">F.9.4.5 The sqrt functions</a></h5>
21788 <p><!--para 1 -->
21789  sqrt is fully specified as a basic arithmetic operation in IEC 60559.
21790
21791 <h4><a name="F.9.5" href="#F.9.5">F.9.5 Error and gamma functions</a></h4>
21792
21793 <h5><a name="F.9.5.1" href="#F.9.5.1">F.9.5.1 The erf functions</a></h5>
21794 <p><!--para 1 -->
21795 <ul>
21796 <li>  erf((+-)0) returns (+-)0.
21797 <li>  erf((+-)(inf)) returns (+-)1.
21798 </ul>
21799
21800 <h5><a name="F.9.5.2" href="#F.9.5.2">F.9.5.2 The erfc functions</a></h5>
21801 <p><!--para 1 -->
21802 <ul>
21803 <li>  erfc(-(inf)) returns 2.
21804 <li>  erfc(+(inf)) returns +0.
21805 </ul>
21806
21807 <h5><a name="F.9.5.3" href="#F.9.5.3">F.9.5.3 The lgamma functions</a></h5>
21808 <p><!--para 1 -->
21809 <ul>
21810 <li>  lgamma(1) returns +0.
21811 <li>  lgamma(2) returns +0.
21812 <li>  lgamma(x) returns +(inf) and raises the ''divide-by-zero'' floating-point exception for
21813  x a negative integer or zero.
21814 <li>  lgamma(-(inf)) returns +(inf).
21815 <li>  lgamma(+(inf)) returns +(inf).
21816 </ul>
21817
21818 <h5><a name="F.9.5.4" href="#F.9.5.4">F.9.5.4 The tgamma functions</a></h5>
21819 <p><!--para 1 -->
21820 <ul>
21821 <li>  tgamma((+-)0) returns (+-)(inf) and raises the ''divide-by-zero'' floating-point exception.
21822 <li>  tgamma(x) returns a NaN and raises the ''invalid'' floating-point exception for x a
21823  negative integer.
21824 <li>  tgamma(-(inf)) returns a NaN and raises the ''invalid'' floating-point exception.
21825 <li>  tgamma(+(inf)) returns +(inf).
21826 </ul>
21827
21828 <h4><a name="F.9.6" href="#F.9.6">F.9.6 Nearest integer functions</a></h4>
21829
21830 <h5><a name="F.9.6.1" href="#F.9.6.1">F.9.6.1 The ceil functions</a></h5>
21831 <p><!--para 1 -->
21832 <ul>
21833 <li>  ceil((+-)0) returns (+-)0.
21834 <li>  ceil((+-)(inf)) returns (+-)(inf).
21835 </ul>
21836 <p><!--para 2 -->
21837  The double version of ceil behaves as though implemented by
21838 <!--page 475 -->
21839 <pre>
21840         #include <a href="#7.12">&lt;math.h&gt;</a>
21841         #include <a href="#7.6">&lt;fenv.h&gt;</a>
21842         #pragma STDC FENV_ACCESS ON
21843         double ceil(double x)
21844         {
21845              double result;
21846              int save_round = fegetround();
21847              fesetround(FE_UPWARD);
21848              result = rint(x); // or nearbyint instead of rint
21849              fesetround(save_round);
21850              return result;
21851         }</pre>
21852
21853 <h5><a name="F.9.6.2" href="#F.9.6.2">F.9.6.2 The floor functions</a></h5>
21854 <p><!--para 1 -->
21855 <ul>
21856 <li>  floor((+-)0) returns (+-)0.
21857 <li>  floor((+-)(inf)) returns (+-)(inf).
21858 </ul>
21859 <p><!--para 2 -->
21860  See the sample implementation for ceil in <a href="#F.9.6.1">F.9.6.1</a>.
21861
21862 <h5><a name="F.9.6.3" href="#F.9.6.3">F.9.6.3 The nearbyint functions</a></h5>
21863 <p><!--para 1 -->
21864  The nearbyint functions use IEC 60559 rounding according to the current rounding
21865  direction. They do not raise the ''inexact'' floating-point exception if the result differs in
21866  value from the argument.
21867 <ul>
21868 <li>  nearbyint((+-)0) returns (+-)0 (for all rounding directions).
21869 <li>  nearbyint((+-)(inf)) returns (+-)(inf) (for all rounding directions).
21870 </ul>
21871
21872 <h5><a name="F.9.6.4" href="#F.9.6.4">F.9.6.4 The rint functions</a></h5>
21873 <p><!--para 1 -->
21874  The rint functions differ from the nearbyint functions only in that they do raise the
21875  ''inexact'' floating-point exception if the result differs in value from the argument.
21876
21877 <h5><a name="F.9.6.5" href="#F.9.6.5">F.9.6.5 The lrint and llrint functions</a></h5>
21878 <p><!--para 1 -->
21879  The lrint and llrint functions provide floating-to-integer conversion as prescribed
21880  by IEC 60559. They round according to the current rounding direction. If the rounded
21881  value is outside the range of the return type, the numeric result is unspecified and the
21882  ''invalid'' floating-point exception is raised. When they raise no other floating-point
21883  exception and the result differs from the argument, they raise the ''inexact'' floating-point
21884  exception.
21885 <!--page 476 -->
21886
21887 <h5><a name="F.9.6.6" href="#F.9.6.6">F.9.6.6 The round functions</a></h5>
21888 <p><!--para 1 -->
21889 <ul>
21890 <li>  round((+-)0) returns (+-)0.
21891 <li>  round((+-)(inf)) returns (+-)(inf).
21892 </ul>
21893 <p><!--para 2 -->
21894  The double version of round behaves as though implemented by
21895 <pre>
21896         #include <a href="#7.12">&lt;math.h&gt;</a>
21897         #include <a href="#7.6">&lt;fenv.h&gt;</a>
21898         #pragma STDC FENV_ACCESS ON
21899         double round(double x)
21900         {
21901              double result;
21902              fenv_t save_env;
21903              feholdexcept(&amp;save_env);
21904              result = rint(x);
21905              if (fetestexcept(FE_INEXACT)) {
21906                   fesetround(FE_TOWARDZERO);
21907                   result = rint(copysign(0.5 + fabs(x), x));
21908              }
21909              feupdateenv(&amp;save_env);
21910              return result;
21911         }</pre>
21912  The round functions may, but are not required to, raise the ''inexact'' floating-point
21913  exception for non-integer numeric arguments, as this implementation does.
21914
21915 <h5><a name="F.9.6.7" href="#F.9.6.7">F.9.6.7 The lround and llround functions</a></h5>
21916 <p><!--para 1 -->
21917  The lround and llround functions differ from the lrint and llrint functions
21918  with the default rounding direction just in that the lround and llround functions
21919  round halfway cases away from zero and need not raise the ''inexact'' floating-point
21920  exception for non-integer arguments that round to within the range of the return type.
21921
21922 <h5><a name="F.9.6.8" href="#F.9.6.8">F.9.6.8 The trunc functions</a></h5>
21923 <p><!--para 1 -->
21924  The trunc functions use IEC 60559 rounding toward zero (regardless of the current
21925  rounding direction).
21926 <ul>
21927 <li>  trunc((+-)0) returns (+-)0.
21928 <li>  trunc((+-)(inf)) returns (+-)(inf).
21929 <!--page 477 -->
21930 </ul>
21931
21932 <h4><a name="F.9.7" href="#F.9.7">F.9.7 Remainder functions</a></h4>
21933
21934 <h5><a name="F.9.7.1" href="#F.9.7.1">F.9.7.1 The fmod functions</a></h5>
21935 <p><!--para 1 -->
21936 <ul>
21937 <li>  fmod((+-)0, y) returns (+-)0 for y not zero.
21938 <li>  fmod(x, y) returns a NaN and raises the ''invalid'' floating-point exception for x
21939  infinite or y zero.
21940 <li>  fmod(x, (+-)(inf)) returns x for x not infinite.
21941 </ul>
21942 <p><!--para 2 -->
21943  The double version of fmod behaves as though implemented by
21944 <pre>
21945         #include <a href="#7.12">&lt;math.h&gt;</a>
21946         #include <a href="#7.6">&lt;fenv.h&gt;</a>
21947         #pragma STDC FENV_ACCESS ON
21948         double fmod(double x, double y)
21949         {
21950              double result;
21951              result = remainder(fabs(x), (y = fabs(y)));
21952              if (signbit(result)) result += y;
21953              return copysign(result, x);
21954         }</pre>
21955
21956 <h5><a name="F.9.7.2" href="#F.9.7.2">F.9.7.2 The remainder functions</a></h5>
21957 <p><!--para 1 -->
21958  The remainder functions are fully specified as a basic arithmetic operation in
21959  IEC 60559.
21960
21961 <h5><a name="F.9.7.3" href="#F.9.7.3">F.9.7.3 The remquo functions</a></h5>
21962 <p><!--para 1 -->
21963  The remquo functions follow the specifications for the remainder functions. They
21964  have no further specifications special to IEC 60559 implementations.
21965
21966 <h4><a name="F.9.8" href="#F.9.8">F.9.8 Manipulation functions</a></h4>
21967
21968 <h5><a name="F.9.8.1" href="#F.9.8.1">F.9.8.1 The copysign functions</a></h5>
21969 <p><!--para 1 -->
21970  copysign is specified in the Appendix to IEC 60559.
21971
21972 <h5><a name="F.9.8.2" href="#F.9.8.2">F.9.8.2 The nan functions</a></h5>
21973 <p><!--para 1 -->
21974  All IEC 60559 implementations support quiet NaNs, in all floating formats.
21975 <!--page 478 -->
21976
21977 <h5><a name="F.9.8.3" href="#F.9.8.3">F.9.8.3 The nextafter functions</a></h5>
21978 <p><!--para 1 -->
21979 <ul>
21980 <li>  nextafter(x, y) raises the ''overflow'' and ''inexact'' floating-point exceptions
21981  for x finite and the function value infinite.
21982 <li>  nextafter(x, y) raises the ''underflow'' and ''inexact'' floating-point
21983  exceptions for the function value subnormal or zero and x != y.
21984 </ul>
21985
21986 <h5><a name="F.9.8.4" href="#F.9.8.4">F.9.8.4 The nexttoward functions</a></h5>
21987 <p><!--para 1 -->
21988  No additional requirements beyond those on nextafter.
21989
21990 <h4><a name="F.9.9" href="#F.9.9">F.9.9 Maximum, minimum, and positive difference functions</a></h4>
21991
21992 <h5><a name="F.9.9.1" href="#F.9.9.1">F.9.9.1 The fdim functions</a></h5>
21993 <p><!--para 1 -->
21994  No additional requirements.
21995
21996 <h5><a name="F.9.9.2" href="#F.9.9.2">F.9.9.2 The fmax functions</a></h5>
21997 <p><!--para 1 -->
21998  If just one argument is a NaN, the fmax functions return the other argument (if both
21999  arguments are NaNs, the functions return a NaN).
22000 <p><!--para 2 -->
22001  The body of the fmax function might be<sup><a href="#note323"><b>323)</b></a></sup>
22002 <pre>
22003         { return (isgreaterequal(x, y) ||
22004              isnan(y)) ? x : y; }</pre>
22005
22006 <h6>footnotes</h6>
22007 <p><small><a name="note323" href="#note323">323)</a> Ideally, fmax would be sensitive to the sign of zero, for example fmax(-0.0, +0.0) would
22008  return +0; however, implementation in software might be impractical.
22009 </small>
22010
22011 <h5><a name="F.9.9.3" href="#F.9.9.3">F.9.9.3 The fmin functions</a></h5>
22012 <p><!--para 1 -->
22013  The fmin functions are analogous to the fmax functions (see <a href="#F.9.9.2">F.9.9.2</a>).
22014
22015 <h4><a name="F.9.10" href="#F.9.10">F.9.10 Floating multiply-add</a></h4>
22016
22017 <h5><a name="F.9.10.1" href="#F.9.10.1">F.9.10.1 The fma functions</a></h5>
22018 <p><!--para 1 -->
22019 <ul>
22020 <li>  fma(x, y, z) computes xy + z, correctly rounded once.
22021 <li>  fma(x, y, z) returns a NaN and optionally raises the ''invalid'' floating-point
22022  exception if one of x and y is infinite, the other is zero, and z is a NaN.
22023 <li>  fma(x, y, z) returns a NaN and raises the ''invalid'' floating-point exception if
22024  one of x and y is infinite, the other is zero, and z is not a NaN.
22025 <li>  fma(x, y, z) returns a NaN and raises the ''invalid'' floating-point exception if x
22026  times y is an exact infinity and z is also an infinity but with the opposite sign.
22027  
22028  
22029  
22030  
22031 <!--page 479 -->
22032 </ul>
22033
22034 <h2><a name="G" href="#G">Annex G</a></h2>
22035 <pre>
22036                                      (informative)
22037                IEC 60559-compatible complex arithmetic</pre>
22038
22039 <h3><a name="G.1" href="#G.1">G.1 Introduction</a></h3>
22040 <p><!--para 1 -->
22041  This annex supplements <a href="#F">annex F</a> to specify complex arithmetic for compatibility with
22042  IEC 60559 real floating-point arithmetic. Although these specifications have been
22043  carefully designed, there is little existing practice to validate the design decisions.
22044  Therefore, these specifications are not normative, but should be viewed more as
22045  recommended          practice.       An         implementation        that     defines
22046  __STDC_IEC_559_COMPLEX__ should conform to the specifications in this annex.
22047
22048 <h3><a name="G.2" href="#G.2">G.2 Types</a></h3>
22049 <p><!--para 1 -->
22050  There is a new keyword _Imaginary, which is used to specify imaginary types. It is
22051  used as a type specifier within declaration specifiers in the same way as _Complex is
22052  (thus, _Imaginary float is a valid type name).
22053 <p><!--para 2 -->
22054  There are three imaginary types, designated as float _Imaginary, double
22055  _Imaginary, and long double _Imaginary. The imaginary types (along with
22056  the real floating and complex types) are floating types.
22057 <p><!--para 3 -->
22058  For imaginary types, the corresponding real type is given by deleting the keyword
22059  _Imaginary from the type name.
22060 <p><!--para 4 -->
22061  Each imaginary type has the same representation and alignment requirements as the
22062  corresponding real type. The value of an object of imaginary type is the value of the real
22063  representation times the imaginary unit.
22064 <p><!--para 5 -->
22065  The imaginary type domain comprises the imaginary types.
22066
22067 <h3><a name="G.3" href="#G.3">G.3 Conventions</a></h3>
22068 <p><!--para 1 -->
22069  A complex or imaginary value with at least one infinite part is regarded as an infinity
22070  (even if its other part is a NaN). A complex or imaginary value is a finite number if each
22071  of its parts is a finite number (neither infinite nor NaN). A complex or imaginary value is
22072  a zero if each of its parts is a zero.
22073 <!--page 480 -->
22074
22075 <h3><a name="G.4" href="#G.4">G.4 Conversions</a></h3>
22076
22077 <h4><a name="G.4.1" href="#G.4.1">G.4.1 Imaginary types</a></h4>
22078 <p><!--para 1 -->
22079  Conversions among imaginary types follow rules analogous to those for real floating
22080  types.
22081
22082 <h4><a name="G.4.2" href="#G.4.2">G.4.2 Real and imaginary</a></h4>
22083 <p><!--para 1 -->
22084  When a value of imaginary type is converted to a real type other than _Bool,<sup><a href="#note324"><b>324)</b></a></sup> the
22085  result is a positive zero.
22086 <p><!--para 2 -->
22087  When a value of real type is converted to an imaginary type, the result is a positive
22088  imaginary zero.
22089
22090 <h6>footnotes</h6>
22091 <p><small><a name="note324" href="#note324">324)</a> See <a href="#6.3.1.2">6.3.1.2</a>.
22092 </small>
22093
22094 <h4><a name="G.4.3" href="#G.4.3">G.4.3 Imaginary and complex</a></h4>
22095 <p><!--para 1 -->
22096  When a value of imaginary type is converted to a complex type, the real part of the
22097  complex result value is a positive zero and the imaginary part of the complex result value
22098  is determined by the conversion rules for the corresponding real types.
22099 <p><!--para 2 -->
22100  When a value of complex type is converted to an imaginary type, the real part of the
22101  complex value is discarded and the value of the imaginary part is converted according to
22102  the conversion rules for the corresponding real types.
22103
22104 <h3><a name="G.5" href="#G.5">G.5 Binary operators</a></h3>
22105 <p><!--para 1 -->
22106  The following subclauses supplement <a href="#6.5">6.5</a> in order to specify the type of the result for an
22107  operation with an imaginary operand.
22108 <p><!--para 2 -->
22109  For most operand types, the value of the result of a binary operator with an imaginary or
22110  complex operand is completely determined, with reference to real arithmetic, by the usual
22111  mathematical formula. For some operand types, the usual mathematical formula is
22112  problematic because of its treatment of infinities and because of undue overflow or
22113  underflow; in these cases the result satisfies certain properties (specified in <a href="#G.5.1">G.5.1</a>), but is
22114  not completely determined.
22115  
22116  
22117  
22118  
22119 <!--page 481 -->
22120
22121 <h4><a name="G.5.1" href="#G.5.1">G.5.1 Multiplicative operators</a></h4>
22122 <h6>Semantics</h6>
22123 <p><!--para 1 -->
22124  If one operand has real type and the other operand has imaginary type, then the result has
22125  imaginary type. If both operands have imaginary type, then the result has real type. (If
22126  either operand has complex type, then the result has complex type.)
22127 <p><!--para 2 -->
22128  If the operands are not both complex, then the result and floating-point exception
22129  behavior of the * operator is defined by the usual mathematical formula:
22130 <pre>
22131         *                  u                   iv                 u + iv</pre>
22132  
22133 <pre>
22134         x                  xu                i(xv)            (xu) + i(xv)</pre>
22135  
22136 <pre>
22137         iy               i(yu)                -yv            (-yv) + i(yu)</pre>
22138  
22139 <p><!--para 3 -->
22140 <pre>
22141         x + iy       (xu) + i(yu)        (-yv) + i(xv)</pre>
22142  If the second operand is not complex, then the result and floating-point exception
22143  behavior of the / operator is defined by the usual mathematical formula:
22144 <pre>
22145         /                   u                       iv</pre>
22146  
22147 <pre>
22148         x                  x/u                 i(-x/v)</pre>
22149  
22150 <pre>
22151         iy               i(y/u)                     y/v</pre>
22152  
22153 <p><!--para 4 -->
22154 <pre>
22155         x + iy       (x/u) + i(y/u)        (y/v) + i(-x/v)</pre>
22156  The * and / operators satisfy the following infinity properties for all real, imaginary, and
22157  complex operands:<sup><a href="#note325"><b>325)</b></a></sup>
22158 <ul>
22159 <li>  if one operand is an infinity and the other operand is a nonzero finite number or an
22160  infinity, then the result of the * operator is an infinity;
22161 <li>  if the first operand is an infinity and the second operand is a finite number, then the
22162  result of the / operator is an infinity;
22163 <li>  if the first operand is a finite number and the second operand is an infinity, then the
22164  result of the / operator is a zero;
22165  
22166  
22167  
22168  
22169 <!--page 482 -->
22170 <li>  if the first operand is a nonzero finite number or an infinity and the second operand is
22171  a zero, then the result of the / operator is an infinity.
22172 </ul>
22173 <p><!--para 5 -->
22174  If both operands of the * operator are complex or if the second operand of the / operator
22175  is complex, the operator raises floating-point exceptions if appropriate for the calculation
22176  of the parts of the result, and may raise spurious floating-point exceptions.
22177 <p><!--para 6 -->
22178  EXAMPLE 1 Multiplication of double _Complex operands could be implemented as follows. Note
22179  that the imaginary unit I has imaginary type (see <a href="#G.6">G.6</a>).
22180 <!--page 483 -->
22181 <p><!--para 7 -->
22182 <pre>
22183         #include <a href="#7.12">&lt;math.h&gt;</a>
22184         #include <a href="#7.3">&lt;complex.h&gt;</a>
22185         /* Multiply z * w ... */
22186         double complex _Cmultd(double complex z, double complex w)
22187         {
22188                #pragma STDC FP_CONTRACT OFF
22189                double a, b, c, d, ac, bd, ad, bc, x, y;
22190                a = creal(z); b = cimag(z);
22191                c = creal(w); d = cimag(w);
22192                ac = a * c;       bd = b * d;
22193                ad = a * d;       bc = b * c;
22194                x = ac - bd; y = ad + bc;
22195                if (isnan(x) &amp;&amp; isnan(y)) {
22196                        /* Recover infinities that computed as NaN+iNaN ... */
22197                        int recalc = 0;
22198                        if ( isinf(a) || isinf(b) ) { // z is infinite
22199                                /* "Box" the infinity and change NaNs in the other factor to 0 */
22200                                a = copysign(isinf(a) ? 1.0 : 0.0, a);
22201                                b = copysign(isinf(b) ? 1.0 : 0.0, b);
22202                                if (isnan(c)) c = copysign(0.0, c);
22203                                if (isnan(d)) d = copysign(0.0, d);
22204                                recalc = 1;
22205                        }
22206                        if ( isinf(c) || isinf(d) ) { // w is infinite
22207                                /* "Box" the infinity and change NaNs in the other factor to 0 */
22208                                c = copysign(isinf(c) ? 1.0 : 0.0, c);
22209                                d = copysign(isinf(d) ? 1.0 : 0.0, d);
22210                                if (isnan(a)) a = copysign(0.0, a);
22211                                if (isnan(b)) b = copysign(0.0, b);
22212                                recalc = 1;
22213                        }
22214                        if (!recalc &amp;&amp; (isinf(ac) || isinf(bd) ||
22215                                               isinf(ad) || isinf(bc))) {
22216                                /* Recover infinities from overflow by changing NaNs to 0 ... */
22217                                if (isnan(a)) a = copysign(0.0, a);
22218                                if (isnan(b)) b = copysign(0.0, b);
22219                                if (isnan(c)) c = copysign(0.0, c);
22220                                if (isnan(d)) d = copysign(0.0, d);
22221                                recalc = 1;
22222                        }
22223                        if (recalc) {
22224                                    x = INFINITY * ( a * c - b * d );
22225                                    y = INFINITY * ( a * d + b * c );
22226                         }
22227                   }
22228                   return x + I * y;
22229           }</pre>
22230  This implementation achieves the required treatment of infinities at the cost of only one isnan test in
22231  ordinary (finite) cases. It is less than ideal in that undue overflow and underflow may occur.
22232  
22233 <p><!--para 8 -->
22234  EXAMPLE 2      Division of two double _Complex operands could be implemented as follows.
22235 <!--page 484 -->
22236 <p><!--para 9 -->
22237 <pre>
22238           #include <a href="#7.12">&lt;math.h&gt;</a>
22239           #include <a href="#7.3">&lt;complex.h&gt;</a>
22240           /* Divide z / w ... */
22241           double complex _Cdivd(double complex z, double complex w)
22242           {
22243                  #pragma STDC FP_CONTRACT OFF
22244                  double a, b, c, d, logbw, denom, x, y;
22245                  int ilogbw = 0;
22246                  a = creal(z); b = cimag(z);
22247                  c = creal(w); d = cimag(w);
22248                  logbw = logb(fmax(fabs(c), fabs(d)));
22249                  if (isfinite(logbw)) {
22250                         ilogbw = (int)logbw;
22251                         c = scalbn(c, -ilogbw); d = scalbn(d, -ilogbw);
22252                  }
22253                  denom = c * c + d * d;
22254                  x = scalbn((a * c + b * d) / denom, -ilogbw);
22255                  y = scalbn((b * c - a * d) / denom, -ilogbw);
22256                   /* Recover infinities and zeros that computed as NaN+iNaN;                 */
22257                   /* the only cases are nonzero/zero, infinite/finite, and finite/infinite, ... */
22258                   if (isnan(x) &amp;&amp; isnan(y)) {
22259                         if ((denom == 0.0) &amp;&amp;
22260                               (!isnan(a) || !isnan(b))) {
22261                               x = copysign(INFINITY, c) * a;
22262                               y = copysign(INFINITY, c) * b;
22263                         }
22264                         else if ((isinf(a) || isinf(b)) &amp;&amp;
22265                               isfinite(c) &amp;&amp; isfinite(d)) {
22266                               a = copysign(isinf(a) ? 1.0 : 0.0,                        a);
22267                               b = copysign(isinf(b) ? 1.0 : 0.0,                        b);
22268                               x = INFINITY * ( a * c + b * d );
22269                               y = INFINITY * ( b * c - a * d );
22270                         }
22271                         else if (isinf(logbw) &amp;&amp;
22272                               isfinite(a) &amp;&amp; isfinite(b)) {
22273                               c = copysign(isinf(c) ? 1.0 : 0.0,                        c);
22274                               d = copysign(isinf(d) ? 1.0 : 0.0,                        d);
22275                               x = 0.0 * ( a * c + b * d );
22276                               y = 0.0 * ( b * c - a * d );
22277                         }
22278                   }
22279                   return x + I * y;
22280          }</pre>
22281  Scaling the denominator alleviates the main overflow and underflow problem, which is more serious than
22282  for multiplication. In the spirit of the multiplication example above, this code does not defend against
22283  overflow and underflow in the calculation of the numerator. Scaling with the scalbn function, instead of
22284  with division, provides better roundoff characteristics.
22285  
22286
22287 <h6>footnotes</h6>
22288 <p><small><a name="note325" href="#note325">325)</a> These properties are already implied for those cases covered in the tables, but are required for all cases
22289  (at least where the state for CX_LIMITED_RANGE is ''off'').
22290 </small>
22291
22292 <h4><a name="G.5.2" href="#G.5.2">G.5.2 Additive operators</a></h4>
22293 <h6>Semantics</h6>
22294 <p><!--para 1 -->
22295  If both operands have imaginary type, then the result has imaginary type. (If one operand
22296  has real type and the other operand has imaginary type, or if either operand has complex
22297  type, then the result has complex type.)
22298 <p><!--para 2 -->
22299  In all cases the result and floating-point exception behavior of a + or - operator is defined
22300  by the usual mathematical formula:
22301 <pre>
22302         + or -              u                       iv                    u + iv</pre>
22303  
22304 <pre>
22305         x                 x(+-)u                     x (+-) iv              (x (+-) u) (+-) iv</pre>
22306  
22307 <pre>
22308         iy               (+-)u + iy                 i(y (+-) v)             (+-)u + i(y (+-) v)</pre>
22309  
22310 <pre>
22311         x + iy         (x (+-) u) + iy            x + i(y (+-) v)        (x (+-) u) + i(y (+-) v)</pre>
22312
22313 <h3><a name="G.6" href="#G.6">G.6 Complex arithmetic <complex.h></a></h3>
22314 <p><!--para 1 -->
22315  The macros
22316 <pre>
22317          imaginary</pre>
22318  and
22319 <pre>
22320          _Imaginary_I</pre>
22321  are defined, respectively, as _Imaginary and a constant expression of type const
22322  float _Imaginary with the value of the imaginary unit. The macro
22323 <pre>
22324          I</pre>
22325  is defined to be _Imaginary_I (not _Complex_I as stated in <a href="#7.3">7.3</a>). Notwithstanding
22326  the provisions of <a href="#7.1.3">7.1.3</a>, a program may undefine and then perhaps redefine the macro
22327  imaginary.
22328 <p><!--para 2 -->
22329  This subclause contains specifications for the <a href="#7.3">&lt;complex.h&gt;</a> functions that are
22330  particularly suited to IEC 60559 implementations. For families of functions, the
22331  specifications apply to all of the functions even though only the principal function is
22332 <!--page 485 -->
22333  shown. Unless otherwise specified, where the symbol ''(+-)'' occurs in both an argument
22334  and the result, the result has the same sign as the argument.
22335 <p><!--para 3 -->
22336  The functions are continuous onto both sides of their branch cuts, taking into account the
22337  sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)2.  ???
22338 <p><!--para 4 -->
22339  Since complex and imaginary values are composed of real values, each function may be
22340  regarded as computing real values from real values. Except as noted, the functions treat
22341  real infinities, NaNs, signed zeros, subnormals, and the floating-point exception flags in a
22342  manner consistent with the specifications for real functions in F.9.<sup><a href="#note326"><b>326)</b></a></sup>
22343 <p><!--para 5 -->
22344  The functions cimag, conj, cproj, and creal are fully specified for all
22345  implementations, including IEC 60559 ones, in <a href="#7.3.9">7.3.9</a>. These functions raise no floating-
22346  point exceptions.
22347 <p><!--para 6 -->
22348  Each of the functions cabs and carg is specified by a formula in terms of a real
22349  function (whose special cases are covered in <a href="#F">annex F</a>):
22350 <p><!--para 7 -->
22351 <pre>
22352          cabs(x + iy) = hypot(x, y)
22353          carg(x + iy) = atan2(y, x)</pre>
22354  Each of the functions casin, catan, ccos, csin, and ctan is specified implicitly by
22355  a formula in terms of other complex functions (whose special cases are specified below):
22356 <p><!--para 8 -->
22357 <pre>
22358          casin(z)        =   -i casinh(iz)
22359          catan(z)        =   -i catanh(iz)
22360          ccos(z)         =   ccosh(iz)
22361          csin(z)         =   -i csinh(iz)
22362          ctan(z)         =   -i ctanh(iz)</pre>
22363  For the other functions, the following subclauses specify behavior for special cases,
22364  including treatment of the ''invalid'' and ''divide-by-zero'' floating-point exceptions. For
22365  families of functions, the specifications apply to all of the functions even though only the
22366  principal function is shown. For a function f satisfying f (conj(z)) = conj( f (z)), the
22367  specifications for the upper half-plane imply the specifications for the lower half-plane; if
22368  the function f is also either even, f (-z) = f (z), or odd, f (-z) = - f (z), then the
22369  specifications for the first quadrant imply the specifications for the other three quadrants.
22370 <p><!--para 9 -->
22371  In the following subclauses, cis(y) is defined as cos(y) + i sin(y).
22372  
22373  
22374  
22375  
22376 <!--page 486 -->
22377
22378 <h6>footnotes</h6>
22379 <p><small><a name="note326" href="#note326">326)</a> As noted in <a href="#G.3">G.3</a>, a complex value with at least one infinite part is regarded as an infinity even if its
22380  other part is a NaN.
22381 </small>
22382
22383 <h4><a name="G.6.1" href="#G.6.1">G.6.1 Trigonometric functions</a></h4>
22384
22385 <h5><a name="G.6.1.1" href="#G.6.1.1">G.6.1.1 The cacos functions</a></h5>
22386 <p><!--para 1 -->
22387 <ul>
22388 <li>  cacos(conj(z)) = conj(cacos(z)).
22389 <li>  cacos((+-)0 + i0) returns pi /2 - i0.
22390 <li>  cacos((+-)0 + iNaN) returns pi /2 + iNaN.
22391 <li>  cacos(x + i (inf)) returns pi /2 - i (inf), for finite x.
22392 <li>  cacos(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22393  point exception, for nonzero finite x.
22394 <li>  cacos(-(inf) + iy) returns pi - i (inf), for positive-signed finite y.
22395 <li>  cacos(+(inf) + iy) returns +0 - i (inf), for positive-signed finite y.
22396 <li>  cacos(-(inf) + i (inf)) returns 3pi /4 - i (inf).
22397 <li>  cacos(+(inf) + i (inf)) returns pi /4 - i (inf).
22398 <li>  cacos((+-)(inf) + iNaN) returns NaN (+-) i (inf) (where the sign of the imaginary part of the
22399  result is unspecified).
22400 <li>  cacos(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22401  point exception, for finite y.
22402 <li>  cacos(NaN + i (inf)) returns NaN - i (inf).
22403 <li>  cacos(NaN + iNaN) returns NaN + iNaN.
22404 </ul>
22405
22406 <h4><a name="G.6.2" href="#G.6.2">G.6.2 Hyperbolic functions</a></h4>
22407
22408 <h5><a name="G.6.2.1" href="#G.6.2.1">G.6.2.1 The cacosh functions</a></h5>
22409 <p><!--para 1 -->
22410 <ul>
22411 <li>  cacosh(conj(z)) = conj(cacosh(z)).
22412 <li>  cacosh((+-)0 + i0) returns +0 + ipi /2.
22413 <li>  cacosh(x + i (inf)) returns +(inf) + ipi /2, for finite x.
22414 <li>  cacosh(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid''
22415  floating-point exception, for finite x.
22416 <li>  cacosh(-(inf) + iy) returns +(inf) + ipi , for positive-signed finite y.
22417 <li>  cacosh(+(inf) + iy) returns +(inf) + i0, for positive-signed finite y.
22418 <li>  cacosh(-(inf) + i (inf)) returns +(inf) + i3pi /4.
22419 <li>  cacosh(+(inf) + i (inf)) returns +(inf) + ipi /4.
22420 <li>  cacosh((+-)(inf) + iNaN) returns +(inf) + iNaN.
22421 <!--page 487 -->
22422 <li>  cacosh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
22423  floating-point exception, for finite y.
22424 <li>  cacosh(NaN + i (inf)) returns +(inf) + iNaN.
22425 <li>  cacosh(NaN + iNaN) returns NaN + iNaN.
22426 </ul>
22427
22428 <h5><a name="G.6.2.2" href="#G.6.2.2">G.6.2.2 The casinh functions</a></h5>
22429 <p><!--para 1 -->
22430 <ul>
22431 <li>  casinh(conj(z)) = conj(casinh(z)) and casinh is odd.
22432 <li>  casinh(+0 + i0) returns 0 + i0.
22433 <li>  casinh(x + i (inf)) returns +(inf) + ipi /2 for positive-signed finite x.
22434 <li>  casinh(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid''
22435  floating-point exception, for finite x.
22436 <li>  casinh(+(inf) + iy) returns +(inf) + i0 for positive-signed finite y.
22437 <li>  casinh(+(inf) + i (inf)) returns +(inf) + ipi /4.
22438 <li>  casinh(+(inf) + iNaN) returns +(inf) + iNaN.
22439 <li>  casinh(NaN + i0) returns NaN + i0.
22440 <li>  casinh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
22441  floating-point exception, for finite nonzero y.
22442 <li>  casinh(NaN + i (inf)) returns (+-)(inf) + iNaN (where the sign of the real part of the result
22443  is unspecified).
22444 <li>  casinh(NaN + iNaN) returns NaN + iNaN.
22445 </ul>
22446
22447 <h5><a name="G.6.2.3" href="#G.6.2.3">G.6.2.3 The catanh functions</a></h5>
22448 <p><!--para 1 -->
22449 <ul>
22450 <li>  catanh(conj(z)) = conj(catanh(z)) and catanh is odd.
22451 <li>  catanh(+0 + i0) returns +0 + i0.
22452 <li>  catanh(+0 + iNaN) returns +0 + iNaN.
22453 <li>  catanh(+1 + i0) returns +(inf) + i0 and raises the ''divide-by-zero'' floating-point
22454  exception.
22455 <li>  catanh(x + i (inf)) returns +0 + ipi /2, for finite positive-signed x.
22456 <li>  catanh(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid''
22457  floating-point exception, for nonzero finite x.
22458 <li>  catanh(+(inf) + iy) returns +0 + ipi /2, for finite positive-signed y.
22459 <li>  catanh(+(inf) + i (inf)) returns +0 + ipi /2.
22460 <li>  catanh(+(inf) + iNaN) returns +0 + iNaN.
22461 <!--page 488 -->
22462 <li>  catanh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid''
22463  floating-point exception, for finite y.
22464 <li>  catanh(NaN + i (inf)) returns (+-)0 + ipi /2 (where the sign of the real part of the result is
22465  unspecified).
22466 <li>  catanh(NaN + iNaN) returns NaN + iNaN.
22467 </ul>
22468
22469 <h5><a name="G.6.2.4" href="#G.6.2.4">G.6.2.4 The ccosh functions</a></h5>
22470 <p><!--para 1 -->
22471 <ul>
22472 <li>  ccosh(conj(z)) = conj(ccosh(z)) and ccosh is even.
22473 <li>  ccosh(+0 + i0) returns 1 + i0.
22474 <li>  ccosh(+0 + i (inf)) returns NaN (+-) i0 (where the sign of the imaginary part of the
22475  result is unspecified) and raises the ''invalid'' floating-point exception.
22476 <li>  ccosh(+0 + iNaN) returns NaN (+-) i0 (where the sign of the imaginary part of the
22477  result is unspecified).
22478 <li>  ccosh(x + i (inf)) returns NaN + iNaN and raises the ''invalid'' floating-point
22479  exception, for finite nonzero x.
22480 <li>  ccosh(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22481  point exception, for finite nonzero x.
22482 <li>  ccosh(+(inf) + i0) returns +(inf) + i0.
22483 <li>  ccosh(+(inf) + iy) returns +(inf) cis(y), for finite nonzero y.
22484 <li>  ccosh(+(inf) + i (inf)) returns (+-)(inf) + iNaN (where the sign of the real part of the result is
22485  unspecified) and raises the ''invalid'' floating-point exception.
22486 <li>  ccosh(+(inf) + iNaN) returns +(inf) + iNaN.
22487 <li>  ccosh(NaN + i0) returns NaN (+-) i0 (where the sign of the imaginary part of the
22488  result is unspecified).
22489 <li>  ccosh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22490  point exception, for all nonzero numbers y.
22491 <li>  ccosh(NaN + iNaN) returns NaN + iNaN.
22492 </ul>
22493
22494 <h5><a name="G.6.2.5" href="#G.6.2.5">G.6.2.5 The csinh functions</a></h5>
22495 <p><!--para 1 -->
22496 <ul>
22497 <li>  csinh(conj(z)) = conj(csinh(z)) and csinh is odd.
22498 <li>  csinh(+0 + i0) returns +0 + i0.
22499 <li>  csinh(+0 + i (inf)) returns (+-)0 + iNaN (where the sign of the real part of the result is
22500  unspecified) and raises the ''invalid'' floating-point exception.
22501 <li>  csinh(+0 + iNaN) returns (+-)0 + iNaN (where the sign of the real part of the result is
22502  unspecified).
22503 <!--page 489 -->
22504 <li>  csinh(x + i (inf)) returns NaN + iNaN and raises the ''invalid'' floating-point
22505  exception, for positive finite x.
22506 <li>  csinh(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22507  point exception, for finite nonzero x.
22508 <li>  csinh(+(inf) + i0) returns +(inf) + i0.
22509 <li>  csinh(+(inf) + iy) returns +(inf) cis(y), for positive finite y.
22510 <li>  csinh(+(inf) + i (inf)) returns (+-)(inf) + iNaN (where the sign of the real part of the result is
22511  unspecified) and raises the ''invalid'' floating-point exception.
22512 <li>  csinh(+(inf) + iNaN) returns (+-)(inf) + iNaN (where the sign of the real part of the result
22513  is unspecified).
22514 <li>  csinh(NaN + i0) returns NaN + i0.
22515 <li>  csinh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22516  point exception, for all nonzero numbers y.
22517 <li>  csinh(NaN + iNaN) returns NaN + iNaN.
22518 </ul>
22519
22520 <h5><a name="G.6.2.6" href="#G.6.2.6">G.6.2.6 The ctanh functions</a></h5>
22521 <p><!--para 1 -->
22522 <ul>
22523 <li>  ctanh(conj(z)) = conj(ctanh(z))and ctanh is odd.
22524 <li>  ctanh(+0 + i0) returns +0 + i0.
22525 <li>  ctanh(x + i (inf)) returns NaN + iNaN and raises the ''invalid'' floating-point
22526  exception, for finite x.
22527 <li>  ctanh(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22528  point exception, for finite x.
22529 <li>  ctanh(+(inf) + iy) returns 1 + i0 sin(2y), for positive-signed finite y.
22530 <li>  ctanh(+(inf) + i (inf)) returns 1 (+-) i0 (where the sign of the imaginary part of the result
22531  is unspecified).
22532 <li>  ctanh(+(inf) + iNaN) returns 1 (+-) i0 (where the sign of the imaginary part of the
22533  result is unspecified).
22534 <li>  ctanh(NaN + i0) returns NaN + i0.
22535 <li>  ctanh(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22536  point exception, for all nonzero numbers y.
22537 <li>  ctanh(NaN + iNaN) returns NaN + iNaN.
22538 <!--page 490 -->
22539 </ul>
22540
22541 <h4><a name="G.6.3" href="#G.6.3">G.6.3 Exponential and logarithmic functions</a></h4>
22542
22543 <h5><a name="G.6.3.1" href="#G.6.3.1">G.6.3.1 The cexp functions</a></h5>
22544 <p><!--para 1 -->
22545 <ul>
22546 <li>  cexp(conj(z)) = conj(cexp(z)).
22547 <li>  cexp((+-)0 + i0) returns 1 + i0.
22548 <li>  cexp(x + i (inf)) returns NaN + iNaN and raises the ''invalid'' floating-point
22549  exception, for finite x.
22550 <li>  cexp(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22551  point exception, for finite x.
22552 <li>  cexp(+(inf) + i0) returns +(inf) + i0.
22553 <li>  cexp(-(inf) + iy) returns +0 cis(y), for finite y.
22554 <li>  cexp(+(inf) + iy) returns +(inf) cis(y), for finite nonzero y.
22555 <li>  cexp(-(inf) + i (inf)) returns (+-)0 (+-) i0 (where the signs of the real and imaginary parts of
22556  the result are unspecified).
22557 <li>  cexp(+(inf) + i (inf)) returns (+-)(inf) + iNaN and raises the ''invalid'' floating-point
22558  exception (where the sign of the real part of the result is unspecified).
22559 <li>  cexp(-(inf) + iNaN) returns (+-)0 (+-) i0 (where the signs of the real and imaginary parts
22560  of the result are unspecified).
22561 <li>  cexp(+(inf) + iNaN) returns (+-)(inf) + iNaN (where the sign of the real part of the result
22562  is unspecified).
22563 <li>  cexp(NaN + i0) returns NaN + i0.
22564 <li>  cexp(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22565  point exception, for all nonzero numbers y.
22566 <li>  cexp(NaN + iNaN) returns NaN + iNaN.
22567 </ul>
22568
22569 <h5><a name="G.6.3.2" href="#G.6.3.2">G.6.3.2 The clog functions</a></h5>
22570 <p><!--para 1 -->
22571 <ul>
22572 <li>  clog(conj(z)) = conj(clog(z)).
22573 <li>  clog(-0 + i0) returns -(inf) + ipi and raises the ''divide-by-zero'' floating-point
22574  exception.
22575 <li>  clog(+0 + i0) returns -(inf) + i0 and raises the ''divide-by-zero'' floating-point
22576  exception.
22577 <li>  clog(x + i (inf)) returns +(inf) + ipi /2, for finite x.
22578 <li>  clog(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22579  point exception, for finite x.
22580 <!--page 491 -->
22581 <li>  clog(-(inf) + iy) returns +(inf) + ipi , for finite positive-signed y.
22582 <li>  clog(+(inf) + iy) returns +(inf) + i0, for finite positive-signed y.
22583 <li>  clog(-(inf) + i (inf)) returns +(inf) + i3pi /4.
22584 <li>  clog(+(inf) + i (inf)) returns +(inf) + ipi /4.
22585 <li>  clog((+-)(inf) + iNaN) returns +(inf) + iNaN.
22586 <li>  clog(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22587  point exception, for finite y.
22588 <li>  clog(NaN + i (inf)) returns +(inf) + iNaN.
22589 <li>  clog(NaN + iNaN) returns NaN + iNaN.
22590 </ul>
22591
22592 <h4><a name="G.6.4" href="#G.6.4">G.6.4 Power and absolute-value functions</a></h4>
22593
22594 <h5><a name="G.6.4.1" href="#G.6.4.1">G.6.4.1 The cpow functions</a></h5>
22595 <p><!--para 1 -->
22596  The cpow functions raise floating-point exceptions if appropriate for the calculation of
22597  the parts of the result, and may raise spurious exceptions.<sup><a href="#note327"><b>327)</b></a></sup>
22598
22599 <h6>footnotes</h6>
22600 <p><small><a name="note327" href="#note327">327)</a> This allows cpow( z , c ) to be implemented as cexp(c      clog( z )) without precluding
22601  implementations that treat special cases more carefully.
22602 </small>
22603
22604 <h5><a name="G.6.4.2" href="#G.6.4.2">G.6.4.2 The csqrt functions</a></h5>
22605 <p><!--para 1 -->
22606 <ul>
22607 <li>  csqrt(conj(z)) = conj(csqrt(z)).
22608 <li>  csqrt((+-)0 + i0) returns +0 + i0.
22609 <li>  csqrt(x + i (inf)) returns +(inf) + i (inf), for all x (including NaN).
22610 <li>  csqrt(x + iNaN) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22611  point exception, for finite x.
22612 <li>  csqrt(-(inf) + iy) returns +0 + i (inf), for finite positive-signed y.
22613 <li>  csqrt(+(inf) + iy) returns +(inf) + i0, for finite positive-signed y.
22614 <li>  csqrt(-(inf) + iNaN) returns NaN (+-) i (inf) (where the sign of the imaginary part of the
22615  result is unspecified).
22616 <li>  csqrt(+(inf) + iNaN) returns +(inf) + iNaN.
22617 <li>  csqrt(NaN + iy) returns NaN + iNaN and optionally raises the ''invalid'' floating-
22618  point exception, for finite y.
22619 <li>  csqrt(NaN + iNaN) returns NaN + iNaN.
22620  
22621  
22622  
22623  
22624 <!--page 492 -->
22625 </ul>
22626
22627 <h3><a name="G.7" href="#G.7">G.7 Type-generic math <tgmath.h></a></h3>
22628 <p><!--para 1 -->
22629  Type-generic macros that accept complex arguments also accept imaginary arguments. If
22630  an argument is imaginary, the macro expands to an expression whose type is real,
22631  imaginary, or complex, as appropriate for the particular function: if the argument is
22632  imaginary, then the types of cos, cosh, fabs, carg, cimag, and creal are real; the
22633  types of sin, tan, sinh, tanh, asin, atan, asinh, and atanh are imaginary; and
22634  the types of the others are complex.
22635 <p><!--para 2 -->
22636  Given an imaginary argument, each of the type-generic macros cos, sin, tan, cosh,
22637  sinh, tanh, asin, atan, asinh, atanh is specified by a formula in terms of real
22638  functions:
22639 <!--page 493 -->
22640 <pre>
22641         cos(iy)      =   cosh(y)
22642         sin(iy)      =   i sinh(y)
22643         tan(iy)      =   i tanh(y)
22644         cosh(iy)     =   cos(y)
22645         sinh(iy)     =   i sin(y)
22646         tanh(iy)     =   i tan(y)
22647         asin(iy)     =   i asinh(y)
22648         atan(iy)     =   i atanh(y)
22649         asinh(iy)    =   i asin(y)
22650         atanh(iy)    =   i atan(y)</pre>
22651
22652 <h2><a name="H" href="#H">Annex H</a></h2>
22653 <pre>
22654                                      (informative)
22655                      Language independent arithmetic</pre>
22656
22657 <h3><a name="H.1" href="#H.1">H.1 Introduction</a></h3>
22658 <p><!--para 1 -->
22659  This annex documents the extent to which the C language supports the ISO/IEC 10967-1
22660  standard for language-independent arithmetic (LIA-1). LIA-1 is more general than
22661  IEC 60559 (<a href="#F">annex F</a>) in that it covers integer and diverse floating-point arithmetics.
22662
22663 <h3><a name="H.2" href="#H.2">H.2 Types</a></h3>
22664 <p><!--para 1 -->
22665  The relevant C arithmetic types meet the requirements of LIA-1 types if an
22666  implementation adds notification of exceptional arithmetic operations and meets the 1
22667  unit in the last place (ULP) accuracy requirement (LIA-1 subclause <a href="#5.2.8">5.2.8</a>).
22668
22669 <h4><a name="H.2.1" href="#H.2.1">H.2.1 Boolean type</a></h4>
22670 <p><!--para 1 -->
22671  The LIA-1 data type Boolean is implemented by the C data type bool with values of
22672  true and false, all from <a href="#7.16">&lt;stdbool.h&gt;</a>.
22673
22674 <h4><a name="H.2.2" href="#H.2.2">H.2.2 Integer types</a></h4>
22675 <p><!--para 1 -->
22676  The signed C integer types int, long int, long long int, and the corresponding
22677  unsigned types are compatible with LIA-1. If an implementation adds support for the
22678  LIA-1 exceptional values ''integer_overflow'' and ''undefined'', then those types are
22679  LIA-1 conformant types. C's unsigned integer types are ''modulo'' in the LIA-1 sense
22680  in that overflows or out-of-bounds results silently wrap. An implementation that defines
22681  signed integer types as also being modulo need not detect integer overflow, in which case,
22682  only integer divide-by-zero need be detected.
22683 <p><!--para 2 -->
22684  The parameters for the integer data types can be accessed by the following:
22685  maxint        INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX,
22686 <pre>
22687                ULLONG_MAX</pre>
22688  minint        INT_MIN, LONG_MIN, LLONG_MIN
22689 <p><!--para 3 -->
22690  The parameter ''bounded'' is always true, and is not provided. The parameter ''minint''
22691  is always 0 for the unsigned types, and is not provided for those types.
22692 <!--page 494 -->
22693
22694 <h5><a name="H.2.2.1" href="#H.2.2.1">H.2.2.1 Integer operations</a></h5>
22695 <p><!--para 1 -->
22696  The integer operations on integer types are the following:
22697  addI           x + y
22698  subI           x - y
22699  mulI           x * y
22700  divI, divtI    x / y
22701  remI, remtI    x % y
22702  negI           -x
22703  absI           abs(x), labs(x), llabs(x)
22704  eqI            x == y
22705  neqI           x != y
22706  lssI           x &lt; y
22707  leqI           x &lt;= y
22708  gtrI           x &gt; y
22709  geqI           x &gt;= y
22710  where x and y are expressions of the same integer type.
22711
22712 <h4><a name="H.2.3" href="#H.2.3">H.2.3 Floating-point types</a></h4>
22713 <p><!--para 1 -->
22714  The C floating-point types float, double, and long double are compatible with
22715  LIA-1. If an implementation adds support for the LIA-1 exceptional values
22716  ''underflow'', ''floating_overflow'', and ''"undefined'', then those types are conformant
22717  with LIA-1. An implementation that uses IEC 60559 floating-point formats and
22718  operations (see <a href="#F">annex F</a>) along with IEC 60559 status flags and traps has LIA-1
22719  conformant types.
22720
22721 <h5><a name="H.2.3.1" href="#H.2.3.1">H.2.3.1 Floating-point parameters</a></h5>
22722 <p><!--para 1 -->
22723  The parameters for a floating point data type can be accessed by the following:
22724  r              FLT_RADIX
22725  p              FLT_MANT_DIG, DBL_MANT_DIG, LDBL_MANT_DIG
22726  emax           FLT_MAX_EXP, DBL_MAX_EXP, LDBL_MAX_EXP
22727  emin           FLT_MIN_EXP, DBL_MIN_EXP, LDBL_MIN_EXP
22728 <p><!--para 2 -->
22729  The derived constants for the floating point types are accessed by the following:
22730 <!--page 495 -->
22731  fmax          FLT_MAX, DBL_MAX, LDBL_MAX
22732  fminN         FLT_MIN, DBL_MIN, LDBL_MIN
22733  epsilon       FLT_EPSILON, DBL_EPSILON, LDBL_EPSILON
22734  rnd_style     FLT_ROUNDS
22735
22736 <h5><a name="H.2.3.2" href="#H.2.3.2">H.2.3.2 Floating-point operations</a></h5>
22737 <p><!--para 1 -->
22738  The floating-point operations on floating-point types are the following:
22739  addF          x + y
22740  subF          x - y
22741  mulF          x * y
22742  divF          x / y
22743  negF          -x
22744  absF          fabsf(x), fabs(x), fabsl(x)
22745  exponentF     1.f+logbf(x), 1.0+logb(x), 1.L+logbl(x)
22746  scaleF        scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
22747 <pre>
22748                scalblnf(x, li), scalbln(x, li), scalblnl(x, li)</pre>
22749  intpartF      modff(x, &amp;y), modf(x, &amp;y), modfl(x, &amp;y)
22750  fractpartF    modff(x, &amp;y), modf(x, &amp;y), modfl(x, &amp;y)
22751  eqF           x == y
22752  neqF          x != y
22753  lssF          x &lt; y
22754  leqF          x &lt;= y
22755  gtrF          x &gt; y
22756  geqF          x &gt;= y
22757  where x and y are expressions of the same floating point type, n is of type int, and li
22758  is of type long int.
22759
22760 <h5><a name="H.2.3.3" href="#H.2.3.3">H.2.3.3 Rounding styles</a></h5>
22761 <p><!--para 1 -->
22762  The C Standard requires all floating types to use the same radix and rounding style, so
22763  that only one identifier for each is provided to map to LIA-1.
22764 <p><!--para 2 -->
22765  The FLT_ROUNDS parameter can be used to indicate the LIA-1 rounding styles:
22766  truncate      FLT_ROUNDS == 0
22767 <!--page 496 -->
22768  nearest        FLT_ROUNDS == 1
22769  other          FLT_ROUNDS != 0 &amp;&amp; FLT_ROUNDS != 1
22770  provided that an implementation extends FLT_ROUNDS to cover the rounding style used
22771  in all relevant LIA-1 operations, not just addition as in C.
22772
22773 <h4><a name="H.2.4" href="#H.2.4">H.2.4 Type conversions</a></h4>
22774 <p><!--para 1 -->
22775  The LIA-1 type conversions are the following type casts:
22776  cvtI' -&gt; I      (int)i, (long int)i, (long long int)i,
22777 <pre>
22778                 (unsigned int)i, (unsigned long int)i,
22779                 (unsigned long long int)i</pre>
22780  cvtF -&gt; I       (int)x, (long int)x, (long long int)x,
22781 <pre>
22782                 (unsigned int)x, (unsigned long int)x,
22783                 (unsigned long long int)x</pre>
22784  cvtI -&gt; F       (float)i, (double)i, (long double)i
22785  cvtF' -&gt; F      (float)x, (double)x, (long double)x
22786 <p><!--para 2 -->
22787  In the above conversions from floating to integer, the use of (cast)x can be replaced with
22788  (cast)round(x), (cast)rint(x), (cast)nearbyint(x), (cast)trunc(x),
22789  (cast)ceil(x), or (cast)floor(x). In addition, C's floating-point to integer
22790  conversion functions, lrint(), llrint(), lround(), and llround(), can be
22791  used. They all meet LIA-1's requirements on floating to integer rounding for in-range
22792  values. For out-of-range values, the conversions shall silently wrap for the modulo types.
22793 <p><!--para 3 -->
22794  The fmod() function is useful for doing silent wrapping to unsigned integer types, e.g.,
22795  fmod( fabs(rint(x)), 65536.0 ) or (0.0 &lt;= (y = fmod( rint(x),
22796  65536.0 )) ? y : 65536.0 + y) will compute an integer value in the range 0.0
22797  to 65535.0 which can then be cast to unsigned short int. But, the
22798  remainder() function is not useful for doing silent wrapping to signed integer types,
22799  e.g., remainder( rint(x), 65536.0 ) will compute an integer value in the
22800  range -32767.0 to +32768.0 which is not, in general, in the range of signed short
22801  int.
22802 <p><!--para 4 -->
22803  C's conversions (casts) from floating-point to floating-point can meet LIA-1
22804  requirements if an implementation uses round-to-nearest (IEC 60559 default).
22805 <p><!--para 5 -->
22806  C's conversions (casts) from integer to floating-point can meet LIA-1 requirements if an
22807  implementation uses round-to-nearest.
22808 <!--page 497 -->
22809
22810 <h3><a name="H.3" href="#H.3">H.3 Notification</a></h3>
22811 <p><!--para 1 -->
22812  Notification is the process by which a user or program is informed that an exceptional
22813  arithmetic operation has occurred. C's operations are compatible with LIA-1 in that C
22814  allows an implementation to cause a notification to occur when any arithmetic operation
22815  returns an exceptional value as defined in LIA-1 clause 5.
22816
22817 <h4><a name="H.3.1" href="#H.3.1">H.3.1 Notification alternatives</a></h4>
22818 <p><!--para 1 -->
22819  LIA-1 requires at least the following two alternatives for handling of notifications:
22820  setting indicators or trap-and-terminate. LIA-1 allows a third alternative: trap-and-
22821  resume.
22822 <p><!--para 2 -->
22823  An implementation need only support a given notification alternative for the entire
22824  program. An implementation may support the ability to switch between notification
22825  alternatives during execution, but is not required to do so. An implementation can
22826  provide separate selection for each kind of notification, but this is not required.
22827 <p><!--para 3 -->
22828  C allows an implementation to provide notification. C's SIGFPE (for traps) and
22829  FE_INVALID, FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW (for indicators)
22830  can provide LIA-1 notification.
22831 <p><!--para 4 -->
22832  C's signal handlers are compatible with LIA-1. Default handling of SIGFPE can
22833  provide trap-and-terminate behavior, except for those LIA-1 operations implemented by
22834  math library function calls. User-provided signal handlers for SIGFPE allow for trap-
22835  and-resume behavior with the same constraint.
22836
22837 <h5><a name="H.3.1.1" href="#H.3.1.1">H.3.1.1 Indicators</a></h5>
22838 <p><!--para 1 -->
22839  C's <a href="#7.6">&lt;fenv.h&gt;</a> status flags are compatible with the LIA-1 indicators.
22840 <p><!--para 2 -->
22841  The following mapping is for floating-point types:
22842  undefined                FE_INVALID, FE_DIVBYZERO
22843  floating_overflow         FE_OVERFLOW
22844  underflow                FE_UNDERFLOW
22845 <p><!--para 3 -->
22846  The floating-point indicator interrogation and manipulation operations are:
22847  set_indicators          feraiseexcept(i)
22848  clear_indicators        feclearexcept(i)
22849  test_indicators         fetestexcept(i)
22850  current_indicators      fetestexcept(FE_ALL_EXCEPT)
22851  where i is an expression of type int representing a subset of the LIA-1 indicators.
22852 <p><!--para 4 -->
22853  C allows an implementation to provide the following LIA-1 required behavior: at
22854  program termination if any indicator is set the implementation shall send an unambiguous
22855 <!--page 498 -->
22856  and ''hard to ignore'' message (see LIA-1 subclause <a href="#6.1.2">6.1.2</a>)
22857 <p><!--para 5 -->
22858  LIA-1 does not make the distinction between floating-point and integer for ''undefined''.
22859  This documentation makes that distinction because <a href="#7.6">&lt;fenv.h&gt;</a> covers only the floating-
22860  point indicators.
22861
22862 <h5><a name="H.3.1.2" href="#H.3.1.2">H.3.1.2 Traps</a></h5>
22863 <p><!--para 1 -->
22864  C is compatible with LIA-1's trap requirements for arithmetic operations, but not for
22865  math library functions (which are not permitted to generate any externally visible
22866  exceptional conditions). An implementation can provide an alternative of notification
22867  through termination with a ''hard-to-ignore'' message (see LIA-1 subclause <a href="#6.1.3">6.1.3</a>).
22868 <p><!--para 2 -->
22869  LIA-1 does not require that traps be precise.
22870 <p><!--para 3 -->
22871  C does require that SIGFPE be the signal corresponding to arithmetic exceptions, if there
22872  is any signal raised for them.
22873 <p><!--para 4 -->
22874  C supports signal handlers for SIGFPE and allows trapping of arithmetic exceptions.
22875  When arithmetic exceptions do trap, C's signal-handler mechanism allows trap-and-
22876  terminate (either default implementation behavior or user replacement for it) or trap-and-
22877  resume, at the programmer's option.
22878 <!--page 499 -->
22879
22880 <h2><a name="I" href="#I">Annex I</a></h2>
22881 <p><!--para 1 -->
22882 <pre>
22883                                      (informative)
22884                                 Common warnings</pre>
22885  An implementation may generate warnings in many situations, none of which are
22886  specified as part of this International Standard. The following are a few of the more
22887  common situations.
22888 <p><!--para 2 -->
22889 <ul>
22890 <li>  A new struct or union type appears in a function prototype (<a href="#6.2.1">6.2.1</a>, <a href="#6.7.2.3">6.7.2.3</a>).
22891 <li>  A block with initialization of an object that has automatic storage duration is jumped
22892  into (<a href="#6.2.4">6.2.4</a>).
22893 <li>  An implicit narrowing conversion is encountered, such as the assignment of a long
22894  int or a double to an int, or a pointer to void to a pointer to any type other than
22895  a character type (<a href="#6.3">6.3</a>).
22896 <li>  A hexadecimal floating constant cannot be represented exactly in its evaluation format
22897  (<a href="#6.4.4.2">6.4.4.2</a>).
22898 <li>  An integer character constant includes more than one character or a wide character
22899  constant includes more than one multibyte character (<a href="#6.4.4.4">6.4.4.4</a>).
22900 <li>  The characters /* are found in a comment (<a href="#6.4.7">6.4.7</a>).
22901 <li>  An ''unordered'' binary operator (not comma, &amp;&amp;, or ||) contains a side effect to an
22902  lvalue in one operand, and a side effect to, or an access to the value of, the identical
22903  lvalue in the other operand (<a href="#6.5">6.5</a>).
22904 <li>  A function is called but no prototype has been supplied (<a href="#6.5.2.2">6.5.2.2</a>).
22905 <li>  The arguments in a function call do not agree in number and type with those of the
22906  parameters in a function definition that is not a prototype (<a href="#6.5.2.2">6.5.2.2</a>).
22907 <li>  An object is defined but not used (<a href="#6.7">6.7</a>).
22908 <li>  A value is given to an object of an enumerated type other than by assignment of an
22909  enumeration constant that is a member of that type, or an enumeration object that has
22910  the same type, or the value of a function that returns the same enumerated type
22911  (<a href="#6.7.2.2">6.7.2.2</a>).
22912 <li>  An aggregate has a partly bracketed initialization (<a href="#6.7.7">6.7.7</a>).
22913 <li>  A statement cannot be reached (<a href="#6.8">6.8</a>).
22914 <li>  A statement with no apparent effect is encountered (<a href="#6.8">6.8</a>).
22915 <li>  A constant expression is used as the controlling expression of a selection statement
22916  (<a href="#6.8.4">6.8.4</a>).
22917 <!--page 500 -->
22918 <li>  An incorrectly formed preprocessing group is encountered while skipping a
22919  preprocessing group (<a href="#6.10.1">6.10.1</a>).
22920 <li>  An unrecognized #pragma directive is encountered (<a href="#6.10.6">6.10.6</a>).
22921 <!--page 501 -->
22922 </ul>
22923
22924 <h2><a name="J" href="#J">Annex J</a></h2>
22925 <p><!--para 1 -->
22926 <pre>
22927                                       (informative)
22928                                    Portability issues</pre>
22929  This annex collects some information about portability that appears in this International
22930  Standard.
22931
22932 <h3><a name="J.1" href="#J.1">J.1 Unspecified behavior</a></h3>
22933 <p><!--para 1 -->
22934  The following are unspecified:
22935 <ul>
22936 <li>  The manner and timing of static initialization (<a href="#5.1.2">5.1.2</a>).
22937 <li>  The termination status returned to the hosted environment if the return type of main
22938  is not compatible with int (<a href="#5.1.2.2.3">5.1.2.2.3</a>).
22939 <li>  The behavior of the display device if a printing character is written when the active
22940  position is at the final position of a line (<a href="#5.2.2">5.2.2</a>).
22941 <li>  The behavior of the display device if a backspace character is written when the active
22942  position is at the initial position of a line (<a href="#5.2.2">5.2.2</a>).
22943 <li>  The behavior of the display device if a horizontal tab character is written when the
22944  active position is at or past the last defined horizontal tabulation position (<a href="#5.2.2">5.2.2</a>).
22945 <li>  The behavior of the display device if a vertical tab character is written when the active
22946  position is at or past the last defined vertical tabulation position (<a href="#5.2.2">5.2.2</a>).
22947 <li>  How an extended source character that does not correspond to a universal character
22948  name counts toward the significant initial characters in an external identifier (<a href="#5.2.4.1">5.2.4.1</a>).
22949 <li>  Many aspects of the representations of types (<a href="#6.2.6">6.2.6</a>).
22950 <li>  The value of padding bytes when storing values in structures or unions (<a href="#6.2.6.1">6.2.6.1</a>).
22951 <li>  The value of a union member other than the last one stored into (<a href="#6.2.6.1">6.2.6.1</a>).
22952 <li>  The representation used when storing a value in an object that has more than one
22953  object representation for that value (<a href="#6.2.6.1">6.2.6.1</a>).
22954 <li>  The values of any padding bits in integer representations (<a href="#6.2.6.2">6.2.6.2</a>).
22955 <li>  Whether certain operators can generate negative zeros and whether a negative zero
22956  becomes a normal zero when stored in an object (<a href="#6.2.6.2">6.2.6.2</a>).
22957 <li>  Whether two string literals result in distinct arrays (<a href="#6.4.5">6.4.5</a>).
22958 <li>  The order in which subexpressions are evaluated and the order in which side effects
22959  take place, except as specified for the function-call (), &amp;&amp;, ||, ?:, and comma
22960  operators (<a href="#6.5">6.5</a>).
22961 <!--page 502 -->
22962 <li>  The order in which the function designator, arguments, and subexpressions within the
22963  arguments are evaluated in a function call (<a href="#6.5.2.2">6.5.2.2</a>).
22964 <li>  The order of side effects among compound literal initialization list expressions
22965  (<a href="#6.5.2.5">6.5.2.5</a>).
22966 <li>  The order in which the operands of an assignment operator are evaluated (<a href="#6.5.16">6.5.16</a>).
22967 <li>  The alignment of the addressable storage unit allocated to hold a bit-field (<a href="#6.7.2.1">6.7.2.1</a>).
22968 <li>  Whether a call to an inline function uses the inline definition or the external definition
22969  of the function (<a href="#6.7.4">6.7.4</a>).
22970 <li>  Whether or not a size expression is evaluated when it is part of the operand of a
22971  sizeof operator and changing the value of the size expression would not affect the
22972  result of the operator (<a href="#6.7.5.2">6.7.5.2</a>).
22973 <li>  The order in which any side effects occur among the initialization list expressions in
22974  an initializer (<a href="#6.7.8">6.7.8</a>).
22975 <li>  The layout of storage for function parameters (<a href="#6.9.1">6.9.1</a>).
22976 <li>  When a fully expanded macro replacement list contains a function-like macro name
22977  as its last preprocessing token and the next preprocessing token from the source file is
22978  a (, and the fully expanded replacement of that macro ends with the name of the first
22979  macro and the next preprocessing token from the source file is again a (, whether that
22980  is considered a nested replacement (<a href="#6.10.3">6.10.3</a>).
22981 <li>  The order in which # and ## operations are evaluated during macro substitution
22982  (<a href="#6.10.3.2">6.10.3.2</a>, <a href="#6.10.3.3">6.10.3.3</a>).
22983 <li>  Whether errno is a macro or an identifier with external linkage (<a href="#7.5">7.5</a>).
22984 <li>  The state of the floating-point status flags when execution passes from a part of the
22985  program translated with FENV_ACCESS ''off'' to a part translated with
22986  FENV_ACCESS ''on'' (<a href="#7.6.1">7.6.1</a>).
22987 <li>  The order in which feraiseexcept raises floating-point exceptions, except as
22988  stated in <a href="#F.7.6">F.7.6</a> (<a href="#7.6.2.3">7.6.2.3</a>).
22989 <li>  Whether math_errhandling is a macro or an identifier with external linkage
22990  (<a href="#7.12">7.12</a>).
22991 <li>  The results of the frexp functions when the specified value is not a floating-point
22992  number (<a href="#7.12.6.4">7.12.6.4</a>).
22993 <li>  The numeric result of the ilogb functions when the correct value is outside the
22994  range of the return type (<a href="#7.12.6.5">7.12.6.5</a>, <a href="#F.9.3.5">F.9.3.5</a>).
22995 <li>  The result of rounding when the value is out of range (<a href="#7.12.9.5">7.12.9.5</a>, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#F.9.6.5">F.9.6.5</a>).
22996 <!--page 503 -->
22997 <li>  The value stored by the remquo functions in the object pointed to by quo when y is
22998  zero (<a href="#7.12.10.3">7.12.10.3</a>).
22999 <li>  Whether setjmp is a macro or an identifier with external linkage (<a href="#7.13">7.13</a>).
23000 <li>  Whether va_copy and va_end are macros or identifiers with external linkage
23001  (<a href="#7.15.1">7.15.1</a>).
23002 <li>  The hexadecimal digit before the decimal point when a non-normalized floating-point
23003  number is printed with an a or A conversion specifier (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23004 <li>  The value of the file position indicator after a successful call to the ungetc function
23005  for a text stream, or the ungetwc function for any stream, until all pushed-back
23006  characters are read or discarded (<a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.24.3.10">7.24.3.10</a>).
23007 <li>  The details of the value stored by the fgetpos function (<a href="#7.19.9.1">7.19.9.1</a>).
23008 <li>  The details of the value returned by the ftell function for a text stream (<a href="#7.19.9.4">7.19.9.4</a>).
23009 <li>  Whether the strtod, strtof, strtold, wcstod, wcstof, and wcstold
23010  functions convert a minus-signed sequence to a negative number directly or by
23011  negating the value resulting from converting the corresponding unsigned sequence
23012  (<a href="#7.20.1.3">7.20.1.3</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>).
23013 <li>  The order and contiguity of storage allocated by successive calls to the calloc,
23014  malloc, and realloc functions (<a href="#7.20.3">7.20.3</a>).
23015 <li>  The amount of storage allocated by a successful call to the calloc, malloc, or
23016  realloc function when 0 bytes was requested (<a href="#7.20.3">7.20.3</a>).
23017 <li>  Which of two elements that compare as equal is matched by the bsearch function
23018  (<a href="#7.20.5.1">7.20.5.1</a>).
23019 <li>  The order of two elements that compare as equal in an array sorted by the qsort
23020  function (<a href="#7.20.5.2">7.20.5.2</a>).
23021 <li>  The encoding of the calendar time returned by the time function (<a href="#7.23.2.4">7.23.2.4</a>).
23022 <li>  The characters stored by the strftime or wcsftime function if any of the time
23023  values being converted is outside the normal range (<a href="#7.23.3.5">7.23.3.5</a>, <a href="#7.24.5.1">7.24.5.1</a>).
23024 <li>  The conversion state after an encoding error occurs (<a href="#7.24.6.3.2">7.24.6.3.2</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.1">7.24.6.4.1</a>,
23025  <a href="#7.24.6.4.2">7.24.6.4.2</a>,
23026 <li>  The resulting value when the ''invalid'' floating-point exception is raised during
23027  IEC 60559 floating to integer conversion (<a href="#F.4">F.4</a>).
23028 <li>  Whether conversion of non-integer IEC 60559 floating values to integer raises the
23029  ''inexact'' floating-point exception (<a href="#F.4">F.4</a>).
23030 <!--page 504 -->
23031 <li>  Whether or when library functions in <a href="#7.12">&lt;math.h&gt;</a> raise the ''inexact'' floating-point
23032  exception in an IEC 60559 conformant implementation (<a href="#F.9">F.9</a>).
23033 <li>  Whether or when library functions in <a href="#7.12">&lt;math.h&gt;</a> raise an undeserved ''underflow''
23034  floating-point exception in an IEC 60559 conformant implementation (<a href="#F.9">F.9</a>).
23035 <li>  The exponent value stored by frexp for a NaN or infinity (<a href="#F.9.3.4">F.9.3.4</a>).
23036 <li>  The numeric result returned by the lrint, llrint, lround, and llround
23037  functions if the rounded value is outside the range of the return type (<a href="#F.9.6.5">F.9.6.5</a>, <a href="#F.9.6.7">F.9.6.7</a>).
23038 <li>  The sign of one part of the complex result of several math functions for certain
23039  exceptional values in IEC 60559 compatible implementations (<a href="#G.6.1.1">G.6.1.1</a>, <a href="#G.6.2.2">G.6.2.2</a>,
23040  <a href="#G.6.2.3">G.6.2.3</a>, <a href="#G.6.2.4">G.6.2.4</a>, <a href="#G.6.2.5">G.6.2.5</a>, <a href="#G.6.2.6">G.6.2.6</a>, <a href="#G.6.3.1">G.6.3.1</a>, <a href="#G.6.4.2">G.6.4.2</a>).
23041 </ul>
23042
23043 <h3><a name="J.2" href="#J.2">J.2 Undefined behavior</a></h3>
23044 <p><!--para 1 -->
23045  The behavior is undefined in the following circumstances:
23046 <ul>
23047 <li>  A ''shall'' or ''shall not'' requirement that appears outside of a constraint is violated
23048  (clause 4).
23049 <li>  A nonempty source file does not end in a new-line character which is not immediately
23050  preceded by a backslash character or ends in a partial preprocessing token or
23051  comment (<a href="#5.1.1.2">5.1.1.2</a>).
23052 <li>  Token concatenation produces a character sequence matching the syntax of a
23053  universal character name (<a href="#5.1.1.2">5.1.1.2</a>).
23054 <li>  A program in a hosted environment does not define a function named main using one
23055  of the specified forms (<a href="#5.1.2.2.1">5.1.2.2.1</a>).
23056 <li>  A character not in the basic source character set is encountered in a source file, except
23057  in an identifier, a character constant, a string literal, a header name, a comment, or a
23058  preprocessing token that is never converted to a token (<a href="#5.2.1">5.2.1</a>).
23059 <li>  An identifier, comment, string literal, character constant, or header name contains an
23060  invalid multibyte character or does not begin and end in the initial shift state (<a href="#5.2.1.2">5.2.1.2</a>).
23061 <li>  The same identifier has both internal and external linkage in the same translation unit
23062  (<a href="#6.2.2">6.2.2</a>).
23063 <li>  An object is referred to outside of its lifetime (<a href="#6.2.4">6.2.4</a>).
23064 <li>  The value of a pointer to an object whose lifetime has ended is used (<a href="#6.2.4">6.2.4</a>).
23065 <li>  The value of an object with automatic storage duration is used while it is
23066  indeterminate (<a href="#6.2.4">6.2.4</a>, <a href="#6.7.8">6.7.8</a>, <a href="#6.8">6.8</a>).
23067 <li>  A trap representation is read by an lvalue expression that does not have character type
23068  (<a href="#6.2.6.1">6.2.6.1</a>).
23069 <!--page 505 -->
23070 <li>  A trap representation is produced by a side effect that modifies any part of the object
23071  using an lvalue expression that does not have character type (<a href="#6.2.6.1">6.2.6.1</a>).
23072 <li>  The arguments to certain operators are such that could produce a negative zero result,
23073  but the implementation does not support negative zeros (<a href="#6.2.6.2">6.2.6.2</a>).
23074 <li>  Two declarations of the same object or function specify types that are not compatible
23075  (<a href="#6.2.7">6.2.7</a>).
23076 <li>  Conversion to or from an integer type produces a value outside the range that can be
23077  represented (<a href="#6.3.1.4">6.3.1.4</a>).
23078 <li>  Demotion of one real floating type to another produces a value outside the range that
23079  can be represented (<a href="#6.3.1.5">6.3.1.5</a>).
23080 <li>  An lvalue does not designate an object when evaluated (<a href="#6.3.2.1">6.3.2.1</a>).
23081 <li>  A non-array lvalue with an incomplete type is used in a context that requires the value
23082  of the designated object (<a href="#6.3.2.1">6.3.2.1</a>).
23083 <li>  An lvalue having array type is converted to a pointer to the initial element of the
23084  array, and the array object has register storage class (<a href="#6.3.2.1">6.3.2.1</a>).
23085 <li>  An attempt is made to use the value of a void expression, or an implicit or explicit
23086  conversion (except to void) is applied to a void expression (<a href="#6.3.2.2">6.3.2.2</a>).
23087 <li>  Conversion of a pointer to an integer type produces a value outside the range that can
23088  be represented (<a href="#6.3.2.3">6.3.2.3</a>).
23089 <li>  Conversion between two pointer types produces a result that is incorrectly aligned
23090  (<a href="#6.3.2.3">6.3.2.3</a>).
23091 <li>  A pointer is used to call a function whose type is not compatible with the pointed-to
23092  type (<a href="#6.3.2.3">6.3.2.3</a>).
23093 <li>  An unmatched ' or " character is encountered on a logical source line during
23094  tokenization (<a href="#6.4">6.4</a>).
23095 <li>  A reserved keyword token is used in translation phase 7 or 8 for some purpose other
23096  than as a keyword (<a href="#6.4.1">6.4.1</a>).
23097 <li>  A universal character name in an identifier does not designate a character whose
23098  encoding falls into one of the specified ranges (<a href="#6.4.2.1">6.4.2.1</a>).
23099 <li>  The initial character of an identifier is a universal character name designating a digit
23100  (<a href="#6.4.2.1">6.4.2.1</a>).
23101 <li>  Two identifiers differ only in nonsignificant characters (<a href="#6.4.2.1">6.4.2.1</a>).
23102 <li>  The identifier __func__ is explicitly declared (<a href="#6.4.2.2">6.4.2.2</a>).
23103 <!--page 506 -->
23104 <li>  The program attempts to modify a string literal (<a href="#6.4.5">6.4.5</a>).
23105 <li>  The characters ', \, ", //, or /* occur in the sequence between the &lt; and &gt;
23106  delimiters, or the characters ', \, //, or /* occur in the sequence between the "
23107  delimiters, in a header name preprocessing token (<a href="#6.4.7">6.4.7</a>).
23108 <li>  Between two sequence points, an object is modified more than once, or is modified
23109  and the prior value is read other than to determine the value to be stored (<a href="#6.5">6.5</a>).
23110 <li>  An exceptional condition occurs during the evaluation of an expression (<a href="#6.5">6.5</a>).
23111 <li>  An object has its stored value accessed other than by an lvalue of an allowable type
23112  (<a href="#6.5">6.5</a>).
23113 <li>  An attempt is made to modify the result of a function call, a conditional operator, an
23114  assignment operator, or a comma operator, or to access it after the next sequence
23115  point (<a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.5.15">6.5.15</a>, <a href="#6.5.16">6.5.16</a>, <a href="#6.5.17">6.5.17</a>).
23116 <li>  For a call to a function without a function prototype in scope, the number of
23117  arguments does not equal the number of parameters (<a href="#6.5.2.2">6.5.2.2</a>).
23118 <li>  For call to a function without a function prototype in scope where the function is
23119  defined with a function prototype, either the prototype ends with an ellipsis or the
23120  types of the arguments after promotion are not compatible with the types of the
23121  parameters (<a href="#6.5.2.2">6.5.2.2</a>).
23122 <li>  For a call to a function without a function prototype in scope where the function is not
23123  defined with a function prototype, the types of the arguments after promotion are not
23124  compatible with those of the parameters after promotion (with certain exceptions)
23125  (<a href="#6.5.2.2">6.5.2.2</a>).
23126 <li>  A function is defined with a type that is not compatible with the type (of the
23127  expression) pointed to by the expression that denotes the called function (<a href="#6.5.2.2">6.5.2.2</a>).
23128 <li>  The operand of the unary * operator has an invalid value (<a href="#6.5.3.2">6.5.3.2</a>).
23129 <li>  A pointer is converted to other than an integer or pointer type (<a href="#6.5.4">6.5.4</a>).
23130 <li>  The value of the second operand of the / or % operator is zero (<a href="#6.5.5">6.5.5</a>).
23131 <li>  Addition or subtraction of a pointer into, or just beyond, an array object and an
23132  integer type produces a result that does not point into, or just beyond, the same array
23133  object (<a href="#6.5.6">6.5.6</a>).
23134 <li>  Addition or subtraction of a pointer into, or just beyond, an array object and an
23135  integer type produces a result that points just beyond the array object and is used as
23136  the operand of a unary * operator that is evaluated (<a href="#6.5.6">6.5.6</a>).
23137 <li>  Pointers that do not point into, or just beyond, the same array object are subtracted
23138  (<a href="#6.5.6">6.5.6</a>).
23139 <!--page 507 -->
23140 <li>  An array subscript is out of range, even if an object is apparently accessible with the
23141  given subscript (as in the lvalue expression a[1][7] given the declaration int
23142  a[4][5]) (<a href="#6.5.6">6.5.6</a>).
23143 <li>  The result of subtracting two pointers is not representable in an object of type
23144  ptrdiff_t (<a href="#6.5.6">6.5.6</a>).
23145 <li>  An expression is shifted by a negative number or by an amount greater than or equal
23146  to the width of the promoted expression (<a href="#6.5.7">6.5.7</a>).
23147 <li>  An expression having signed promoted type is left-shifted and either the value of the
23148  expression is negative or the result of shifting would be not be representable in the
23149  promoted type (<a href="#6.5.7">6.5.7</a>).
23150 <li>  Pointers that do not point to the same aggregate or union (nor just beyond the same
23151  array object) are compared using relational operators (<a href="#6.5.8">6.5.8</a>).
23152 <li>  An object is assigned to an inexactly overlapping object or to an exactly overlapping
23153  object with incompatible type (<a href="#6.5.16.1">6.5.16.1</a>).
23154 <li>  An expression that is required to be an integer constant expression does not have an
23155  integer type; has operands that are not integer constants, enumeration constants,
23156  character constants, sizeof expressions whose results are integer constants, or
23157  immediately-cast floating constants; or contains casts (outside operands to sizeof
23158  operators) other than conversions of arithmetic types to integer types (<a href="#6.6">6.6</a>).
23159 <li>  A constant expression in an initializer is not, or does not evaluate to, one of the
23160  following: an arithmetic constant expression, a null pointer constant, an address
23161  constant, or an address constant for an object type plus or minus an integer constant
23162  expression (<a href="#6.6">6.6</a>).
23163 <li>  An arithmetic constant expression does not have arithmetic type; has operands that
23164  are not integer constants, floating constants, enumeration constants, character
23165  constants, or sizeof expressions; or contains casts (outside operands to sizeof
23166  operators) other than conversions of arithmetic types to arithmetic types (<a href="#6.6">6.6</a>).
23167 <li>  The value of an object is accessed by an array-subscript [], member-access . or -&gt;,
23168  address &amp;, or indirection * operator or a pointer cast in creating an address constant
23169  (<a href="#6.6">6.6</a>).
23170 <li>  An identifier for an object is declared with no linkage and the type of the object is
23171  incomplete after its declarator, or after its init-declarator if it has an initializer (<a href="#6.7">6.7</a>).
23172 <li>  A function is declared at block scope with an explicit storage-class specifier other
23173  than extern (<a href="#6.7.1">6.7.1</a>).
23174 <li>  A structure or union is defined as containing no named members (<a href="#6.7.2.1">6.7.2.1</a>).
23175 <!--page 508 -->
23176 <li>  An attempt is made to access, or generate a pointer to just past, a flexible array
23177  member of a structure when the referenced object provides no elements for that array
23178  (<a href="#6.7.2.1">6.7.2.1</a>).
23179 <li>  When the complete type is needed, an incomplete structure or union type is not
23180  completed in the same scope by another declaration of the tag that defines the content
23181  (<a href="#6.7.2.3">6.7.2.3</a>).
23182 <li>  An attempt is made to modify an object defined with a const-qualified type through
23183  use of an lvalue with non-const-qualified type (<a href="#6.7.3">6.7.3</a>).
23184 <li>  An attempt is made to refer to an object defined with a volatile-qualified type through
23185  use of an lvalue with non-volatile-qualified type (<a href="#6.7.3">6.7.3</a>).
23186 <li>  The specification of a function type includes any type qualifiers (<a href="#6.7.3">6.7.3</a>).
23187 <li>  Two qualified types that are required to be compatible do not have the identically
23188  qualified version of a compatible type (<a href="#6.7.3">6.7.3</a>).
23189 <li>  An object which has been modified is accessed through a restrict-qualified pointer to
23190  a const-qualified type, or through a restrict-qualified pointer and another pointer that
23191  are not both based on the same object (<a href="#6.7.3.1">6.7.3.1</a>).
23192 <li>  A restrict-qualified pointer is assigned a value based on another restricted pointer
23193  whose associated block neither began execution before the block associated with this
23194  pointer, nor ended before the assignment (<a href="#6.7.3.1">6.7.3.1</a>).
23195 <li>  A function with external linkage is declared with an inline function specifier, but is
23196  not also defined in the same translation unit (<a href="#6.7.4">6.7.4</a>).
23197 <li>  Two pointer types that are required to be compatible are not identically qualified, or
23198  are not pointers to compatible types (<a href="#6.7.5.1">6.7.5.1</a>).
23199 <li>  The size expression in an array declaration is not a constant expression and evaluates
23200  at program execution time to a nonpositive value (<a href="#6.7.5.2">6.7.5.2</a>).
23201 <li>  In a context requiring two array types to be compatible, they do not have compatible
23202  element types, or their size specifiers evaluate to unequal values (<a href="#6.7.5.2">6.7.5.2</a>).
23203 <li>  A declaration of an array parameter includes the keyword static within the [ and
23204  ] and the corresponding argument does not provide access to the first element of an
23205  array with at least the specified number of elements (<a href="#6.7.5.3">6.7.5.3</a>).
23206 <li>  A storage-class specifier or type qualifier modifies the keyword void as a function
23207  parameter type list (<a href="#6.7.5.3">6.7.5.3</a>).
23208 <li>  In a context requiring two function types to be compatible, they do not have
23209   compatible return types, or their parameters disagree in use of the ellipsis terminator
23210   or the number and type of parameters (after default argument promotion, when there
23211    is no parameter type list or when one type is specified by a function definition with an
23212 <!--page 509 -->
23213   identifier list) (<a href="#6.7.5.3">6.7.5.3</a>).
23214 <li>  The value of an unnamed member of a structure or union is used (<a href="#6.7.8">6.7.8</a>).
23215 <li>  The initializer for a scalar is neither a single expression nor a single expression
23216  enclosed in braces (<a href="#6.7.8">6.7.8</a>).
23217 <li>  The initializer for a structure or union object that has automatic storage duration is
23218  neither an initializer list nor a single expression that has compatible structure or union
23219  type (<a href="#6.7.8">6.7.8</a>).
23220 <li>  The initializer for an aggregate or union, other than an array initialized by a string
23221  literal, is not a brace-enclosed list of initializers for its elements or members (<a href="#6.7.8">6.7.8</a>).
23222 <li>  An identifier with external linkage is used, but in the program there does not exist
23223  exactly one external definition for the identifier, or the identifier is not used and there
23224  exist multiple external definitions for the identifier (<a href="#6.9">6.9</a>).
23225 <li>  A function definition includes an identifier list, but the types of the parameters are not
23226  declared in a following declaration list (<a href="#6.9.1">6.9.1</a>).
23227 <li>  An adjusted parameter type in a function definition is not an object type (<a href="#6.9.1">6.9.1</a>).
23228 <li>  A function that accepts a variable number of arguments is defined without a
23229  parameter type list that ends with the ellipsis notation (<a href="#6.9.1">6.9.1</a>).
23230 <li>  The } that terminates a function is reached, and the value of the function call is used
23231  by the caller (<a href="#6.9.1">6.9.1</a>).
23232 <li>  An identifier for an object with internal linkage and an incomplete type is declared
23233  with a tentative definition (<a href="#6.9.2">6.9.2</a>).
23234 <li>  The token defined is generated during the expansion of a #if or #elif
23235  preprocessing directive, or the use of the defined unary operator does not match
23236  one of the two specified forms prior to macro replacement (<a href="#6.10.1">6.10.1</a>).
23237 <li>  The #include preprocessing directive that results after expansion does not match
23238  one of the two header name forms (<a href="#6.10.2">6.10.2</a>).
23239 <li>  The character sequence in an #include preprocessing directive does not start with a
23240  letter (<a href="#6.10.2">6.10.2</a>).
23241 <li>  There are sequences of preprocessing tokens within the list of macro arguments that
23242  would otherwise act as preprocessing directives (<a href="#6.10.3">6.10.3</a>).
23243 <li>  The result of the preprocessing operator # is not a valid character string literal
23244  (<a href="#6.10.3.2">6.10.3.2</a>).
23245 <li>  The result of the preprocessing operator ## is not a valid preprocessing token
23246  (<a href="#6.10.3.3">6.10.3.3</a>).
23247 <!--page 510 -->
23248 <li>  The #line preprocessing directive that results after expansion does not match one of
23249  the two well-defined forms, or its digit sequence specifies zero or a number greater
23250  than 2147483647 (<a href="#6.10.4">6.10.4</a>).
23251 <li>  A non-STDC #pragma preprocessing directive that is documented as causing
23252  translation failure or some other form of undefined behavior is encountered (<a href="#6.10.6">6.10.6</a>).
23253 <li>  A #pragma STDC preprocessing directive does not match one of the well-defined
23254  forms (<a href="#6.10.6">6.10.6</a>).
23255 <li>  The name of a predefined macro, or the identifier defined, is the subject of a
23256  #define or #undef preprocessing directive (<a href="#6.10.8">6.10.8</a>).
23257 <li>  An attempt is made to copy an object to an overlapping object by use of a library
23258  function, other than as explicitly allowed (e.g., memmove) (clause 7).
23259 <li>  A file with the same name as one of the standard headers, not provided as part of the
23260  implementation, is placed in any of the standard places that are searched for included
23261  source files (<a href="#7.1.2">7.1.2</a>).
23262 <li>  A header is included within an external declaration or definition (<a href="#7.1.2">7.1.2</a>).
23263 <li>  A function, object, type, or macro that is specified as being declared or defined by
23264  some standard header is used before any header that declares or defines it is included
23265  (<a href="#7.1.2">7.1.2</a>).
23266 <li>  A standard header is included while a macro is defined with the same name as a
23267  keyword (<a href="#7.1.2">7.1.2</a>).
23268 <li>  The program attempts to declare a library function itself, rather than via a standard
23269  header, but the declaration does not have external linkage (<a href="#7.1.2">7.1.2</a>).
23270 <li>  The program declares or defines a reserved identifier, other than as allowed by <a href="#7.1.4">7.1.4</a>
23271  (<a href="#7.1.3">7.1.3</a>).
23272 <li>  The program removes the definition of a macro whose name begins with an
23273  underscore and either an uppercase letter or another underscore (<a href="#7.1.3">7.1.3</a>).
23274 <li>  An argument to a library function has an invalid value or a type not expected by a
23275  function with variable number of arguments (<a href="#7.1.4">7.1.4</a>).
23276 <li>  The pointer passed to a library function array parameter does not have a value such
23277  that all address computations and object accesses are valid (<a href="#7.1.4">7.1.4</a>).
23278 <li>  The macro definition of assert is suppressed in order to access an actual function
23279  (<a href="#7.2">7.2</a>).
23280 <li>  The argument to the assert macro does not have a scalar type (<a href="#7.2">7.2</a>).
23281 <li>  The CX_LIMITED_RANGE, FENV_ACCESS, or FP_CONTRACT pragma is used in
23282  any context other than outside all external declarations or preceding all explicit
23283 <!--page 511 -->
23284   declarations and statements inside a compound statement (<a href="#7.3.4">7.3.4</a>, <a href="#7.6.1">7.6.1</a>, <a href="#7.12.2">7.12.2</a>).
23285 <li>  The value of an argument to a character handling function is neither equal to the value
23286  of EOF nor representable as an unsigned char (<a href="#7.4">7.4</a>).
23287 <li>  A macro definition of errno is suppressed in order to access an actual object, or the
23288  program defines an identifier with the name errno (<a href="#7.5">7.5</a>).
23289 <li>  Part of the program tests floating-point status flags, sets floating-point control modes,
23290  or runs under non-default mode settings, but was translated with the state for the
23291  FENV_ACCESS pragma ''off'' (<a href="#7.6.1">7.6.1</a>).
23292 <li>  The exception-mask argument for one of the functions that provide access to the
23293  floating-point status flags has a nonzero value not obtained by bitwise OR of the
23294  floating-point exception macros (<a href="#7.6.2">7.6.2</a>).
23295 <li>  The fesetexceptflag function is used to set floating-point status flags that were
23296  not specified in the call to the fegetexceptflag function that provided the value
23297  of the corresponding fexcept_t object (<a href="#7.6.2.4">7.6.2.4</a>).
23298 <li>  The argument to fesetenv or feupdateenv is neither an object set by a call to
23299  fegetenv or feholdexcept, nor is it an environment macro (<a href="#7.6.4.3">7.6.4.3</a>, <a href="#7.6.4.4">7.6.4.4</a>).
23300 <li>  The value of the result of an integer arithmetic or conversion function cannot be
23301  represented (<a href="#7.8.2.1">7.8.2.1</a>, <a href="#7.8.2.2">7.8.2.2</a>, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.20.6.1">7.20.6.1</a>, <a href="#7.20.6.2">7.20.6.2</a>, <a href="#7.20.1">7.20.1</a>).
23302 <li>  The program modifies the string pointed to by the value returned by the setlocale
23303  function (<a href="#7.11.1.1">7.11.1.1</a>).
23304 <li>  The program modifies the structure pointed to by the value returned by the
23305  localeconv function (<a href="#7.11.2.1">7.11.2.1</a>).
23306 <li>  A macro definition of math_errhandling is suppressed or the program defines
23307  an identifier with the name math_errhandling (<a href="#7.12">7.12</a>).
23308 <li>  An argument to a floating-point classification or comparison macro is not of real
23309  floating type (<a href="#7.12.3">7.12.3</a>, <a href="#7.12.14">7.12.14</a>).
23310 <li>  A macro definition of setjmp is suppressed in order to access an actual function, or
23311  the program defines an external identifier with the name setjmp (<a href="#7.13">7.13</a>).
23312 <li>  An invocation of the setjmp macro occurs other than in an allowed context
23313  (<a href="#7.13.2.1">7.13.2.1</a>).
23314 <li>  The longjmp function is invoked to restore a nonexistent environment (<a href="#7.13.2.1">7.13.2.1</a>).
23315 <li>  After a longjmp, there is an attempt to access the value of an object of automatic
23316  storage class with non-volatile-qualified type, local to the function containing the
23317  invocation of the corresponding setjmp macro, that was changed between the
23318  setjmp invocation and longjmp call (<a href="#7.13.2.1">7.13.2.1</a>).
23319 <!--page 512 -->
23320 <li>  The program specifies an invalid pointer to a signal handler function (<a href="#7.14.1.1">7.14.1.1</a>).
23321 <li>  A signal handler returns when the signal corresponded to a computational exception
23322  (<a href="#7.14.1.1">7.14.1.1</a>).
23323 <li>  A signal occurs as the result of calling the abort or raise function, and the signal
23324  handler calls the raise function (<a href="#7.14.1.1">7.14.1.1</a>).
23325 <li>  A signal occurs other than as the result of calling the abort or raise function, and
23326  the signal handler refers to an object with static storage duration other than by
23327  assigning a value to an object declared as volatile sig_atomic_t, or calls any
23328  function in the standard library other than the abort function, the _Exit function,
23329  or the signal function (for the same signal number) (<a href="#7.14.1.1">7.14.1.1</a>).
23330 <li>  The value of errno is referred to after a signal occurred other than as the result of
23331  calling the abort or raise function and the corresponding signal handler obtained
23332  a SIG_ERR return from a call to the signal function (<a href="#7.14.1.1">7.14.1.1</a>).
23333 <li>  A signal is generated by an asynchronous signal handler (<a href="#7.14.1.1">7.14.1.1</a>).
23334 <li>  A function with a variable number of arguments attempts to access its varying
23335  arguments other than through a properly declared and initialized va_list object, or
23336  before the va_start macro is invoked (<a href="#7.15">7.15</a>, <a href="#7.15.1.1">7.15.1.1</a>, <a href="#7.15.1.4">7.15.1.4</a>).
23337 <li>  The macro va_arg is invoked using the parameter ap that was passed to a function
23338  that invoked the macro va_arg with the same parameter (<a href="#7.15">7.15</a>).
23339 <li>  A macro definition of va_start, va_arg, va_copy, or va_end is suppressed in
23340  order to access an actual function, or the program defines an external identifier with
23341  the name va_copy or va_end (<a href="#7.15.1">7.15.1</a>).
23342 <li>  The va_start or va_copy macro is invoked without a corresponding invocation
23343  of the va_end macro in the same function, or vice versa (<a href="#7.15.1">7.15.1</a>, <a href="#7.15.1.2">7.15.1.2</a>, <a href="#7.15.1.3">7.15.1.3</a>,
23344  <a href="#7.15.1.4">7.15.1.4</a>).
23345 <li>  The type parameter to the va_arg macro is not such that a pointer to an object of
23346  that type can be obtained simply by postfixing a * (<a href="#7.15.1.1">7.15.1.1</a>).
23347 <li>  The va_arg macro is invoked when there is no actual next argument, or with a
23348  specified type that is not compatible with the promoted type of the actual next
23349  argument, with certain exceptions (<a href="#7.15.1.1">7.15.1.1</a>).
23350 <li>  The va_copy or va_start macro is called to initialize a va_list that was
23351  previously initialized by either macro without an intervening invocation of the
23352  va_end macro for the same va_list (<a href="#7.15.1.2">7.15.1.2</a>, <a href="#7.15.1.4">7.15.1.4</a>).
23353 <li>  The parameter parmN of a va_start macro is declared with the register
23354  storage class, with a function or array type, or with a type that is not compatible with
23355  the type that results after application of the default argument promotions (<a href="#7.15.1.4">7.15.1.4</a>).
23356 <!--page 513 -->
23357 <li>  The member designator parameter of an offsetof macro is an invalid right
23358  operand of the . operator for the type parameter, or designates a bit-field (<a href="#7.17">7.17</a>).
23359 <li>  The argument in an instance of one of the integer-constant macros is not a decimal,
23360  octal, or hexadecimal constant, or it has a value that exceeds the limits for the
23361  corresponding type (<a href="#7.18.4">7.18.4</a>).
23362 <li>  A byte input/output function is applied to a wide-oriented stream, or a wide character
23363  input/output function is applied to a byte-oriented stream (<a href="#7.19.2">7.19.2</a>).
23364 <li>  Use is made of any portion of a file beyond the most recent wide character written to
23365  a wide-oriented stream (<a href="#7.19.2">7.19.2</a>).
23366 <li>  The value of a pointer to a FILE object is used after the associated file is closed
23367  (<a href="#7.19.3">7.19.3</a>).
23368 <li>  The stream for the fflush function points to an input stream or to an update stream
23369  in which the most recent operation was input (<a href="#7.19.5.2">7.19.5.2</a>).
23370 <li>  The string pointed to by the mode argument in a call to the fopen function does not
23371  exactly match one of the specified character sequences (<a href="#7.19.5.3">7.19.5.3</a>).
23372 <li>  An output operation on an update stream is followed by an input operation without an
23373  intervening call to the fflush function or a file positioning function, or an input
23374  operation on an update stream is followed by an output operation with an intervening
23375  call to a file positioning function (<a href="#7.19.5.3">7.19.5.3</a>).
23376 <li>  An attempt is made to use the contents of the array that was supplied in a call to the
23377  setvbuf function (<a href="#7.19.5.6">7.19.5.6</a>).
23378 <li>  There are insufficient arguments for the format in a call to one of the formatted
23379  input/output functions, or an argument does not have an appropriate type (<a href="#7.19.6.1">7.19.6.1</a>,
23380  <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23381 <li>  The format in a call to one of the formatted input/output functions or to the
23382  strftime or wcsftime function is not a valid multibyte character sequence that
23383  begins and ends in its initial shift state (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.23.3.5">7.23.3.5</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>,
23384  <a href="#7.24.5.1">7.24.5.1</a>).
23385 <li>  In a call to one of the formatted output functions, a precision appears with a
23386  conversion specifier other than those described (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23387 <li>  A conversion specification for a formatted output function uses an asterisk to denote
23388  an argument-supplied field width or precision, but the corresponding argument is not
23389  provided (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23390 <li>  A conversion specification for a formatted output function uses a # or 0 flag with a
23391  conversion specifier other than those described (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23392 <!--page 514 -->
23393 <li>  A conversion specification for one of the formatted input/output functions uses a
23394  length modifier with a conversion specifier other than those described (<a href="#7.19.6.1">7.19.6.1</a>,
23395  <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23396 <li>  An s conversion specifier is encountered by one of the formatted output functions,
23397  and the argument is missing the null terminator (unless a precision is specified that
23398  does not require null termination) (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23399 <li>  An n conversion specification for one of the formatted input/output functions includes
23400  any flags, an assignment-suppressing character, a field width, or a precision (<a href="#7.19.6.1">7.19.6.1</a>,
23401  <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23402 <li>  A % conversion specifier is encountered by one of the formatted input/output
23403  functions, but the complete conversion specification is not exactly %% (<a href="#7.19.6.1">7.19.6.1</a>,
23404  <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23405 <li>  An invalid conversion specification is found in the format for one of the formatted
23406  input/output functions, or the strftime or wcsftime function (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,
23407  <a href="#7.23.3.5">7.23.3.5</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.5.1">7.24.5.1</a>).
23408 <li>  The number of characters transmitted by a formatted output function is greater than
23409  INT_MAX (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.3">7.19.6.3</a>, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.10">7.19.6.10</a>).
23410 <li>  The result of a conversion by one of the formatted input functions cannot be
23411  represented in the corresponding object, or the receiving object does not have an
23412  appropriate type (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23413 <li>  A c, s, or [ conversion specifier is encountered by one of the formatted input
23414  functions, and the array pointed to by the corresponding argument is not large enough
23415  to accept the input sequence (and a null terminator if the conversion specifier is s or
23416  [) (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23417 <li>  A c, s, or [ conversion specifier with an l qualifier is encountered by one of the
23418  formatted input functions, but the input is not a valid multibyte character sequence
23419  that begins in the initial shift state (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23420 <li>  The input item for a %p conversion by one of the formatted input functions is not a
23421  value converted earlier during the same program execution (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23422 <li>  The vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf,
23423  vsscanf, vfwprintf, vfwscanf, vswprintf, vswscanf, vwprintf, or
23424  vwscanf function is called with an improperly initialized va_list argument, or
23425  the argument is used (other than in an invocation of va_end) after the function
23426  returns (<a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.9">7.19.6.9</a>, <a href="#7.19.6.10">7.19.6.10</a>, <a href="#7.19.6.11">7.19.6.11</a>, <a href="#7.19.6.12">7.19.6.12</a>, <a href="#7.19.6.13">7.19.6.13</a>, <a href="#7.19.6.14">7.19.6.14</a>,
23427  <a href="#7.24.2.5">7.24.2.5</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.7">7.24.2.7</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.10">7.24.2.10</a>).
23428 <li>  The contents of the array supplied in a call to the fgets, gets, or fgetws function
23429  are used after a read error occurred (<a href="#7.19.7.2">7.19.7.2</a>, <a href="#7.19.7.7">7.19.7.7</a>, <a href="#7.24.3.2">7.24.3.2</a>).
23430 <!--page 515 -->
23431 <li>  The file position indicator for a binary stream is used after a call to the ungetc
23432  function where its value was zero before the call (<a href="#7.19.7.11">7.19.7.11</a>).
23433 <li>  The file position indicator for a stream is used after an error occurred during a call to
23434  the fread or fwrite function (<a href="#7.19.8.1">7.19.8.1</a>, <a href="#7.19.8.2">7.19.8.2</a>).
23435 <li>  A partial element read by a call to the fread function is used (<a href="#7.19.8.1">7.19.8.1</a>).
23436 <li>  The fseek function is called for a text stream with a nonzero offset and either the
23437  offset was not returned by a previous successful call to the ftell function on a
23438  stream associated with the same file or whence is not SEEK_SET (<a href="#7.19.9.2">7.19.9.2</a>).
23439 <li>  The fsetpos function is called to set a position that was not returned by a previous
23440  successful call to the fgetpos function on a stream associated with the same file
23441  (<a href="#7.19.9.3">7.19.9.3</a>).
23442 <li>  A non-null pointer returned by a call to the calloc, malloc, or realloc function
23443  with a zero requested size is used to access an object (<a href="#7.20.3">7.20.3</a>).
23444 <li>  The value of a pointer that refers to space deallocated by a call to the free or
23445  realloc function is used (<a href="#7.20.3">7.20.3</a>).
23446 <li>  The pointer argument to the free or realloc function does not match a pointer
23447  earlier returned by calloc, malloc, or realloc, or the space has been
23448  deallocated by a call to free or realloc (<a href="#7.20.3.2">7.20.3.2</a>, <a href="#7.20.3.4">7.20.3.4</a>).
23449 <li>  The value of the object allocated by the malloc function is used (<a href="#7.20.3.3">7.20.3.3</a>).
23450 <li>  The value of any bytes in a new object allocated by the realloc function beyond
23451  the size of the old object are used (<a href="#7.20.3.4">7.20.3.4</a>).
23452 <li>  The program executes more than one call to the exit function (<a href="#7.20.4.3">7.20.4.3</a>).
23453 <li>  During the call to a function registered with the atexit function, a call is made to
23454  the longjmp function that would terminate the call to the registered function
23455  (<a href="#7.20.4.3">7.20.4.3</a>).
23456 <li>  The string set up by the getenv or strerror function is modified by the program
23457  (<a href="#7.20.4.5">7.20.4.5</a>, <a href="#7.21.6.2">7.21.6.2</a>).
23458 <li>  A command is executed through the system function in a way that is documented as
23459  causing termination or some other form of undefined behavior (<a href="#7.20.4.6">7.20.4.6</a>).
23460 <li>  A searching or sorting utility function is called with an invalid pointer argument, even
23461  if the number of elements is zero (<a href="#7.20.5">7.20.5</a>).
23462 <li>  The comparison function called by a searching or sorting utility function alters the
23463  contents of the array being searched or sorted, or returns ordering values
23464  inconsistently (<a href="#7.20.5">7.20.5</a>).
23465 <!--page 516 -->
23466 <li>  The array being searched by the bsearch function does not have its elements in
23467  proper order (<a href="#7.20.5.1">7.20.5.1</a>).
23468 <li>  The current conversion state is used by a multibyte/wide character conversion
23469  function after changing the LC_CTYPE category (<a href="#7.20.7">7.20.7</a>).
23470 <li>  A string or wide string utility function is instructed to access an array beyond the end
23471  of an object (<a href="#7.21.1">7.21.1</a>, <a href="#7.24.4">7.24.4</a>).
23472 <li>  A string or wide string utility function is called with an invalid pointer argument, even
23473  if the length is zero (<a href="#7.21.1">7.21.1</a>, <a href="#7.24.4">7.24.4</a>).
23474 <li>  The contents of the destination array are used after a call to the strxfrm,
23475  strftime, wcsxfrm, or wcsftime function in which the specified length was
23476  too small to hold the entire null-terminated result (<a href="#7.21.4.5">7.21.4.5</a>, <a href="#7.23.3.5">7.23.3.5</a>, <a href="#7.24.4.4.4">7.24.4.4.4</a>,
23477  <a href="#7.24.5.1">7.24.5.1</a>).
23478 <li>  The first argument in the very first call to the strtok or wcstok is a null pointer
23479  (<a href="#7.21.5.8">7.21.5.8</a>, <a href="#7.24.4.5.7">7.24.4.5.7</a>).
23480 <li>  The type of an argument to a type-generic macro is not compatible with the type of
23481  the corresponding parameter of the selected function (<a href="#7.22">7.22</a>).
23482 <li>  A complex argument is supplied for a generic parameter of a type-generic macro that
23483  has no corresponding complex function (<a href="#7.22">7.22</a>).
23484 <li>  The argument corresponding to an s specifier without an l qualifier in a call to the
23485  fwprintf function does not point to a valid multibyte character sequence that
23486  begins in the initial shift state (<a href="#7.24.2.11">7.24.2.11</a>).
23487 <li>  In a call to the wcstok function, the object pointed to by ptr does not have the
23488  value stored by the previous call for the same wide string (<a href="#7.24.4.5.7">7.24.4.5.7</a>).
23489 <li>  An mbstate_t object is used inappropriately (<a href="#7.24.6">7.24.6</a>).
23490 <li>  The value of an argument of type wint_t to a wide character classification or case
23491  mapping function is neither equal to the value of WEOF nor representable as a
23492  wchar_t (<a href="#7.25.1">7.25.1</a>).
23493 <li>  The iswctype function is called using a different LC_CTYPE category from the
23494  one in effect for the call to the wctype function that returned the description
23495  (<a href="#7.25.2.2.1">7.25.2.2.1</a>).
23496 <li>  The towctrans function is called using a different LC_CTYPE category from the
23497  one in effect for the call to the wctrans function that returned the description
23498  (<a href="#7.25.3.2.1">7.25.3.2.1</a>).
23499 <!--page 517 -->
23500 </ul>
23501
23502 <h3><a name="J.3" href="#J.3">J.3 Implementation-defined behavior</a></h3>
23503 <p><!--para 1 -->
23504  A conforming implementation is required to document its choice of behavior in each of
23505  the areas listed in this subclause. The following are implementation-defined:
23506
23507 <h4><a name="J.3.1" href="#J.3.1">J.3.1 Translation</a></h4>
23508 <p><!--para 1 -->
23509 <ul>
23510 <li>  How a diagnostic is identified (<a href="#3.10">3.10</a>, <a href="#5.1.1.3">5.1.1.3</a>).
23511 <li>  Whether each nonempty sequence of white-space characters other than new-line is
23512  retained or replaced by one space character in translation phase 3 (<a href="#5.1.1.2">5.1.1.2</a>).
23513 </ul>
23514
23515 <h4><a name="J.3.2" href="#J.3.2">J.3.2 Environment</a></h4>
23516 <p><!--para 1 -->
23517 <ul>
23518 <li>  The mapping between physical source file multibyte characters and the source
23519  character set in translation phase 1 (<a href="#5.1.1.2">5.1.1.2</a>).
23520 <li>  The name and type of the function called at program startup in a freestanding
23521  environment (<a href="#5.1.2.1">5.1.2.1</a>).
23522 <li>  The effect of program termination in a freestanding environment (<a href="#5.1.2.1">5.1.2.1</a>).
23523 <li>  An alternative manner in which the main function may be defined (<a href="#5.1.2.2.1">5.1.2.2.1</a>).
23524 <li>  The values given to the strings pointed to by the argv argument to main (<a href="#5.1.2.2.1">5.1.2.2.1</a>).
23525 <li>  What constitutes an interactive device (<a href="#5.1.2.3">5.1.2.3</a>).
23526 <li>  The set of signals, their semantics, and their default handling (<a href="#7.14">7.14</a>).
23527 <li>  Signal values other than SIGFPE, SIGILL, and SIGSEGV that correspond to a
23528  computational exception (<a href="#7.14.1.1">7.14.1.1</a>).
23529 <li>  Signals for which the equivalent of signal(sig, SIG_IGN); is executed at
23530  program startup (<a href="#7.14.1.1">7.14.1.1</a>).
23531 <li>  The set of environment names and the method for altering the environment list used
23532  by the getenv function (<a href="#7.20.4.5">7.20.4.5</a>).
23533 <li>  The manner of execution of the string by the system function (<a href="#7.20.4.6">7.20.4.6</a>).
23534 </ul>
23535
23536 <h4><a name="J.3.3" href="#J.3.3">J.3.3 Identifiers</a></h4>
23537 <p><!--para 1 -->
23538 <ul>
23539 <li>  Which additional multibyte characters may appear in identifiers and their
23540  correspondence to universal character names (<a href="#6.4.2">6.4.2</a>).
23541 <li>  The number of significant initial characters in an identifier (<a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2">6.4.2</a>).
23542 <!--page 518 -->
23543 </ul>
23544
23545 <h4><a name="J.3.4" href="#J.3.4">J.3.4 Characters</a></h4>
23546 <p><!--para 1 -->
23547 <ul>
23548 <li>  The number of bits in a byte (<a href="#3.6">3.6</a>).
23549 <li>  The values of the members of the execution character set (<a href="#5.2.1">5.2.1</a>).
23550 <li>  The unique value of the member of the execution character set produced for each of
23551  the standard alphabetic escape sequences (<a href="#5.2.2">5.2.2</a>).
23552 <li>  The value of a char object into which has been stored any character other than a
23553  member of the basic execution character set (<a href="#6.2.5">6.2.5</a>).
23554 <li>  Which of signed char or unsigned char has the same range, representation,
23555  and behavior as ''plain'' char (<a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>).
23556 <li>  The mapping of members of the source character set (in character constants and string
23557  literals) to members of the execution character set (<a href="#6.4.4.4">6.4.4.4</a>, <a href="#5.1.1.2">5.1.1.2</a>).
23558 <li>  The value of an integer character constant containing more than one character or
23559  containing a character or escape sequence that does not map to a single-byte
23560  execution character (<a href="#6.4.4.4">6.4.4.4</a>).
23561 <li>  The value of a wide character constant containing more than one multibyte character,
23562  or containing a multibyte character or escape sequence not represented in the
23563  extended execution character set (<a href="#6.4.4.4">6.4.4.4</a>).
23564 <li>  The current locale used to convert a wide character constant consisting of a single
23565  multibyte character that maps to a member of the extended execution character set
23566  into a corresponding wide character code (<a href="#6.4.4.4">6.4.4.4</a>).
23567 <li>  The current locale used to convert a wide string literal into corresponding wide
23568  character codes (<a href="#6.4.5">6.4.5</a>).
23569 <li>  The value of a string literal containing a multibyte character or escape sequence not
23570  represented in the execution character set (<a href="#6.4.5">6.4.5</a>).
23571 </ul>
23572
23573 <h4><a name="J.3.5" href="#J.3.5">J.3.5 Integers</a></h4>
23574 <p><!--para 1 -->
23575 <ul>
23576 <li>  Any extended integer types that exist in the implementation (<a href="#6.2.5">6.2.5</a>).
23577 <li>  Whether signed integer types are represented using sign and magnitude, two's
23578  complement, or ones' complement, and whether the extraordinary value is a trap
23579  representation or an ordinary value (<a href="#6.2.6.2">6.2.6.2</a>).
23580 <li>  The rank of any extended integer type relative to another extended integer type with
23581  the same precision (<a href="#6.3.1.1">6.3.1.1</a>).
23582 <li>  The result of, or the signal raised by, converting an integer to a signed integer type
23583  when the value cannot be represented in an object of that type (<a href="#6.3.1.3">6.3.1.3</a>).
23584 <!--page 519 -->
23585 <li>  The results of some bitwise operations on signed integers (<a href="#6.5">6.5</a>).
23586 </ul>
23587
23588 <h4><a name="J.3.6" href="#J.3.6">J.3.6 Floating point</a></h4>
23589 <p><!--para 1 -->
23590 <ul>
23591 <li>  The accuracy of the floating-point operations and of the library functions in
23592  <a href="#7.12">&lt;math.h&gt;</a> and <a href="#7.3">&lt;complex.h&gt;</a> that return floating-point results (<a href="#5.2.4.2.2">5.2.4.2.2</a>).
23593 <li>  The accuracy of the conversions between floating-point internal representations and
23594  string representations performed by the library functions in <a href="#7.19">&lt;stdio.h&gt;</a>,
23595  <a href="#7.20">&lt;stdlib.h&gt;</a>, and <a href="#7.24">&lt;wchar.h&gt;</a> (<a href="#5.2.4.2.2">5.2.4.2.2</a>).
23596 <li>  The rounding behaviors characterized by non-standard values of FLT_ROUNDS
23597  (<a href="#5.2.4.2.2">5.2.4.2.2</a>).
23598 <li>  The evaluation methods characterized by non-standard negative values of
23599  FLT_EVAL_METHOD (<a href="#5.2.4.2.2">5.2.4.2.2</a>).
23600 <li>  The direction of rounding when an integer is converted to a floating-point number that
23601  cannot exactly represent the original value (<a href="#6.3.1.4">6.3.1.4</a>).
23602 <li>  The direction of rounding when a floating-point number is converted to a narrower
23603  floating-point number (<a href="#6.3.1.5">6.3.1.5</a>).
23604 <li>  How the nearest representable value or the larger or smaller representable value
23605  immediately adjacent to the nearest representable value is chosen for certain floating
23606  constants (<a href="#6.4.4.2">6.4.4.2</a>).
23607 <li>  Whether and how floating expressions are contracted when not disallowed by the
23608  FP_CONTRACT pragma (<a href="#6.5">6.5</a>).
23609 <li>  The default state for the FENV_ACCESS pragma (<a href="#7.6.1">7.6.1</a>).
23610 <li>  Additional floating-point exceptions, rounding             modes,    environments,   and
23611  classifications, and their macro names (<a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>).
23612 <li>  The default state for the FP_CONTRACT pragma (<a href="#7.12.2">7.12.2</a>).                                    *
23613 </ul>
23614
23615 <h4><a name="J.3.7" href="#J.3.7">J.3.7 Arrays and pointers</a></h4>
23616 <p><!--para 1 -->
23617 <ul>
23618 <li>  The result of converting a pointer to an integer or vice versa (<a href="#6.3.2.3">6.3.2.3</a>).
23619 <li>  The size of the result of subtracting two pointers to elements of the same array
23620  (<a href="#6.5.6">6.5.6</a>).
23621 <!--page 520 -->
23622 </ul>
23623
23624 <h4><a name="J.3.8" href="#J.3.8">J.3.8 Hints</a></h4>
23625 <p><!--para 1 -->
23626 <ul>
23627 <li>  The extent to which suggestions made by using the register storage-class
23628  specifier are effective (<a href="#6.7.1">6.7.1</a>).
23629 <li>  The extent to which suggestions made by using the inline function specifier are
23630  effective (<a href="#6.7.4">6.7.4</a>).
23631 </ul>
23632
23633 <h4><a name="J.3.9" href="#J.3.9">J.3.9 Structures, unions, enumerations, and bit-fields</a></h4>
23634 <p><!--para 1 -->
23635 <ul>
23636 <li>  Whether a ''plain'' int bit-field is treated as a signed int bit-field or as an
23637  unsigned int bit-field (<a href="#6.7.2">6.7.2</a>, <a href="#6.7.2.1">6.7.2.1</a>).
23638 <li>  Allowable bit-field types other than _Bool, signed int, and unsigned int
23639  (<a href="#6.7.2.1">6.7.2.1</a>).
23640 <li>  Whether a bit-field can straddle a storage-unit boundary (<a href="#6.7.2.1">6.7.2.1</a>).
23641 <li>  The order of allocation of bit-fields within a unit (<a href="#6.7.2.1">6.7.2.1</a>).
23642 <li>  The alignment of non-bit-field members of structures (<a href="#6.7.2.1">6.7.2.1</a>). This should present
23643  no problem unless binary data written by one implementation is read by another.
23644 <li>  The integer type compatible with each enumerated type (<a href="#6.7.2.2">6.7.2.2</a>).
23645 </ul>
23646
23647 <h4><a name="J.3.10" href="#J.3.10">J.3.10 Qualifiers</a></h4>
23648 <p><!--para 1 -->
23649 <ul>
23650 <li>  What constitutes an access to an object that has volatile-qualified type (<a href="#6.7.3">6.7.3</a>).
23651 </ul>
23652
23653 <h4><a name="J.3.11" href="#J.3.11">J.3.11 Preprocessing directives</a></h4>
23654 <p><!--para 1 -->
23655 <ul>
23656 <li>  The locations within #pragma directives where header name preprocessing tokens
23657  are recognized (<a href="#6.4">6.4</a>, <a href="#6.4.7">6.4.7</a>).
23658 <li>  How sequences in both forms of header names are mapped to headers or external
23659  source file names (<a href="#6.4.7">6.4.7</a>).
23660 <li>  Whether the value of a character constant in a constant expression that controls
23661  conditional inclusion matches the value of the same character constant in the
23662  execution character set (<a href="#6.10.1">6.10.1</a>).
23663 <li>  Whether the value of a single-character character constant in a constant expression
23664  that controls conditional inclusion may have a negative value (<a href="#6.10.1">6.10.1</a>).
23665 <li>  The places that are searched for an included &lt; &gt; delimited header, and how the places
23666  are specified or the header is identified (<a href="#6.10.2">6.10.2</a>).
23667 <li>  How the named source file is searched for in an included " " delimited header
23668  (<a href="#6.10.2">6.10.2</a>).
23669 <li>  The method by which preprocessing tokens (possibly resulting from macro
23670  expansion) in a #include directive are combined into a header name (<a href="#6.10.2">6.10.2</a>).
23671 <!--page 521 -->
23672 <li>  The nesting limit for #include processing (<a href="#6.10.2">6.10.2</a>).
23673 <li>  Whether the # operator inserts a \ character before the \ character that begins a
23674  universal character name in a character constant or string literal (<a href="#6.10.3.2">6.10.3.2</a>).
23675 <li>  The behavior on each recognized non-STDC #pragma directive (<a href="#6.10.6">6.10.6</a>).
23676 <li>  The definitions for __DATE__ and __TIME__ when respectively, the date and
23677  time of translation are not available (<a href="#6.10.8">6.10.8</a>).
23678 </ul>
23679
23680 <h4><a name="J.3.12" href="#J.3.12">J.3.12 Library functions</a></h4>
23681 <p><!--para 1 -->
23682 <ul>
23683 <li>  Any library facilities available to a freestanding program, other than the minimal set
23684  required by clause 4 (<a href="#5.1.2.1">5.1.2.1</a>).
23685 <li>  The format of the diagnostic printed by the assert macro (<a href="#7.2.1.1">7.2.1.1</a>).
23686 <li>  The representation of the floating-point               status   flags     stored   by   the
23687  fegetexceptflag function (<a href="#7.6.2.2">7.6.2.2</a>).
23688 <li>  Whether the feraiseexcept function raises the ''inexact'' floating-point
23689  exception in addition to the ''overflow'' or ''underflow'' floating-point exception
23690  (<a href="#7.6.2.3">7.6.2.3</a>).
23691 <li>  Strings other than "C" and "" that may be passed as the second argument to the
23692  setlocale function (<a href="#7.11.1.1">7.11.1.1</a>).
23693 <li>  The types defined for float_t and double_t when the value of the
23694  FLT_EVAL_METHOD macro is less than 0 (<a href="#7.12">7.12</a>).
23695 <li>  Domain errors for the mathematics functions, other than those required by this
23696  International Standard (<a href="#7.12.1">7.12.1</a>).
23697 <li>  The values returned by the mathematics functions on domain errors (<a href="#7.12.1">7.12.1</a>).
23698 <li>  The values returned by the mathematics functions on underflow range errors, whether
23699  errno is set to the value of the macro ERANGE when the integer expression
23700  math_errhandling &amp; MATH_ERRNO is nonzero, and whether the ''underflow''
23701  floating-point exception is raised when the integer expression math_errhandling
23702  &amp; MATH_ERREXCEPT is nonzero. (<a href="#7.12.1">7.12.1</a>).
23703 <li>  Whether a domain error occurs or zero is returned when an fmod function has a
23704  second argument of zero (<a href="#7.12.10.1">7.12.10.1</a>).
23705 <li>  Whether a domain error occurs or zero is returned when a remainder function has
23706  a second argument of zero (<a href="#7.12.10.2">7.12.10.2</a>).
23707 <li>  The base-2 logarithm of the modulus used by the remquo functions in reducing the
23708  quotient (<a href="#7.12.10.3">7.12.10.3</a>).
23709 <!--page 522 -->
23710 <li>  Whether a domain error occurs or zero is returned when a remquo function has a
23711  second argument of zero (<a href="#7.12.10.3">7.12.10.3</a>).
23712 <li>  Whether the equivalent of signal(sig, SIG_DFL); is executed prior to the call
23713  of a signal handler, and, if not, the blocking of signals that is performed (<a href="#7.14.1.1">7.14.1.1</a>).
23714 <li>  The null pointer constant to which the macro NULL expands (<a href="#7.17">7.17</a>).
23715 <li>  Whether the last line of a text stream requires a terminating new-line character
23716  (<a href="#7.19.2">7.19.2</a>).
23717 <li>  Whether space characters that are written out to a text stream immediately before a
23718  new-line character appear when read in (<a href="#7.19.2">7.19.2</a>).
23719 <li>  The number of null characters that may be appended to data written to a binary
23720  stream (<a href="#7.19.2">7.19.2</a>).
23721 <li>  Whether the file position indicator of an append-mode stream is initially positioned at
23722  the beginning or end of the file (<a href="#7.19.3">7.19.3</a>).
23723 <li>  Whether a write on a text stream causes the associated file to be truncated beyond that
23724  point (<a href="#7.19.3">7.19.3</a>).
23725 <li>  The characteristics of file buffering (<a href="#7.19.3">7.19.3</a>).
23726 <li>  Whether a zero-length file actually exists (<a href="#7.19.3">7.19.3</a>).
23727 <li>  The rules for composing valid file names (<a href="#7.19.3">7.19.3</a>).
23728 <li>  Whether the same file can be simultaneously open multiple times (<a href="#7.19.3">7.19.3</a>).
23729 <li>  The nature and choice of encodings used for multibyte characters in files (<a href="#7.19.3">7.19.3</a>).
23730 <li>  The effect of the remove function on an open file (<a href="#7.19.4.1">7.19.4.1</a>).
23731 <li>  The effect if a file with the new name exists prior to a call to the rename function
23732  (<a href="#7.19.4.2">7.19.4.2</a>).
23733 <li>  Whether an open temporary file is removed upon abnormal program termination
23734  (<a href="#7.19.4.3">7.19.4.3</a>).
23735 <li>  Which changes of mode are permitted (if any), and under what circumstances
23736  (<a href="#7.19.5.4">7.19.5.4</a>).
23737 <li>  The style used to print an infinity or NaN, and the meaning of any n-char or n-wchar
23738  sequence printed for a NaN (<a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23739 <li>  The output for %p conversion in the fprintf or fwprintf function (<a href="#7.19.6.1">7.19.6.1</a>,
23740  <a href="#7.24.2.1">7.24.2.1</a>).
23741 <li>  The interpretation of a - character that is neither the first nor the last character, nor
23742    the second where a ^ character is the first, in the scanlist for %[ conversion in the
23743   fscanf or fwscanf function (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>).
23744 <!--page 523 -->
23745 <li>  The set of sequences matched by a %p conversion and the interpretation of the
23746  corresponding input item in the fscanf or fwscanf function (<a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>).
23747 <li>  The value to which the macro errno is set by the fgetpos, fsetpos, or ftell
23748  functions on failure (<a href="#7.19.9.1">7.19.9.1</a>, <a href="#7.19.9.3">7.19.9.3</a>, <a href="#7.19.9.4">7.19.9.4</a>).
23749 <li>  The meaning of any n-char or n-wchar sequence in a string representing a NaN that is
23750  converted by the strtod, strtof, strtold, wcstod, wcstof, or wcstold
23751  function (<a href="#7.20.1.3">7.20.1.3</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>).
23752 <li>  Whether or not the strtod, strtof, strtold, wcstod, wcstof, or wcstold
23753  function sets errno to ERANGE when underflow occurs (<a href="#7.20.1.3">7.20.1.3</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>).
23754 <li>  Whether the calloc, malloc, and realloc functions return a null pointer or a
23755  pointer to an allocated object when the size requested is zero (<a href="#7.20.3">7.20.3</a>).
23756 <li>  Whether open streams with unwritten buffered data are flushed, open streams are
23757  closed, or temporary files are removed when the abort or _Exit function is called
23758  (<a href="#7.20.4.1">7.20.4.1</a>, <a href="#7.20.4.4">7.20.4.4</a>).
23759 <li>  The termination status returned to the host environment by the abort, exit, or
23760  _Exit function (<a href="#7.20.4.1">7.20.4.1</a>, <a href="#7.20.4.3">7.20.4.3</a>, <a href="#7.20.4.4">7.20.4.4</a>).
23761 <li>  The value returned by the system function when its argument is not a null pointer
23762  (<a href="#7.20.4.6">7.20.4.6</a>).
23763 <li>  The local time zone and Daylight Saving Time (<a href="#7.23.1">7.23.1</a>).
23764 <li>  The range and precision of times representable in clock_t and time_t (<a href="#7.23">7.23</a>).
23765 <li>  The era for the clock function (<a href="#7.23.2.1">7.23.2.1</a>).
23766 <li>  The replacement string for the %Z specifier to the strftime, and wcsftime
23767  functions in the "C" locale (<a href="#7.23.3.5">7.23.3.5</a>, <a href="#7.24.5.1">7.24.5.1</a>).
23768 <li>  Whether the functions in <a href="#7.12">&lt;math.h&gt;</a> honor the rounding direction mode in an
23769  IEC 60559 conformant implementation, unless explicitly specified otherwise (<a href="#F.9">F.9</a>).
23770 </ul>
23771
23772 <h4><a name="J.3.13" href="#J.3.13">J.3.13 Architecture</a></h4>
23773 <p><!--para 1 -->
23774 <ul>
23775 <li>  The values or expressions assigned to the macros specified in the headers
23776  <a href="#7.7">&lt;float.h&gt;</a>, <a href="#7.10">&lt;limits.h&gt;</a>, and <a href="#7.18">&lt;stdint.h&gt;</a> (<a href="#5.2.4.2">5.2.4.2</a>, <a href="#7.18.2">7.18.2</a>, <a href="#7.18.3">7.18.3</a>).
23777 <li>  The number, order, and encoding of bytes in any object (when not explicitly specified
23778  in this International Standard) (<a href="#6.2.6.1">6.2.6.1</a>).
23779 <li>  The value of the result of the sizeof operator (<a href="#6.5.3.4">6.5.3.4</a>).
23780 <!--page 524 -->
23781 </ul>
23782
23783 <h3><a name="J.4" href="#J.4">J.4 Locale-specific behavior</a></h3>
23784 <p><!--para 1 -->
23785  The following characteristics of a hosted environment are locale-specific and are required
23786  to be documented by the implementation:
23787 <ul>
23788 <li>  Additional members of the source and execution character sets beyond the basic
23789  character set (<a href="#5.2.1">5.2.1</a>).
23790 <li>  The presence, meaning, and representation of additional multibyte characters in the
23791  execution character set beyond the basic character set (<a href="#5.2.1.2">5.2.1.2</a>).
23792 <li>  The shift states used for the encoding of multibyte characters (<a href="#5.2.1.2">5.2.1.2</a>).
23793 <li>  The direction of writing of successive printing characters (<a href="#5.2.2">5.2.2</a>).
23794 <li>  The decimal-point character (<a href="#7.1.1">7.1.1</a>).
23795 <li>  The set of printing characters (<a href="#7.4">7.4</a>, <a href="#7.25.2">7.25.2</a>).
23796 <li>  The set of control characters (<a href="#7.4">7.4</a>, <a href="#7.25.2">7.25.2</a>).
23797 <li>  The sets of characters tested for by the isalpha, isblank, islower, ispunct,
23798  isspace, isupper, iswalpha, iswblank, iswlower, iswpunct,
23799  iswspace, or iswupper functions (<a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.3">7.4.1.3</a>, <a href="#7.4.1.7">7.4.1.7</a>, <a href="#7.4.1.9">7.4.1.9</a>, <a href="#7.4.1.10">7.4.1.10</a>,
23800  <a href="#7.4.1.11">7.4.1.11</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>, <a href="#7.25.2.1.3">7.25.2.1.3</a>, <a href="#7.25.2.1.7">7.25.2.1.7</a>, <a href="#7.25.2.1.9">7.25.2.1.9</a>, <a href="#7.25.2.1.10">7.25.2.1.10</a>, <a href="#7.25.2.1.11">7.25.2.1.11</a>).
23801 <li>  The native environment (<a href="#7.11.1.1">7.11.1.1</a>).
23802 <li>  Additional subject sequences accepted by the numeric conversion functions (<a href="#7.20.1">7.20.1</a>,
23803  <a href="#7.24.4.1">7.24.4.1</a>).
23804 <li>  The collation sequence of the execution character set (<a href="#7.21.4.3">7.21.4.3</a>, <a href="#7.24.4.4.2">7.24.4.4.2</a>).
23805 <li>  The contents of the error message strings set up by the strerror function
23806  (<a href="#7.21.6.2">7.21.6.2</a>).
23807 <li>  The formats for time and date (<a href="#7.23.3.5">7.23.3.5</a>, <a href="#7.24.5.1">7.24.5.1</a>).
23808 <li>  Character mappings that are supported by the towctrans function (<a href="#7.25.1">7.25.1</a>).
23809 <li>  Character classifications that are supported by the iswctype function (<a href="#7.25.1">7.25.1</a>).
23810 <!--page 525 -->
23811 </ul>
23812
23813 <h3><a name="J.5" href="#J.5">J.5 Common extensions</a></h3>
23814 <p><!--para 1 -->
23815  The following extensions are widely used in many systems, but are not portable to all
23816  implementations. The inclusion of any extension that may cause a strictly conforming
23817  program to become invalid renders an implementation nonconforming. Examples of such
23818  extensions are new keywords, extra library functions declared in standard headers, or
23819  predefined macros with names that do not begin with an underscore.
23820
23821 <h4><a name="J.5.1" href="#J.5.1">J.5.1 Environment arguments</a></h4>
23822 <p><!--para 1 -->
23823  In a hosted environment, the main function receives a third argument, char *envp[],
23824  that points to a null-terminated array of pointers to char, each of which points to a string
23825  that provides information about the environment for this execution of the program
23826  (<a href="#5.1.2.2.1">5.1.2.2.1</a>).
23827
23828 <h4><a name="J.5.2" href="#J.5.2">J.5.2 Specialized identifiers</a></h4>
23829 <p><!--para 1 -->
23830  Characters other than the underscore _, letters, and digits, that are not part of the basic
23831  source character set (such as the dollar sign $, or characters in national character sets)
23832  may appear in an identifier (<a href="#6.4.2">6.4.2</a>).
23833
23834 <h4><a name="J.5.3" href="#J.5.3">J.5.3 Lengths and cases of identifiers</a></h4>
23835 <p><!--para 1 -->
23836  All characters in identifiers (with or without external linkage) are significant (<a href="#6.4.2">6.4.2</a>).
23837
23838 <h4><a name="J.5.4" href="#J.5.4">J.5.4 Scopes of identifiers</a></h4>
23839 <p><!--para 1 -->
23840  A function identifier, or the identifier of an object the declaration of which contains the
23841  keyword extern, has file scope (<a href="#6.2.1">6.2.1</a>).
23842
23843 <h4><a name="J.5.5" href="#J.5.5">J.5.5 Writable string literals</a></h4>
23844 <p><!--para 1 -->
23845  String literals are modifiable (in which case, identical string literals should denote distinct
23846  objects) (<a href="#6.4.5">6.4.5</a>).
23847
23848 <h4><a name="J.5.6" href="#J.5.6">J.5.6 Other arithmetic types</a></h4>
23849 <p><!--para 1 -->
23850  Additional arithmetic types, such as __int128 or double double, and their
23851  appropriate conversions are defined (<a href="#6.2.5">6.2.5</a>, <a href="#6.3.1">6.3.1</a>). Additional floating types may have
23852  more range or precision than long double, may be used for evaluating expressions of
23853  other floating types, and may be used to define float_t or double_t.
23854 <!--page 526 -->
23855
23856 <h4><a name="J.5.7" href="#J.5.7">J.5.7 Function pointer casts</a></h4>
23857 <p><!--para 1 -->
23858  A pointer to an object or to void may be cast to a pointer to a function, allowing data to
23859  be invoked as a function (<a href="#6.5.4">6.5.4</a>).
23860 <p><!--para 2 -->
23861  A pointer to a function may be cast to a pointer to an object or to void, allowing a
23862  function to be inspected or modified (for example, by a debugger) (<a href="#6.5.4">6.5.4</a>).
23863
23864 <h4><a name="J.5.8" href="#J.5.8">J.5.8 Extended bit-field types</a></h4>
23865 <p><!--para 1 -->
23866  A bit-field may be declared with a type other than _Bool, unsigned int, or
23867  signed int, with an appropriate maximum width (<a href="#6.7.2.1">6.7.2.1</a>).
23868
23869 <h4><a name="J.5.9" href="#J.5.9">J.5.9 The fortran keyword</a></h4>
23870 <p><!--para 1 -->
23871  The fortran function specifier may be used in a function declaration to indicate that
23872  calls suitable for FORTRAN should be generated, or that a different representation for the
23873  external name is to be generated (<a href="#6.7.4">6.7.4</a>).
23874
23875 <h4><a name="J.5.10" href="#J.5.10">J.5.10 The asm keyword</a></h4>
23876 <p><!--para 1 -->
23877  The asm keyword may be used to insert assembly language directly into the translator
23878  output (<a href="#6.8">6.8</a>). The most common implementation is via a statement of the form:
23879 <pre>
23880         asm ( character-string-literal );</pre>
23881
23882 <h4><a name="J.5.11" href="#J.5.11">J.5.11 Multiple external definitions</a></h4>
23883 <p><!--para 1 -->
23884  There may be more than one external definition for the identifier of an object, with or
23885  without the explicit use of the keyword extern; if the definitions disagree, or more than
23886  one is initialized, the behavior is undefined (<a href="#6.9.2">6.9.2</a>).
23887
23888 <h4><a name="J.5.12" href="#J.5.12">J.5.12 Predefined macro names</a></h4>
23889 <p><!--para 1 -->
23890  Macro names that do not begin with an underscore, describing the translation and
23891  execution environments, are defined by the implementation before translation begins
23892  (<a href="#6.10.8">6.10.8</a>).
23893
23894 <h4><a name="J.5.13" href="#J.5.13">J.5.13 Floating-point status flags</a></h4>
23895 <p><!--para 1 -->
23896  If any floating-point status flags are set on normal termination after all calls to functions
23897  registered by the atexit function have been made (see <a href="#7.20.4.3">7.20.4.3</a>), the implementation
23898  writes some diagnostics indicating the fact to the stderr stream, if it is still open,
23899 <!--page 527 -->
23900
23901 <h4><a name="J.5.14" href="#J.5.14">J.5.14 Extra arguments for signal handlers</a></h4>
23902 <p><!--para 1 -->
23903  Handlers for specific signals are called with extra arguments in addition to the signal
23904  number (<a href="#7.14.1.1">7.14.1.1</a>).
23905
23906 <h4><a name="J.5.15" href="#J.5.15">J.5.15 Additional stream types and file-opening modes</a></h4>
23907 <p><!--para 1 -->
23908  Additional mappings from files to streams are supported (<a href="#7.19.2">7.19.2</a>).
23909 <p><!--para 2 -->
23910  Additional file-opening modes may be specified by characters appended to the mode
23911  argument of the fopen function (<a href="#7.19.5.3">7.19.5.3</a>).
23912
23913 <h4><a name="J.5.16" href="#J.5.16">J.5.16 Defined file position indicator</a></h4>
23914 <p><!--para 1 -->
23915  The file position indicator is decremented by each successful call to the ungetc or
23916  ungetwc function for a text stream, except if its value was zero before a call (<a href="#7.19.7.11">7.19.7.11</a>,
23917  <a href="#7.24.3.10">7.24.3.10</a>).
23918
23919 <h4><a name="J.5.17" href="#J.5.17">J.5.17 Math error reporting</a></h4>
23920 <p><!--para 1 -->
23921  Functions declared in <a href="#7.3">&lt;complex.h&gt;</a> and <a href="#7.12">&lt;math.h&gt;</a> raise SIGFPE to report errors
23922  instead of, or in addition to, setting errno or raising floating-point exceptions (<a href="#7.3">7.3</a>,
23923  <a href="#7.12">7.12</a>).
23924 <!--page 528 -->
23925
23926 <h2><a name="Bibliography" href="#Bibliography">Bibliography</a></h2>
23927 <ol>
23928 <li>  ''The C Reference Manual'' by Dennis M. Ritchie, a version of which was
23929  published in The C Programming Language by Brian W. Kernighan and Dennis
23930  M. Ritchie, Prentice-Hall, Inc., (1978). Copyright owned by AT&amp;T.
23931 <li>  1984 /usr/group Standard by the /usr/group Standards Committee, Santa Clara,
23932  California, USA, November 1984.
23933 <li>  ANSI X3/TR-1-82 (1982), American National Dictionary for Information
23934  Processing Systems, Information Processing Systems Technical Report.
23935 <li>  ANSI/IEEE 754-1985, American National Standard for Binary Floating-Point
23936  Arithmetic.
23937 <li>  ANSI/IEEE 854-1988, American National Standard for Radix-Independent
23938  Floating-Point Arithmetic.
23939 <li>  IEC 60559:1989, Binary floating-point arithmetic for microprocessor systems,
23940  second edition (previously designated IEC 559:1989).
23941 <li>  ISO 31-11:1992, Quantities and units -- Part 11: Mathematical signs and
23942  symbols for use in the physical sciences and technology.
23943 <li>  ISO/IEC 646:1991, Information technology -- ISO 7-bit coded character set for
23944  information interchange.
23945 <li>  ISO/IEC 2382-1:1993, Information technology -- Vocabulary -- Part 1:
23946  Fundamental terms.
23947 <li>  ISO 4217:1995, Codes for the representation of currencies and funds.
23948 <li>  ISO 8601:1988, Data elements and interchange formats -- Information
23949  interchange -- Representation of dates and times.
23950 <li>  ISO/IEC 9899:1990, Programming languages -- C.
23951 <li>  ISO/IEC 9899/COR1:1994, Technical Corrigendum 1.
23952 <li>  ISO/IEC 9899/COR2:1996, Technical Corrigendum 2.
23953 <li>  ISO/IEC 9899/AMD1:1995, Amendment 1 to ISO/IEC 9899:1990 C Integrity.
23954 <li>  ISO/IEC 9945-2:1993, Information technology -- Portable Operating System
23955  Interface (POSIX) -- Part 2: Shell and Utilities.
23956 <li>  ISO/IEC TR 10176:1998, Information technology -- Guidelines for the
23957  preparation of programming language standards.
23958 <li>  ISO/IEC 10646-1:1993, Information technology -- Universal Multiple-Octet
23959  Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.
23960 <!--page 529 -->
23961 <li>  ISO/IEC 10646-1/COR1:1996,      Technical       Corrigendum      1      to
23962  ISO/IEC 10646-1:1993.
23963 <li>  ISO/IEC 10646-1/COR2:1998,      Technical       Corrigendum      2      to
23964  ISO/IEC 10646-1:1993.
23965 <li>  ISO/IEC 10646-1/AMD1:1996, Amendment 1 to ISO/IEC 10646-1:1993
23966  Transformation Format for 16 planes of group 00 (UTF-16).
23967 <li>  ISO/IEC 10646-1/AMD2:1996, Amendment 2 to ISO/IEC 10646-1:1993 UCS
23968  Transformation Format 8 (UTF-8).
23969 <li>  ISO/IEC 10646-1/AMD3:1996, Amendment 3 to ISO/IEC 10646-1:1993.
23970 <li>  ISO/IEC 10646-1/AMD4:1996, Amendment 4 to ISO/IEC 10646-1:1993.
23971 <li>  ISO/IEC 10646-1/AMD5:1998, Amendment 5 to ISO/IEC 10646-1:1993 Hangul
23972  syllables.
23973 <li>  ISO/IEC 10646-1/AMD6:1997, Amendment 6 to ISO/IEC 10646-1:1993 Tibetan.
23974 <li>  ISO/IEC 10646-1/AMD7:1997, Amendment 7 to ISO/IEC 10646-1:1993 33
23975  additional characters.
23976 <li>  ISO/IEC 10646-1/AMD8:1997, Amendment 8 to ISO/IEC 10646-1:1993.
23977 <li>  ISO/IEC 10646-1/AMD9:1997,    Amendment     9   to    ISO/IEC 10646-1:1993
23978  Identifiers for characters.
23979 <li>  ISO/IEC 10646-1/AMD10:1998, Amendment 10 to ISO/IEC 10646-1:1993
23980  Ethiopic.
23981 <li>  ISO/IEC 10646-1/AMD11:1998, Amendment 11 to ISO/IEC 10646-1:1993
23982  Unified Canadian Aboriginal Syllabics.
23983 <li>  ISO/IEC 10646-1/AMD12:1998, Amendment 12 to ISO/IEC 10646-1:1993
23984  Cherokee.
23985 <li>  ISO/IEC 10967-1:1994, Information technology -- Language independent
23986  arithmetic -- Part 1: Integer and floating point arithmetic.
23987 <!--page 530 -->
23988 <!--page 531 -->
23989 </ol>
23990
23991 <h2><a name="Index" href="#Index">Index</a></h2>
23992 <pre>
23993  ??? x ???, <a href="#3.18">3.18</a>                                                    , (comma punctuator), <a href="#6.5.2">6.5.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.2.1">6.7.2.1</a>, <a href="#6.7.2.2">6.7.2.2</a>,
23994                                                                      <a href="#6.7.2.3">6.7.2.3</a>, <a href="#6.7.8">6.7.8</a>
23995  ??? x ???, <a href="#3.19">3.19</a>                                                    - (subtraction operator), <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>, <a href="#G.5.2">G.5.2</a>
23996  ! (logical negation operator), <a href="#6.5.3.3">6.5.3.3</a>                         - (unary minus operator), <a href="#6.5.3.3">6.5.3.3</a>, <a href="#F.3">F.3</a>
23997  != (inequality operator), <a href="#6.5.9">6.5.9</a>                                -- (postfix decrement operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.4">6.5.2.4</a>
23998  # operator, <a href="#6.10.3.2">6.10.3.2</a>                                           -- (prefix decrement operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a>
23999  # preprocessing directive, <a href="#6.10.7">6.10.7</a>                              -= (subtraction assignment operator), <a href="#6.5.16.2">6.5.16.2</a>
24000  # punctuator, <a href="#6.10">6.10</a>                                             -&gt; (structure/union pointer operator), <a href="#6.5.2.3">6.5.2.3</a>
24001  ## operator, <a href="#6.10.3.3">6.10.3.3</a>                                          . (structure/union member operator), <a href="#6.3.2.1">6.3.2.1</a>,
24002  #define preprocessing directive, <a href="#6.10.3">6.10.3</a>                             <a href="#6.5.2.3">6.5.2.3</a>
24003  #elif preprocessing directive, <a href="#6.10.1">6.10.1</a>                          . punctuator, <a href="#6.7.8">6.7.8</a>
24004  #else preprocessing directive, <a href="#6.10.1">6.10.1</a>                          ... (ellipsis punctuator), <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.10.3">6.10.3</a>
24005  #endif preprocessing directive, <a href="#6.10.1">6.10.1</a>                         / (division operator), <a href="#6.5.5">6.5.5</a>, <a href="#F.3">F.3</a>, <a href="#G.5.1">G.5.1</a>
24006  #error preprocessing directive, <a href="#4">4</a>, <a href="#6.10.5">6.10.5</a>                      /* */ (comment delimiters), <a href="#6.4.9">6.4.9</a>
24007  #if preprocessing directive, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>,             // (comment delimiter), <a href="#6.4.9">6.4.9</a>
24008       <a href="#6.10.1">6.10.1</a>, <a href="#7.1.4">7.1.4</a>                                             /= (division assignment operator), <a href="#6.5.16.2">6.5.16.2</a>
24009  #ifdef preprocessing directive, <a href="#6.10.1">6.10.1</a>                         : (colon punctuator), <a href="#6.7.2.1">6.7.2.1</a>
24010  #ifndef preprocessing directive, <a href="#6.10.1">6.10.1</a>                        :&gt; (alternative spelling of ]), <a href="#6.4.6">6.4.6</a>
24011  #include preprocessing directive, <a href="#5.1.1.2">5.1.1.2</a>,                     ; (semicolon punctuator), <a href="#6.7">6.7</a>, <a href="#6.7.2.1">6.7.2.1</a>, <a href="#6.8.3">6.8.3</a>,
24012       <a href="#6.10.2">6.10.2</a>                                                         <a href="#6.8.5">6.8.5</a>, <a href="#6.8.6">6.8.6</a>
24013  #line preprocessing directive, <a href="#6.10.4">6.10.4</a>                          &lt; (less-than operator), <a href="#6.5.8">6.5.8</a>
24014  #pragma preprocessing directive, <a href="#6.10.6">6.10.6</a>                        &lt;% (alternative spelling of {), <a href="#6.4.6">6.4.6</a>
24015  #undef preprocessing directive, <a href="#6.10.3.5">6.10.3.5</a>, <a href="#7.1.3">7.1.3</a>,               &lt;: (alternative spelling of [), <a href="#6.4.6">6.4.6</a>
24016       <a href="#7.1.4">7.1.4</a>                                                     &lt;&lt; (left-shift operator), <a href="#6.5.7">6.5.7</a>
24017  % (remainder operator), <a href="#6.5.5">6.5.5</a>                                  &lt;&lt;= (left-shift assignment operator), <a href="#6.5.16.2">6.5.16.2</a>
24018  %: (alternative spelling of #), <a href="#6.4.6">6.4.6</a>                          &lt;= (less-than-or-equal-to operator), <a href="#6.5.8">6.5.8</a>
24019  %:%: (alternative spelling of ##), <a href="#6.4.6">6.4.6</a>                       <a href="#7.2">&lt;assert.h&gt;</a> header, <a href="#7.2">7.2</a>, <a href="#B.1">B.1</a>
24020  %= (remainder assignment operator), <a href="#6.5.16.2">6.5.16.2</a>                   <a href="#7.3">&lt;complex.h&gt;</a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.3">7.3</a>, <a href="#7.22">7.22</a>,
24021  %&gt; (alternative spelling of }), <a href="#6.4.6">6.4.6</a>                               <a href="#7.26.1">7.26.1</a>, <a href="#G.6">G.6</a>, <a href="#J.5.17">J.5.17</a>
24022  &amp; (address operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>                         <a href="#7.4">&lt;ctype.h&gt;</a> header, <a href="#7.4">7.4</a>, <a href="#7.26.2">7.26.2</a>
24023  &amp; (bitwise AND operator), <a href="#6.5.10">6.5.10</a>                               <a href="#7.5">&lt;errno.h&gt;</a> header, <a href="#7.5">7.5</a>, <a href="#7.26.3">7.26.3</a>
24024  &amp;&amp; (logical AND operator), <a href="#6.5.13">6.5.13</a>                              <a href="#7.6">&lt;fenv.h&gt;</a> header, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>, <a href="#F">F</a>,
24025  &amp;= (bitwise AND assignment operator), <a href="#6.5.16.2">6.5.16.2</a>                      <a href="#H">H</a>
24026  ' ' (space character), <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>, <a href="#7.4.1.3">7.4.1.3</a>,           <a href="#7.7">&lt;float.h&gt;</a> header, <a href="#4">4</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.7">7.7</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24027       <a href="#7.4.1.10">7.4.1.10</a>, <a href="#7.25.2.1.3">7.25.2.1.3</a>                                           <a href="#7.24.4.1.1">7.24.4.1.1</a>
24028  ( ) (cast operator), <a href="#6.5.4">6.5.4</a>                                     <a href="#7.8">&lt;inttypes.h&gt;</a> header, <a href="#7.8">7.8</a>, <a href="#7.26.4">7.26.4</a>
24029  ( ) (function-call operator), <a href="#6.5.2.2">6.5.2.2</a>                          <a href="#7.9">&lt;iso646.h&gt;</a> header, <a href="#4">4</a>, <a href="#7.9">7.9</a>
24030  ( ) (parentheses punctuator), <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.8.4">6.8.4</a>, <a href="#6.8.5">6.8.5</a>            <a href="#7.10">&lt;limits.h&gt;</a> header, <a href="#4">4</a>, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#6.2.5">6.2.5</a>, <a href="#7.10">7.10</a>
24031  ( ){ } (compound-literal operator), <a href="#6.5.2.5">6.5.2.5</a>                    <a href="#7.11">&lt;locale.h&gt;</a> header, <a href="#7.11">7.11</a>, <a href="#7.26.5">7.26.5</a>
24032  * (asterisk punctuator), <a href="#6.7.5.1">6.7.5.1</a>, <a href="#6.7.5.2">6.7.5.2</a>                      <a href="#7.12">&lt;math.h&gt;</a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.5">6.5</a>, <a href="#7.12">7.12</a>, <a href="#7.22">7.22</a>, <a href="#F">F</a>,
24033  * (indirection operator), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>                          <a href="#F.9">F.9</a>, <a href="#J.5.17">J.5.17</a>
24034  * (multiplication operator), <a href="#6.5.5">6.5.5</a>, <a href="#F.3">F.3</a>, <a href="#G.5.1">G.5.1</a>                 <a href="#7.13">&lt;setjmp.h&gt;</a> header, <a href="#7.13">7.13</a>
24035  *= (multiplication assignment operator), <a href="#6.5.16.2">6.5.16.2</a>              <a href="#7.14">&lt;signal.h&gt;</a> header, <a href="#7.14">7.14</a>, <a href="#7.26.6">7.26.6</a>
24036  + (addition operator), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>, <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>,           <a href="#7.15">&lt;stdarg.h&gt;</a> header, <a href="#4">4</a>, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#7.15">7.15</a>
24037       <a href="#G.5.2">G.5.2</a>                                                     <a href="#7.16">&lt;stdbool.h&gt;</a> header, <a href="#4">4</a>, <a href="#7.16">7.16</a>, <a href="#7.26.7">7.26.7</a>, <a href="#H">H</a>
24038  + (unary plus operator), <a href="#6.5.3.3">6.5.3.3</a>                               <a href="#7.17">&lt;stddef.h&gt;</a> header, <a href="#4">4</a>, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.3.2.3">6.3.2.3</a>, <a href="#6.4.4.4">6.4.4.4</a>,
24039  ++ (postfix increment operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.4">6.5.2.4</a>                    <a href="#6.4.5">6.4.5</a>, <a href="#6.5.3.4">6.5.3.4</a>, <a href="#6.5.6">6.5.6</a>, <a href="#7.17">7.17</a>
24040  ++ (prefix increment operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a>                <a href="#7.18">&lt;stdint.h&gt;</a> header, <a href="#4">4</a>, <a href="#5.2.4.2">5.2.4.2</a>, <a href="#6.10.1">6.10.1</a>, <a href="#7.8">7.8</a>,
24041  += (addition assignment operator), <a href="#6.5.16.2">6.5.16.2</a>                         <a href="#7.18">7.18</a>, <a href="#7.26.8">7.26.8</a>
24042  , (comma operator), <a href="#6.5.17">6.5.17</a>
24043 <!--page 532 -->
24044  <a href="#7.19">&lt;stdio.h&gt;</a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19">7.19</a>, <a href="#7.26.9">7.26.9</a>, <a href="#F">F</a>                 __cplusplus macro, <a href="#6.10.8">6.10.8</a>
24045  <a href="#7.20">&lt;stdlib.h&gt;</a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.20">7.20</a>, <a href="#7.26.10">7.26.10</a>, <a href="#F">F</a>               __DATE__ macro, <a href="#6.10.8">6.10.8</a>
24046  <a href="#7.21">&lt;string.h&gt;</a> header, <a href="#7.21">7.21</a>, <a href="#7.26.11">7.26.11</a>                             __FILE__ macro, <a href="#6.10.8">6.10.8</a>, <a href="#7.2.1.1">7.2.1.1</a>
24047  <a href="#7.22">&lt;tgmath.h&gt;</a> header, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                                 __func__ identifier, <a href="#6.4.2.2">6.4.2.2</a>, <a href="#7.2.1.1">7.2.1.1</a>
24048  <a href="#7.23">&lt;time.h&gt;</a> header, <a href="#7.23">7.23</a>                                        __LINE__ macro, <a href="#6.10.8">6.10.8</a>, <a href="#7.2.1.1">7.2.1.1</a>
24049  <a href="#7.24">&lt;wchar.h&gt;</a> header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.24">7.24</a>,                   __STDC_, <a href="#6.11.9">6.11.9</a>
24050       <a href="#7.26.12">7.26.12</a>, <a href="#F">F</a>                                              __STDC__ macro, <a href="#6.10.8">6.10.8</a>
24051  <a href="#7.25">&lt;wctype.h&gt;</a> header, <a href="#7.25">7.25</a>, <a href="#7.26.13">7.26.13</a>                             __STDC_CONSTANT_MACROS macro, <a href="#7.18.4">7.18.4</a>
24052  = (equal-sign punctuator), <a href="#6.7">6.7</a>, <a href="#6.7.2.2">6.7.2.2</a>, <a href="#6.7.8">6.7.8</a>               __STDC_FORMAT_MACROS macro, <a href="#7.8.1">7.8.1</a>
24053  = (simple assignment operator), <a href="#6.5.16.1">6.5.16.1</a>                     __STDC_HOSTED__ macro, <a href="#6.10.8">6.10.8</a>
24054  == (equality operator), <a href="#6.5.9">6.5.9</a>                                __STDC_IEC_559__ macro, <a href="#6.10.8">6.10.8</a>, <a href="#F.1">F.1</a>
24055  &gt; (greater-than operator), <a href="#6.5.8">6.5.8</a>                             __STDC_IEC_559_COMPLEX__ macro,
24056  &gt;= (greater-than-or-equal-to operator), <a href="#6.5.8">6.5.8</a>                     <a href="#6.10.8">6.10.8</a>, <a href="#G.1">G.1</a>
24057  &gt;&gt; (right-shift operator), <a href="#6.5.7">6.5.7</a>                             __STDC_ISO_10646__ macro, <a href="#6.10.8">6.10.8</a>
24058  &gt;&gt;= (right-shift assignment operator), <a href="#6.5.16.2">6.5.16.2</a>              __STDC_LIMIT_MACROS macro, <a href="#7.18.2">7.18.2</a>,
24059  ? : (conditional operator), <a href="#6.5.15">6.5.15</a>                                <a href="#7.18.3">7.18.3</a>
24060  ?? (trigraph sequences), <a href="#5.2.1.1">5.2.1.1</a>                             __STDC_MB_MIGHT_NEQ_WC__ macro,
24061  [ ] (array subscript operator), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>                  <a href="#6.10.8">6.10.8</a>, <a href="#7.17">7.17</a>
24062  [ ] (brackets punctuator), <a href="#6.7.5.2">6.7.5.2</a>, <a href="#6.7.8">6.7.8</a>                    __STDC_VERSION__ macro, <a href="#6.10.8">6.10.8</a>
24063  \ (backslash character), <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>             __TIME__ macro, <a href="#6.10.8">6.10.8</a>
24064  \ (escape character), <a href="#6.4.4.4">6.4.4.4</a>                                __VA_ARGS__ identifier, <a href="#6.10.3">6.10.3</a>, <a href="#6.10.3.1">6.10.3.1</a>
24065  \" (double-quote escape sequence), <a href="#6.4.4.4">6.4.4.4</a>,                  _Bool type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.2">6.3.1.2</a>, <a href="#6.7.2">6.7.2</a>
24066       <a href="#6.4.5">6.4.5</a>, <a href="#6.10.9">6.10.9</a>                                           _Bool type conversions, <a href="#6.3.1.2">6.3.1.2</a>
24067  \\ (backslash escape sequence), <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.10.9">6.10.9</a>              _Complex types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>, <a href="#7.3.1">7.3.1</a>, <a href="#G">G</a>
24068  \' (single-quote escape sequence), <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.4.5">6.4.5</a>            _Complex_I macro, <a href="#7.3.1">7.3.1</a>
24069  \0 (null character), <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.4.5">6.4.5</a>                   _Exit function, <a href="#7.20.4.4">7.20.4.4</a>
24070    padding of binary stream, <a href="#7.19.2">7.19.2</a>                           _Imaginary keyword, <a href="#G.2">G.2</a>
24071  \? (question-mark escape sequence), <a href="#6.4.4.4">6.4.4.4</a>                  _Imaginary types, <a href="#7.3.1">7.3.1</a>, <a href="#G">G</a>
24072  \a (alert escape sequence), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>                   _Imaginary_I macro, <a href="#7.3.1">7.3.1</a>, <a href="#G.6">G.6</a>
24073  \b (backspace escape sequence), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>               _IOFBF macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.5">7.19.5.5</a>, <a href="#7.19.5.6">7.19.5.6</a>
24074  \f (form-feed escape sequence), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>,              _IOLBF macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.6">7.19.5.6</a>
24075       <a href="#7.4.1.10">7.4.1.10</a>                                                _IONBF macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.5">7.19.5.5</a>, <a href="#7.19.5.6">7.19.5.6</a>
24076  \n (new-line escape sequence), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>,               _Pragma operator, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.10.9">6.10.9</a>
24077       <a href="#7.4.1.10">7.4.1.10</a>                                                { } (braces punctuator), <a href="#6.7.2.2">6.7.2.2</a>, <a href="#6.7.2.3">6.7.2.3</a>, <a href="#6.7.8">6.7.8</a>,
24078  \octal digits (octal-character escape sequence),                  <a href="#6.8.2">6.8.2</a>
24079       <a href="#6.4.4.4">6.4.4.4</a>                                                 { } (compound-literal operator), <a href="#6.5.2.5">6.5.2.5</a>
24080  \r (carriage-return escape sequence), <a href="#5.2.2">5.2.2</a>,                 | (bitwise inclusive OR operator), <a href="#6.5.12">6.5.12</a>
24081       <a href="#6.4.4.4">6.4.4.4</a>, <a href="#7.4.1.10">7.4.1.10</a>                                       |= (bitwise inclusive OR assignment operator),
24082  \t (horizontal-tab escape sequence), <a href="#5.2.2">5.2.2</a>,                       <a href="#6.5.16.2">6.5.16.2</a>
24083       <a href="#6.4.4.4">6.4.4.4</a>, <a href="#7.4.1.3">7.4.1.3</a>, <a href="#7.4.1.10">7.4.1.10</a>, <a href="#7.25.2.1.3">7.25.2.1.3</a>                  || (logical OR operator), <a href="#6.5.14">6.5.14</a>
24084  \U (universal character names), <a href="#6.4.3">6.4.3</a>                        ~ (bitwise complement operator), <a href="#6.5.3.3">6.5.3.3</a>
24085  \u (universal character names), <a href="#6.4.3">6.4.3</a>
24086  \v (vertical-tab escape sequence), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>,           abort function, <a href="#7.2.1.1">7.2.1.1</a>, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#7.19.3">7.19.3</a>,
24087       <a href="#7.4.1.10">7.4.1.10</a>                                                     <a href="#7.20.4.1">7.20.4.1</a>
24088  \x hexadecimal digits (hexadecimal-character                 abs function, <a href="#7.20.6.1">7.20.6.1</a>
24089       escape sequence), <a href="#6.4.4.4">6.4.4.4</a>                               absolute-value functions
24090  ^ (bitwise exclusive OR operator), <a href="#6.5.11">6.5.11</a>                      complex, <a href="#7.3.8">7.3.8</a>, <a href="#G.6.4">G.6.4</a>
24091  ^= (bitwise exclusive OR assignment operator),                 integer, <a href="#7.8.2.1">7.8.2.1</a>, <a href="#7.20.6.1">7.20.6.1</a>
24092       <a href="#6.5.16.2">6.5.16.2</a>                                                  real, <a href="#7.12.7">7.12.7</a>, <a href="#F.9.4">F.9.4</a>
24093  __bool_true_false_are_defined                               abstract declarator, <a href="#6.7.6">6.7.6</a>
24094       macro, <a href="#7.16">7.16</a>                                             abstract machine, <a href="#5.1.2.3">5.1.2.3</a>
24095 <!--page 533 -->
24096  access, <a href="#3.1">3.1</a>, <a href="#6.7.3">6.7.3</a>                                             array
24097  accuracy, see floating-point accuracy                              argument, <a href="#6.9.1">6.9.1</a>
24098  acos functions, <a href="#7.12.4.1">7.12.4.1</a>, <a href="#F.9.1.1">F.9.1.1</a>                                 declarator, <a href="#6.7.5.2">6.7.5.2</a>
24099  acos type-generic macro, <a href="#7.22">7.22</a>                                     initialization, <a href="#6.7.8">6.7.8</a>
24100  acosh functions, <a href="#7.12.5.1">7.12.5.1</a>, <a href="#F.9.2.1">F.9.2.1</a>                                multidimensional, <a href="#6.5.2.1">6.5.2.1</a>
24101  acosh type-generic macro, <a href="#7.22">7.22</a>                                    parameter, <a href="#6.9.1">6.9.1</a>
24102  active position, <a href="#5.2.2">5.2.2</a>                                            storage order, <a href="#6.5.2.1">6.5.2.1</a>
24103  actual argument, <a href="#3.3">3.3</a>                                              subscript operator ([ ]), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>
24104  actual parameter (deprecated), <a href="#3.3">3.3</a>                                subscripting, <a href="#6.5.2.1">6.5.2.1</a>
24105  addition assignment operator (+=), <a href="#6.5.16.2">6.5.16.2</a>                       type, <a href="#6.2.5">6.2.5</a>
24106  addition operator (+), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>, <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>,              type conversion, <a href="#6.3.2.1">6.3.2.1</a>
24107        <a href="#G.5.2">G.5.2</a>                                                       variable length, <a href="#6.7.5">6.7.5</a>, <a href="#6.7.5.2">6.7.5.2</a>
24108  additive expressions, <a href="#6.5.6">6.5.6</a>, <a href="#G.5.2">G.5.2</a>                             arrow operator (-&gt;), <a href="#6.5.2.3">6.5.2.3</a>
24109  address constant, <a href="#6.6">6.6</a>                                          as-if rule, <a href="#5.1.2.3">5.1.2.3</a>
24110  address operator (&amp;), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>                         ASCII code set, <a href="#5.2.1.1">5.2.1.1</a>
24111  aggregate initialization, <a href="#6.7.8">6.7.8</a>                                asctime function, <a href="#7.23.3.1">7.23.3.1</a>
24112  aggregate types, <a href="#6.2.5">6.2.5</a>                                         asin functions, <a href="#7.12.4.2">7.12.4.2</a>, <a href="#F.9.1.2">F.9.1.2</a>
24113  alert escape sequence (\a), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>                     asin type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24114  aliasing, <a href="#6.5">6.5</a>                                                  asinh functions, <a href="#7.12.5.2">7.12.5.2</a>, <a href="#F.9.2.2">F.9.2.2</a>
24115  alignment, <a href="#3.2">3.2</a>                                                 asinh type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24116     pointer, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.2.3">6.3.2.3</a>                                     asm keyword, <a href="#J.5.10">J.5.10</a>
24117     structure/union member, <a href="#6.7.2.1">6.7.2.1</a>                             assert macro, <a href="#7.2.1.1">7.2.1.1</a>
24118  allocated storage, order and contiguity, <a href="#7.20.3">7.20.3</a>                assert.h header, <a href="#7.2">7.2</a>, <a href="#B.1">B.1</a>
24119  and macro, <a href="#7.9">7.9</a>                                                 assignment
24120  AND operators                                                     compound, <a href="#6.5.16.2">6.5.16.2</a>
24121     bitwise (&amp;), <a href="#6.5.10">6.5.10</a>                                            conversion, <a href="#6.5.16.1">6.5.16.1</a>
24122     bitwise assignment (&amp;=), <a href="#6.5.16.2">6.5.16.2</a>                              expression, <a href="#6.5.16">6.5.16</a>
24123     logical (&amp;&amp;), <a href="#6.5.13">6.5.13</a>                                           operators, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.16">6.5.16</a>
24124  and_eq macro, <a href="#7.9">7.9</a>                                                 simple, <a href="#6.5.16.1">6.5.16.1</a>
24125  ANSI/IEEE 754, <a href="#F.1">F.1</a>                                             associativity of operators, <a href="#6.5">6.5</a>
24126  ANSI/IEEE 854, <a href="#F.1">F.1</a>                                             asterisk punctuator (*), <a href="#6.7.5.1">6.7.5.1</a>, <a href="#6.7.5.2">6.7.5.2</a>
24127  argc (main function parameter), <a href="#5.1.2.2.1">5.1.2.2.1</a>                      atan functions, <a href="#7.12.4.3">7.12.4.3</a>, <a href="#F.9.1.3">F.9.1.3</a>
24128  argument, <a href="#3.3">3.3</a>                                                  atan type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24129     array, <a href="#6.9.1">6.9.1</a>                                                atan2 functions, <a href="#7.12.4.4">7.12.4.4</a>, <a href="#F.9.1.4">F.9.1.4</a>
24130     default promotions, <a href="#6.5.2.2">6.5.2.2</a>                                 atan2 type-generic macro, <a href="#7.22">7.22</a>
24131     function, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.9.1">6.9.1</a>                                    atanh functions, <a href="#7.12.5.3">7.12.5.3</a>, <a href="#F.9.2.3">F.9.2.3</a>
24132     macro, substitution, <a href="#6.10.3.1">6.10.3.1</a>                               atanh type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24133  argument, complex, <a href="#7.3.9.1">7.3.9.1</a>                                     atexit function, <a href="#7.20.4.2">7.20.4.2</a>, <a href="#7.20.4.3">7.20.4.3</a>, <a href="#7.20.4.4">7.20.4.4</a>,
24134  argv (main function parameter), <a href="#5.1.2.2.1">5.1.2.2.1</a>                            <a href="#J.5.13">J.5.13</a>
24135  arithmetic constant expression, <a href="#6.6">6.6</a>                            atof function, <a href="#7.20.1">7.20.1</a>, <a href="#7.20.1.1">7.20.1.1</a>
24136  arithmetic conversions, usual, see usual arithmetic            atoi function, <a href="#7.20.1">7.20.1</a>, <a href="#7.20.1.2">7.20.1.2</a>
24137        conversions                                              atol function, <a href="#7.20.1">7.20.1</a>, <a href="#7.20.1.2">7.20.1.2</a>
24138  arithmetic operators                                           atoll function, <a href="#7.20.1">7.20.1</a>, <a href="#7.20.1.2">7.20.1.2</a>
24139     additive, <a href="#6.5.6">6.5.6</a>, <a href="#G.5.2">G.5.2</a>                                      auto storage-class specifier, <a href="#6.7.1">6.7.1</a>, <a href="#6.9">6.9</a>
24140     bitwise, <a href="#6.5.10">6.5.10</a>, <a href="#6.5.11">6.5.11</a>, <a href="#6.5.12">6.5.12</a>                             automatic storage duration, <a href="#5.2.3">5.2.3</a>, <a href="#6.2.4">6.2.4</a>
24141     increment and decrement, <a href="#6.5.2.4">6.5.2.4</a>, <a href="#6.5.3.1">6.5.3.1</a>
24142     multiplicative, <a href="#6.5.5">6.5.5</a>, <a href="#G.5.1">G.5.1</a>                                backslash character (\), <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>
24143     shift, <a href="#6.5.7">6.5.7</a>                                                backslash escape sequence (\\), <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.10.9">6.10.9</a>
24144     unary, <a href="#6.5.3.3">6.5.3.3</a>                                              backspace escape sequence (\b), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>
24145  arithmetic types, <a href="#6.2.5">6.2.5</a>                                        basic character set, <a href="#3.6">3.6</a>, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1">5.2.1</a>
24146  arithmetic, pointer, <a href="#6.5.6">6.5.6</a>                                     basic types, <a href="#6.2.5">6.2.5</a>
24147 <!--page 534 -->
24148  behavior, <a href="#3.4">3.4</a>                                                  call by value, <a href="#6.5.2.2">6.5.2.2</a>
24149  binary streams, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>,                   calloc function, <a href="#7.20.3">7.20.3</a>, <a href="#7.20.3.1">7.20.3.1</a>, <a href="#7.20.3.2">7.20.3.2</a>,
24150        <a href="#7.19.9.4">7.19.9.4</a>                                                       <a href="#7.20.3.4">7.20.3.4</a>
24151  bit, <a href="#3.5">3.5</a>                                                       carg functions, <a href="#7.3.9.1">7.3.9.1</a>, <a href="#G.6">G.6</a>
24152     high order, <a href="#3.6">3.6</a>                                             carg type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24153     low order, <a href="#3.6">3.6</a>                                              carriage-return escape sequence (\r), <a href="#5.2.2">5.2.2</a>,
24154  bit-field, <a href="#6.7.2.1">6.7.2.1</a>                                                    <a href="#6.4.4.4">6.4.4.4</a>, <a href="#7.4.1.10">7.4.1.10</a>
24155  bitand macro, <a href="#7.9">7.9</a>                                              case label, <a href="#6.8.1">6.8.1</a>, <a href="#6.8.4.2">6.8.4.2</a>
24156  bitor macro, <a href="#7.9">7.9</a>                                               case mapping functions
24157  bitwise operators, <a href="#6.5">6.5</a>                                           character, <a href="#7.4.2">7.4.2</a>
24158     AND, <a href="#6.5.10">6.5.10</a>                                                   wide character, <a href="#7.25.3.1">7.25.3.1</a>
24159     AND assignment (&amp;=), <a href="#6.5.16.2">6.5.16.2</a>                                     extensible, <a href="#7.25.3.2">7.25.3.2</a>
24160     complement (~), <a href="#6.5.3.3">6.5.3.3</a>                                     casin functions, <a href="#7.3.5.2">7.3.5.2</a>, <a href="#G.6">G.6</a>
24161     exclusive OR, <a href="#6.5.11">6.5.11</a>                                          type-generic macro for, <a href="#7.22">7.22</a>
24162     exclusive OR assignment (^=), <a href="#6.5.16.2">6.5.16.2</a>                      casinh functions, <a href="#7.3.6.2">7.3.6.2</a>, <a href="#G.6.2.2">G.6.2.2</a>
24163     inclusive OR, <a href="#6.5.12">6.5.12</a>                                          type-generic macro for, <a href="#7.22">7.22</a>
24164     inclusive OR assignment (|=), <a href="#6.5.16.2">6.5.16.2</a>                      cast expression, <a href="#6.5.4">6.5.4</a>
24165     shift, <a href="#6.5.7">6.5.7</a>                                                cast operator (( )), <a href="#6.5.4">6.5.4</a>
24166  blank character, <a href="#7.4.1.3">7.4.1.3</a>                                       catan functions, <a href="#7.3.5.3">7.3.5.3</a>, <a href="#G.6">G.6</a>
24167  block, <a href="#6.8">6.8</a>, <a href="#6.8.2">6.8.2</a>, <a href="#6.8.4">6.8.4</a>, <a href="#6.8.5">6.8.5</a>                                  type-generic macro for, <a href="#7.22">7.22</a>
24168  block scope, <a href="#6.2.1">6.2.1</a>                                             catanh functions, <a href="#7.3.6.3">7.3.6.3</a>, <a href="#G.6.2.3">G.6.2.3</a>
24169  block structure, <a href="#6.2.1">6.2.1</a>                                           type-generic macro for, <a href="#7.22">7.22</a>
24170  bold type convention, <a href="#6.1">6.1</a>                                      cbrt functions, <a href="#7.12.7.1">7.12.7.1</a>, <a href="#F.9.4.1">F.9.4.1</a>
24171  bool macro, <a href="#7.16">7.16</a>                                               cbrt type-generic macro, <a href="#7.22">7.22</a>
24172  boolean type, <a href="#6.3.1.2">6.3.1.2</a>                                          ccos functions, <a href="#7.3.5.4">7.3.5.4</a>, <a href="#G.6">G.6</a>
24173  boolean type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.2">6.3.1.2</a>                        type-generic macro for, <a href="#7.22">7.22</a>
24174  braces punctuator ({ }), <a href="#6.7.2.2">6.7.2.2</a>, <a href="#6.7.2.3">6.7.2.3</a>, <a href="#6.7.8">6.7.8</a>,              ccosh functions, <a href="#7.3.6.4">7.3.6.4</a>, <a href="#G.6.2.4">G.6.2.4</a>
24175        <a href="#6.8.2">6.8.2</a>                                                      type-generic macro for, <a href="#7.22">7.22</a>
24176  brackets operator ([ ]), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>                      ceil functions, <a href="#7.12.9.1">7.12.9.1</a>, <a href="#F.9.6.1">F.9.6.1</a>
24177  brackets punctuator ([ ]), <a href="#6.7.5.2">6.7.5.2</a>, <a href="#6.7.8">6.7.8</a>                      ceil type-generic macro, <a href="#7.22">7.22</a>
24178  branch cuts, <a href="#7.3.3">7.3.3</a>                                             cerf function, <a href="#7.26.1">7.26.1</a>
24179  break statement, <a href="#6.8.6.3">6.8.6.3</a>                                       cerfc function, <a href="#7.26.1">7.26.1</a>
24180  broken-down time, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.3">7.23.2.3</a>, <a href="#7.23.3">7.23.3</a>,                    cexp functions, <a href="#7.3.7.1">7.3.7.1</a>, <a href="#G.6.3.1">G.6.3.1</a>
24181        <a href="#7.23.3.1">7.23.3.1</a>, <a href="#7.23.3.3">7.23.3.3</a>, <a href="#7.23.3.4">7.23.3.4</a>, <a href="#7.23.3.5">7.23.3.5</a>                     type-generic macro for, <a href="#7.22">7.22</a>
24182  bsearch function, <a href="#7.20.5">7.20.5</a>, <a href="#7.20.5.1">7.20.5.1</a>                             cexp2 function, <a href="#7.26.1">7.26.1</a>
24183  btowc function, <a href="#7.24.6.1.1">7.24.6.1.1</a>                                     cexpm1 function, <a href="#7.26.1">7.26.1</a>
24184  BUFSIZ macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.5.5">7.19.5.5</a>                         char type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.7.2">6.7.2</a>
24185  byte, <a href="#3.6">3.6</a>, <a href="#6.5.3.4">6.5.3.4</a>                                             char type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.3.1.4">6.3.1.4</a>,
24186  byte input/output functions, <a href="#7.19.1">7.19.1</a>                                  <a href="#6.3.1.8">6.3.1.8</a>
24187  byte-oriented stream, <a href="#7.19.2">7.19.2</a>                                   CHAR_BIT macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
24188                                                                 CHAR_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24189  <a href="#C">C</a> program, <a href="#5.1.1.1">5.1.1.1</a>                                             CHAR_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
24190  <a href="#C">C</a>++, <a href="#7.8.1">7.8.1</a>, <a href="#7.18.2">7.18.2</a>, <a href="#7.18.3">7.18.3</a>, <a href="#7.18.4">7.18.4</a>                             character, <a href="#3.7">3.7</a>, <a href="#3.7.1">3.7.1</a>
24191  cabs functions, <a href="#7.3.8.1">7.3.8.1</a>, <a href="#G.6">G.6</a>                                   character array initialization, <a href="#6.7.8">6.7.8</a>
24192    type-generic macro for, <a href="#7.22">7.22</a>                                 character case mapping functions, <a href="#7.4.2">7.4.2</a>
24193  cacos functions, <a href="#7.3.5.1">7.3.5.1</a>, <a href="#G.6.1.1">G.6.1.1</a>                                wide character, <a href="#7.25.3.1">7.25.3.1</a>
24194    type-generic macro for, <a href="#7.22">7.22</a>                                       extensible, <a href="#7.25.3.2">7.25.3.2</a>
24195  cacosh functions, <a href="#7.3.6.1">7.3.6.1</a>, <a href="#G.6.2.1">G.6.2.1</a>                             character classification functions, <a href="#7.4.1">7.4.1</a>
24196    type-generic macro for, <a href="#7.22">7.22</a>                                   wide character, <a href="#7.25.2.1">7.25.2.1</a>
24197  calendar time, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.2">7.23.2.2</a>, <a href="#7.23.2.3">7.23.2.3</a>, <a href="#7.23.2.4">7.23.2.4</a>,                 extensible, <a href="#7.25.2.2">7.25.2.2</a>
24198       <a href="#7.23.3.2">7.23.3.2</a>, <a href="#7.23.3.3">7.23.3.3</a>, <a href="#7.23.3.4">7.23.3.4</a>                              character constant, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>
24199 <!--page 535 -->
24200  character display semantics, <a href="#5.2.2">5.2.2</a>                            complex.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.3">7.3</a>, <a href="#7.22">7.22</a>, <a href="#7.26.1">7.26.1</a>,
24201  character handling header, <a href="#7.4">7.4</a>, <a href="#7.11.1.1">7.11.1.1</a>                           <a href="#G.6">G.6</a>, <a href="#J.5.17">J.5.17</a>
24202  character input/output functions, <a href="#7.19.7">7.19.7</a>                      compliance, see conformance
24203     wide character, <a href="#7.24.3">7.24.3</a>                                     components of time, <a href="#7.23.1">7.23.1</a>
24204  character sets, <a href="#5.2.1">5.2.1</a>                                         composite type, <a href="#6.2.7">6.2.7</a>
24205  character string literal, see string literal                  compound assignment, <a href="#6.5.16.2">6.5.16.2</a>
24206  character type conversion, <a href="#6.3.1.1">6.3.1.1</a>                            compound literals, <a href="#6.5.2.5">6.5.2.5</a>
24207  character types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.8">6.7.8</a>                                 compound statement, <a href="#6.8.2">6.8.2</a>
24208  cimag functions, <a href="#7.3.9.2">7.3.9.2</a>, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#G.6">G.6</a>                        compound-literal operator (( ){ }), <a href="#6.5.2.5">6.5.2.5</a>
24209  cimag type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                           concatenation functions
24210  cis function, <a href="#G.6">G.6</a>                                               string, <a href="#7.21.3">7.21.3</a>
24211  classification functions                                         wide string, <a href="#7.24.4.3">7.24.4.3</a>
24212     character, <a href="#7.4.1">7.4.1</a>                                           concatenation, preprocessing, see preprocessing
24213     floating-point, <a href="#7.12.3">7.12.3</a>                                           concatenation
24214     wide character, <a href="#7.25.2.1">7.25.2.1</a>                                   conceptual models, <a href="#5.1">5.1</a>
24215        extensible, <a href="#7.25.2.2">7.25.2.2</a>                                    conditional inclusion, <a href="#6.10.1">6.10.1</a>
24216  clearerr function, <a href="#7.19.10.1">7.19.10.1</a>                                  conditional operator (? :), <a href="#6.5.15">6.5.15</a>
24217  clgamma function, <a href="#7.26.1">7.26.1</a>                                      conformance, <a href="#4">4</a>
24218  clock function, <a href="#7.23.2.1">7.23.2.1</a>                                      conj functions, <a href="#7.3.9.3">7.3.9.3</a>, <a href="#G.6">G.6</a>
24219  clock_t type, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.1">7.23.2.1</a>                                conj type-generic macro, <a href="#7.22">7.22</a>
24220  CLOCKS_PER_SEC macro, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.1">7.23.2.1</a>                        const type qualifier, <a href="#6.7.3">6.7.3</a>
24221  clog functions, <a href="#7.3.7.2">7.3.7.2</a>, <a href="#G.6.3.2">G.6.3.2</a>                              const-qualified type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.7.3">6.7.3</a>
24222     type-generic macro for, <a href="#7.22">7.22</a>                               constant expression, <a href="#6.6">6.6</a>, <a href="#F.7.4">F.7.4</a>
24223  clog10 function, <a href="#7.26.1">7.26.1</a>                                       constants, <a href="#6.4.4">6.4.4</a>
24224  clog1p function, <a href="#7.26.1">7.26.1</a>                                         as primary expression, <a href="#6.5.1">6.5.1</a>
24225  clog2 function, <a href="#7.26.1">7.26.1</a>                                          character, <a href="#6.4.4.4">6.4.4.4</a>
24226  collating sequences, <a href="#5.2.1">5.2.1</a>                                      enumeration, <a href="#6.2.1">6.2.1</a>, <a href="#6.4.4.3">6.4.4.3</a>
24227  colon punctuator (:), <a href="#6.7.2.1">6.7.2.1</a>                                   floating, <a href="#6.4.4.2">6.4.4.2</a>
24228  comma operator (,), <a href="#6.5.17">6.5.17</a>                                      hexadecimal, <a href="#6.4.4.1">6.4.4.1</a>
24229  comma punctuator (,), <a href="#6.5.2">6.5.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.2.1">6.7.2.1</a>, <a href="#6.7.2.2">6.7.2.2</a>,             integer, <a href="#6.4.4.1">6.4.4.1</a>
24230        <a href="#6.7.2.3">6.7.2.3</a>, <a href="#6.7.8">6.7.8</a>                                            octal, <a href="#6.4.4.1">6.4.4.1</a>
24231  command processor, <a href="#7.20.4.6">7.20.4.6</a>                                   constraint, <a href="#3.8">3.8</a>, <a href="#4">4</a>
24232  comment delimiters (/* */ and //), <a href="#6.4.9">6.4.9</a>                      content of structure/union/enumeration, <a href="#6.7.2.3">6.7.2.3</a>
24233  comments, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.4">6.4</a>, <a href="#6.4.9">6.4.9</a>                                 contiguity of allocated storage, <a href="#7.20.3">7.20.3</a>
24234  common extensions, <a href="#J.5">J.5</a>                                        continue statement, <a href="#6.8.6.2">6.8.6.2</a>
24235  common initial sequence, <a href="#6.5.2.3">6.5.2.3</a>                              contracted expression, <a href="#6.5">6.5</a>, <a href="#7.12.2">7.12.2</a>, <a href="#F.6">F.6</a>
24236  common real type, <a href="#6.3.1.8">6.3.1.8</a>                                     control character, <a href="#5.2.1">5.2.1</a>, <a href="#7.4">7.4</a>
24237  common warnings, <a href="#I">I</a>                                            control wide character, <a href="#7.25.2">7.25.2</a>
24238  comparison functions, <a href="#7.20.5">7.20.5</a>, <a href="#7.20.5.1">7.20.5.1</a>, <a href="#7.20.5.2">7.20.5.2</a>              conversion, <a href="#6.3">6.3</a>
24239     string, <a href="#7.21.4">7.21.4</a>                                               arithmetic operands, <a href="#6.3.1">6.3.1</a>
24240     wide string, <a href="#7.24.4.4">7.24.4.4</a>                                        array argument, <a href="#6.9.1">6.9.1</a>                           *
24241  comparison macros, <a href="#7.12.14">7.12.14</a>                                      array parameter, <a href="#6.9.1">6.9.1</a>
24242  comparison, pointer, <a href="#6.5.8">6.5.8</a>                                      arrays, <a href="#6.3.2.1">6.3.2.1</a>
24243  compatible type, <a href="#6.2.7">6.2.7</a>, <a href="#6.7.2">6.7.2</a>, <a href="#6.7.3">6.7.3</a>, <a href="#6.7.5">6.7.5</a>                     boolean, <a href="#6.3.1.2">6.3.1.2</a>
24244  compl macro, <a href="#7.9">7.9</a>                                                boolean, characters, and integers, <a href="#6.3.1.1">6.3.1.1</a>
24245  complement operator (~), <a href="#6.5.3.3">6.5.3.3</a>                                by assignment, <a href="#6.5.16.1">6.5.16.1</a>
24246  complex macro, <a href="#7.3.1">7.3.1</a>                                            by return statement, <a href="#6.8.6.4">6.8.6.4</a>
24247  complex numbers, <a href="#6.2.5">6.2.5</a>, <a href="#G">G</a>                                       complex types, <a href="#6.3.1.6">6.3.1.6</a>
24248  complex type conversion, <a href="#6.3.1.6">6.3.1.6</a>, <a href="#6.3.1.7">6.3.1.7</a>                       explicit, <a href="#6.3">6.3</a>
24249  complex type domain, <a href="#6.2.5">6.2.5</a>                                      function, <a href="#6.3.2.1">6.3.2.1</a>
24250  complex types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>, <a href="#G">G</a>                                  function argument, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.9.1">6.9.1</a>
24251 <!--page 536 -->
24252    function designators, <a href="#6.3.2.1">6.3.2.1</a>                                type-generic macro for, <a href="#7.22">7.22</a>
24253    function parameter, <a href="#6.9.1">6.9.1</a>                                  csinh functions, <a href="#7.3.6.5">7.3.6.5</a>, <a href="#G.6.2.5">G.6.2.5</a>
24254    imaginary, <a href="#G.4.1">G.4.1</a>                                             type-generic macro for, <a href="#7.22">7.22</a>
24255    imaginary and complex, <a href="#G.4.3">G.4.3</a>                               csqrt functions, <a href="#7.3.8.3">7.3.8.3</a>, <a href="#G.6.4.2">G.6.4.2</a>
24256    implicit, <a href="#6.3">6.3</a>                                                type-generic macro for, <a href="#7.22">7.22</a>
24257    lvalues, <a href="#6.3.2.1">6.3.2.1</a>                                           ctan functions, <a href="#7.3.5.6">7.3.5.6</a>, <a href="#G.6">G.6</a>
24258    pointer, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.3.2.3">6.3.2.3</a>                                    type-generic macro for, <a href="#7.22">7.22</a>
24259    real and complex, <a href="#6.3.1.7">6.3.1.7</a>                                  ctanh functions, <a href="#7.3.6.6">7.3.6.6</a>, <a href="#G.6.2.6">G.6.2.6</a>
24260    real and imaginary, <a href="#G.4.2">G.4.2</a>                                    type-generic macro for, <a href="#7.22">7.22</a>
24261    real floating and integer, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#F.3">F.3</a>, <a href="#F.4">F.4</a>                ctgamma function, <a href="#7.26.1">7.26.1</a>
24262    real floating types, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#F.3">F.3</a>                           ctime function, <a href="#7.23.3.2">7.23.3.2</a>
24263    signed and unsigned integers, <a href="#6.3.1.3">6.3.1.3</a>                      ctype.h header, <a href="#7.4">7.4</a>, <a href="#7.26.2">7.26.2</a>
24264    usual arithmetic, see usual arithmetic                     current object, <a href="#6.7.8">6.7.8</a>
24265          conversions                                          CX_LIMITED_RANGE pragma, <a href="#6.10.6">6.10.6</a>, <a href="#7.3.4">7.3.4</a>
24266    void type, <a href="#6.3.2.2">6.3.2.2</a>
24267  conversion functions                                         data stream, see streams
24268    multibyte/wide character, <a href="#7.20.7">7.20.7</a>                           date and time header, <a href="#7.23">7.23</a>
24269       extended, <a href="#7.24.6">7.24.6</a>                                        Daylight Saving Time, <a href="#7.23.1">7.23.1</a>
24270       restartable, <a href="#7.24.6.3">7.24.6.3</a>                                   DBL_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24271    multibyte/wide string, <a href="#7.20.8">7.20.8</a>                              DBL_EPSILON macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24272       restartable, <a href="#7.24.6.4">7.24.6.4</a>                                   DBL_MANT_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24273    numeric, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.20.1">7.20.1</a>                                   DBL_MAX macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24274       wide string, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.24.4.1">7.24.4.1</a>                          DBL_MAX_10_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24275    single byte/wide character, <a href="#7.24.6.1">7.24.6.1</a>                       DBL_MAX_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24276    time, <a href="#7.23.3">7.23.3</a>                                               DBL_MIN macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24277       wide character, <a href="#7.24.5">7.24.5</a>                                  DBL_MIN_10_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24278  conversion specifier, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>,           DBL_MIN_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24279       <a href="#7.24.2.2">7.24.2.2</a>                                                decimal constant, <a href="#6.4.4.1">6.4.4.1</a>
24280  conversion state, <a href="#7.20.7">7.20.7</a>, <a href="#7.24.6">7.24.6</a>, <a href="#7.24.6.2.1">7.24.6.2.1</a>,                decimal digit, <a href="#5.2.1">5.2.1</a>
24281       <a href="#7.24.6.3">7.24.6.3</a>, <a href="#7.24.6.3.2">7.24.6.3.2</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4">7.24.6.4</a>,             decimal-point character, <a href="#7.1.1">7.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24282       <a href="#7.24.6.4.1">7.24.6.4.1</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a>                                  DECIMAL_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19.6.1">7.19.6.1</a>,
24283  conversion state functions, <a href="#7.24.6.2">7.24.6.2</a>                              <a href="#7.20.1.3">7.20.1.3</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#F.5">F.5</a>
24284  copying functions                                            declaration specifiers, <a href="#6.7">6.7</a>
24285    string, <a href="#7.21.2">7.21.2</a>                                             declarations, <a href="#6.7">6.7</a>
24286    wide string, <a href="#7.24.4.2">7.24.4.2</a>                                        function, <a href="#6.7.5.3">6.7.5.3</a>
24287  copysign functions, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#7.12.11.1">7.12.11.1</a>, <a href="#F.3">F.3</a>,                   pointer, <a href="#6.7.5.1">6.7.5.1</a>
24288       <a href="#F.9.8.1">F.9.8.1</a>                                                   structure/union, <a href="#6.7.2.1">6.7.2.1</a>
24289  copysign type-generic macro, <a href="#7.22">7.22</a>                              typedef, <a href="#6.7.7">6.7.7</a>
24290  correctly rounded result, <a href="#3.9">3.9</a>                                declarator, <a href="#6.7.5">6.7.5</a>
24291  corresponding real type, <a href="#6.2.5">6.2.5</a>                                 abstract, <a href="#6.7.6">6.7.6</a>
24292  cos functions, <a href="#7.12.4.5">7.12.4.5</a>, <a href="#F.9.1.5">F.9.1.5</a>                             declarator type derivation, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.5">6.7.5</a>
24293  cos type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                            decrement operators, see arithmetic operators,
24294  cosh functions, <a href="#7.12.5.4">7.12.5.4</a>, <a href="#F.9.2.4">F.9.2.4</a>                                 increment and decrement
24295  cosh type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                           default argument promotions, <a href="#6.5.2.2">6.5.2.2</a>
24296  cpow functions, <a href="#7.3.8.2">7.3.8.2</a>, <a href="#G.6.4.1">G.6.4.1</a>                             default initialization, <a href="#6.7.8">6.7.8</a>
24297    type-generic macro for, <a href="#7.22">7.22</a>                               default label, <a href="#6.8.1">6.8.1</a>, <a href="#6.8.4.2">6.8.4.2</a>
24298  cproj functions, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#G.6">G.6</a>                                define preprocessing directive, <a href="#6.10.3">6.10.3</a>
24299  cproj type-generic macro, <a href="#7.22">7.22</a>                               defined operator, <a href="#6.10.1">6.10.1</a>, <a href="#6.10.8">6.10.8</a>
24300  creal functions, <a href="#7.3.9.5">7.3.9.5</a>, <a href="#G.6">G.6</a>                                definition, <a href="#6.7">6.7</a>
24301  creal type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                            function, <a href="#6.9.1">6.9.1</a>
24302  csin functions, <a href="#7.3.5.5">7.3.5.5</a>, <a href="#G.6">G.6</a>                                 derived declarator types, <a href="#6.2.5">6.2.5</a>
24303 <!--page 537 -->
24304  derived types, <a href="#6.2.5">6.2.5</a>                                            end-of-file indicator, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.1">7.19.7.1</a>,
24305  designated initializer, <a href="#6.7.8">6.7.8</a>                                         <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.7.6">7.19.7.6</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>,
24306  destringizing, <a href="#6.10.9">6.10.9</a>                                                 <a href="#7.19.9.3">7.19.9.3</a>, <a href="#7.19.10.1">7.19.10.1</a>, <a href="#7.19.10.2">7.19.10.2</a>, <a href="#7.24.3.1">7.24.3.1</a>,
24307  device input/output, <a href="#5.1.2.3">5.1.2.3</a>                                          <a href="#7.24.3.10">7.24.3.10</a>
24308  diagnostic message, <a href="#3.10">3.10</a>, <a href="#5.1.1.3">5.1.1.3</a>                               end-of-file macro, see EOF macro
24309  diagnostics, <a href="#5.1.1.3">5.1.1.3</a>                                            end-of-line indicator, <a href="#5.2.1">5.2.1</a>
24310  diagnostics header, <a href="#7.2">7.2</a>                                         endif preprocessing directive, <a href="#6.10.1">6.10.1</a>
24311  difftime function, <a href="#7.23.2.2">7.23.2.2</a>                                     enum type, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>, <a href="#6.7.2.2">6.7.2.2</a>
24312  digit, <a href="#5.2.1">5.2.1</a>, <a href="#7.4">7.4</a>                                               enumerated type, <a href="#6.2.5">6.2.5</a>
24313  digraphs, <a href="#6.4.6">6.4.6</a>                                                 enumeration, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2.2">6.7.2.2</a>
24314  direct input/output functions, <a href="#7.19.8">7.19.8</a>                           enumeration constant, <a href="#6.2.1">6.2.1</a>, <a href="#6.4.4.3">6.4.4.3</a>
24315  display device, <a href="#5.2.2">5.2.2</a>                                           enumeration content, <a href="#6.7.2.3">6.7.2.3</a>
24316  div function, <a href="#7.20.6.2">7.20.6.2</a>                                          enumeration members, <a href="#6.7.2.2">6.7.2.2</a>
24317  div_t type, <a href="#7.20">7.20</a>                                                enumeration specifiers, <a href="#6.7.2.2">6.7.2.2</a>
24318  division assignment operator (/=), <a href="#6.5.16.2">6.5.16.2</a>                     enumeration tag, <a href="#6.2.3">6.2.3</a>, <a href="#6.7.2.3">6.7.2.3</a>
24319  division operator (/), <a href="#6.5.5">6.5.5</a>, <a href="#F.3">F.3</a>, <a href="#G.5.1">G.5.1</a>                        enumerator, <a href="#6.7.2.2">6.7.2.2</a>
24320  do statement, <a href="#6.8.5.2">6.8.5.2</a>                                           environment, <a href="#5">5</a>
24321  documentation of implementation, <a href="#4">4</a>                              environment functions, <a href="#7.20.4">7.20.4</a>
24322  domain error, <a href="#7.12.1">7.12.1</a>, <a href="#7.12.4.1">7.12.4.1</a>, <a href="#7.12.4.2">7.12.4.2</a>, <a href="#7.12.4.4">7.12.4.4</a>,             environment list, <a href="#7.20.4.5">7.20.4.5</a>
24323        <a href="#7.12.5.1">7.12.5.1</a>, <a href="#7.12.5.3">7.12.5.3</a>, <a href="#7.12.6.5">7.12.6.5</a>, <a href="#7.12.6.7">7.12.6.7</a>,                   environmental considerations, <a href="#5.2">5.2</a>
24324        <a href="#7.12.6.8">7.12.6.8</a>, <a href="#7.12.6.9">7.12.6.9</a>, <a href="#7.12.6.10">7.12.6.10</a>, <a href="#7.12.6.11">7.12.6.11</a>,                 environmental limits, <a href="#5.2.4">5.2.4</a>, <a href="#7.13.1.1">7.13.1.1</a>, <a href="#7.19.2">7.19.2</a>,
24325        <a href="#7.12.7.4">7.12.7.4</a>, <a href="#7.12.7.5">7.12.7.5</a>, <a href="#7.12.8.4">7.12.8.4</a>, <a href="#7.12.9.5">7.12.9.5</a>,                         <a href="#7.19.3">7.19.3</a>, <a href="#7.19.4.4">7.19.4.4</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.20.2.1">7.20.2.1</a>, <a href="#7.20.4.2">7.20.4.2</a>,
24326        <a href="#7.12.9.7">7.12.9.7</a>, <a href="#7.12.10.1">7.12.10.1</a>, <a href="#7.12.10.2">7.12.10.2</a>, <a href="#7.12.10.3">7.12.10.3</a>                       <a href="#7.24.2.1">7.24.2.1</a>
24327  dot operator (.), <a href="#6.5.2.3">6.5.2.3</a>                                       EOF macro, <a href="#7.4">7.4</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.1">7.19.5.1</a>, <a href="#7.19.5.2">7.19.5.2</a>,
24328  double _Complex type, <a href="#6.2.5">6.2.5</a>                                           <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.19.6.7">7.19.6.7</a>, <a href="#7.19.6.9">7.19.6.9</a>, <a href="#7.19.6.11">7.19.6.11</a>,
24329  double _Complex type conversion, <a href="#6.3.1.6">6.3.1.6</a>,                             <a href="#7.19.6.14">7.19.6.14</a>, <a href="#7.19.7.1">7.19.7.1</a>, <a href="#7.19.7.3">7.19.7.3</a>, <a href="#7.19.7.4">7.19.7.4</a>,
24330        <a href="#6.3.1.7">6.3.1.7</a>, <a href="#6.3.1.8">6.3.1.8</a>                                                <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.7.6">7.19.7.6</a>, <a href="#7.19.7.9">7.19.7.9</a>, <a href="#7.19.7.10">7.19.7.10</a>,
24331  double _Imaginary type, <a href="#G.2">G.2</a>                                           <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.24.1">7.24.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.2.4">7.24.2.4</a>,
24332  double type, <a href="#6.2.5">6.2.5</a>, <a href="#6.4.4.2">6.4.4.2</a>, <a href="#6.7.2">6.7.2</a>, <a href="#7.19.6.2">7.19.6.2</a>,                         <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.10">7.24.2.10</a>, <a href="#7.24.2.12">7.24.2.12</a>,
24333        <a href="#7.24.2.2">7.24.2.2</a>, <a href="#F.2">F.2</a>                                                   <a href="#7.24.3.4">7.24.3.4</a>, <a href="#7.24.6.1.1">7.24.6.1.1</a>, <a href="#7.24.6.1.2">7.24.6.1.2</a>
24334  double type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.7">6.3.1.7</a>,              equal-sign punctuator (=), <a href="#6.7">6.7</a>, <a href="#6.7.2.2">6.7.2.2</a>, <a href="#6.7.8">6.7.8</a>
24335        <a href="#6.3.1.8">6.3.1.8</a>                                                   equal-to operator, see equality operator
24336  double-precision arithmetic, <a href="#5.1.2.3">5.1.2.3</a>                            equality expressions, <a href="#6.5.9">6.5.9</a>
24337  double-quote escape sequence (\"), <a href="#6.4.4.4">6.4.4.4</a>,                     equality operator (==), <a href="#6.5.9">6.5.9</a>
24338        <a href="#6.4.5">6.4.5</a>, <a href="#6.10.9">6.10.9</a>                                             ERANGE macro, <a href="#7.5">7.5</a>, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.12.1">7.12.1</a>,
24339  double_t type, <a href="#7.12">7.12</a>, <a href="#J.5.6">J.5.6</a>                                            <a href="#7.20.1.3">7.20.1.3</a>, <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>, see
24340                                                                        also range error
24341  EDOM macro, <a href="#7.5">7.5</a>, <a href="#7.12.1">7.12.1</a>, see also domain error                  erf functions, <a href="#7.12.8.1">7.12.8.1</a>, <a href="#F.9.5.1">F.9.5.1</a>
24342  effective type, <a href="#6.5">6.5</a>                                             erf type-generic macro, <a href="#7.22">7.22</a>
24343  EILSEQ macro, <a href="#7.5">7.5</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.24.3.1">7.24.3.1</a>, <a href="#7.24.3.3">7.24.3.3</a>,                  erfc functions, <a href="#7.12.8.2">7.12.8.2</a>, <a href="#F.9.5.2">F.9.5.2</a>
24344        <a href="#7.24.6.3.2">7.24.6.3.2</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.1">7.24.6.4.1</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a>,           erfc type-generic macro, <a href="#7.22">7.22</a>
24345        see also encoding error                                   errno macro, <a href="#7.1.3">7.1.3</a>, <a href="#7.3.2">7.3.2</a>, <a href="#7.5">7.5</a>, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>,
24346  element type, <a href="#6.2.5">6.2.5</a>                                                   <a href="#7.12.1">7.12.1</a>, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.9.3">7.19.9.3</a>, <a href="#7.19.10.4">7.19.10.4</a>,
24347  elif preprocessing directive, <a href="#6.10.1">6.10.1</a>                                  <a href="#7.20.1">7.20.1</a>, <a href="#7.20.1.3">7.20.1.3</a>, <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.21.6.2">7.21.6.2</a>, <a href="#7.24.3.1">7.24.3.1</a>,
24348  ellipsis punctuator (...), <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.10.3">6.10.3</a>                   <a href="#7.24.3.3">7.24.3.3</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>, <a href="#7.24.6.3.2">7.24.6.3.2</a>,
24349  else preprocessing directive, <a href="#6.10.1">6.10.1</a>                                  <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.1">7.24.6.4.1</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a>, <a href="#J.5.17">J.5.17</a>
24350  else statement, <a href="#6.8.4.1">6.8.4.1</a>                                         errno.h header, <a href="#7.5">7.5</a>, <a href="#7.26.3">7.26.3</a>
24351  empty statement, <a href="#6.8.3">6.8.3</a>                                          error
24352  encoding error, <a href="#7.19.3">7.19.3</a>, <a href="#7.24.3.1">7.24.3.1</a>, <a href="#7.24.3.3">7.24.3.3</a>,                        domain, see domain error
24353        <a href="#7.24.6.3.2">7.24.6.3.2</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.1">7.24.6.4.1</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a>               encoding, see encoding error
24354  end-of-file, <a href="#7.24.1">7.24.1</a>                                                 range, see range error
24355 <!--page 538 -->
24356  error conditions, <a href="#7.12.1">7.12.1</a>                                     extended characters, <a href="#5.2.1">5.2.1</a>
24357  error functions, <a href="#7.12.8">7.12.8</a>, <a href="#F.9.5">F.9.5</a>                               extended integer types, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.4.4.1">6.4.4.1</a>,
24358  error indicator, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.1">7.19.7.1</a>,                      <a href="#7.18">7.18</a>
24359        <a href="#7.19.7.3">7.19.7.3</a>, <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.7.6">7.19.7.6</a>, <a href="#7.19.7.8">7.19.7.8</a>,                extended multibyte/wide character conversion
24360        <a href="#7.19.7.9">7.19.7.9</a>, <a href="#7.19.9.2">7.19.9.2</a>, <a href="#7.19.10.1">7.19.10.1</a>, <a href="#7.19.10.3">7.19.10.3</a>,                   utilities, <a href="#7.24.6">7.24.6</a>
24361        <a href="#7.24.3.1">7.24.3.1</a>, <a href="#7.24.3.3">7.24.3.3</a>                                     extensible wide character case mapping functions,
24362  error preprocessing directive, <a href="#4">4</a>, <a href="#6.10.5">6.10.5</a>                          <a href="#7.25.3.2">7.25.3.2</a>
24363  error-handling functions, <a href="#7.19.10">7.19.10</a>, <a href="#7.21.6.2">7.21.6.2</a>                  extensible wide character classification functions,
24364  escape character (\), <a href="#6.4.4.4">6.4.4.4</a>                                     <a href="#7.25.2.2">7.25.2.2</a>
24365  escape sequences, <a href="#5.2.1">5.2.1</a>, <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.11.4">6.11.4</a>              extern storage-class specifier, <a href="#6.2.2">6.2.2</a>, <a href="#6.7.1">6.7.1</a>
24366  evaluation format, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.4.4.2">6.4.4.2</a>, <a href="#7.12">7.12</a>                  external definition, <a href="#6.9">6.9</a>
24367  evaluation method, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.5">6.5</a>, <a href="#F.7.5">F.7.5</a>                     external identifiers, underscore, <a href="#7.1.3">7.1.3</a>
24368  evaluation order, <a href="#6.5">6.5</a>                                        external linkage, <a href="#6.2.2">6.2.2</a>
24369  exceptional condition, <a href="#6.5">6.5</a>, <a href="#7.12.1">7.12.1</a>                           external name, <a href="#6.4.2.1">6.4.2.1</a>
24370  excess precision, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.8">6.3.1.8</a>,               external object definitions, <a href="#6.9.2">6.9.2</a>
24371        <a href="#6.8.6.4">6.8.6.4</a>
24372  excess range, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.8">6.3.1.8</a>, <a href="#6.8.6.4">6.8.6.4</a>           fabs functions, <a href="#7.12.7.2">7.12.7.2</a>, <a href="#F.9.4.2">F.9.4.2</a>
24373  exclusive OR operators                                       fabs type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24374     bitwise (^), <a href="#6.5.11">6.5.11</a>                                       false macro, <a href="#7.16">7.16</a>
24375     bitwise assignment (^=), <a href="#6.5.16.2">6.5.16.2</a>                         fclose function, <a href="#7.19.5.1">7.19.5.1</a>
24376  executable program, <a href="#5.1.1.1">5.1.1.1</a>                                  fdim functions, <a href="#7.12.12.1">7.12.12.1</a>, <a href="#F.9.9.1">F.9.9.1</a>
24377  execution character set, <a href="#5.2.1">5.2.1</a>                               fdim type-generic macro, <a href="#7.22">7.22</a>
24378  execution environment, <a href="#5">5</a>, <a href="#5.1.2">5.1.2</a>, see also                    FE_ALL_EXCEPT macro, <a href="#7.6">7.6</a>
24379        environmental limits                                   FE_DFL_ENV macro, <a href="#7.6">7.6</a>
24380  execution sequence, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#6.8">6.8</a>                             FE_DIVBYZERO macro, <a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24381  exit function, <a href="#5.1.2.2.3">5.1.2.2.3</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.20">7.20</a>, <a href="#7.20.4.3">7.20.4.3</a>,            FE_DOWNWARD macro, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24382        <a href="#7.20.4.4">7.20.4.4</a>                                               FE_INEXACT macro, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24383  EXIT_FAILURE macro, <a href="#7.20">7.20</a>, <a href="#7.20.4.3">7.20.4.3</a>                           FE_INVALID macro, <a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24384  EXIT_SUCCESS macro, <a href="#7.20">7.20</a>, <a href="#7.20.4.3">7.20.4.3</a>                           FE_OVERFLOW macro, <a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24385  exp functions, <a href="#7.12.6.1">7.12.6.1</a>, <a href="#F.9.3.1">F.9.3.1</a>                             FE_TONEAREST macro, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24386  exp type-generic macro, <a href="#7.22">7.22</a>                                 FE_TOWARDZERO macro, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24387  exp2 functions, <a href="#7.12.6.2">7.12.6.2</a>, <a href="#F.9.3.2">F.9.3.2</a>                            FE_UNDERFLOW macro, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24388  exp2 type-generic macro, <a href="#7.22">7.22</a>                                FE_UPWARD macro, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24389  explicit conversion, <a href="#6.3">6.3</a>                                     feclearexcept function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.1">7.6.2.1</a>, <a href="#F.3">F.3</a>
24390  expm1 functions, <a href="#7.12.6.3">7.12.6.3</a>, <a href="#F.9.3.3">F.9.3.3</a>                           fegetenv function, <a href="#7.6.4.1">7.6.4.1</a>, <a href="#7.6.4.3">7.6.4.3</a>, <a href="#7.6.4.4">7.6.4.4</a>, <a href="#F.3">F.3</a>
24391  expm1 type-generic macro, <a href="#7.22">7.22</a>                               fegetexceptflag function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.2">7.6.2.2</a>, <a href="#F.3">F.3</a>
24392  exponent part, <a href="#6.4.4.2">6.4.4.2</a>                                       fegetround function, <a href="#7.6">7.6</a>, <a href="#7.6.3.1">7.6.3.1</a>, <a href="#F.3">F.3</a>
24393  exponential functions                                        feholdexcept function, <a href="#7.6.4.2">7.6.4.2</a>, <a href="#7.6.4.3">7.6.4.3</a>,
24394     complex, <a href="#7.3.7">7.3.7</a>, <a href="#G.6.3">G.6.3</a>                                        <a href="#7.6.4.4">7.6.4.4</a>, <a href="#F.3">F.3</a>
24395     real, <a href="#7.12.6">7.12.6</a>, <a href="#F.9.3">F.9.3</a>                                       fenv.h header, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>, <a href="#F">F</a>, <a href="#H">H</a>
24396  expression, <a href="#6.5">6.5</a>                                              FENV_ACCESS pragma, <a href="#6.10.6">6.10.6</a>, <a href="#7.6.1">7.6.1</a>, <a href="#F.7">F.7</a>, <a href="#F.8">F.8</a>,
24397     assignment, <a href="#6.5.16">6.5.16</a>                                           <a href="#F.9">F.9</a>
24398     cast, <a href="#6.5.4">6.5.4</a>                                               fenv_t type, <a href="#7.6">7.6</a>
24399     constant, <a href="#6.6">6.6</a>                                             feof function, <a href="#7.19.10.2">7.19.10.2</a>
24400     full, <a href="#6.8">6.8</a>                                                 feraiseexcept function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.3">7.6.2.3</a>, <a href="#F.3">F.3</a>
24401     order of evaluation, <a href="#6.5">6.5</a>                                  ferror function, <a href="#7.19.10.3">7.19.10.3</a>
24402     parenthesized, <a href="#6.5.1">6.5.1</a>                                      fesetenv function, <a href="#7.6.4.3">7.6.4.3</a>, <a href="#F.3">F.3</a>
24403     primary, <a href="#6.5.1">6.5.1</a>                                            fesetexceptflag function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.4">7.6.2.4</a>, <a href="#F.3">F.3</a>
24404     unary, <a href="#6.5.3">6.5.3</a>                                              fesetround function, <a href="#7.6">7.6</a>, <a href="#7.6.3.2">7.6.3.2</a>, <a href="#F.3">F.3</a>
24405  expression statement, <a href="#6.8.3">6.8.3</a>                                  fetestexcept function, <a href="#7.6.2">7.6.2</a>, <a href="#7.6.2.5">7.6.2.5</a>, <a href="#F.3">F.3</a>
24406  extended character set, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#5.2.1.2">5.2.1.2</a>                feupdateenv function, <a href="#7.6.4.2">7.6.4.2</a>, <a href="#7.6.4.4">7.6.4.4</a>, <a href="#F.3">F.3</a>
24407 <!--page 539 -->
24408  fexcept_t type, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>                                      floating-point status flag, <a href="#7.6">7.6</a>, <a href="#F.7.6">F.7.6</a>
24409  fflush function, <a href="#7.19.5.2">7.19.5.2</a>, <a href="#7.19.5.3">7.19.5.3</a>                           floor functions, <a href="#7.12.9.2">7.12.9.2</a>, <a href="#F.9.6.2">F.9.6.2</a>
24410  fgetc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.7.1">7.19.7.1</a>,                     floor type-generic macro, <a href="#7.22">7.22</a>
24411       <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.8.1">7.19.8.1</a>                                       FLT_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24412  fgetpos function, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.9.1">7.19.9.1</a>, <a href="#7.19.9.3">7.19.9.3</a>                  FLT_EPSILON macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24413  fgets function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.2">7.19.7.2</a>                              FLT_EVAL_METHOD macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.8.6.4">6.8.6.4</a>,
24414  fgetwc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.24.3.1">7.24.3.1</a>,                         <a href="#7.12">7.12</a>
24415       <a href="#7.24.3.6">7.24.3.6</a>                                                 FLT_MANT_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24416  fgetws function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.2">7.24.3.2</a>                             FLT_MAX macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24417  field width, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>                                FLT_MAX_10_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24418  file, <a href="#7.19.3">7.19.3</a>                                                   FLT_MAX_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24419    access functions, <a href="#7.19.5">7.19.5</a>                                    FLT_MIN macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24420    name, <a href="#7.19.3">7.19.3</a>                                                FLT_MIN_10_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24421    operations, <a href="#7.19.4">7.19.4</a>                                          FLT_MIN_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24422    position indicator, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.3">7.19.3</a>,                 FLT_RADIX macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24423          <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.1">7.19.7.1</a>, <a href="#7.19.7.3">7.19.7.3</a>, <a href="#7.19.7.11">7.19.7.11</a>,                   <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.4.1.1">7.24.4.1.1</a>
24424          <a href="#7.19.8.1">7.19.8.1</a>, <a href="#7.19.8.2">7.19.8.2</a>, <a href="#7.19.9.1">7.19.9.1</a>, <a href="#7.19.9.2">7.19.9.2</a>,               FLT_ROUNDS macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.6">7.6</a>, <a href="#F.3">F.3</a>
24425          <a href="#7.19.9.3">7.19.9.3</a>, <a href="#7.19.9.4">7.19.9.4</a>, <a href="#7.19.9.5">7.19.9.5</a>, <a href="#7.24.3.1">7.24.3.1</a>,               fma functions, <a href="#7.12">7.12</a>, <a href="#7.12.13.1">7.12.13.1</a>, <a href="#F.9.10.1">F.9.10.1</a>
24426          <a href="#7.24.3.3">7.24.3.3</a>, <a href="#7.24.3.10">7.24.3.10</a>                                   fma type-generic macro, <a href="#7.22">7.22</a>
24427    positioning functions, <a href="#7.19.9">7.19.9</a>                               fmax functions, <a href="#7.12.12.2">7.12.12.2</a>, <a href="#F.9.9.2">F.9.9.2</a>
24428  file scope, <a href="#6.2.1">6.2.1</a>, <a href="#6.9">6.9</a>                                         fmax type-generic macro, <a href="#7.22">7.22</a>
24429  FILE type, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>                                     fmin functions, <a href="#7.12.12.3">7.12.12.3</a>, <a href="#F.9.9.3">F.9.9.3</a>
24430  FILENAME_MAX macro, <a href="#7.19.1">7.19.1</a>                                    fmin type-generic macro, <a href="#7.22">7.22</a>
24431  flags, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>                                      fmod functions, <a href="#7.12.10.1">7.12.10.1</a>, <a href="#F.9.7.1">F.9.7.1</a>
24432    floating-point status, see floating-point status              fmod type-generic macro, <a href="#7.22">7.22</a>
24433          flag                                                   fopen function, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.5.4">7.19.5.4</a>
24434  flexible array member, <a href="#6.7.2.1">6.7.2.1</a>                                 FOPEN_MAX macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.4.3">7.19.4.3</a>
24435  float _Complex type, <a href="#6.2.5">6.2.5</a>                                    for statement, <a href="#6.8.5">6.8.5</a>, <a href="#6.8.5.3">6.8.5.3</a>
24436  float _Complex type conversion, <a href="#6.3.1.6">6.3.1.6</a>,                      form-feed character, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>
24437       <a href="#6.3.1.7">6.3.1.7</a>, <a href="#6.3.1.8">6.3.1.8</a>                                         form-feed escape sequence (\f), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>,
24438  float _Imaginary type, <a href="#G.2">G.2</a>                                         <a href="#7.4.1.10">7.4.1.10</a>
24439  float type, <a href="#6.2.5">6.2.5</a>, <a href="#6.4.4.2">6.4.4.2</a>, <a href="#6.7.2">6.7.2</a>, <a href="#F.2">F.2</a>                        formal argument (deprecated), <a href="#3.15">3.15</a>
24440  float type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.7">6.3.1.7</a>,             formal parameter, <a href="#3.15">3.15</a>
24441       <a href="#6.3.1.8">6.3.1.8</a>                                                  formatted input/output functions, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.19.6">7.19.6</a>
24442  float.h header, <a href="#4">4</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.7">7.7</a>, <a href="#7.20.1.3">7.20.1.3</a>,                     wide character, <a href="#7.24.2">7.24.2</a>
24443       <a href="#7.24.4.1.1">7.24.4.1.1</a>                                               fortran keyword, <a href="#J.5.9">J.5.9</a>
24444  float_t type, <a href="#7.12">7.12</a>, <a href="#J.5.6">J.5.6</a>                                     forward reference, <a href="#3.11">3.11</a>
24445  floating constant, <a href="#6.4.4.2">6.4.4.2</a>                                     FP_CONTRACT pragma, <a href="#6.5">6.5</a>, <a href="#6.10.6">6.10.6</a>, <a href="#7.12.2">7.12.2</a>, see
24446  floating suffix, f or <a href="#F">F</a>, <a href="#6.4.4.2">6.4.4.2</a>                                     also contracted expression
24447  floating type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.7">6.3.1.7</a>,           FP_FAST_FMA macro, <a href="#7.12">7.12</a>
24448       <a href="#F.3">F.3</a>, <a href="#F.4">F.4</a>                                                 FP_FAST_FMAF macro, <a href="#7.12">7.12</a>
24449  floating types, <a href="#6.2.5">6.2.5</a>, <a href="#6.11.1">6.11.1</a>                                  FP_FAST_FMAL macro, <a href="#7.12">7.12</a>
24450  floating-point accuracy, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.4.4.2">6.4.4.2</a>, <a href="#6.5">6.5</a>,              FP_ILOGB0 macro, <a href="#7.12">7.12</a>, <a href="#7.12.6.5">7.12.6.5</a>
24451       <a href="#7.20.1.3">7.20.1.3</a>, <a href="#F.5">F.5</a>, see also contracted expression            FP_ILOGBNAN macro, <a href="#7.12">7.12</a>, <a href="#7.12.6.5">7.12.6.5</a>
24452  floating-point arithmetic functions, <a href="#7.12">7.12</a>, <a href="#F.9">F.9</a>                 FP_INFINITE macro, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24453  floating-point classification functions, <a href="#7.12.3">7.12.3</a>                 FP_NAN macro, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24454  floating-point control mode, <a href="#7.6">7.6</a>, <a href="#F.7.6">F.7.6</a>                        FP_NORMAL macro, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24455  floating-point environment, <a href="#7.6">7.6</a>, <a href="#F.7">F.7</a>, <a href="#F.7.6">F.7.6</a>                    FP_SUBNORMAL macro, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24456  floating-point exception, <a href="#7.6">7.6</a>, <a href="#7.6.2">7.6.2</a>, <a href="#F.9">F.9</a>                      FP_ZERO macro, <a href="#7.12">7.12</a>, <a href="#F.3">F.3</a>
24457  floating-point number, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.2.5">6.2.5</a>                        fpclassify macro, <a href="#7.12.3.1">7.12.3.1</a>, <a href="#F.3">F.3</a>
24458  floating-point rounding mode, <a href="#5.2.4.2.2">5.2.4.2.2</a>                        fpos_t type, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>
24459 <!--page 540 -->
24460  fprintf function, <a href="#7.8.1">7.8.1</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.1">7.19.6.1</a>,                       language, <a href="#6.11">6.11</a>
24461        <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.19.6.3">7.19.6.3</a>, <a href="#7.19.6.5">7.19.6.5</a>, <a href="#7.19.6.6">7.19.6.6</a>,                    library, <a href="#7.26">7.26</a>
24462        <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#F.3">F.3</a>                                  fwide function, <a href="#7.19.2">7.19.2</a>, <a href="#7.24.3.5">7.24.3.5</a>
24463  fputc function, <a href="#5.2.2">5.2.2</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.7.3">7.19.7.3</a>,               fwprintf function, <a href="#7.8.1">7.8.1</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,
24464        <a href="#7.19.7.8">7.19.7.8</a>, <a href="#7.19.8.2">7.19.8.2</a>                                            <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.2.3">7.24.2.3</a>, <a href="#7.24.2.5">7.24.2.5</a>,
24465  fputs function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.4">7.19.7.4</a>                                    <a href="#7.24.2.11">7.24.2.11</a>
24466  fputwc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.24.3.3">7.24.3.3</a>,                     fwrite function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.8.2">7.19.8.2</a>
24467        <a href="#7.24.3.8">7.24.3.8</a>                                                 fwscanf function, <a href="#7.8.1">7.8.1</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.2">7.24.2.2</a>,
24468  fputws function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.4">7.24.3.4</a>                                   <a href="#7.24.2.4">7.24.2.4</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.12">7.24.2.12</a>, <a href="#7.24.3.10">7.24.3.10</a>
24469  fread function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.8.1">7.19.8.1</a>
24470  free function, <a href="#7.20.3.2">7.20.3.2</a>, <a href="#7.20.3.4">7.20.3.4</a>                              gamma functions, <a href="#7.12.8">7.12.8</a>, <a href="#F.9.5">F.9.5</a>
24471  freestanding execution environment, <a href="#4">4</a>, <a href="#5.1.2">5.1.2</a>,                  general utilities, <a href="#7.20">7.20</a>
24472        <a href="#5.1.2.1">5.1.2.1</a>                                                    wide string, <a href="#7.24.4">7.24.4</a>
24473  freopen function, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.5.4">7.19.5.4</a>                             general wide string utilities, <a href="#7.24.4">7.24.4</a>
24474  frexp functions, <a href="#7.12.6.4">7.12.6.4</a>, <a href="#F.9.3.4">F.9.3.4</a>                             generic parameters, <a href="#7.22">7.22</a>
24475  frexp type-generic macro, <a href="#7.22">7.22</a>                                 getc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.5">7.19.7.5</a>, <a href="#7.19.7.6">7.19.7.6</a>
24476  fscanf function, <a href="#7.8.1">7.8.1</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,                      getchar function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.6">7.19.7.6</a>
24477        <a href="#7.19.6.4">7.19.6.4</a>, <a href="#7.19.6.7">7.19.6.7</a>, <a href="#7.19.6.9">7.19.6.9</a>, <a href="#F.3">F.3</a>                        getenv function, <a href="#7.20.4.5">7.20.4.5</a>
24478  fseek function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.11">7.19.7.11</a>,                   gets function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.7">7.19.7.7</a>, <a href="#7.26.9">7.26.9</a>
24479        <a href="#7.19.9.2">7.19.9.2</a>, <a href="#7.19.9.4">7.19.9.4</a>, <a href="#7.19.9.5">7.19.9.5</a>, <a href="#7.24.3.10">7.24.3.10</a>                  getwc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.6">7.24.3.6</a>, <a href="#7.24.3.7">7.24.3.7</a>
24480  fsetpos function, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.11">7.19.7.11</a>,                 getwchar function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.7">7.24.3.7</a>
24481        <a href="#7.19.9.1">7.19.9.1</a>, <a href="#7.19.9.3">7.19.9.3</a>, <a href="#7.24.3.10">7.24.3.10</a>                            gmtime function, <a href="#7.23.3.3">7.23.3.3</a>
24482  ftell function, <a href="#7.19.9.2">7.19.9.2</a>, <a href="#7.19.9.4">7.19.9.4</a>                             goto statement, <a href="#6.2.1">6.2.1</a>, <a href="#6.8.1">6.8.1</a>, <a href="#6.8.6.1">6.8.6.1</a>
24483  full declarator, <a href="#6.7.5">6.7.5</a>                                         graphic characters, <a href="#5.2.1">5.2.1</a>
24484  full expression, <a href="#6.8">6.8</a>                                           greater-than operator (&gt;), <a href="#6.5.8">6.5.8</a>
24485  fully buffered stream, <a href="#7.19.3">7.19.3</a>                                  greater-than-or-equal-to operator (&gt;=), <a href="#6.5.8">6.5.8</a>
24486  function
24487     argument, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.9.1">6.9.1</a>                                    header, <a href="#5.1.1.1">5.1.1.1</a>, <a href="#7.1.2">7.1.2</a>, see also standard headers
24488     body, <a href="#6.9.1">6.9.1</a>                                                 header names, <a href="#6.4">6.4</a>, <a href="#6.4.7">6.4.7</a>, <a href="#6.10.2">6.10.2</a>
24489     call, <a href="#6.5.2.2">6.5.2.2</a>                                               hexadecimal constant, <a href="#6.4.4.1">6.4.4.1</a>
24490        library, <a href="#7.1.4">7.1.4</a>                                           hexadecimal digit, <a href="#6.4.4.1">6.4.4.1</a>, <a href="#6.4.4.2">6.4.4.2</a>, <a href="#6.4.4.4">6.4.4.4</a>
24491     declarator, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.11.6">6.11.6</a>                                 hexadecimal prefix, <a href="#6.4.4.1">6.4.4.1</a>
24492     definition, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.9.1">6.9.1</a>, <a href="#6.11.7">6.11.7</a>                           hexadecimal-character escape sequence
24493     designator, <a href="#6.3.2.1">6.3.2.1</a>                                              (\x hexadecimal digits), <a href="#6.4.4.4">6.4.4.4</a>
24494     image, <a href="#5.2.3">5.2.3</a>                                                high-order bit, <a href="#3.6">3.6</a>
24495     library, <a href="#5.1.1.1">5.1.1.1</a>, <a href="#7.1.4">7.1.4</a>                                     horizontal-tab character, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>
24496     name length, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.11.3">6.11.3</a>                       horizontal-tab escape sequence (\r), <a href="#7.25.2.1.3">7.25.2.1.3</a>
24497     parameter, <a href="#5.1.2.2.1">5.1.2.2.1</a>, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.7">6.7</a>, <a href="#6.9.1">6.9.1</a>                   horizontal-tab escape sequence (\t), <a href="#5.2.2">5.2.2</a>,
24498     prototype, <a href="#5.1.2.2.1">5.1.2.2.1</a>, <a href="#6.2.1">6.2.1</a>, <a href="#6.2.7">6.2.7</a>, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.7">6.7</a>,                <a href="#6.4.4.4">6.4.4.4</a>, <a href="#7.4.1.3">7.4.1.3</a>, <a href="#7.4.1.10">7.4.1.10</a>
24499           <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.9.1">6.9.1</a>, <a href="#6.11.6">6.11.6</a>, <a href="#6.11.7">6.11.7</a>, <a href="#7.1.2">7.1.2</a>, <a href="#7.12">7.12</a>           hosted execution environment, <a href="#4">4</a>, <a href="#5.1.2">5.1.2</a>, <a href="#5.1.2.2">5.1.2.2</a>
24500     prototype scope, <a href="#6.2.1">6.2.1</a>, <a href="#6.7.5.2">6.7.5.2</a>                             HUGE_VAL macro, <a href="#7.12">7.12</a>, <a href="#7.12.1">7.12.1</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24501     recursive call, <a href="#6.5.2.2">6.5.2.2</a>                                          <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#F.9">F.9</a>
24502     return, <a href="#6.8.6.4">6.8.6.4</a>                                             HUGE_VALF macro, <a href="#7.12">7.12</a>, <a href="#7.12.1">7.12.1</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24503     scope, <a href="#6.2.1">6.2.1</a>                                                     <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#F.9">F.9</a>
24504     type, <a href="#6.2.5">6.2.5</a>                                                 HUGE_VALL macro, <a href="#7.12">7.12</a>, <a href="#7.12.1">7.12.1</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24505     type conversion, <a href="#6.3.2.1">6.3.2.1</a>                                         <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#F.9">F.9</a>
24506  function specifiers, <a href="#6.7.4">6.7.4</a>                                      hyperbolic functions
24507  function type, <a href="#6.2.5">6.2.5</a>                                             complex, <a href="#7.3.6">7.3.6</a>, <a href="#G.6.2">G.6.2</a>
24508  function-call operator (( )), <a href="#6.5.2.2">6.5.2.2</a>                            real, <a href="#7.12.5">7.12.5</a>, <a href="#F.9.2">F.9.2</a>
24509  function-like macro, <a href="#6.10.3">6.10.3</a>                                    hypot functions, <a href="#7.12.7.3">7.12.7.3</a>, <a href="#F.9.4.3">F.9.4.3</a>
24510  future directions                                              hypot type-generic macro, <a href="#7.22">7.22</a>
24511 <!--page 541 -->
24512  <a href="#I">I</a> macro, <a href="#7.3.1">7.3.1</a>, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#G.6">G.6</a>                                    initial position, <a href="#5.2.2">5.2.2</a>
24513  identifier, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.5.1">6.5.1</a>                                       initial shift state, <a href="#5.2.1.2">5.2.1.2</a>
24514     linkage, see linkage                                         initialization, <a href="#5.1.2">5.1.2</a>, <a href="#6.2.4">6.2.4</a>, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.5">6.5.2.5</a>, <a href="#6.7.8">6.7.8</a>,
24515    maximum length, <a href="#6.4.2.1">6.4.2.1</a>                                             <a href="#F.7.5">F.7.5</a>
24516     name spaces, <a href="#6.2.3">6.2.3</a>                                              in blocks, <a href="#6.8">6.8</a>
24517     reserved, <a href="#6.4.1">6.4.1</a>, <a href="#7.1.3">7.1.3</a>                                       initializer, <a href="#6.7.8">6.7.8</a>
24518    scope, <a href="#6.2.1">6.2.1</a>                                                     permitted form, <a href="#6.6">6.6</a>
24519     type, <a href="#6.2.5">6.2.5</a>                                                     string literal, <a href="#6.3.2.1">6.3.2.1</a>
24520  identifier list, <a href="#6.7.5">6.7.5</a>                                           inline, <a href="#6.7.4">6.7.4</a>
24521  identifier nondigit, <a href="#6.4.2.1">6.4.2.1</a>                                     inner scope, <a href="#6.2.1">6.2.1</a>
24522  IEC 559, <a href="#F.1">F.1</a>                                                    input failure, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.10">7.24.2.10</a>
24523  IEC 60559, <a href="#2">2</a>, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.10.8">6.10.8</a>, <a href="#7.3.3">7.3.3</a>, <a href="#7.6">7.6</a>,           input/output functions
24524        <a href="#7.6.4.2">7.6.4.2</a>, <a href="#7.12.1">7.12.1</a>, <a href="#7.12.10.2">7.12.10.2</a>, <a href="#7.12.14">7.12.14</a>, <a href="#F">F</a>, <a href="#G">G</a>, <a href="#H.1">H.1</a>               character, <a href="#7.19.7">7.19.7</a>
24525  IEEE 754, <a href="#F.1">F.1</a>                                                      direct, <a href="#7.19.8">7.19.8</a>
24526  IEEE 854, <a href="#F.1">F.1</a>                                                      formatted, <a href="#7.19.6">7.19.6</a>
24527  IEEE floating-point arithmetic standard, see                           wide character, <a href="#7.24.2">7.24.2</a>
24528        IEC 60559, ANSI/IEEE 754,                                    wide character, <a href="#7.24.3">7.24.3</a>
24529        ANSI/IEEE 854                                                   formatted, <a href="#7.24.2">7.24.2</a>
24530  if preprocessing directive, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>,               input/output header, <a href="#7.19">7.19</a>
24531        <a href="#6.10.1">6.10.1</a>, <a href="#7.1.4">7.1.4</a>                                             input/output, device, <a href="#5.1.2.3">5.1.2.3</a>
24532  if statement, <a href="#6.8.4.1">6.8.4.1</a>                                           int type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.4.4.1">6.4.4.1</a>, <a href="#6.7.2">6.7.2</a>
24533  ifdef preprocessing directive, <a href="#6.10.1">6.10.1</a>                           int type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.3.1.4">6.3.1.4</a>,
24534  ifndef preprocessing directive, <a href="#6.10.1">6.10.1</a>                                <a href="#6.3.1.8">6.3.1.8</a>
24535  ilogb functions, <a href="#7.12">7.12</a>, <a href="#7.12.6.5">7.12.6.5</a>, <a href="#F.9.3.5">F.9.3.5</a>                        INT_FASTN_MAX macros, <a href="#7.18.2.3">7.18.2.3</a>
24536  ilogb type-generic macro, <a href="#7.22">7.22</a>                                  INT_FASTN_MIN macros, <a href="#7.18.2.3">7.18.2.3</a>
24537  imaginary macro, <a href="#7.3.1">7.3.1</a>, <a href="#G.6">G.6</a>                                     int_fastN_t types, <a href="#7.18.1.3">7.18.1.3</a>
24538  imaginary numbers, <a href="#G">G</a>                                            INT_LEASTN_MAX macros, <a href="#7.18.2.2">7.18.2.2</a>
24539  imaginary type domain, <a href="#G.2">G.2</a>                                      INT_LEASTN_MIN macros, <a href="#7.18.2.2">7.18.2.2</a>
24540  imaginary types, <a href="#G">G</a>                                              int_leastN_t types, <a href="#7.18.1.2">7.18.1.2</a>
24541  imaxabs function, <a href="#7.8.2.1">7.8.2.1</a>                                       INT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.12">7.12</a>, <a href="#7.12.6.5">7.12.6.5</a>
24542  imaxdiv function, <a href="#7.8">7.8</a>, <a href="#7.8.2.2">7.8.2.2</a>                                  INT_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.12">7.12</a>
24543  imaxdiv_t type, <a href="#7.8">7.8</a>                                             integer arithmetic functions, <a href="#7.8.2.1">7.8.2.1</a>, <a href="#7.8.2.2">7.8.2.2</a>,
24544  implementation, <a href="#3.12">3.12</a>                                                  <a href="#7.20.6">7.20.6</a>
24545  implementation limit, <a href="#3.13">3.13</a>, <a href="#4">4</a>, <a href="#5.2.4.2">5.2.4.2</a>, <a href="#6.4.2.1">6.4.2.1</a>,                integer character constant, <a href="#6.4.4.4">6.4.4.4</a>
24546        <a href="#6.7.5">6.7.5</a>, <a href="#6.8.4.2">6.8.4.2</a>, <a href="#E">E</a>, see also environmental                 integer constant, <a href="#6.4.4.1">6.4.4.1</a>
24547        limits                                                    integer constant expression, <a href="#6.6">6.6</a>
24548  implementation-defined behavior, <a href="#3.4.1">3.4.1</a>, <a href="#4">4</a>, <a href="#J.3">J.3</a>                   integer conversion rank, <a href="#6.3.1.1">6.3.1.1</a>
24549  implementation-defined value, <a href="#3.17.1">3.17.1</a>                             integer promotions, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#6.3.1.1">6.3.1.1</a>,
24550  implicit conversion, <a href="#6.3">6.3</a>                                              <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.5.3.3">6.5.3.3</a>, <a href="#6.5.7">6.5.7</a>, <a href="#6.8.4.2">6.8.4.2</a>, <a href="#7.18.2">7.18.2</a>, <a href="#7.18.3">7.18.3</a>,
24551  implicit initialization, <a href="#6.7.8">6.7.8</a>                                        <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>
24552  include preprocessing directive, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.10.2">6.10.2</a>                integer suffix, <a href="#6.4.4.1">6.4.4.1</a>
24553  inclusive OR operators                                          integer type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.3.1.4">6.3.1.4</a>,
24554     bitwise (|), <a href="#6.5.12">6.5.12</a>                                                <a href="#F.3">F.3</a>, <a href="#F.4">F.4</a>
24555     bitwise assignment (|=), <a href="#6.5.16.2">6.5.16.2</a>                            integer types, <a href="#6.2.5">6.2.5</a>, <a href="#7.18">7.18</a>
24556  incomplete type, <a href="#6.2.5">6.2.5</a>                                             extended, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.4.4.1">6.4.4.1</a>, <a href="#7.18">7.18</a>
24557  increment operators, see arithmetic operators,                  interactive device, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.5.3">7.19.5.3</a>
24558        increment and decrement                                   internal linkage, <a href="#6.2.2">6.2.2</a>
24559  indeterminate value, <a href="#3.17.2">3.17.2</a>                                     internal name, <a href="#6.4.2.1">6.4.2.1</a>
24560  indirection operator (*), <a href="#6.5.2.1">6.5.2.1</a>, <a href="#6.5.3.2">6.5.3.2</a>                      interrupt, <a href="#5.2.3">5.2.3</a>
24561  inequality operator (!=), <a href="#6.5.9">6.5.9</a>                                 INTMAX_C macro, <a href="#7.18.4.2">7.18.4.2</a>
24562  INFINITY macro, <a href="#7.3.9.4">7.3.9.4</a>, <a href="#7.12">7.12</a>, <a href="#F.2.1">F.2.1</a>                            INTMAX_MAX macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>
24563 <!--page 542 -->
24564  INTMAX_MIN macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>            iswalpha function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>,
24565  intmax_t type, <a href="#7.18.1.5">7.18.1.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,                  <a href="#7.25.2.2.1">7.25.2.2.1</a>
24566      <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                                  iswblank function, <a href="#7.25.2.1.3">7.25.2.1.3</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24567  INTN_C macros, <a href="#7.18.4.1">7.18.4.1</a>                                 iswcntrl function, <a href="#7.25.2.1.2">7.25.2.1.2</a>, <a href="#7.25.2.1.4">7.25.2.1.4</a>,
24568  INTN_MAX macros, <a href="#7.18.2.1">7.18.2.1</a>                                     <a href="#7.25.2.1.7">7.25.2.1.7</a>, <a href="#7.25.2.1.11">7.25.2.1.11</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24569  INTN_MIN macros, <a href="#7.18.2.1">7.18.2.1</a>                               iswctype function, <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>
24570  intN_t types, <a href="#7.18.1.1">7.18.1.1</a>                                  iswdigit function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>,
24571  INTPTR_MAX macro, <a href="#7.18.2.4">7.18.2.4</a>                                    <a href="#7.25.2.1.5">7.25.2.1.5</a>, <a href="#7.25.2.1.7">7.25.2.1.7</a>, <a href="#7.25.2.1.11">7.25.2.1.11</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24572  INTPTR_MIN macro, <a href="#7.18.2.4">7.18.2.4</a>                              iswgraph function, <a href="#7.25.2.1">7.25.2.1</a>, <a href="#7.25.2.1.6">7.25.2.1.6</a>,
24573  intptr_t type, <a href="#7.18.1.4">7.18.1.4</a>                                       <a href="#7.25.2.1.10">7.25.2.1.10</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24574  inttypes.h header, <a href="#7.8">7.8</a>, <a href="#7.26.4">7.26.4</a>                          iswlower function, <a href="#7.25.2.1.2">7.25.2.1.2</a>, <a href="#7.25.2.1.7">7.25.2.1.7</a>,
24575  isalnum function, <a href="#7.4.1.1">7.4.1.1</a>, <a href="#7.4.1.9">7.4.1.9</a>, <a href="#7.4.1.10">7.4.1.10</a>                  <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.3.1.1">7.25.3.1.1</a>, <a href="#7.25.3.1.2">7.25.3.1.2</a>
24576  isalpha function, <a href="#7.4.1.1">7.4.1.1</a>, <a href="#7.4.1.2">7.4.1.2</a>                      iswprint function, <a href="#7.25.2.1.6">7.25.2.1.6</a>, <a href="#7.25.2.1.8">7.25.2.1.8</a>,
24577  isblank function, <a href="#7.4.1.3">7.4.1.3</a>                                     <a href="#7.25.2.2.1">7.25.2.2.1</a>
24578  iscntrl function, <a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.4">7.4.1.4</a>, <a href="#7.4.1.7">7.4.1.7</a>,            iswpunct function, <a href="#7.25.2.1">7.25.2.1</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>,
24579      <a href="#7.4.1.11">7.4.1.11</a>                                                  <a href="#7.25.2.1.7">7.25.2.1.7</a>, <a href="#7.25.2.1.9">7.25.2.1.9</a>, <a href="#7.25.2.1.10">7.25.2.1.10</a>,
24580  isdigit function, <a href="#7.4.1.1">7.4.1.1</a>, <a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.5">7.4.1.5</a>,                  <a href="#7.25.2.1.11">7.25.2.1.11</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24581      <a href="#7.4.1.7">7.4.1.7</a>, <a href="#7.4.1.11">7.4.1.11</a>, <a href="#7.11.1.1">7.11.1.1</a>                         iswspace function, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>,
24582  isfinite macro, <a href="#7.12.3.2">7.12.3.2</a>, <a href="#F.3">F.3</a>                                 <a href="#7.24.4.1.1">7.24.4.1.1</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>, <a href="#7.25.2.1.2">7.25.2.1.2</a>, <a href="#7.25.2.1.6">7.25.2.1.6</a>,
24583  isgraph function, <a href="#7.4.1.6">7.4.1.6</a>                                     <a href="#7.25.2.1.7">7.25.2.1.7</a>, <a href="#7.25.2.1.9">7.25.2.1.9</a>, <a href="#7.25.2.1.10">7.25.2.1.10</a>,
24584  isgreater macro, <a href="#7.12.14.1">7.12.14.1</a>, <a href="#F.3">F.3</a>                               <a href="#7.25.2.1.11">7.25.2.1.11</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24585  isgreaterequal macro, <a href="#7.12.14.2">7.12.14.2</a>, <a href="#F.3">F.3</a>                    iswupper function, <a href="#7.25.2.1.2">7.25.2.1.2</a>, <a href="#7.25.2.1.11">7.25.2.1.11</a>,
24586  isinf macro, <a href="#7.12.3.3">7.12.3.3</a>                                         <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.3.1.1">7.25.3.1.1</a>, <a href="#7.25.3.1.2">7.25.3.1.2</a>
24587  isless macro, <a href="#7.12.14.3">7.12.14.3</a>, <a href="#F.3">F.3</a>                            iswxdigit function, <a href="#7.25.2.1.12">7.25.2.1.12</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>
24588  islessequal macro, <a href="#7.12.14.4">7.12.14.4</a>, <a href="#F.3">F.3</a>                       isxdigit function, <a href="#7.4.1.12">7.4.1.12</a>, <a href="#7.11.1.1">7.11.1.1</a>
24589  islessgreater macro, <a href="#7.12.14.5">7.12.14.5</a>, <a href="#F.3">F.3</a>                     italic type convention, <a href="#3">3</a>, <a href="#6.1">6.1</a>
24590  islower function, <a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.7">7.4.1.7</a>, <a href="#7.4.2.1">7.4.2.1</a>,            iteration statements, <a href="#6.8.5">6.8.5</a>
24591      <a href="#7.4.2.2">7.4.2.2</a>
24592  isnan macro, <a href="#7.12.3.4">7.12.3.4</a>, <a href="#F.3">F.3</a>                              jmp_buf type, <a href="#7.13">7.13</a>
24593  isnormal macro, <a href="#7.12.3.5">7.12.3.5</a>                                jump statements, <a href="#6.8.6">6.8.6</a>
24594  ISO 31-11, <a href="#2">2</a>, <a href="#3">3</a>
24595  ISO 4217, <a href="#2">2</a>, <a href="#7.11.2.1">7.11.2.1</a>                                   keywords, <a href="#6.4.1">6.4.1</a>, <a href="#G.2">G.2</a>, <a href="#J.5.9">J.5.9</a>, <a href="#J.5.10">J.5.10</a>
24596  ISO 8601, <a href="#2">2</a>, <a href="#7.23.3.5">7.23.3.5</a>                                   known constant size, <a href="#6.2.5">6.2.5</a>
24597  ISO/IEC 10646, <a href="#2">2</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.4.3">6.4.3</a>, <a href="#6.10.8">6.10.8</a>
24598  ISO/IEC 10976-1, <a href="#H.1">H.1</a>                                    L_tmpnam macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.4.4">7.19.4.4</a>
24599  ISO/IEC 2382-1, <a href="#2">2</a>, <a href="#3">3</a>                                    label name, <a href="#6.2.1">6.2.1</a>, <a href="#6.2.3">6.2.3</a>
24600  ISO/IEC 646, <a href="#2">2</a>, <a href="#5.2.1.1">5.2.1.1</a>                                 labeled statement, <a href="#6.8.1">6.8.1</a>
24601  ISO/IEC 9945-2, <a href="#7.11">7.11</a>                                    labs function, <a href="#7.20.6.1">7.20.6.1</a>
24602  ISO/IEC TR 10176, <a href="#D">D</a>                                     language, <a href="#6">6</a>
24603  iso646.h header, <a href="#4">4</a>, <a href="#7.9">7.9</a>                                    future directions, <a href="#6.11">6.11</a>
24604  isprint function, <a href="#5.2.2">5.2.2</a>, <a href="#7.4.1.8">7.4.1.8</a>                           syntax summary, <a href="#A">A</a>
24605  ispunct function, <a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.7">7.4.1.7</a>, <a href="#7.4.1.9">7.4.1.9</a>,            Latin alphabet, <a href="#5.2.1">5.2.1</a>, <a href="#6.4.2.1">6.4.2.1</a>
24606      <a href="#7.4.1.11">7.4.1.11</a>                                            LC_ALL macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24607  isspace function, <a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.7">7.4.1.7</a>, <a href="#7.4.1.9">7.4.1.9</a>,            LC_COLLATE macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.21.4.3">7.21.4.3</a>,
24608      <a href="#7.4.1.10">7.4.1.10</a>, <a href="#7.4.1.11">7.4.1.11</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.20.1.3">7.20.1.3</a>,                   <a href="#7.24.4.4.2">7.24.4.4.2</a>
24609      <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.24.2.2">7.24.2.2</a>                                  LC_CTYPE macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.20">7.20</a>, <a href="#7.20.7">7.20.7</a>,
24610  isunordered macro, <a href="#7.12.14.6">7.12.14.6</a>, <a href="#F.3">F.3</a>                             <a href="#7.20.8">7.20.8</a>, <a href="#7.24.6">7.24.6</a>, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>,
24611  isupper function, <a href="#7.4.1.2">7.4.1.2</a>, <a href="#7.4.1.11">7.4.1.11</a>, <a href="#7.4.2.1">7.4.2.1</a>,                 <a href="#7.25.3.2.1">7.25.3.2.1</a>, <a href="#7.25.3.2.2">7.25.3.2.2</a>
24612      <a href="#7.4.2.2">7.4.2.2</a>                                             LC_MONETARY macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24613  iswalnum function, <a href="#7.25.2.1.1">7.25.2.1.1</a>, <a href="#7.25.2.1.9">7.25.2.1.9</a>,              LC_NUMERIC macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24614      <a href="#7.25.2.1.10">7.25.2.1.10</a>, <a href="#7.25.2.2.1">7.25.2.2.1</a>                             LC_TIME macro, <a href="#7.11">7.11</a>, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.23.3.5">7.23.3.5</a>
24615 <!--page 543 -->
24616  lconv structure type, <a href="#7.11">7.11</a>                                 llabs function, <a href="#7.20.6.1">7.20.6.1</a>
24617  LDBL_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                                  lldiv function, <a href="#7.20.6.2">7.20.6.2</a>
24618  LDBL_EPSILON macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                              lldiv_t type, <a href="#7.20">7.20</a>
24619  LDBL_MANT_DIG macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                             LLONG_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.20.1.4">7.20.1.4</a>,
24620  LDBL_MAX macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                                       <a href="#7.24.4.1.2">7.24.4.1.2</a>
24621  LDBL_MAX_10_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                           LLONG_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.20.1.4">7.20.1.4</a>,
24622  LDBL_MAX_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                                   <a href="#7.24.4.1.2">7.24.4.1.2</a>
24623  LDBL_MIN macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                                  llrint functions, <a href="#7.12.9.5">7.12.9.5</a>, <a href="#F.3">F.3</a>, <a href="#F.9.6.5">F.9.6.5</a>
24624  LDBL_MIN_10_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                           llrint type-generic macro, <a href="#7.22">7.22</a>
24625  LDBL_MIN_EXP macro, <a href="#5.2.4.2.2">5.2.4.2.2</a>                              llround functions, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#F.9.6.7">F.9.6.7</a>
24626  ldexp functions, <a href="#7.12.6.6">7.12.6.6</a>, <a href="#F.9.3.6">F.9.3.6</a>                         llround type-generic macro, <a href="#7.22">7.22</a>
24627  ldexp type-generic macro, <a href="#7.22">7.22</a>                             local time, <a href="#7.23.1">7.23.1</a>
24628  ldiv function, <a href="#7.20.6.2">7.20.6.2</a>                                    locale, <a href="#3.4.2">3.4.2</a>
24629  ldiv_t type, <a href="#7.20">7.20</a>                                          locale-specific behavior, <a href="#3.4.2">3.4.2</a>, <a href="#J.4">J.4</a>
24630  leading underscore in identifiers, <a href="#7.1.3">7.1.3</a>                    locale.h header, <a href="#7.11">7.11</a>, <a href="#7.26.5">7.26.5</a>
24631  left-shift assignment operator (&lt;&lt;=), <a href="#6.5.16.2">6.5.16.2</a>             localeconv function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24632  left-shift operator (&lt;&lt;), <a href="#6.5.7">6.5.7</a>                            localization, <a href="#7.11">7.11</a>
24633  length                                                     localtime function, <a href="#7.23.3.4">7.23.3.4</a>
24634     external name, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.11.3">6.11.3</a>                 log functions, <a href="#7.12.6.7">7.12.6.7</a>, <a href="#F.9.3.7">F.9.3.7</a>
24635     function name, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.11.3">6.11.3</a>                 log type-generic macro, <a href="#7.22">7.22</a>
24636     identifier, <a href="#6.4.2.1">6.4.2.1</a>                                      log10 functions, <a href="#7.12.6.8">7.12.6.8</a>, <a href="#F.9.3.8">F.9.3.8</a>
24637     internal name, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>                         log10 type-generic macro, <a href="#7.22">7.22</a>
24638  length function, <a href="#7.20.7.1">7.20.7.1</a>, <a href="#7.21.6.3">7.21.6.3</a>, <a href="#7.24.4.6.1">7.24.4.6.1</a>,           log1p functions, <a href="#7.12.6.9">7.12.6.9</a>, <a href="#F.9.3.9">F.9.3.9</a>
24639        <a href="#7.24.6.3.1">7.24.6.3.1</a>                                           log1p type-generic macro, <a href="#7.22">7.22</a>
24640  length modifier, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>,              log2 functions, <a href="#7.12.6.10">7.12.6.10</a>, <a href="#F.9.3.10">F.9.3.10</a>
24641        <a href="#7.24.2.2">7.24.2.2</a>                                             log2 type-generic macro, <a href="#7.22">7.22</a>
24642  less-than operator (&lt;), <a href="#6.5.8">6.5.8</a>                              logarithmic functions
24643  less-than-or-equal-to operator (&lt;=), <a href="#6.5.8">6.5.8</a>                   complex, <a href="#7.3.7">7.3.7</a>, <a href="#G.6.3">G.6.3</a>
24644  letter, <a href="#5.2.1">5.2.1</a>, <a href="#7.4">7.4</a>                                           real, <a href="#7.12.6">7.12.6</a>, <a href="#F.9.3">F.9.3</a>
24645  lexical elements, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.4">6.4</a>                             logb functions, <a href="#7.12.6.11">7.12.6.11</a>, <a href="#F.3">F.3</a>, <a href="#F.9.3.11">F.9.3.11</a>
24646  lgamma functions, <a href="#7.12.8.3">7.12.8.3</a>, <a href="#F.9.5.3">F.9.5.3</a>                        logb type-generic macro, <a href="#7.22">7.22</a>
24647  lgamma type-generic macro, <a href="#7.22">7.22</a>                            logical operators
24648  library, <a href="#5.1.1.1">5.1.1.1</a>, <a href="#7">7</a>                                          AND (&amp;&amp;), <a href="#6.5.13">6.5.13</a>
24649     future directions, <a href="#7.26">7.26</a>                                   negation (!), <a href="#6.5.3.3">6.5.3.3</a>
24650     summary, <a href="#B">B</a>                                                OR (||), <a href="#6.5.14">6.5.14</a>
24651     terms, <a href="#7.1.1">7.1.1</a>                                            logical source lines, <a href="#5.1.1.2">5.1.1.2</a>
24652     use of functions, <a href="#7.1.4">7.1.4</a>                                 long double _Complex type, <a href="#6.2.5">6.2.5</a>
24653  lifetime, <a href="#6.2.4">6.2.4</a>                                            long double _Complex type conversion,
24654  limits                                                          <a href="#6.3.1.6">6.3.1.6</a>, <a href="#6.3.1.7">6.3.1.7</a>, <a href="#6.3.1.8">6.3.1.8</a>
24655     environmental, see environmental limits                 long double _Imaginary type, <a href="#G.2">G.2</a>
24656     implementation, see implementation limits               long double suffix, l or <a href="#L">L</a>, <a href="#6.4.4.2">6.4.4.2</a>
24657     numerical, see numerical limits                         long double type, <a href="#6.2.5">6.2.5</a>, <a href="#6.4.4.2">6.4.4.2</a>, <a href="#6.7.2">6.7.2</a>,
24658     translation, see translation limits                          <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#F.2">F.2</a>
24659  limits.h header, <a href="#4">4</a>, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#6.2.5">6.2.5</a>, <a href="#7.10">7.10</a>                 long double type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>,
24660  line buffered stream, <a href="#7.19.3">7.19.3</a>                                    <a href="#6.3.1.7">6.3.1.7</a>, <a href="#6.3.1.8">6.3.1.8</a>
24661  line number, <a href="#6.10.4">6.10.4</a>, <a href="#6.10.8">6.10.8</a>                                long int type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.7.2">6.7.2</a>, <a href="#7.19.6.1">7.19.6.1</a>,
24662  line preprocessing directive, <a href="#6.10.4">6.10.4</a>                            <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>
24663  lines, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#7.19.2">7.19.2</a>                                     long int type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>,
24664     preprocessing directive, <a href="#6.10">6.10</a>                                <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.8">6.3.1.8</a>
24665  linkage, <a href="#6.2.2">6.2.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.4">6.7.4</a>, <a href="#6.7.5.2">6.7.5.2</a>, <a href="#6.9">6.9</a>, <a href="#6.9.2">6.9.2</a>,           long integer suffix, l or <a href="#L">L</a>, <a href="#6.4.4.1">6.4.4.1</a>
24666        <a href="#6.11.2">6.11.2</a>                                               long long int type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.7.2">6.7.2</a>,
24667 <!--page 544 -->
24668       <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                    mbsinit function, <a href="#7.24.6.2.1">7.24.6.2.1</a>
24669  long long int type conversion, <a href="#6.3.1.1">6.3.1.1</a>,                        mbsrtowcs function, <a href="#7.24.6.4.1">7.24.6.4.1</a>
24670       <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.8">6.3.1.8</a>                                 mbstate_t type, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.6.1">7.19.6.1</a>,
24671  long long integer suffix, ll or LL, <a href="#6.4.4.1">6.4.4.1</a>                          <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.1">7.24.1</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.6">7.24.6</a>,
24672  LONG_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>                     <a href="#7.24.6.2.1">7.24.6.2.1</a>, <a href="#7.24.6.3">7.24.6.3</a>, <a href="#7.24.6.3.1">7.24.6.3.1</a>, <a href="#7.24.6.4">7.24.6.4</a>
24673  LONG_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>                mbstowcs function, <a href="#6.4.5">6.4.5</a>, <a href="#7.20.8.1">7.20.8.1</a>, <a href="#7.24.6.4">7.24.6.4</a>
24674  longjmp function, <a href="#7.13.1.1">7.13.1.1</a>, <a href="#7.13.2.1">7.13.2.1</a>, <a href="#7.20.4.3">7.20.4.3</a>                 mbtowc function, <a href="#7.20.7.1">7.20.7.1</a>, <a href="#7.20.7.2">7.20.7.2</a>, <a href="#7.20.8.1">7.20.8.1</a>,
24675  loop body, <a href="#6.8.5">6.8.5</a>                                                    <a href="#7.24.6.3">7.24.6.3</a>
24676  low-order bit, <a href="#3.6">3.6</a>                                             member access operators (. and -&gt;), <a href="#6.5.2.3">6.5.2.3</a>
24677  lowercase letter, <a href="#5.2.1">5.2.1</a>                                        member alignment, <a href="#6.7.2.1">6.7.2.1</a>
24678  lrint functions, <a href="#7.12.9.5">7.12.9.5</a>, <a href="#F.3">F.3</a>, <a href="#F.9.6.5">F.9.6.5</a>                        memchr function, <a href="#7.21.5.1">7.21.5.1</a>
24679  lrint type-generic macro, <a href="#7.22">7.22</a>                                 memcmp function, <a href="#7.21.4">7.21.4</a>, <a href="#7.21.4.1">7.21.4.1</a>
24680  lround functions, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#F.9.6.7">F.9.6.7</a>                            memcpy function, <a href="#7.21.2.1">7.21.2.1</a>
24681  lround type-generic macro, <a href="#7.22">7.22</a>                                memmove function, <a href="#7.21.2.2">7.21.2.2</a>
24682  lvalue, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.1">6.5.1</a>, <a href="#6.5.2.4">6.5.2.4</a>, <a href="#6.5.3.1">6.5.3.1</a>, <a href="#6.5.16">6.5.16</a>               memory management functions, <a href="#7.20.3">7.20.3</a>
24683                                                                 memset function, <a href="#7.21.6.1">7.21.6.1</a>
24684  macro argument substitution, <a href="#6.10.3.1">6.10.3.1</a>                          minimum functions, <a href="#7.12.12">7.12.12</a>, <a href="#F.9.9">F.9.9</a>
24685  macro definition                                                minus operator, unary, <a href="#6.5.3.3">6.5.3.3</a>
24686    library function, <a href="#7.1.4">7.1.4</a>                                      miscellaneous functions
24687  macro invocation, <a href="#6.10.3">6.10.3</a>                                         string, <a href="#7.21.6">7.21.6</a>
24688  macro name, <a href="#6.10.3">6.10.3</a>                                               wide string, <a href="#7.24.4.6">7.24.4.6</a>
24689    length, <a href="#5.2.4.1">5.2.4.1</a>                                              mktime function, <a href="#7.23.2.3">7.23.2.3</a>
24690    predefined, <a href="#6.10.8">6.10.8</a>, <a href="#6.11.9">6.11.9</a>                                    modf functions, <a href="#7.12.6.12">7.12.6.12</a>, <a href="#F.9.3.12">F.9.3.12</a>
24691    redefinition, <a href="#6.10.3">6.10.3</a>                                          modifiable lvalue, <a href="#6.3.2.1">6.3.2.1</a>
24692    scope, <a href="#6.10.3.5">6.10.3.5</a>                                              modulus functions, <a href="#7.12.6.12">7.12.6.12</a>
24693  macro parameter, <a href="#6.10.3">6.10.3</a>                                        modulus, complex, <a href="#7.3.8.1">7.3.8.1</a>
24694  macro preprocessor, <a href="#6.10">6.10</a>                                       multibyte character, <a href="#3.7.2">3.7.2</a>, <a href="#5.2.1.2">5.2.1.2</a>, <a href="#6.4.4.4">6.4.4.4</a>
24695  macro replacement, <a href="#6.10.3">6.10.3</a>                                      multibyte conversion functions
24696  magnitude, complex, <a href="#7.3.8.1">7.3.8.1</a>                                      wide character, <a href="#7.20.7">7.20.7</a>
24697  main function, <a href="#5.1.2.2.1">5.1.2.2.1</a>, <a href="#5.1.2.2.3">5.1.2.2.3</a>, <a href="#6.7.3.1">6.7.3.1</a>, <a href="#6.7.4">6.7.4</a>,                extended, <a href="#7.24.6">7.24.6</a>
24698       <a href="#7.19.3">7.19.3</a>                                                         restartable, <a href="#7.24.6.3">7.24.6.3</a>
24699  malloc function, <a href="#7.20.3">7.20.3</a>, <a href="#7.20.3.2">7.20.3.2</a>, <a href="#7.20.3.3">7.20.3.3</a>,                     wide string, <a href="#7.20.8">7.20.8</a>
24700       <a href="#7.20.3.4">7.20.3.4</a>                                                       restartable, <a href="#7.24.6.4">7.24.6.4</a>
24701  manipulation functions                                         multibyte string, <a href="#7.1.1">7.1.1</a>
24702    complex, <a href="#7.3.9">7.3.9</a>                                               multibyte/wide character conversion functions,
24703    real, <a href="#7.12.11">7.12.11</a>, <a href="#F.9.8">F.9.8</a>                                              <a href="#7.20.7">7.20.7</a>
24704  matching failure, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.10">7.24.2.10</a>                  extended, <a href="#7.24.6">7.24.6</a>
24705  math.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.5">6.5</a>, <a href="#7.12">7.12</a>, <a href="#7.22">7.22</a>, <a href="#F">F</a>, <a href="#F.9">F.9</a>,               restartable, <a href="#7.24.6.3">7.24.6.3</a>
24706       <a href="#J.5.17">J.5.17</a>                                                    multibyte/wide string conversion functions, <a href="#7.20.8">7.20.8</a>
24707  MATH_ERREXCEPT macro, <a href="#7.12">7.12</a>, <a href="#F.9">F.9</a>                                  restartable, <a href="#7.24.6.4">7.24.6.4</a>
24708  math_errhandling macro, <a href="#7.1.3">7.1.3</a>, <a href="#7.12">7.12</a>, <a href="#F.9">F.9</a>                       multidimensional array, <a href="#6.5.2.1">6.5.2.1</a>
24709  MATH_ERRNO macro, <a href="#7.12">7.12</a>                                         multiplication assignment operator (*=), <a href="#6.5.16.2">6.5.16.2</a>
24710  maximum functions, <a href="#7.12.12">7.12.12</a>, <a href="#F.9.9">F.9.9</a>                              multiplication operator (*), <a href="#6.5.5">6.5.5</a>, <a href="#F.3">F.3</a>, <a href="#G.5.1">G.5.1</a>
24711  MB_CUR_MAX macro, <a href="#7.1.1">7.1.1</a>, <a href="#7.20">7.20</a>, <a href="#7.20.7.2">7.20.7.2</a>,                       multiplicative expressions, <a href="#6.5.5">6.5.5</a>, <a href="#G.5.1">G.5.1</a>
24712       <a href="#7.20.7.3">7.20.7.3</a>, <a href="#7.24.6.3.3">7.24.6.3.3</a>
24713  MB_LEN_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.1.1">7.1.1</a>, <a href="#7.20">7.20</a>                       n-char sequence, <a href="#7.20.1.3">7.20.1.3</a>
24714  mblen function, <a href="#7.20.7.1">7.20.7.1</a>, <a href="#7.24.6.3">7.24.6.3</a>                             n-wchar sequence, <a href="#7.24.4.1.1">7.24.4.1.1</a>
24715  mbrlen function, <a href="#7.24.6.3.1">7.24.6.3.1</a>                                    name
24716  mbrtowc function, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,                    external, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>, <a href="#6.11.3">6.11.3</a>
24717       <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>, <a href="#7.24.6.3.1">7.24.6.3.1</a>, <a href="#7.24.6.3.2">7.24.6.3.2</a>,                 file, <a href="#7.19.3">7.19.3</a>
24718       <a href="#7.24.6.4.1">7.24.6.4.1</a>                                                  internal, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.2.1">6.4.2.1</a>
24719 <!--page 545 -->
24720    label, <a href="#6.2.3">6.2.3</a>                                                  octal-character escape sequence (\octal digits),
24721    structure/union member, <a href="#6.2.3">6.2.3</a>                                       <a href="#6.4.4.4">6.4.4.4</a>
24722  name spaces, <a href="#6.2.3">6.2.3</a>                                              offsetof macro, <a href="#7.17">7.17</a>
24723  named label, <a href="#6.8.1">6.8.1</a>                                              on-off switch, <a href="#6.10.6">6.10.6</a>
24724  NaN, <a href="#5.2.4.2.2">5.2.4.2.2</a>                                                  ones' complement, <a href="#6.2.6.2">6.2.6.2</a>
24725  nan functions, <a href="#7.12.11.2">7.12.11.2</a>, <a href="#F.2.1">F.2.1</a>, <a href="#F.9.8.2">F.9.8.2</a>                        operand, <a href="#6.4.6">6.4.6</a>, <a href="#6.5">6.5</a>
24726  NAN macro, <a href="#7.12">7.12</a>, <a href="#F.2.1">F.2.1</a>                                          operating system, <a href="#5.1.2.1">5.1.2.1</a>, <a href="#7.20.4.6">7.20.4.6</a>
24727  NDEBUG macro, <a href="#7.2">7.2</a>                                               operations on files, <a href="#7.19.4">7.19.4</a>
24728  nearbyint functions, <a href="#7.12.9.3">7.12.9.3</a>, <a href="#7.12.9.4">7.12.9.4</a>, <a href="#F.3">F.3</a>,                   operator, <a href="#6.4.6">6.4.6</a>
24729       <a href="#F.9.6.3">F.9.6.3</a>                                                    operators, <a href="#6.5">6.5</a>
24730  nearbyint type-generic macro, <a href="#7.22">7.22</a>                                 assignment, <a href="#6.5.16">6.5.16</a>
24731  nearest integer functions, <a href="#7.12.9">7.12.9</a>, <a href="#F.9.6">F.9.6</a>                           associativity, <a href="#6.5">6.5</a>
24732  negation operator (!), <a href="#6.5.3.3">6.5.3.3</a>                                     equality, <a href="#6.5.9">6.5.9</a>
24733  negative zero, <a href="#6.2.6.2">6.2.6.2</a>, <a href="#7.12.11.1">7.12.11.1</a>                                  multiplicative, <a href="#6.5.5">6.5.5</a>, <a href="#G.5.1">G.5.1</a>
24734  new-line character, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>, <a href="#6.10">6.10</a>, <a href="#6.10.4">6.10.4</a>              postfix, <a href="#6.5.2">6.5.2</a>
24735  new-line escape sequence (\n), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>,                     precedence, <a href="#6.5">6.5</a>
24736       <a href="#7.4.1.10">7.4.1.10</a>                                                      preprocessing, <a href="#6.10.1">6.10.1</a>, <a href="#6.10.3.2">6.10.3.2</a>, <a href="#6.10.3.3">6.10.3.3</a>, <a href="#6.10.9">6.10.9</a>
24737  nextafter functions, <a href="#7.12.11.3">7.12.11.3</a>, <a href="#7.12.11.4">7.12.11.4</a>, <a href="#F.3">F.3</a>,                    relational, <a href="#6.5.8">6.5.8</a>
24738       <a href="#F.9.8.3">F.9.8.3</a>                                                       shift, <a href="#6.5.7">6.5.7</a>
24739  nextafter type-generic macro, <a href="#7.22">7.22</a>                                 unary, <a href="#6.5.3">6.5.3</a>
24740  nexttoward functions, <a href="#7.12.11.4">7.12.11.4</a>, <a href="#F.3">F.3</a>, <a href="#F.9.8.4">F.9.8.4</a>                      unary arithmetic, <a href="#6.5.3.3">6.5.3.3</a>
24741  nexttoward type-generic macro, <a href="#7.22">7.22</a>                             or macro, <a href="#7.9">7.9</a>
24742  no linkage, <a href="#6.2.2">6.2.2</a>                                               OR operators
24743  non-stop floating-point control mode, <a href="#7.6.4.2">7.6.4.2</a>                       bitwise exclusive (^), <a href="#6.5.11">6.5.11</a>
24744  nongraphic characters, <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>                              bitwise exclusive assignment (^=), <a href="#6.5.16.2">6.5.16.2</a>
24745  nonlocal jumps header, <a href="#7.13">7.13</a>                                        bitwise inclusive (|), <a href="#6.5.12">6.5.12</a>
24746  norm, complex, <a href="#7.3.8.1">7.3.8.1</a>                                             bitwise inclusive assignment (|=), <a href="#6.5.16.2">6.5.16.2</a>
24747  not macro, <a href="#7.9">7.9</a>                                                     logical (||), <a href="#6.5.14">6.5.14</a>
24748  not-equal-to operator, see inequality operator                  or_eq macro, <a href="#7.9">7.9</a>
24749  not_eq macro, <a href="#7.9">7.9</a>                                               order of allocated storage, <a href="#7.20.3">7.20.3</a>
24750  null character (\0), <a href="#5.2.1">5.2.1</a>, <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.4.5">6.4.5</a>                      order of evaluation, <a href="#6.5">6.5</a>
24751    padding of binary stream, <a href="#7.19.2">7.19.2</a>                              ordinary identifier name space, <a href="#6.2.3">6.2.3</a>
24752  NULL macro, <a href="#7.11">7.11</a>, <a href="#7.17">7.17</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.20">7.20</a>, <a href="#7.21.1">7.21.1</a>,                   orientation of stream, <a href="#7.19.2">7.19.2</a>, <a href="#7.24.3.5">7.24.3.5</a>
24753       <a href="#7.23.1">7.23.1</a>, <a href="#7.24.1">7.24.1</a>                                             outer scope, <a href="#6.2.1">6.2.1</a>
24754  null pointer, <a href="#6.3.2.3">6.3.2.3</a>
24755  null pointer constant, <a href="#6.3.2.3">6.3.2.3</a>                                  padding
24756  null preprocessing directive, <a href="#6.10.7">6.10.7</a>                              binary stream, <a href="#7.19.2">7.19.2</a>
24757  null statement, <a href="#6.8.3">6.8.3</a>                                             bits, <a href="#6.2.6.2">6.2.6.2</a>, <a href="#7.18.1.1">7.18.1.1</a>
24758  null wide character, <a href="#7.1.1">7.1.1</a>                                        structure/union, <a href="#6.2.6.1">6.2.6.1</a>, <a href="#6.7.2.1">6.7.2.1</a>
24759  number classification macros, <a href="#7.12">7.12</a>, <a href="#7.12.3.1">7.12.3.1</a>                     parameter, <a href="#3.15">3.15</a>
24760  numeric conversion functions, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.20.1">7.20.1</a>                     array, <a href="#6.9.1">6.9.1</a>
24761    wide string, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.24.4.1">7.24.4.1</a>                                  ellipsis, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.10.3">6.10.3</a>
24762  numerical limits, <a href="#5.2.4.2">5.2.4.2</a>                                         function, <a href="#6.5.2.2">6.5.2.2</a>, <a href="#6.7">6.7</a>, <a href="#6.9.1">6.9.1</a>
24763                                                                    macro, <a href="#6.10.3">6.10.3</a>
24764  object, <a href="#3.14">3.14</a>                                                      main function, <a href="#5.1.2.2.1">5.1.2.2.1</a>
24765  object representation, <a href="#6.2.6.1">6.2.6.1</a>                                    program, <a href="#5.1.2.2.1">5.1.2.2.1</a>
24766  object type, <a href="#6.2.5">6.2.5</a>                                              parameter type list, <a href="#6.7.5.3">6.7.5.3</a>
24767  object-like macro, <a href="#6.10.3">6.10.3</a>                                       parentheses punctuator (( )), <a href="#6.7.5.3">6.7.5.3</a>, <a href="#6.8.4">6.8.4</a>, <a href="#6.8.5">6.8.5</a>
24768  obsolescence, <a href="#6.11">6.11</a>, <a href="#7.26">7.26</a>                                        parenthesized expression, <a href="#6.5.1">6.5.1</a>
24769  octal constant, <a href="#6.4.4.1">6.4.4.1</a>                                         parse state, <a href="#7.19.2">7.19.2</a>
24770  octal digit, <a href="#6.4.4.1">6.4.4.1</a>, <a href="#6.4.4.4">6.4.4.4</a>                                   permitted form of initializer, <a href="#6.6">6.6</a>
24771 <!--page 546 -->
24772  perror function, <a href="#7.19.10.4">7.19.10.4</a>                                    PRIcPTR macros, <a href="#7.8.1">7.8.1</a>
24773  phase angle, complex, <a href="#7.3.9.1">7.3.9.1</a>                                 primary expression, <a href="#6.5.1">6.5.1</a>
24774  physical source lines, <a href="#5.1.1.2">5.1.1.2</a>                                printf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.3">7.19.6.3</a>, <a href="#7.19.6.10">7.19.6.10</a>
24775  placemarker, <a href="#6.10.3.3">6.10.3.3</a>                                         printing character, <a href="#5.2.2">5.2.2</a>, <a href="#7.4">7.4</a>, <a href="#7.4.1.8">7.4.1.8</a>
24776  plus operator, unary, <a href="#6.5.3.3">6.5.3.3</a>                                 printing wide character, <a href="#7.25.2">7.25.2</a>
24777  pointer arithmetic, <a href="#6.5.6">6.5.6</a>                                     program diagnostics, <a href="#7.2.1">7.2.1</a>
24778  pointer comparison, <a href="#6.5.8">6.5.8</a>                                     program execution, <a href="#5.1.2.2.2">5.1.2.2.2</a>, <a href="#5.1.2.3">5.1.2.3</a>
24779  pointer declarator, <a href="#6.7.5.1">6.7.5.1</a>                                   program file, <a href="#5.1.1.1">5.1.1.1</a>
24780  pointer operator (-&gt;), <a href="#6.5.2.3">6.5.2.3</a>                                program image, <a href="#5.1.1.2">5.1.1.2</a>
24781  pointer to function, <a href="#6.5.2.2">6.5.2.2</a>                                  program name (argv[0]), <a href="#5.1.2.2.1">5.1.2.2.1</a>
24782  pointer type, <a href="#6.2.5">6.2.5</a>                                           program parameters, <a href="#5.1.2.2.1">5.1.2.2.1</a>
24783  pointer type conversion, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.3.2.3">6.3.2.3</a>                     program startup, <a href="#5.1.2">5.1.2</a>, <a href="#5.1.2.1">5.1.2.1</a>, <a href="#5.1.2.2.1">5.1.2.2.1</a>
24784  pointer, null, <a href="#6.3.2.3">6.3.2.3</a>                                        program structure, <a href="#5.1.1.1">5.1.1.1</a>
24785  portability, <a href="#4">4</a>, <a href="#J">J</a>                                             program termination, <a href="#5.1.2">5.1.2</a>, <a href="#5.1.2.1">5.1.2.1</a>, <a href="#5.1.2.2.3">5.1.2.2.3</a>,
24786  position indicator, file, see file position indicator                 <a href="#5.1.2.3">5.1.2.3</a>
24787  positive difference, <a href="#7.12.12.1">7.12.12.1</a>                                program, conforming, <a href="#4">4</a>
24788  positive difference functions, <a href="#7.12.12">7.12.12</a>, <a href="#F.9.9">F.9.9</a>                 program, strictly conforming, <a href="#4">4</a>
24789  postfix decrement operator (--), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.4">6.5.2.4</a>              promotions
24790  postfix expressions, <a href="#6.5.2">6.5.2</a>                                        default argument, <a href="#6.5.2.2">6.5.2.2</a>
24791  postfix increment operator (++), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.4">6.5.2.4</a>                 integer, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#6.3.1.1">6.3.1.1</a>
24792  pow functions, <a href="#7.12.7.4">7.12.7.4</a>, <a href="#F.9.4.4">F.9.4.4</a>                              prototype, see function prototype
24793  pow type-generic macro, <a href="#7.22">7.22</a>                                  pseudo-random sequence functions, <a href="#7.20.2">7.20.2</a>
24794  power functions                                               PTRDIFF_MAX macro, <a href="#7.18.3">7.18.3</a>
24795    complex, <a href="#7.3.8">7.3.8</a>, <a href="#G.6.4">G.6.4</a>                                       PTRDIFF_MIN macro, <a href="#7.18.3">7.18.3</a>
24796    real, <a href="#7.12.7">7.12.7</a>, <a href="#F.9.4">F.9.4</a>                                         ptrdiff_t type, <a href="#7.17">7.17</a>, <a href="#7.18.3">7.18.3</a>, <a href="#7.19.6.1">7.19.6.1</a>,
24797  pp-number, <a href="#6.4.8">6.4.8</a>                                                    <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>
24798  pragma operator, <a href="#6.10.9">6.10.9</a>                                       punctuators, <a href="#6.4.6">6.4.6</a>
24799  pragma preprocessing directive, <a href="#6.10.6">6.10.6</a>, <a href="#6.11.8">6.11.8</a>                putc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.8">7.19.7.8</a>, <a href="#7.19.7.9">7.19.7.9</a>
24800  precedence of operators, <a href="#6.5">6.5</a>                                  putchar function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.9">7.19.7.9</a>
24801  precedence of syntax rules, <a href="#5.1.1.2">5.1.1.2</a>                           puts function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.10">7.19.7.10</a>
24802  precision, <a href="#6.2.6.2">6.2.6.2</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.2.1">7.24.2.1</a>               putwc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.8">7.24.3.8</a>, <a href="#7.24.3.9">7.24.3.9</a>
24803     excess, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.8">6.3.1.8</a>, <a href="#6.8.6.4">6.8.6.4</a>               putwchar function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.9">7.24.3.9</a>
24804  predefined macro names, <a href="#6.10.8">6.10.8</a>, <a href="#6.11.9">6.11.9</a>
24805  prefix decrement operator (--), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a>               qsort function, <a href="#7.20.5">7.20.5</a>, <a href="#7.20.5.2">7.20.5.2</a>
24806  prefix increment operator (++), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a>               qualified types, <a href="#6.2.5">6.2.5</a>
24807  preprocessing concatenation, <a href="#6.10.3.3">6.10.3.3</a>                         qualified version of type, <a href="#6.2.5">6.2.5</a>
24808  preprocessing directives, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.10">6.10</a>                       question-mark escape sequence (\?), <a href="#6.4.4.4">6.4.4.4</a>
24809  preprocessing file, <a href="#5.1.1.1">5.1.1.1</a>, <a href="#6.10">6.10</a>                              quiet NaN, <a href="#5.2.4.2.2">5.2.4.2.2</a>
24810  preprocessing numbers, <a href="#6.4">6.4</a>, <a href="#6.4.8">6.4.8</a>
24811  preprocessing operators                                       raise function, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#7.14.2.1">7.14.2.1</a>, <a href="#7.20.4.1">7.20.4.1</a>
24812     #, <a href="#6.10.3.2">6.10.3.2</a>                                                rand function, <a href="#7.20">7.20</a>, <a href="#7.20.2.1">7.20.2.1</a>, <a href="#7.20.2.2">7.20.2.2</a>
24813     ##, <a href="#6.10.3.3">6.10.3.3</a>                                               RAND_MAX macro, <a href="#7.20">7.20</a>, <a href="#7.20.2.1">7.20.2.1</a>
24814     _Pragma, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.10.9">6.10.9</a>                                   range
24815     defined, <a href="#6.10.1">6.10.1</a>                                              excess, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.3.1.5">6.3.1.5</a>, <a href="#6.3.1.8">6.3.1.8</a>, <a href="#6.8.6.4">6.8.6.4</a>
24816  preprocessing tokens, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.4">6.4</a>, <a href="#6.10">6.10</a>                      range error, <a href="#7.12.1">7.12.1</a>, <a href="#7.12.5.3">7.12.5.3</a>, <a href="#7.12.5.4">7.12.5.4</a>, <a href="#7.12.5.5">7.12.5.5</a>,
24817  preprocessing translation unit, <a href="#5.1.1.1">5.1.1.1</a>                            <a href="#7.12.6.1">7.12.6.1</a>, <a href="#7.12.6.2">7.12.6.2</a>, <a href="#7.12.6.3">7.12.6.3</a>, <a href="#7.12.6.5">7.12.6.5</a>,
24818  preprocessor, <a href="#6.10">6.10</a>                                                 <a href="#7.12.6.6">7.12.6.6</a>, <a href="#7.12.6.7">7.12.6.7</a>, <a href="#7.12.6.8">7.12.6.8</a>, <a href="#7.12.6.9">7.12.6.9</a>,
24819  PRIcFASTN macros, <a href="#7.8.1">7.8.1</a>                                            <a href="#7.12.6.10">7.12.6.10</a>, <a href="#7.12.6.11">7.12.6.11</a>, <a href="#7.12.6.13">7.12.6.13</a>, <a href="#7.12.7.3">7.12.7.3</a>,
24820  PRIcLEASTN macros, <a href="#7.8.1">7.8.1</a>                                           <a href="#7.12.7.4">7.12.7.4</a>, <a href="#7.12.8.2">7.12.8.2</a>, <a href="#7.12.8.3">7.12.8.3</a>, <a href="#7.12.8.4">7.12.8.4</a>,
24821  PRIcMAX macros, <a href="#7.8.1">7.8.1</a>                                              <a href="#7.12.9.5">7.12.9.5</a>, <a href="#7.12.9.7">7.12.9.7</a>, <a href="#7.12.11.3">7.12.11.3</a>, <a href="#7.12.12.1">7.12.12.1</a>,
24822  PRIcN macros, <a href="#7.8.1">7.8.1</a>                                                <a href="#7.12.13.1">7.12.13.1</a>
24823 <!--page 547 -->
24824  rank, see integer conversion rank                         same scope, <a href="#6.2.1">6.2.1</a>
24825  real floating type conversion, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.5">6.3.1.5</a>,           save calling environment function, <a href="#7.13.1">7.13.1</a>
24826        <a href="#6.3.1.7">6.3.1.7</a>, <a href="#F.3">F.3</a>, <a href="#F.4">F.4</a>                                   scalar types, <a href="#6.2.5">6.2.5</a>
24827  real floating types, <a href="#6.2.5">6.2.5</a>                                 scalbln function, <a href="#7.12.6.13">7.12.6.13</a>, <a href="#F.3">F.3</a>, <a href="#F.9.3.13">F.9.3.13</a>
24828  real type domain, <a href="#6.2.5">6.2.5</a>                                   scalbln type-generic macro, <a href="#7.22">7.22</a>
24829  real types, <a href="#6.2.5">6.2.5</a>                                         scalbn function, <a href="#7.12.6.13">7.12.6.13</a>, <a href="#F.3">F.3</a>, <a href="#F.9.3.13">F.9.3.13</a>
24830  real-floating, <a href="#7.12.3">7.12.3</a>                                      scalbn type-generic macro, <a href="#7.22">7.22</a>
24831  realloc function, <a href="#7.20.3">7.20.3</a>, <a href="#7.20.3.2">7.20.3.2</a>, <a href="#7.20.3.4">7.20.3.4</a>              scanf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.4">7.19.6.4</a>, <a href="#7.19.6.11">7.19.6.11</a>
24832  recommended practice, <a href="#3.16">3.16</a>                                scanlist, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>
24833  recursion, <a href="#6.5.2.2">6.5.2.2</a>                                        scanset, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>
24834  recursive function call, <a href="#6.5.2.2">6.5.2.2</a>                          SCHAR_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
24835  redefinition of macro, <a href="#6.10.3">6.10.3</a>                              SCHAR_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
24836  reentrancy, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.3">5.2.3</a>                                SCNcFASTN macros, <a href="#7.8.1">7.8.1</a>
24837     library functions, <a href="#7.1.4">7.1.4</a>                               SCNcLEASTN macros, <a href="#7.8.1">7.8.1</a>
24838  referenced type, <a href="#6.2.5">6.2.5</a>                                    SCNcMAX macros, <a href="#7.8.1">7.8.1</a>
24839  register storage-class specifier, <a href="#6.7.1">6.7.1</a>, <a href="#6.9">6.9</a>               SCNcN macros, <a href="#7.8.1">7.8.1</a>
24840  relational expressions, <a href="#6.5.8">6.5.8</a>                             SCNcPTR macros, <a href="#7.8.1">7.8.1</a>
24841  reliability of data, interrupted, <a href="#5.1.2.3">5.1.2.3</a>                 scope of identifier, <a href="#6.2.1">6.2.1</a>, <a href="#6.9.2">6.9.2</a>
24842  remainder assignment operator (%=), <a href="#6.5.16.2">6.5.16.2</a>              search functions
24843  remainder functions, <a href="#7.12.10">7.12.10</a>, <a href="#F.9.7">F.9.7</a>                          string, <a href="#7.21.5">7.21.5</a>
24844  remainder functions, <a href="#7.12.10.2">7.12.10.2</a>, <a href="#7.12.10.3">7.12.10.3</a>, <a href="#F.3">F.3</a>,              utility, <a href="#7.20.5">7.20.5</a>
24845        <a href="#F.9.7.2">F.9.7.2</a>                                                wide string, <a href="#7.24.4.5">7.24.4.5</a>
24846  remainder operator (%), <a href="#6.5.5">6.5.5</a>                             SEEK_CUR macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.9.2">7.19.9.2</a>
24847  remainder type-generic macro, <a href="#7.22">7.22</a>                        SEEK_END macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.9.2">7.19.9.2</a>
24848  remove function, <a href="#7.19.4.1">7.19.4.1</a>, <a href="#7.19.4.4">7.19.4.4</a>                       SEEK_SET macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.9.2">7.19.9.2</a>
24849  remquo functions, <a href="#7.12.10.3">7.12.10.3</a>, <a href="#F.3">F.3</a>, <a href="#F.9.7.3">F.9.7.3</a>                 selection statements, <a href="#6.8.4">6.8.4</a>
24850  remquo type-generic macro, <a href="#7.22">7.22</a>                           self-referential structure, <a href="#6.7.2.3">6.7.2.3</a>
24851  rename function, <a href="#7.19.4.2">7.19.4.2</a>                                 semicolon punctuator (;), <a href="#6.7">6.7</a>, <a href="#6.7.2.1">6.7.2.1</a>, <a href="#6.8.3">6.8.3</a>,
24852  representations of types, <a href="#6.2.6">6.2.6</a>                                 <a href="#6.8.5">6.8.5</a>, <a href="#6.8.6">6.8.6</a>
24853     pointer, <a href="#6.2.5">6.2.5</a>                                         separate compilation, <a href="#5.1.1.1">5.1.1.1</a>
24854  rescanning and replacement, <a href="#6.10.3.4">6.10.3.4</a>                      separate translation, <a href="#5.1.1.1">5.1.1.1</a>
24855  reserved identifiers, <a href="#6.4.1">6.4.1</a>, <a href="#7.1.3">7.1.3</a>                         sequence points, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#6.5">6.5</a>, <a href="#6.8">6.8</a>, <a href="#7.1.4">7.1.4</a>, <a href="#7.19.6">7.19.6</a>,
24856  restartable multibyte/wide character conversion                 <a href="#7.20.5">7.20.5</a>, <a href="#7.24.2">7.24.2</a>, <a href="#C">C</a>
24857        functions, <a href="#7.24.6.3">7.24.6.3</a>                                 sequencing of statements, <a href="#6.8">6.8</a>
24858  restartable multibyte/wide string conversion              setbuf function, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.5.1">7.19.5.1</a>, <a href="#7.19.5.5">7.19.5.5</a>
24859        functions, <a href="#7.24.6.4">7.24.6.4</a>                                 setjmp macro, <a href="#7.1.3">7.1.3</a>, <a href="#7.13.1.1">7.13.1.1</a>, <a href="#7.13.2.1">7.13.2.1</a>
24860  restore calling environment function, <a href="#7.13.2">7.13.2</a>              setjmp.h header, <a href="#7.13">7.13</a>
24861  restrict type qualifier, <a href="#6.7.3">6.7.3</a>, <a href="#6.7.3.1">6.7.3.1</a>                    setlocale function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.11.2.1">7.11.2.1</a>
24862  restrict-qualified type, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.3">6.7.3</a>                      setvbuf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.5.1">7.19.5.1</a>,
24863  return statement, <a href="#6.8.6.4">6.8.6.4</a>                                       <a href="#7.19.5.5">7.19.5.5</a>, <a href="#7.19.5.6">7.19.5.6</a>
24864  rewind function, <a href="#7.19.5.3">7.19.5.3</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.5">7.19.9.5</a>,           shall, <a href="#4">4</a>
24865        <a href="#7.24.3.10">7.24.3.10</a>                                           shift expressions, <a href="#6.5.7">6.5.7</a>
24866  right-shift assignment operator (&gt;&gt;=), <a href="#6.5.16.2">6.5.16.2</a>           shift sequence, <a href="#7.1.1">7.1.1</a>
24867  right-shift operator (&gt;&gt;), <a href="#6.5.7">6.5.7</a>                          shift states, <a href="#5.2.1.2">5.2.1.2</a>
24868  rint functions, <a href="#7.12.9.4">7.12.9.4</a>, <a href="#F.3">F.3</a>, <a href="#F.9.6.4">F.9.6.4</a>                    short identifier, character, <a href="#5.2.4.1">5.2.4.1</a>, <a href="#6.4.3">6.4.3</a>
24869  rint type-generic macro, <a href="#7.22">7.22</a>                             short int type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.7.2">6.7.2</a>, <a href="#7.19.6.1">7.19.6.1</a>,
24870  round functions, <a href="#7.12.9.6">7.12.9.6</a>, <a href="#F.9.6.6">F.9.6.6</a>                              <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>
24871  round type-generic macro, <a href="#7.22">7.22</a>                            short int type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>,
24872  rounding mode, floating point, <a href="#5.2.4.2.2">5.2.4.2.2</a>                         <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.8">6.3.1.8</a>
24873  rvalue, <a href="#6.3.2.1">6.3.2.1</a>                                           SHRT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
24874                                                            SHRT_MIN macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
24875 <!--page 548 -->
24876  side effects, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#6.5">6.5</a>                                   source lines, <a href="#5.1.1.2">5.1.1.2</a>
24877  SIG_ATOMIC_MAX macro, <a href="#7.18.3">7.18.3</a>                                 source text, <a href="#5.1.1.2">5.1.1.2</a>
24878  SIG_ATOMIC_MIN macro, <a href="#7.18.3">7.18.3</a>                                 space character (' '), <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>, <a href="#7.4.1.3">7.4.1.3</a>,
24879  sig_atomic_t type, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#7.18.3">7.18.3</a>                         <a href="#7.4.1.10">7.4.1.10</a>, <a href="#7.25.2.1.3">7.25.2.1.3</a>
24880  SIG_DFL macro, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>                                sprintf function, <a href="#7.19.6.6">7.19.6.6</a>, <a href="#7.19.6.13">7.19.6.13</a>
24881  SIG_ERR macro, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>                                sqrt functions, <a href="#7.12.7.5">7.12.7.5</a>, <a href="#F.3">F.3</a>, <a href="#F.9.4.5">F.9.4.5</a>
24882  SIG_IGN macro, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>                                sqrt type-generic macro, <a href="#7.22">7.22</a>
24883  SIGABRT macro, <a href="#7.14">7.14</a>, <a href="#7.20.4.1">7.20.4.1</a>                                srand function, <a href="#7.20.2.2">7.20.2.2</a>
24884  SIGFPE macro, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#J.5.17">J.5.17</a>                         sscanf function, <a href="#7.19.6.7">7.19.6.7</a>, <a href="#7.19.6.14">7.19.6.14</a>
24885  SIGILL macro, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>                                 standard error stream, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.10.4">7.19.10.4</a>
24886  SIGINT macro, <a href="#7.14">7.14</a>                                           standard headers, <a href="#4">4</a>, <a href="#7.1.2">7.1.2</a>
24887  sign and magnitude, <a href="#6.2.6.2">6.2.6.2</a>                                     <a href="#7.2">&lt;assert.h&gt;</a>, <a href="#7.2">7.2</a>, <a href="#B.1">B.1</a>
24888  sign bit, <a href="#6.2.6.2">6.2.6.2</a>                                               <a href="#7.3">&lt;complex.h&gt;</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.3">7.3</a>, <a href="#7.22">7.22</a>, <a href="#7.26.1">7.26.1</a>,
24889  signal function, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#7.20.4.4">7.20.4.4</a>                                  <a href="#G.6">G.6</a>, <a href="#J.5.17">J.5.17</a>
24890  signal handler, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.3">5.2.3</a>, <a href="#7.14.1.1">7.14.1.1</a>, <a href="#7.14.2.1">7.14.2.1</a>              <a href="#7.4">&lt;ctype.h&gt;</a>, <a href="#7.4">7.4</a>, <a href="#7.26.2">7.26.2</a>
24891  signal handling functions, <a href="#7.14.1">7.14.1</a>                               <a href="#7.5">&lt;errno.h&gt;</a>, <a href="#7.5">7.5</a>, <a href="#7.26.3">7.26.3</a>
24892  signal.h header, <a href="#7.14">7.14</a>, <a href="#7.26.6">7.26.6</a>                                   <a href="#7.6">&lt;fenv.h&gt;</a>, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.6">7.6</a>, <a href="#7.12">7.12</a>, <a href="#F">F</a>, <a href="#H">H</a>
24893  signaling NaN, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#F.2.1">F.2.1</a>                                 <a href="#7.7">&lt;float.h&gt;</a>, <a href="#4">4</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.7">7.7</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24894  signals, <a href="#5.1.2.3">5.1.2.3</a>, <a href="#5.2.3">5.2.3</a>, <a href="#7.14.1">7.14.1</a>                                      <a href="#7.24.4.1.1">7.24.4.1.1</a>
24895  signbit macro, <a href="#7.12.3.6">7.12.3.6</a>, <a href="#F.3">F.3</a>                                    <a href="#7.8">&lt;inttypes.h&gt;</a>, <a href="#7.8">7.8</a>, <a href="#7.26.4">7.26.4</a>
24896  signed char type, <a href="#6.2.5">6.2.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,                    <a href="#7.9">&lt;iso646.h&gt;</a>, <a href="#4">4</a>, <a href="#7.9">7.9</a>
24897       <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                                         <a href="#7.10">&lt;limits.h&gt;</a>, <a href="#4">4</a>, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#6.2.5">6.2.5</a>, <a href="#7.10">7.10</a>
24898  signed character, <a href="#6.3.1.1">6.3.1.1</a>                                       <a href="#7.11">&lt;locale.h&gt;</a>, <a href="#7.11">7.11</a>, <a href="#7.26.5">7.26.5</a>
24899  signed integer types, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.4.4.1">6.4.4.1</a>                   <a href="#7.12">&lt;math.h&gt;</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#6.5">6.5</a>, <a href="#7.12">7.12</a>, <a href="#7.22">7.22</a>, <a href="#F">F</a>, <a href="#F.9">F.9</a>,
24900  signed type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.3.1.4">6.3.1.4</a>,                   <a href="#J.5.17">J.5.17</a>
24901       <a href="#6.3.1.8">6.3.1.8</a>                                                    <a href="#7.13">&lt;setjmp.h&gt;</a>, <a href="#7.13">7.13</a>
24902  signed types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>                                      <a href="#7.14">&lt;signal.h&gt;</a>, <a href="#7.14">7.14</a>, <a href="#7.26.6">7.26.6</a>
24903  significand part, <a href="#6.4.4.2">6.4.4.2</a>                                        <a href="#7.15">&lt;stdarg.h&gt;</a>, <a href="#4">4</a>, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#7.15">7.15</a>
24904  SIGSEGV macro, <a href="#7.14">7.14</a>, <a href="#7.14.1.1">7.14.1.1</a>                                   <a href="#7.16">&lt;stdbool.h&gt;</a>, <a href="#4">4</a>, <a href="#7.16">7.16</a>, <a href="#7.26.7">7.26.7</a>, <a href="#H">H</a>
24905  SIGTERM macro, <a href="#7.14">7.14</a>                                             <a href="#7.17">&lt;stddef.h&gt;</a>, <a href="#4">4</a>, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.3.2.3">6.3.2.3</a>, <a href="#6.4.4.4">6.4.4.4</a>,
24906  simple assignment operator (=), <a href="#6.5.16.1">6.5.16.1</a>                             <a href="#6.4.5">6.4.5</a>, <a href="#6.5.3.4">6.5.3.4</a>, <a href="#6.5.6">6.5.6</a>, <a href="#7.17">7.17</a>
24907  sin functions, <a href="#7.12.4.6">7.12.4.6</a>, <a href="#F.9.1.6">F.9.1.6</a>                                <a href="#7.18">&lt;stdint.h&gt;</a>, <a href="#4">4</a>, <a href="#5.2.4.2">5.2.4.2</a>, <a href="#6.10.1">6.10.1</a>, <a href="#7.8">7.8</a>, <a href="#7.18">7.18</a>,
24908  sin type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                                    <a href="#7.26.8">7.26.8</a>
24909  single-byte character, <a href="#3.7.1">3.7.1</a>, <a href="#5.2.1.2">5.2.1.2</a>                           <a href="#7.19">&lt;stdio.h&gt;</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19">7.19</a>, <a href="#7.26.9">7.26.9</a>, <a href="#F">F</a>
24910  single-byte/wide character conversion functions,                <a href="#7.20">&lt;stdlib.h&gt;</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.20">7.20</a>, <a href="#7.26.10">7.26.10</a>, <a href="#F">F</a>
24911       <a href="#7.24.6.1">7.24.6.1</a>                                                   <a href="#7.21">&lt;string.h&gt;</a>, <a href="#7.21">7.21</a>, <a href="#7.26.11">7.26.11</a>
24912  single-precision arithmetic, <a href="#5.1.2.3">5.1.2.3</a>                            <a href="#7.22">&lt;tgmath.h&gt;</a>, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
24913  single-quote escape sequence (\'), <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.4.5">6.4.5</a>               <a href="#7.23">&lt;time.h&gt;</a>, <a href="#7.23">7.23</a>
24914  sinh functions, <a href="#7.12.5.5">7.12.5.5</a>, <a href="#F.9.2.5">F.9.2.5</a>                               <a href="#7.24">&lt;wchar.h&gt;</a>, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.24">7.24</a>, <a href="#7.26.12">7.26.12</a>,
24915  sinh type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                                   <a href="#F">F</a>
24916  SIZE_MAX macro, <a href="#7.18.3">7.18.3</a>                                          <a href="#7.25">&lt;wctype.h&gt;</a>, <a href="#7.25">7.25</a>, <a href="#7.26.13">7.26.13</a>
24917  size_t type, <a href="#6.5.3.4">6.5.3.4</a>, <a href="#7.17">7.17</a>, <a href="#7.18.3">7.18.3</a>, <a href="#7.19.1">7.19.1</a>,                  standard input stream, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>
24918       <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.20">7.20</a>, <a href="#7.21.1">7.21.1</a>, <a href="#7.23.1">7.23.1</a>,               standard integer types, <a href="#6.2.5">6.2.5</a>
24919       <a href="#7.24.1">7.24.1</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                              standard output stream, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>
24920  sizeof operator, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3">6.5.3</a>, <a href="#6.5.3.4">6.5.3.4</a>                     standard signed integer types, <a href="#6.2.5">6.2.5</a>
24921  snprintf function, <a href="#7.19.6.5">7.19.6.5</a>, <a href="#7.19.6.12">7.19.6.12</a>                       state-dependent encoding, <a href="#5.2.1.2">5.2.1.2</a>, <a href="#7.20.7">7.20.7</a>
24922  sorting utility functions, <a href="#7.20.5">7.20.5</a>                            statements, <a href="#6.8">6.8</a>
24923  source character set, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>                            break, <a href="#6.8.6.3">6.8.6.3</a>
24924  source file, <a href="#5.1.1.1">5.1.1.1</a>                                             compound, <a href="#6.8.2">6.8.2</a>
24925     name, <a href="#6.10.4">6.10.4</a>, <a href="#6.10.8">6.10.8</a>                                         continue, <a href="#6.8.6.2">6.8.6.2</a>
24926  source file inclusion, <a href="#6.10.2">6.10.2</a>                                    do, <a href="#6.8.5.2">6.8.5.2</a>
24927 <!--page 549 -->
24928     else, <a href="#6.8.4.1">6.8.4.1</a>                                             strictly conforming program, <a href="#4">4</a>
24929     expression, <a href="#6.8.3">6.8.3</a>                                         string, <a href="#7.1.1">7.1.1</a>
24930     for, <a href="#6.8.5.3">6.8.5.3</a>                                                 comparison functions, <a href="#7.21.4">7.21.4</a>
24931     goto, <a href="#6.8.6.1">6.8.6.1</a>                                                concatenation functions, <a href="#7.21.3">7.21.3</a>
24932     if, <a href="#6.8.4.1">6.8.4.1</a>                                                  conversion functions, <a href="#7.11.1.1">7.11.1.1</a>
24933     iteration, <a href="#6.8.5">6.8.5</a>                                             copying functions, <a href="#7.21.2">7.21.2</a>
24934     jump, <a href="#6.8.6">6.8.6</a>                                                  library function conventions, <a href="#7.21.1">7.21.1</a>
24935     labeled, <a href="#6.8.1">6.8.1</a>                                               literal, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1">5.2.1</a>, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.4.5">6.4.5</a>, <a href="#6.5.1">6.5.1</a>, <a href="#6.7.8">6.7.8</a>
24936     null, <a href="#6.8.3">6.8.3</a>                                                  miscellaneous functions, <a href="#7.21.6">7.21.6</a>
24937     return, <a href="#6.8.6.4">6.8.6.4</a>                                              numeric conversion functions, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.20.1">7.20.1</a>
24938     selection, <a href="#6.8.4">6.8.4</a>                                             search functions, <a href="#7.21.5">7.21.5</a>
24939     sequencing, <a href="#6.8">6.8</a>                                           string handling header, <a href="#7.21">7.21</a>
24940     switch, <a href="#6.8.4.2">6.8.4.2</a>                                           string.h header, <a href="#7.21">7.21</a>, <a href="#7.26.11">7.26.11</a>
24941     while, <a href="#6.8.5.1">6.8.5.1</a>                                            stringizing, <a href="#6.10.3.2">6.10.3.2</a>, <a href="#6.10.9">6.10.9</a>
24942  static storage duration, <a href="#6.2.4">6.2.4</a>                               strlen function, <a href="#7.21.6.3">7.21.6.3</a>
24943  static storage-class specifier, <a href="#6.2.2">6.2.2</a>, <a href="#6.2.4">6.2.4</a>, <a href="#6.7.1">6.7.1</a>           strncat function, <a href="#7.21.3.2">7.21.3.2</a>
24944  static, in array declarators, <a href="#6.7.5.2">6.7.5.2</a>, <a href="#6.7.5.3">6.7.5.3</a>               strncmp function, <a href="#7.21.4">7.21.4</a>, <a href="#7.21.4.4">7.21.4.4</a>
24945  stdarg.h header, <a href="#4">4</a>, <a href="#6.7.5.3">6.7.5.3</a>, <a href="#7.15">7.15</a>                            strncpy function, <a href="#7.21.2.4">7.21.2.4</a>
24946  stdbool.h header, <a href="#4">4</a>, <a href="#7.16">7.16</a>, <a href="#7.26.7">7.26.7</a>, <a href="#H">H</a>                         strpbrk function, <a href="#7.21.5.4">7.21.5.4</a>
24947  STDC, <a href="#6.10.6">6.10.6</a>, <a href="#6.11.8">6.11.8</a>                                         strrchr function, <a href="#7.21.5.5">7.21.5.5</a>
24948  stddef.h header, <a href="#4">4</a>, <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.3.2.3">6.3.2.3</a>, <a href="#6.4.4.4">6.4.4.4</a>,               strspn function, <a href="#7.21.5.6">7.21.5.6</a>
24949        <a href="#6.4.5">6.4.5</a>, <a href="#6.5.3.4">6.5.3.4</a>, <a href="#6.5.6">6.5.6</a>, <a href="#7.17">7.17</a>                            strstr function, <a href="#7.21.5.7">7.21.5.7</a>
24950  stderr macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.3">7.19.3</a>                         strtod function, <a href="#7.12.11.2">7.12.11.2</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.20.1.3">7.20.1.3</a>,
24951  stdin macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.6.4">7.19.6.4</a>,                     <a href="#7.24.2.2">7.24.2.2</a>, <a href="#F.3">F.3</a>
24952        <a href="#7.19.7.6">7.19.7.6</a>, <a href="#7.19.7.7">7.19.7.7</a>, <a href="#7.24.2.12">7.24.2.12</a>, <a href="#7.24.3.7">7.24.3.7</a>                strtof function, <a href="#7.12.11.2">7.12.11.2</a>, <a href="#7.20.1.3">7.20.1.3</a>, <a href="#F.3">F.3</a>
24953  stdint.h header, <a href="#4">4</a>, <a href="#5.2.4.2">5.2.4.2</a>, <a href="#6.10.1">6.10.1</a>, <a href="#7.8">7.8</a>, <a href="#7.18">7.18</a>,              strtoimax function, <a href="#7.8.2.3">7.8.2.3</a>
24954        <a href="#7.26.8">7.26.8</a>                                                 strtok function, <a href="#7.21.5.8">7.21.5.8</a>
24955  stdio.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19">7.19</a>, <a href="#7.26.9">7.26.9</a>, <a href="#F">F</a>                   strtol function, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.20.1.2">7.20.1.2</a>,
24956  stdlib.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.20">7.20</a>, <a href="#7.26.10">7.26.10</a>, <a href="#F">F</a>                       <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.24.2.2">7.24.2.2</a>
24957  stdout macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.6.3">7.19.6.3</a>,              strtold function, <a href="#7.12.11.2">7.12.11.2</a>, <a href="#7.20.1.3">7.20.1.3</a>, <a href="#F.3">F.3</a>
24958        <a href="#7.19.7.9">7.19.7.9</a>, <a href="#7.19.7.10">7.19.7.10</a>, <a href="#7.24.2.11">7.24.2.11</a>, <a href="#7.24.3.9">7.24.3.9</a>               strtoll function, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.20.1.2">7.20.1.2</a>, <a href="#7.20.1.4">7.20.1.4</a>
24959  storage duration, <a href="#6.2.4">6.2.4</a>                                      strtoul function, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.20.1.2">7.20.1.2</a>,
24960  storage order of array, <a href="#6.5.2.1">6.5.2.1</a>                                    <a href="#7.20.1.4">7.20.1.4</a>, <a href="#7.24.2.2">7.24.2.2</a>
24961  storage-class specifiers, <a href="#6.7.1">6.7.1</a>, <a href="#6.11.5">6.11.5</a>                       strtoull function, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.20.1.2">7.20.1.2</a>, <a href="#7.20.1.4">7.20.1.4</a>
24962  strcat function, <a href="#7.21.3.1">7.21.3.1</a>                                    strtoumax function, <a href="#7.8.2.3">7.8.2.3</a>
24963  strchr function, <a href="#7.21.5.2">7.21.5.2</a>                                    struct hack, see flexible array member
24964  strcmp function, <a href="#7.21.4">7.21.4</a>, <a href="#7.21.4.2">7.21.4.2</a>                            structure
24965  strcoll function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.21.4.3">7.21.4.3</a>, <a href="#7.21.4.5">7.21.4.5</a>                  arrow operator (-&gt;), <a href="#6.5.2.3">6.5.2.3</a>
24966  strcpy function, <a href="#7.21.2.3">7.21.2.3</a>                                       content, <a href="#6.7.2.3">6.7.2.3</a>
24967  strcspn function, <a href="#7.21.5.3">7.21.5.3</a>                                      dot operator (.), <a href="#6.5.2.3">6.5.2.3</a>
24968  streams, <a href="#7.19.2">7.19.2</a>, <a href="#7.20.4.3">7.20.4.3</a>                                       initialization, <a href="#6.7.8">6.7.8</a>
24969     fully buffered, <a href="#7.19.3">7.19.3</a>                                       member alignment, <a href="#6.7.2.1">6.7.2.1</a>
24970     line buffered, <a href="#7.19.3">7.19.3</a>                                        member name space, <a href="#6.2.3">6.2.3</a>
24971     orientation, <a href="#7.19.2">7.19.2</a>                                          member operator (.), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.3">6.5.2.3</a>
24972     standard error, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>                               pointer operator (-&gt;), <a href="#6.5.2.3">6.5.2.3</a>
24973     standard input, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>                               specifier, <a href="#6.7.2.1">6.7.2.1</a>
24974     standard output, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.3">7.19.3</a>                              tag, <a href="#6.2.3">6.2.3</a>, <a href="#6.7.2.3">6.7.2.3</a>
24975     unbuffered, <a href="#7.19.3">7.19.3</a>                                           type, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2.1">6.7.2.1</a>
24976  strerror function, <a href="#7.19.10.4">7.19.10.4</a>, <a href="#7.21.6.2">7.21.6.2</a>                       strxfrm function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.21.4.5">7.21.4.5</a>
24977  strftime function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.23.3">7.23.3</a>, <a href="#7.23.3.5">7.23.3.5</a>,               subscripting, <a href="#6.5.2.1">6.5.2.1</a>
24978        <a href="#7.24.5.1">7.24.5.1</a>                                               subtraction assignment operator (-=), <a href="#6.5.16.2">6.5.16.2</a>
24979 <!--page 550 -->
24980  subtraction operator (-), <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>, <a href="#G.5.2">G.5.2</a>                   tolower function, <a href="#7.4.2.1">7.4.2.1</a>
24981  suffix                                                         toupper function, <a href="#7.4.2.2">7.4.2.2</a>
24982    floating constant, <a href="#6.4.4.2">6.4.4.2</a>                                   towctrans function, <a href="#7.25.3.2.1">7.25.3.2.1</a>, <a href="#7.25.3.2.2">7.25.3.2.2</a>
24983    integer constant, <a href="#6.4.4.1">6.4.4.1</a>                                   towlower function, <a href="#7.25.3.1.1">7.25.3.1.1</a>, <a href="#7.25.3.2.1">7.25.3.2.1</a>
24984  switch body, <a href="#6.8.4.2">6.8.4.2</a>                                          towupper function, <a href="#7.25.3.1.2">7.25.3.1.2</a>, <a href="#7.25.3.2.1">7.25.3.2.1</a>
24985  switch case label, <a href="#6.8.1">6.8.1</a>, <a href="#6.8.4.2">6.8.4.2</a>                             translation environment, <a href="#5">5</a>, <a href="#5.1.1">5.1.1</a>
24986  switch default label, <a href="#6.8.1">6.8.1</a>, <a href="#6.8.4.2">6.8.4.2</a>                          translation limits, <a href="#5.2.4.1">5.2.4.1</a>
24987  switch statement, <a href="#6.8.1">6.8.1</a>, <a href="#6.8.4.2">6.8.4.2</a>                              translation phases, <a href="#5.1.1.2">5.1.1.2</a>
24988  swprintf function, <a href="#7.24.2.3">7.24.2.3</a>, <a href="#7.24.2.7">7.24.2.7</a>                         translation unit, <a href="#5.1.1.1">5.1.1.1</a>, <a href="#6.9">6.9</a>
24989  swscanf function, <a href="#7.24.2.4">7.24.2.4</a>, <a href="#7.24.2.8">7.24.2.8</a>                          trap representation, <a href="#6.2.6.1">6.2.6.1</a>, <a href="#6.2.6.2">6.2.6.2</a>, <a href="#6.3.2.3">6.3.2.3</a>,
24990  symbols, <a href="#3">3</a>                                                          <a href="#6.5.2.3">6.5.2.3</a>
24991  syntactic categories, <a href="#6.1">6.1</a>                                     trigonometric functions
24992  syntax notation, <a href="#6.1">6.1</a>                                             complex, <a href="#7.3.5">7.3.5</a>, <a href="#G.6.1">G.6.1</a>
24993  syntax rule precedence, <a href="#5.1.1.2">5.1.1.2</a>                                  real, <a href="#7.12.4">7.12.4</a>, <a href="#F.9.1">F.9.1</a>
24994  syntax summary, language, <a href="#A">A</a>                                   trigraph sequences, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#5.2.1.1">5.2.1.1</a>
24995  system function, <a href="#7.20.4.6">7.20.4.6</a>                                     true macro, <a href="#7.16">7.16</a>
24996                                                                trunc functions, <a href="#7.12.9.8">7.12.9.8</a>, <a href="#F.9.6.8">F.9.6.8</a>
24997  tab characters, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>                                    trunc type-generic macro, <a href="#7.22">7.22</a>
24998  tag compatibility, <a href="#6.2.7">6.2.7</a>                                      truncation, <a href="#6.3.1.4">6.3.1.4</a>, <a href="#7.12.9.8">7.12.9.8</a>, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.5.3">7.19.5.3</a>
24999  tag name space, <a href="#6.2.3">6.2.3</a>                                         truncation toward zero, <a href="#6.5.5">6.5.5</a>
25000  tags, <a href="#6.7.2.3">6.7.2.3</a>                                                 two's complement, <a href="#6.2.6.2">6.2.6.2</a>, <a href="#7.18.1.1">7.18.1.1</a>
25001  tan functions, <a href="#7.12.4.7">7.12.4.7</a>, <a href="#F.9.1.7">F.9.1.7</a>                              type category, <a href="#6.2.5">6.2.5</a>
25002  tan type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                             type conversion, <a href="#6.3">6.3</a>
25003  tanh functions, <a href="#7.12.5.6">7.12.5.6</a>, <a href="#F.9.2.6">F.9.2.6</a>                             type definitions, <a href="#6.7.7">6.7.7</a>
25004  tanh type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                            type domain, <a href="#6.2.5">6.2.5</a>, <a href="#G.2">G.2</a>
25005  tentative definition, <a href="#6.9.2">6.9.2</a>                                    type names, <a href="#6.7.6">6.7.6</a>
25006  terms, <a href="#3">3</a>                                                      type punning, <a href="#6.5.2.3">6.5.2.3</a>
25007  text streams, <a href="#7.19.2">7.19.2</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>, <a href="#7.19.9.4">7.19.9.4</a>           type qualifiers, <a href="#6.7.3">6.7.3</a>
25008  tgamma functions, <a href="#7.12.8.4">7.12.8.4</a>, <a href="#F.9.5.4">F.9.5.4</a>                           type specifiers, <a href="#6.7.2">6.7.2</a>
25009  tgamma type-generic macro, <a href="#7.22">7.22</a>                               type-generic macro, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>
25010  tgmath.h header, <a href="#7.22">7.22</a>, <a href="#G.7">G.7</a>                                    typedef declaration, <a href="#6.7.7">6.7.7</a>
25011  time                                                          typedef storage-class specifier, <a href="#6.7.1">6.7.1</a>, <a href="#6.7.7">6.7.7</a>
25012     broken down, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.3">7.23.2.3</a>, <a href="#7.23.3">7.23.3</a>, <a href="#7.23.3.1">7.23.3.1</a>,           types, <a href="#6.2.5">6.2.5</a>
25013           <a href="#7.23.3.3">7.23.3.3</a>, <a href="#7.23.3.4">7.23.3.4</a>, <a href="#7.23.3.5">7.23.3.5</a>                            character, <a href="#6.7.8">6.7.8</a>
25014     calendar, <a href="#7.23.1">7.23.1</a>, <a href="#7.23.2.2">7.23.2.2</a>, <a href="#7.23.2.3">7.23.2.3</a>, <a href="#7.23.2.4">7.23.2.4</a>,               compatible, <a href="#6.2.7">6.2.7</a>, <a href="#6.7.2">6.7.2</a>, <a href="#6.7.3">6.7.3</a>, <a href="#6.7.5">6.7.5</a>
25015           <a href="#7.23.3.2">7.23.3.2</a>, <a href="#7.23.3.3">7.23.3.3</a>, <a href="#7.23.3.4">7.23.3.4</a>                            complex, <a href="#6.2.5">6.2.5</a>, <a href="#G">G</a>
25016     components, <a href="#7.23.1">7.23.1</a>                                            composite, <a href="#6.2.7">6.2.7</a>
25017     conversion functions, <a href="#7.23.3">7.23.3</a>                                  const qualified, <a href="#6.7.3">6.7.3</a>
25018        wide character, <a href="#7.24.5">7.24.5</a>                                     conversions, <a href="#6.3">6.3</a>
25019     local, <a href="#7.23.1">7.23.1</a>                                                 imaginary, <a href="#G">G</a>
25020     manipulation functions, <a href="#7.23.2">7.23.2</a>                                restrict qualified, <a href="#6.7.3">6.7.3</a>
25021  time function, <a href="#7.23.2.4">7.23.2.4</a>                                          volatile qualified, <a href="#6.7.3">6.7.3</a>
25022  time.h header, <a href="#7.23">7.23</a>
25023  time_t type, <a href="#7.23.1">7.23.1</a>                                           UCHAR_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
25024  tm structure type, <a href="#7.23.1">7.23.1</a>, <a href="#7.24.1">7.24.1</a>                             UINT_FASTN_MAX macros, <a href="#7.18.2.3">7.18.2.3</a>
25025  TMP_MAX macro, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.4.3">7.19.4.3</a>, <a href="#7.19.4.4">7.19.4.4</a>                     uint_fastN_t types, <a href="#7.18.1.3">7.18.1.3</a>
25026  tmpfile function, <a href="#7.19.4.3">7.19.4.3</a>, <a href="#7.20.4.3">7.20.4.3</a>                          UINT_LEASTN_MAX macros, <a href="#7.18.2.2">7.18.2.2</a>
25027  tmpnam function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.4.3">7.19.4.3</a>, <a href="#7.19.4.4">7.19.4.4</a>                   uint_leastN_t types, <a href="#7.18.1.2">7.18.1.2</a>
25028  token, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.4">6.4</a>, see also preprocessing tokens            UINT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
25029  token concatenation, <a href="#6.10.3.3">6.10.3.3</a>                                 UINTMAX_C macro, <a href="#7.18.4.2">7.18.4.2</a>
25030  token pasting, <a href="#6.10.3.3">6.10.3.3</a>                                       UINTMAX_MAX macro, <a href="#7.8.2.3">7.8.2.3</a>, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.18.2.5">7.18.2.5</a>
25031 <!--page 551 -->
25032  uintmax_t type, <a href="#7.18.1.5">7.18.1.5</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,               USHRT_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>
25033       <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                                     usual arithmetic conversions, <a href="#6.3.1.8">6.3.1.8</a>, <a href="#6.5.5">6.5.5</a>, <a href="#6.5.6">6.5.6</a>,
25034  UINTN_C macros, <a href="#7.18.4.1">7.18.4.1</a>                                          <a href="#6.5.8">6.5.8</a>, <a href="#6.5.9">6.5.9</a>, <a href="#6.5.10">6.5.10</a>, <a href="#6.5.11">6.5.11</a>, <a href="#6.5.12">6.5.12</a>, <a href="#6.5.15">6.5.15</a>
25035  UINTN_MAX macros, <a href="#7.18.2.1">7.18.2.1</a>                                  utilities, general, <a href="#7.20">7.20</a>
25036  uintN_t types, <a href="#7.18.1.1">7.18.1.1</a>                                        wide string, <a href="#7.24.4">7.24.4</a>
25037  UINTPTR_MAX macro, <a href="#7.18.2.4">7.18.2.4</a>
25038  uintptr_t type, <a href="#7.18.1.4">7.18.1.4</a>                                    va_arg macro, <a href="#7.15">7.15</a>, <a href="#7.15.1">7.15.1</a>, <a href="#7.15.1.1">7.15.1.1</a>, <a href="#7.15.1.2">7.15.1.2</a>,
25039  ULLONG_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.20.1.4">7.20.1.4</a>,                           <a href="#7.15.1.4">7.15.1.4</a>, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.9">7.19.6.9</a>, <a href="#7.19.6.10">7.19.6.10</a>,
25040       <a href="#7.24.4.1.2">7.24.4.1.2</a>                                                  <a href="#7.19.6.11">7.19.6.11</a>, <a href="#7.19.6.12">7.19.6.12</a>, <a href="#7.19.6.13">7.19.6.13</a>, <a href="#7.19.6.14">7.19.6.14</a>,
25041  ULONG_MAX macro, <a href="#5.2.4.2.1">5.2.4.2.1</a>, <a href="#7.20.1.4">7.20.1.4</a>,                            <a href="#7.24.2.5">7.24.2.5</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.7">7.24.2.7</a>, <a href="#7.24.2.8">7.24.2.8</a>,
25042       <a href="#7.24.4.1.2">7.24.4.1.2</a>                                                  <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.10">7.24.2.10</a>
25043  unary arithmetic operators, <a href="#6.5.3.3">6.5.3.3</a>                         va_copy macro, <a href="#7.15">7.15</a>, <a href="#7.15.1">7.15.1</a>, <a href="#7.15.1.1">7.15.1.1</a>, <a href="#7.15.1.2">7.15.1.2</a>,
25044  unary expression, <a href="#6.5.3">6.5.3</a>                                          <a href="#7.15.1.3">7.15.1.3</a>
25045  unary minus operator (-), <a href="#6.5.3.3">6.5.3.3</a>, <a href="#F.3">F.3</a>                      va_end macro, <a href="#7.1.3">7.1.3</a>, <a href="#7.15">7.15</a>, <a href="#7.15.1">7.15.1</a>, <a href="#7.15.1.3">7.15.1.3</a>,
25046  unary operators, <a href="#6.5.3">6.5.3</a>                                           <a href="#7.15.1.4">7.15.1.4</a>, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.9">7.19.6.9</a>, <a href="#7.19.6.10">7.19.6.10</a>,
25047  unary plus operator (+), <a href="#6.5.3.3">6.5.3.3</a>                                 <a href="#7.19.6.11">7.19.6.11</a>, <a href="#7.19.6.12">7.19.6.12</a>, <a href="#7.19.6.13">7.19.6.13</a>, <a href="#7.19.6.14">7.19.6.14</a>,
25048  unbuffered stream, <a href="#7.19.3">7.19.3</a>                                        <a href="#7.24.2.5">7.24.2.5</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.2.7">7.24.2.7</a>, <a href="#7.24.2.8">7.24.2.8</a>,
25049  undef preprocessing directive, <a href="#6.10.3.5">6.10.3.5</a>, <a href="#7.1.3">7.1.3</a>,                  <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.10">7.24.2.10</a>
25050       <a href="#7.1.4">7.1.4</a>                                                  va_list type, <a href="#7.15">7.15</a>, <a href="#7.15.1.3">7.15.1.3</a>
25051  undefined behavior, <a href="#3.4.3">3.4.3</a>, <a href="#4">4</a>, <a href="#J.2">J.2</a>                            va_start macro, <a href="#7.15">7.15</a>, <a href="#7.15.1">7.15.1</a>, <a href="#7.15.1.1">7.15.1.1</a>,
25052  underscore character, <a href="#6.4.2.1">6.4.2.1</a>                                    <a href="#7.15.1.2">7.15.1.2</a>, <a href="#7.15.1.3">7.15.1.3</a>, <a href="#7.15.1.4">7.15.1.4</a>, <a href="#7.19.6.8">7.19.6.8</a>,
25053  underscore, leading, in identifier, <a href="#7.1.3">7.1.3</a>                         <a href="#7.19.6.9">7.19.6.9</a>, <a href="#7.19.6.10">7.19.6.10</a>, <a href="#7.19.6.11">7.19.6.11</a>, <a href="#7.19.6.12">7.19.6.12</a>,
25054  ungetc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.7.11">7.19.7.11</a>, <a href="#7.19.9.2">7.19.9.2</a>,                    <a href="#7.19.6.13">7.19.6.13</a>, <a href="#7.19.6.14">7.19.6.14</a>, <a href="#7.24.2.5">7.24.2.5</a>, <a href="#7.24.2.6">7.24.2.6</a>,
25055       <a href="#7.19.9.3">7.19.9.3</a>                                                    <a href="#7.24.2.7">7.24.2.7</a>, <a href="#7.24.2.8">7.24.2.8</a>, <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.10">7.24.2.10</a>
25056  ungetwc function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3.10">7.24.3.10</a>                         value, <a href="#3.17">3.17</a>
25057  Unicode required set, <a href="#6.10.8">6.10.8</a>                                value bits, <a href="#6.2.6.2">6.2.6.2</a>
25058  union                                                       variable arguments, <a href="#6.10.3">6.10.3</a>, <a href="#7.15">7.15</a>
25059    arrow operator (-&gt;), <a href="#6.5.2.3">6.5.2.3</a>                              variable arguments header, <a href="#7.15">7.15</a>
25060    content, <a href="#6.7.2.3">6.7.2.3</a>                                          variable length array, <a href="#6.7.5">6.7.5</a>, <a href="#6.7.5.2">6.7.5.2</a>
25061    dot operator (.), <a href="#6.5.2.3">6.5.2.3</a>                                 variably modified type, <a href="#6.7.5">6.7.5</a>, <a href="#6.7.5.2">6.7.5.2</a>
25062    initialization, <a href="#6.7.8">6.7.8</a>                                     vertical-tab character, <a href="#5.2.1">5.2.1</a>, <a href="#6.4">6.4</a>
25063    member alignment, <a href="#6.7.2.1">6.7.2.1</a>                                 vertical-tab escape sequence (\v), <a href="#5.2.2">5.2.2</a>, <a href="#6.4.4.4">6.4.4.4</a>,
25064    member name space, <a href="#6.2.3">6.2.3</a>                                       <a href="#7.4.1.10">7.4.1.10</a>
25065    member operator (.), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.3">6.5.2.3</a>                     vfprintf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.8">7.19.6.8</a>
25066    pointer operator (-&gt;), <a href="#6.5.2.3">6.5.2.3</a>                            vfscanf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.9">7.19.6.9</a>
25067    specifier, <a href="#6.7.2.1">6.7.2.1</a>                                         vfwprintf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.5">7.24.2.5</a>
25068    tag, <a href="#6.2.3">6.2.3</a>, <a href="#6.7.2.3">6.7.2.3</a>                                       vfwscanf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.6">7.24.2.6</a>, <a href="#7.24.3.10">7.24.3.10</a>
25069    type, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2.1">6.7.2.1</a>                                      visibility of identifier, <a href="#6.2.1">6.2.1</a>
25070  universal character name, <a href="#6.4.3">6.4.3</a>                             VLA, see variable length array
25071  unqualified type, <a href="#6.2.5">6.2.5</a>                                      void expression, <a href="#6.3.2.2">6.3.2.2</a>
25072  unqualified version of type, <a href="#6.2.5">6.2.5</a>                           void function parameter, <a href="#6.7.5.3">6.7.5.3</a>
25073  unsigned integer suffix, u or <a href="#U">U</a>, <a href="#6.4.4.1">6.4.4.1</a>                     void type, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.2.2">6.3.2.2</a>, <a href="#6.7.2">6.7.2</a>
25074  unsigned integer types, <a href="#6.2.5">6.2.5</a>, <a href="#6.3.1.3">6.3.1.3</a>, <a href="#6.4.4.1">6.4.4.1</a>             void type conversion, <a href="#6.3.2.2">6.3.2.2</a>
25075  unsigned type conversion, <a href="#6.3.1.1">6.3.1.1</a>, <a href="#6.3.1.3">6.3.1.3</a>,                 volatile storage, <a href="#5.1.2.3">5.1.2.3</a>
25076       <a href="#6.3.1.4">6.3.1.4</a>, <a href="#6.3.1.8">6.3.1.8</a>                                       volatile type qualifier, <a href="#6.7.3">6.7.3</a>
25077  unsigned types, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.2">6.7.2</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>,           volatile-qualified type, <a href="#6.2.5">6.2.5</a>, <a href="#6.7.3">6.7.3</a>
25078       <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                                     vprintf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.10">7.19.6.10</a>
25079  unspecified behavior, <a href="#3.4.4">3.4.4</a>, <a href="#4">4</a>, <a href="#J.1">J.1</a>                          vscanf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.11">7.19.6.11</a>
25080  unspecified value, <a href="#3.17.3">3.17.3</a>                                    vsnprintf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.12">7.19.6.12</a>
25081  uppercase letter, <a href="#5.2.1">5.2.1</a>                                     vsprintf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.13">7.19.6.13</a>
25082  use of library functions, <a href="#7.1.4">7.1.4</a>                             vsscanf function, <a href="#7.19.6.8">7.19.6.8</a>, <a href="#7.19.6.14">7.19.6.14</a>
25083 <!--page 552 -->
25084  vswprintf function, <a href="#7.24.2.7">7.24.2.7</a>                                  wctype.h header, <a href="#7.25">7.25</a>, <a href="#7.26.13">7.26.13</a>
25085  vswscanf function, <a href="#7.24.2.8">7.24.2.8</a>                                   wctype_t type, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>
25086  vwprintf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.9">7.24.2.9</a>                           WEOF macro, <a href="#7.24.1">7.24.1</a>, <a href="#7.24.3.1">7.24.3.1</a>, <a href="#7.24.3.3">7.24.3.3</a>, <a href="#7.24.3.6">7.24.3.6</a>,
25087  vwscanf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.10">7.24.2.10</a>, <a href="#7.24.3.10">7.24.3.10</a>                     <a href="#7.24.3.7">7.24.3.7</a>, <a href="#7.24.3.8">7.24.3.8</a>, <a href="#7.24.3.9">7.24.3.9</a>, <a href="#7.24.3.10">7.24.3.10</a>,
25088                                                                     <a href="#7.24.6.1.1">7.24.6.1.1</a>, <a href="#7.25.1">7.25.1</a>
25089  warnings, <a href="#I">I</a>                                                   while statement, <a href="#6.8.5.1">6.8.5.1</a>
25090  wchar.h header, <a href="#5.2.4.2.2">5.2.4.2.2</a>, <a href="#7.19.1">7.19.1</a>, <a href="#7.24">7.24</a>, <a href="#7.26.12">7.26.12</a>,             white space, <a href="#5.1.1.2">5.1.1.2</a>, <a href="#6.4">6.4</a>, <a href="#6.10">6.10</a>, <a href="#7.4.1.10">7.4.1.10</a>,
25091      <a href="#F">F</a>                                                              <a href="#7.25.2.1.10">7.25.2.1.10</a>
25092  WCHAR_MAX macro, <a href="#7.18.3">7.18.3</a>, <a href="#7.24.1">7.24.1</a>                               white-space characters, <a href="#6.4">6.4</a>
25093  WCHAR_MIN macro, <a href="#7.18.3">7.18.3</a>, <a href="#7.24.1">7.24.1</a>                               wide character, <a href="#3.7.3">3.7.3</a>
25094  wchar_t type, <a href="#3.7.3">3.7.3</a>, <a href="#6.4.4.4">6.4.4.4</a>, <a href="#6.4.5">6.4.5</a>, <a href="#6.7.8">6.7.8</a>,                     case mapping functions, <a href="#7.25.3.1">7.25.3.1</a>
25095      <a href="#6.10.8">6.10.8</a>, <a href="#7.17">7.17</a>, <a href="#7.18.3">7.18.3</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.20">7.20</a>,                extensible, <a href="#7.25.3.2">7.25.3.2</a>
25096      <a href="#7.24.1">7.24.1</a>, <a href="#7.24.2.1">7.24.2.1</a>, <a href="#7.24.2.2">7.24.2.2</a>                                  classification functions, <a href="#7.25.2.1">7.25.2.1</a>
25097  wcrtomb function, <a href="#7.19.3">7.19.3</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>,                      extensible, <a href="#7.25.2.2">7.25.2.2</a>
25098      <a href="#7.24.6.3.3">7.24.6.3.3</a>, <a href="#7.24.6.4.2">7.24.6.4.2</a>                                      constant, <a href="#6.4.4.4">6.4.4.4</a>
25099  wcscat function, <a href="#7.24.4.3.1">7.24.4.3.1</a>                                     formatted input/output functions, <a href="#7.24.2">7.24.2</a>
25100  wcschr function, <a href="#7.24.4.5.1">7.24.4.5.1</a>                                     input functions, <a href="#7.19.1">7.19.1</a>
25101  wcscmp function, <a href="#7.24.4.4.1">7.24.4.4.1</a>, <a href="#7.24.4.4.4">7.24.4.4.4</a>                         input/output functions, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.3">7.24.3</a>
25102  wcscoll function, <a href="#7.24.4.4.2">7.24.4.4.2</a>, <a href="#7.24.4.4.4">7.24.4.4.4</a>                        output functions, <a href="#7.19.1">7.19.1</a>
25103  wcscpy function, <a href="#7.24.4.2.1">7.24.4.2.1</a>                                     single-byte conversion functions, <a href="#7.24.6.1">7.24.6.1</a>
25104  wcscspn function, <a href="#7.24.4.5.2">7.24.4.5.2</a>                                  wide string, <a href="#7.1.1">7.1.1</a>
25105  wcsftime function, <a href="#7.11.1.1">7.11.1.1</a>, <a href="#7.24.5.1">7.24.5.1</a>                         wide string comparison functions, <a href="#7.24.4.4">7.24.4.4</a>
25106  wcslen function, <a href="#7.24.4.6.1">7.24.4.6.1</a>                                   wide string concatenation functions, <a href="#7.24.4.3">7.24.4.3</a>
25107  wcsncat function, <a href="#7.24.4.3.2">7.24.4.3.2</a>                                  wide string copying functions, <a href="#7.24.4.2">7.24.4.2</a>
25108  wcsncmp function, <a href="#7.24.4.4.3">7.24.4.4.3</a>                                  wide string literal, see string literal
25109  wcsncpy function, <a href="#7.24.4.2.2">7.24.4.2.2</a>                                  wide string miscellaneous functions, <a href="#7.24.4.6">7.24.4.6</a>
25110  wcspbrk function, <a href="#7.24.4.5.3">7.24.4.5.3</a>                                  wide string numeric conversion functions, <a href="#7.8.2.4">7.8.2.4</a>,
25111  wcsrchr function, <a href="#7.24.4.5.4">7.24.4.5.4</a>                                       <a href="#7.24.4.1">7.24.4.1</a>
25112  wcsrtombs function, <a href="#7.24.6.4.2">7.24.6.4.2</a>                                wide string search functions, <a href="#7.24.4.5">7.24.4.5</a>
25113  wcsspn function, <a href="#7.24.4.5.5">7.24.4.5.5</a>                                   wide-oriented stream, <a href="#7.19.2">7.19.2</a>
25114  wcsstr function, <a href="#7.24.4.5.6">7.24.4.5.6</a>                                   width, <a href="#6.2.6.2">6.2.6.2</a>
25115  wcstod function, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>                           WINT_MAX macro, <a href="#7.18.3">7.18.3</a>
25116  wcstod function, <a href="#7.24.4.1.1">7.24.4.1.1</a>                                   WINT_MIN macro, <a href="#7.18.3">7.18.3</a>
25117  wcstof function, <a href="#7.24.4.1.1">7.24.4.1.1</a>                                   wint_t type, <a href="#7.18.3">7.18.3</a>, <a href="#7.19.6.1">7.19.6.1</a>, <a href="#7.24.1">7.24.1</a>, <a href="#7.24.2.1">7.24.2.1</a>,
25118  wcstoimax function, <a href="#7.8.2.4">7.8.2.4</a>                                        <a href="#7.25.1">7.25.1</a>
25119  wcstok function, <a href="#7.24.4.5.7">7.24.4.5.7</a>                                   wmemchr function, <a href="#7.24.4.5.8">7.24.4.5.8</a>
25120  wcstol function, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>,                 wmemcmp function, <a href="#7.24.4.4.5">7.24.4.4.5</a>
25121      <a href="#7.24.4.1.2">7.24.4.1.2</a>                                                wmemcpy function, <a href="#7.24.4.2.3">7.24.4.2.3</a>
25122  wcstold function, <a href="#7.24.4.1.1">7.24.4.1.1</a>                                  wmemmove function, <a href="#7.24.4.2.4">7.24.4.2.4</a>
25123  wcstoll function, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>                         wmemset function, <a href="#7.24.4.6.2">7.24.4.6.2</a>
25124  wcstombs function, <a href="#7.20.8.2">7.20.8.2</a>, <a href="#7.24.6.4">7.24.6.4</a>                         wprintf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.9">7.24.2.9</a>, <a href="#7.24.2.11">7.24.2.11</a>
25125  wcstoul function, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.19.6.2">7.19.6.2</a>, <a href="#7.24.2.2">7.24.2.2</a>,                wscanf function, <a href="#7.19.1">7.19.1</a>, <a href="#7.24.2.10">7.24.2.10</a>, <a href="#7.24.2.12">7.24.2.12</a>,
25126      <a href="#7.24.4.1.2">7.24.4.1.2</a>                                                     <a href="#7.24.3.10">7.24.3.10</a>
25127  wcstoull function, <a href="#7.8.2.4">7.8.2.4</a>, <a href="#7.24.4.1.2">7.24.4.1.2</a>
25128  wcstoumax function, <a href="#7.8.2.4">7.8.2.4</a>                                   xor macro, <a href="#7.9">7.9</a>
25129  wcsxfrm function, <a href="#7.24.4.4.4">7.24.4.4.4</a>                                  xor_eq macro, <a href="#7.9">7.9</a>
25130  wctob function, <a href="#7.24.6.1.2">7.24.6.1.2</a>, <a href="#7.25.2.1">7.25.2.1</a>
25131  wctomb function, <a href="#7.20.7.3">7.20.7.3</a>, <a href="#7.20.8.2">7.20.8.2</a>, <a href="#7.24.6.3">7.24.6.3</a>
25132  wctrans function, <a href="#7.25.3.2.1">7.25.3.2.1</a>, <a href="#7.25.3.2.2">7.25.3.2.2</a>
25133  wctrans_t type, <a href="#7.25.1">7.25.1</a>, <a href="#7.25.3.2.2">7.25.3.2.2</a>
25134  wctype function, <a href="#7.25.2.2.1">7.25.2.2.1</a>, <a href="#7.25.2.2.2">7.25.2.2.2</a>
25135 </pre>
25136 </body></html>