共计550页,目录如下:
ContentsForeword ............................. xiIntroduction ............................ xiv1. Scope ............................. 12. Normative references ....................... 23. Terms, definitions, and symbols ................... 34. Conformance .......................... 75. Environment .......................... 95.1 Conceptual models ..................... 95.1.1 Translation environment ................ 95.1.2 Execution environments ................ 115.2 Environmental considerations ................. 175.2.1 Character sets .................... 175.2.2 Character display semantics .............. 195.2.3 Signals and interrupts ................. 205.2.4 Environmental limits ................. 206. Language ............................ 296.1 Notation .......................... 296.2 Concepts ......................... 296.2.1 Scopes of identifiers ................. 296.2.2 Linkages of identifiers ................. 306.2.3 Name spaces of identifiers ............... 316.2.4 Storage durations of objects .............. 326.2.5 Types ....................... 336.2.6 Representations of types ................ 376.2.7 Compatible type and composite type ........... 406.3 Conversions ........................ 426.3.1 Arithmetic operands ................. 426.3.2 Other operands ................... 466.4 Lexical elements ...................... 496.4.1 Keywords ...................... 506.4.2 Identifiers ...................... 516.4.3 Universal character names ............... 536.4.4 Constants ...................... 546.4.5 String literals .................... 626.4.6 Punctuators ..................... 636.4.7 Header names .................... 646.4.8 Preprocessing numbers ................ 656.4.9 Comments ..................... 666.5 Expressions ........................ 67Contents iiiISO/IEC 9899:1999 (E) ©ISO/IEC6.5.1 Primary expressions ................. 696.5.2 Postfix operators ................... 696.5.3 Unary operators ................... 786.5.4 Cast operators .................... 816.5.5 Multiplicative operators ................ 826.5.6 Additive operators .................. 826.5.7 Bitwise shift operators ................. 846.5.8 Relational operators .................. 856.5.9 Equality operators .................. 866.5.10 Bitwise AND operator ................. 876.5.11 Bitwise exclusive OR operator ............. 886.5.12 Bitwise inclusive OR operator .............. 886.5.13 Logical AND operator ................. 896.5.14 Logical OR operator ................. 896.5.15 Conditional operator ................. 906.5.16 Assignment operators ................. 916.5.17 Comma operator ................... 946.6 Constant expressions ..................... 956.7 Declarations ........................ 976.7.1 Storage-class specifiers ................ 986.7.2 Type specifiers .................... 996.7.3 Type qualifiers .................... 1086.7.4 Function specifiers .................. 1126.7.5 Declarators ..................... 1146.7.6 Type names ..................... 1226.7.7 Type definitions ................... 1236.7.8 Initialization .................... 1256.8 Statements and blocks .................... 1316.8.1 Labeled statements .................. 1316.8.2 Compound statement ................. 1326.8.3 Expression and null statements ............. 1326.8.4 Selection statements ................. 1336.8.5 Iteration statements .................. 1356.8.6 Jump statements ................... 1366.9 External definitions ..................... 1406.9.1 Function definitions .................. 1416.9.2 External object definitions ............... 1436.10 Preprocessing directives ................... 1456.10.1 Conditional inclusion ................. 1476.10.2 Source file inclusion ................. 1496.10.3 Macro replacement .................. 1516.10.4 Line control ..................... 1586.10.5 Error directive .................... 1596.10.6 Pragma directive ................... 159iv Contents©ISO/IEC ISO/IEC 9899:1999 (E)6.10.7 Null directive .................... 1606.10.8 Predefined macro names ................ 1606.10.9 Pragma operator ................... 1616.11 Future language directions .................. 1636.11.1 Floating types .................... 1636.11.2 Linkages of identifiers ................. 1636.11.3 External names ................... 1636.11.4 Character escape sequences .............. 1636.11.5 Storage-class specifiers ................ 1636.11.6 Function declarators ................. 1636.11.7 Function definitions .................. 1636.11.8 Pragma directives .................. 1636.11.9 Predefined macro names ................ 1637. Library ............................. 1647.1 Introduction ........................ 1647.1.1 Definitions of terms .................. 1647.1.2 Standard headers ................... 1657.1.3 Reserved identifiers .................. 1667.1.4 Use of library functions ................ 1667.2 Diagnostics <assert.h> .................. 1697.2.1 Program diagnostics ................. 1697.3 Complex arithmetic <complex.h> .............. 1707.3.1 Introduction ..................... 1707.3.2 Conventions ..................... 1717.3.3 Branch cuts ..................... 1717.3.4 The CX_LIMITED_RANGE pragma ........... 1717.3.5 Trigonometric functions ................ 1727.3.6 Hyperbolic functions ................. 1747.3.7 Exponential and logarithmic functions .......... 1767.3.8 Power and absolute-value functions ........... 1777.3.9 Manipulation functions ................ 1787.4 Character handling <ctype.h> ................ 1817.4.1 Character classification functions ............ 1817.4.2 Character case mapping functions ............ 1847.5 Errors <errno.h> ..................... 1867.6 Floating-point environment <fenv.h> ............. 1877.6.1 The FENV_ACCESS pragma .............. 1897.6.2 Floating-point exceptions ............... 1907.6.3 Rounding ...................... 1927.6.4 Environment .................... 1947.7 Characteristics of floating types <float.h> ........... 1967.8 Format conversion of integer types <inttypes.h> ........ 1977.8.1 Macros for format specifiers .............. 1977.8.2 Functions for greatest-width integer types ......... 198Contents vISO/IEC 9899:1999 (E) ©ISO/IEC7.9 Alternative spellings <iso646.h> ............... 2017.10 Sizes of integer types <limits.h> .............. 2027.11 Localization <locale.h> .................. 2037.11.1 Locale control .................... 2047.11.2 Numeric formatting convention inquiry .......... 2057.12 Mathematics <math.h> ................... 2117.12.1 Treatment of error conditions .............. 2137.12.2 The FP_CONTRACT pragma .............. 2147.12.3 Classification macros ................. 2157.12.4 Trigonometric functions ................ 2177.12.5 Hyperbolic functions ................. 2207.12.6 Exponential and logarithmic functions .......... 2227.12.7 Power and absolute-value functions ........... 2277.12.8 Error and gamma functions ............... 2297.12.9 Nearest integer functions ................ 2307.12.10 Remainder functions ................. 2347.12.11 Manipulation functions ................ 2357.12.12 Maximum, minimum, and positive difference functions ... 2377.12.13 Floating multiply-add ................. 2387.12.14 Comparison macros .................. 2397.13 Nonlocal jumps <setjmp.h> ................ 2427.13.1 Save calling environment ............... 2427.13.2 Restore calling environment .............. 2437.14 Signal handling <signal.h> ................. 2457.14.1 Specify signal handling ................ 2467.14.2 Send signal ..................... 2477.15 Variable arguments <stdarg.h> ............... 2487.15.1 Variable argument list access macros ........... 2487.16 Boolean type and values <stdbool.h> ............ 2527.17 Common definitions <stddef.h> ............... 2537.18 Integer types <stdint.h> .................. 2547.18.1 Integer types .................... 2547.18.2 Limits of specified-width integer types .......... 2567.18.3 Limits of other integer types .............. 2587.18.4 Macros for integer constants .............. 2597.19 Input/output <stdio.h> .................. 2617.19.1 Introduction ..................... 2617.19.2 Streams ...................... 2637.19.3 Files ........................ 2657.19.4 Operations on files .................. 2677.19.5 File access functions ................. 2697.19.6 Formatted input/output functions ............ 2737.19.7 Character input/output functions ............. 2947.19.8 Direct input/output functions .............. 299vi Contents©ISO/IEC ISO/IEC 9899:1999 (E)7.19.9 File positioning functions ............... 3007.19.10 Error-handling functions ................ 3037.20 General utilities <stdlib.h> ................ 3057.20.1 Numeric conversion functions .............. 3067.20.2 Pseudo-random sequence generation functions ....... 3117.20.3 Memory management functions ............. 3127.20.4 Communication with the environment .......... 3147.20.5 Searching and sorting utilities .............. 3177.20.6 Integer arithmetic functions .............. 3197.20.7 Multibyte/wide character conversion functions ....... 3207.20.8 Multibyte/wide string conversion functions ........ 3227.21 String handling <string.h> ................. 3247.21.1 String function conventions ............... 3247.21.2 Copying functions .................. 3247.21.3 Concatenation functions ................ 3267.21.4 Comparison functions ................. 3277.21.5 Search functions ................... 3297.21.6 Miscellaneous functions ................ 3327.22 Type-generic math <tgmath.h> ............... 3347.23 Date and time <time.h> .................. 3377.23.1 Components of time ................. 3377.23.2 Time manipulation functions .............. 3387.23.3 Time conversion functions ............... 3407.24 Extended multibyte and wide character utilities <wchar.h> ..... 3477.24.1 Introduction ..................... 3477.24.2 Formatted wide character input/output functions ...... 3487.24.3 Wide character input/output functions .......... 3667.24.4 General wide string utilities .............. 3707.24.5 Wide character time conversion functions ......... 3847.24.6 Extended multibyte/wide character conversion utilities .... 3857.25 Wide character classification and mapping utilities <wctype.h> ... 3927.25.1 Introduction ..................... 3927.25.2 Wide character classification utilities ........... 3937.25.3 Wide character case mapping utilities ........... 3987.26 Future library directions ................... 4007.26.1 Complex arithmetic <complex.h> ........... 4007.26.2 Character handling <ctype.h> ............ 4007.26.3 Errors <errno.h> ................. 4007.26.4 Format conversion of integer types <inttypes.h> .... 4007.26.5 Localization <locale.h> .............. 4007.26.6 Signal handling <signal.h> ............. 4007.26.7 Boolean type and values <stdbool.h> ......... 4007.26.8 Integer types <stdint.h> .............. 4007.26.9 Input/output <stdio.h> ............... 401Contents viiISO/IEC 9899:1999 (E) ©ISO/IEC7.26.10 General utilities <stdlib.h> ............. 4017.26.11 String handling <string.h> ............. 4017.26.12 Extended multibyte and wide character utilities<wchar.h> .................... 4017.26.13 Wide character classification and mapping utilities<wctype.h> .................... 401Annex A (informative) Language syntax summary ............ 402A.1 Lexical grammar ...................... 402A.2 Phrase structure grammar ................... 408A.3 Preprocessing directives ................... 415Annex B (informative) Library summary ................ 417B.1 Diagnostics <assert.h> .................. 417B.2 Complex <complex.h> ................... 417B.3 Character handling <ctype.h> ................ 419B.4 Errors <errno.h> ..................... 419B.5 Floating-point environment <fenv.h> ............. 419B.6 Characteristics of floating types <float.h> ........... 420B.7 Format conversion of integer types <inttypes.h> ........ 420B.8 Alternative spellings <iso646.h> ............... 421B.9 Sizes of integer types <limits.h> .............. 421B.10 Localization <locale.h> .................. 421B.11 Mathematics <math.h> ................... 421B.12 Nonlocal jumps <setjmp.h> ................ 426B.13 Signal handling <signal.h> ................. 426B.14 Variable arguments <stdarg.h> ............... 426B.15 Boolean type and values <stdbool.h> ............ 426B.16 Common definitions <stddef.h> ............... 427B.17 Integer types <stdint.h> .................. 427B.18 Input/output <stdio.h> .................. 427B.19 General utilities <stdlib.h> ................ 429B.20 String handling <string.h> ................. 431B.21 Type-generic math <tgmath.h> ............... 432B.22 Date and time <time.h> .................. 432B.23 Extended multibyte/wide character utilities <wchar.h> ...... 433B.24 Wide character classification and mapping utilities <wctype.h> ... 435Annex C (informative) Sequence points ................. 437Annex D (normative) Universal character names for identifiers ....... 438Annex E (informative) Implementation limits .............. 440Annex F (normative) IEC 60559 floating-point arithmetic .......... 442F.1 Introduction ........................ 442F.2 Types ........................... 442F.3 Operators and functions ................... 443viii Contents©ISO/IEC ISO/IEC 9899:1999 (E)F.4 Floating to integer conversion ................. 445F.5 Binary-decimal conversion .................. 445F.6 Contracted expressions .................... 446F.7 Floating-point environment .................. 446F.8 Optimization ........................ 449F.9 Mathematics <math.h> ................... 452Annex G (informative) IEC 60559-compatible complex arithmetic ...... 465G.1 Introduction ........................ 465G.2 Types ........................... 465G.3 Conventions ........................ 465G.4 Conversions ........................ 466G.5 Binary operators ...................... 466G.6 Complex arithmetic <complex.h> .............. 470G.7 Type-generic math <tgmath.h> ............... 478Annex H (informative) Language independent arithmetic .......... 479H.1 Introduction ........................ 479H.2 Types ........................... 479H.3 Notification ........................ 483Annex I (informative) Common warnings ................ 485Annex J (informative) Portability issues ................. 487J.1 Unspecified behavior ..................... 487J.2 Undefined behavior ..................... 490J.3 Implementation-defined behavior ................ 503J.4 Locale-specific behavior ................... 510J.5 Common extensions ..................... 511Bibliography ........................... 514Index .............................. 517
评论