Transcription of Rationale for International Standard ... - open-std.org
1 Rationale for International Standard . Programming Languages . C. Revision April-2003. UNIX is a trademark of The Open Group. POSIX is a trademark of IEEE. Contents 0. Introduction ..1. Organization of the document ..5. 1. Scope ..7. 2. Normative References ..9. 5 3. Terms and 4. Conformance ..13. 5. Environment ..15. Conceptual Translation 10 Execution environments ..17. Environmental considerations ..19. Character Character display semantics ..23. Signals and interrupts ..24. 15 Environmental limits ..24. 6. Language ..31.
2 Concepts ..31. Scopes of identifiers ..31. Linkages of identifiers ..32. 20 Name spaces of Storage durations of Representations of types ..43. Compatible type and composite 25 Conversions ..44. Arithmetic Complex types ..46. Real and complex ..46. Other 30 Lexical Elements ..49. Universal character 35 String Punctuators ..57. Header Preprocessing numbers ..57. Comments ..58. 40 Expressions ..58. Primary Postfix operators ..61. Unary operators ..64. Cast operators ..66. ii Contents Multiplicative Additive operators ..67. Bitwise shift operators.
3 68. Relational operators ..69. 5 Equality Conditional operator ..69. Assignment operators ..69. Comma operator ..71. Constant expressions ..71. 10 Declarations ..72. Storage-class Type Type qualifiers ..75. Function 15 Type Type definitions ..87. Statements and 20 Labeled Compound statement ..92. Expression and null Selection Iteration 25 Jump External Function definitions ..95. External object Preprocessing directives ..97. 30 Conditional Source file inclusion ..98. Macro replacement ..99. Line Error 35 Pragma directive.
4 105. Null directive ..105. Predefined macro Pragma Future language 40 Floating Linkages of identifiers ..107. External Character escape Storage-class 45 Function Function definitions ..108. Pragma Predefined macro iii Contents 7. Definitions of terms ..111. Standard 5 Reserved identifiers ..112. Use of library functions ..112. Diagnostics < > ..113. Program Complex arithmetic < > ..114. 10 Trigonometric functions ..115. Hyperbolic functions ..116. Exponential and logarithmic Power and absolute-value functions ..117. Manipulation 15 Character handling < >.
5 118. Character classification Character case mapping functions ..119. Errors < >..119. Floating-point environment < > ..120. 20 The FENV_ACCESS Floating-point exceptions ..122. Environment ..123. Characteristics of floating types < >..123. 25 Format conversion of integer types < >..124. Alternate spellings < > ..124. Sizes of integer types < > ..125. Localization < > ..125. Locale control ..127. 30 Numeric formatting convention inquiry ..127. Mathematics < > ..127. Treatment of error conditions ..128. The FP_CONTRACT Classification 35 Trigonometric functions.
6 131. Exponential and logarithmic Power and absolute-value functions ..134. Error and gamma functions ..134. Nearest integer functions ..135. 40 Remainder Manipulation Maximum, minimum, and positive difference Floating multiply-add ..138. Comparison macros ..138. 45 Nonlocal jumps < >..139. Save calling environment ..139. iv Contents Restore calling environment ..140. Signal handling < > ..140. Specify signal Send 5 Variable arguments < >..141. Variable argument list access Boolean type and values < >..143. Common definitions < >.
7 143. Integer types < >..144. 10 Integer Input/output < > ..145. Streams ..146. 15 Operations on File access functions ..149. Formatted input/output functions ..151. Character input/output functions ..155. Direct input/output 20 File positioning functions ..157. Error-handling General Utilities < >..158. Numeric conversion Pseudo-random sequence generation 25 Memory management functions ..160. Communication with the environment ..162. Searching and sorting utilities ..164. Integer arithmetic Multibyte/wide character conversion 30 Multibyte/wide string conversion functions.
8 165. String handling < >..165. String function Copying Concatenation functions ..166. 35 Comparison Search Miscellaneous functions ..167. Type-generic math < > ..167. Date and time < >..169. 40 Components of Time manipulation Time conversion functions ..171. Extended multibyte and wide character utilities < > ..171. Wide character classification and mapping utilities < > ..171. 45 Future library directions ..172. 8. Annexes ..173. v Contents Annex D Universal character names for identifiers (normative) ..175. Annex F IEC 60559 floating-point arithmetic (normative).
9 177. Binary-decimal 5 Environment ..179. Constant expressions ..179. Mathematics < > ..179. Trigonometric functions ..181. 10 Power and absolute value functions ..182. Maximum, minimum, and positive difference Annex G IEC 60559-compatible complex arithmetic (informative) ..183. Binary 15 Multiplicative Complex arithmetic < > ..184. Hyperbolic Exponential and logarithmic functions ..187. Power and absolute-value functions ..187. 20 Type-generic math < > ..187. Annex H Language independent arithmetic (informative) ..189. MSE.
10 Multibyte Support Extensions MSE Programming model based on wide characters ..193. 25 Parallelism versus improvement ..193. Support for invariant ISO/IEC 646 ..197. Headers ..197. < >..197. < > ..199. 30 Wide-character classification Locale dependency of iswxxx Changed space character handling ..199. Extensible classification and mapping Generalized multibyte 35 Streams and files ..201. Conversion state ..201. Byte versus wide-character input/output ..203. Text versus binary 40 Formatted input/output Enhancing existing formatted input/output functions.