ANSI INCITS ISO IEC 9899-2011 Information technology - Programming languages - C.pdf

上传人:Iclinic170 文档编号:436593 上传时间:2018-11-14 格式:PDF 页数:702 大小:1.68MB
下载 相关 举报
ANSI INCITS ISO IEC 9899-2011 Information technology - Programming languages - C.pdf_第1页
第1页 / 共702页
ANSI INCITS ISO IEC 9899-2011 Information technology - Programming languages - C.pdf_第2页
第2页 / 共702页
ANSI INCITS ISO IEC 9899-2011 Information technology - Programming languages - C.pdf_第3页
第3页 / 共702页
ANSI INCITS ISO IEC 9899-2011 Information technology - Programming languages - C.pdf_第4页
第4页 / 共702页
ANSI INCITS ISO IEC 9899-2011 Information technology - Programming languages - C.pdf_第5页
第5页 / 共702页
亲,该文档总共702页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、 INCITS/ISO/IEC 9899-20112012 (ISO/IEC 9899-2011, IDT) Information technology Programming languages C INCITS/ISO/IEC 9899-20112012 PDF disclaimer This PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but shall not be edited unles

2、s the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark

3、of Adobe Systems Incorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In

4、the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below. Adopted by INCITS (InterNational Committee for Information Technology Standards) as an American National Standard. Date of ANSI Approval: 5/23/2012 Published by American Natio

5、nal Standards Institute, 25 West 43rd Street, New York, New York 10036 Copyright 2012 by Information Technology Industry Council (ITI). All rights reserved. These materials are subject to copyright claims of International Standardization Organization (ISO), International Electrotechnical Commission

6、(IEC), American National Standards Institute (ANSI), and Information Technology Industry Council (ITI). Not for resale. No part of this publication may be reproduced in any form, including an electronic retrieval system, without the prior written permission of ITI. All requests pertaining to this st

7、andard should be submitted to ITI, 1250 Eye Street NW, Washington, DC 20005. Printed in the United States of America ii ITIC 2012 All rights reserved ISO/IEC 2011 All rights reserved ISO/IEC 9899:2011 (E)ContentsForeword . xiiiIntroduction xvii1. Scope . 12. Normative references . 23. Terms, definit

8、ions, and symbols . 34. Conformance 85. Environment 105.1 Conceptual models . 105.1.1 Translation environment 105.1.2 Execution environments 125.2 Environmental considerations . 225.2.1 Character sets 225.2.2 Character display semantics 245.2.3 Signals and interrupts . 255.2.4 Environmental limits .

9、 256. Language 356.1 Notation 356.2 Concepts . 356.2.1 Scopes of identifiers . 356.2.2 Linkages of identifiers . 366.2.3 Name spaces of identifiers . 376.2.4 Storage durations of objects 386.2.5 Types . 396.2.6 Representations of types 446.2.7 Compatible type and composite type . 476.2.8 Alignment o

10、f objects . 486.3 Conversions 506.3.1 Arithmetic operands . 506.3.2 Other operands . 546.4 Lexical elements 576.4.1 Keywords 586.4.2 Identifiers 596.4.3 Universal character names . 616.4.4 Constants 626.4.5 String literals 706.4.6 Punctuators . 726.4.7 Header names 736.4.8 Preprocessing numbers 746.

11、4.9 Comments . 75Contents iiiISO/IEC 9899:2011 (E) ISO/IEC 2011 All rights reserved6.5 Expressions 766.5.1 Primary expressions . 786.5.2 Postfix operators . 796.5.3 Unary operators . 886.5.4 Cast operators 916.5.5 Multiplicative operators 926.5.6 Additive operators 926.5.7 Bitwise shift operators .

12、946.5.8 Relational operators 956.5.9 Equality operators 966.5.10 Bitwise AND operator . 976.5.11 Bitwise exclusive OR operator . 986.5.12 Bitwise inclusive OR operator 986.5.13 Logical AND operator . 996.5.14 Logical OR operator . 996.5.15 Conditional operator .1006.5.16 Assignment operators .1016.5

13、.17 Comma operator .1056.6 Constant expressions .1066.7 Declarations 1086.7.1 Storage-class specifiers 1096.7.2 Type specifiers 1116.7.3 Type qualifiers 1216.7.4 Function specifiers 1256.7.5 Alignment specifier 1276.7.6 Declarators .1286.7.7 Type names .1366.7.8 Type definitions .1376.7.9 Initializa

14、tion 1396.7.10 Static assertions .1456.8 Statements and blocks 1466.8.1 Labeled statements 1466.8.2 Compound statement .1476.8.3 Expression and null statements .1476.8.4 Selection statements .1486.8.5 Iteration statements 1506.8.6 Jump statements .1516.9 External definitions .1556.9.1 Function defin

15、itions 1566.9.2 External object definitions .1586.10 Preprocessing directives .1606.10.1 Conditional inclusion .1626.10.2 Source file inclusion .1646.10.3 Macro replacement 166iv Contents ISO/IEC 2011 All rights reserved ISO/IEC 9899:2011 (E)6.10.4 Line control .1736.10.5 Error directive 1746.10.6 P

16、ragma directive .1746.10.7 Null directive 1756.10.8 Predefined macro names 1756.10.9 Pragma operator .1786.11 Future language directions 1796.11.1 Floating types 1796.11.2 Linkages of identifiers .1796.11.3 External names .1796.11.4 Character escape sequences 1796.11.5 Storage-class specifiers 1796.

17、11.6 Function declarators .1796.11.7 Function definitions 1796.11.8 Pragma directives 1796.11.9 Predefined macro names 1797. Library .1807.1 Introduction 1807.1.1 Definitions of terms 1807.1.2 Standard headers .1817.1.3 Reserved identifiers 1827.1.4 Use of library functions 1837.2 Diagnostics 1867.2

18、.1 Program diagnostics .1867.3 Complex arithmetic 1887.3.1 Introduction .1887.3.2 Conventions .1897.3.3 Branch cuts .1897.3.4 The CX_LIMITED_RANGE pragma .1897.3.5 Trigonometric functions 1907.3.6 Hyperbolic functions .1927.3.7 Exponential and logarithmic functions 1947.3.8 Power and absolute-value

19、functions .1957.3.9 Manipulation functions 1967.4 Character handling 2007.4.1 Character classification functions 2007.4.2 Character case mapping functions 2037.5 Errors .2057.6 Floating-point environment .2067.6.1 The FENV_ACCESS pragma 2087.6.2 Floating-point exceptions .2097.6.3 Rounding 2127.6.4

20、Environment 2137.7 Characteristics of floating types .216Contents vISO/IEC 9899:2011 (E) ISO/IEC 2011 All rights reserved7.8 Format conversion of integer types 2177.8.1 Macros for format specifiers 2177.8.2 Functions for greatest-width integer types .2187.9 Alternative spellings .2217.10 Sizes of in

21、teger types 2227.11 Localization 2237.11.1 Locale control 2247.11.2 Numeric formatting convention inquiry 2257.12 Mathematics .2317.12.1 Treatment of error conditions 2337.12.2 The FP_CONTRACT pragma 2357.12.3 Classification macros .2357.12.4 Trigonometric functions 2387.12.5 Hyperbolic functions .2

22、407.12.6 Exponential and logarithmic functions 2427.12.7 Power and absolute-value functions .2477.12.8 Error and gamma functions .2497.12.9 Nearest integer functions 2517.12.10 Remainder functions .2547.12.11 Manipulation functions 2557.12.12 Maximum, minimum, and positive difference functions .2577

23、.12.13 Floating multiply-add .2587.12.14 Comparison macros 2597.13 Nonlocal jumps 2627.13.1 Save calling environment .2627.13.2 Restore calling environment 2637.14 Signal handling .2657.14.1 Specify signal handling 2667.14.2 Send signal .2677.15 Alignment .2687.16 Variable arguments .2697.16.1 Varia

24、ble argument list access macros .2697.17 Atomics 2737.17.1 Introduction .2737.17.2 Initialization 2747.17.3 Order and consistency .2757.17.4 Fences .2787.17.5 Lock-free property 2797.17.6 Atomic integer types .2807.17.7 Operations on atomic types .2827.17.8 Atomic flag type and operations .2857.18 B

25、oolean type and values 2877.19 Common definitions .2887.20 Integer types 289vi Contents ISO/IEC 2011 All rights reserved ISO/IEC 9899:2011 (E)7.20.1 Integer types 2897.20.2 Limits of specified-width integer types 2917.20.3 Limits of other integer types 2937.20.4 Macros for integer constants 2947.21

26、Input/output 2967.21.1 Introduction .2967.21.2 Streams 2987.21.3 Files 3007.21.4 Operations on files 3027.21.5 File access functions .3047.21.6 Formatted input/output functions 3097.21.7 Character input/output functions .3307.21.8 Direct input/output functions 3357.21.9 File positioning functions .3

27、367.21.10 Error-handling functions 3387.22 General utilities 3407.22.1 Numeric conversion functions 3417.22.2 Pseudo-random sequence generation functions .3467.22.3 Memory management functions .3477.22.4 Communication with the environment 3507.22.5 Searching and sorting utilities 3547.22.6 Integer a

28、rithmetic functions 3567.22.7 Multibyte/wide character conversion functions .3577.22.8 Multibyte/wide string conversion functions 3597.23 _Noreturn 3617.24 String handling .3627.24.1 String function conventions .3627.24.2 Copying functions 3627.24.3 Concatenation functions 3647.24.4 Comparison funct

29、ions .3657.24.5 Search functions .3677.24.6 Miscellaneous functions 3717.25 Type-generic math .3737.26 Threads .3767.26.1 Introduction .3767.26.2 Initialization functions .3787.26.3 Condition variable functions 3787.26.4 Mutex functions .3807.26.5 Thread functions .3837.26.6 Thread-specific storage

30、functions 3867.27 Date and time 3887.27.1 Components of time .3887.27.2 Time manipulation functions 3897.27.3 Time conversion functions .392Contents viiISO/IEC 9899:2011 (E) ISO/IEC 2011 All rights reserved7.28 Unicode utilities .3987.28.1 Restartable multibyte/wide character conversion functions 39

31、87.29 Extended multibyte and wide character utilities .4027.29.1 Introduction .4027.29.2 Formatted wide character input/output functions 4037.29.3 Wide character input/output functions 4217.29.4 General wide string utilities 4267.29.4.1 Wide string numeric conversion functions .4267.29.4.2 Wide stri

32、ng copying functions 4307.29.4.3 Wide string concatenation functions .4327.29.4.4 Wide string comparison functions 4337.29.4.5 Wide string search functions 4357.29.4.6 Miscellaneous functions 4397.29.5 Wide character time conversion functions .4397.29.6 Extended multibyte/wide character conversion u

33、tilities 4407.29.6.1 Single-byte/wide character conversion functions .4417.29.6.2 Conversion state functions .4417.29.6.3 Restartable multibyte/wide character conversionfunctions 4427.29.6.4 Restartable multibyte/wide string conversionfunctions 4447.30 Wide character classification and mapping utili

34、ties .4477.30.1 Introduction .4477.30.2 Wide character classification utilities .4487.30.2.1 Wide character classification functions 4487.30.2.2 Extensible wide character classificationfunctions 4517.30.3 Wide character case mapping utilities .4537.30.3.1 Wide character case mapping functions 4537.3

35、0.3.2 Extensible wide character case mappingfunctions 4537.31 Future library directions .4557.31.1 Complex arithmetic .4557.31.2 Character handling 4557.31.3 Errors .4557.31.4 Floating-point environment 4557.31.5 Format conversion of integer types 4557.31.6 Localization 4557.31.7 Signal handling .45

36、57.31.8 Atomics 4557.31.9 Boolean type and values .4567.31.10 Integer types 4567.31.11 Input/output .4567.31.12 General utilities .456viii Contents ISO/IEC 2011 All rights reserved ISO/IEC 9899:2011 (E)7.31.13 String handling .4567.31.14 Date and time .4567.31.15 Threads 4567.31.16 Extended multibyt

37、e and wide character utilities4567.31.17 Wide character classification and mapping utilities457Annex A (informative) Language syntax summary 458A.1 Lexical grammar 458A.2 Phrase structure grammar .465A.3 Preprocessing directives .473Annex B (informative) Library summary 475B.1 Diagnostics 475B.2 Com

38、plex .475B.3 Character handling 477B.4 Errors .477B.5 Floating-point environment .477B.6 Characteristics of floating types .478B.7 Format conversion of integer types 478B.8 Alternative spellings .479B.9 Sizes of integer types 479B.10 Localization 479B.11 Mathematics .479B.12 Nonlocal jumps 484B.13 S

39、ignal handling .484B.14 Alignment .485B.15 Variable arguments .485B.16 Atomics 485B.17 Boolean type and values 487B.18 Common definitions .487B.19 Integer types 487B.20 Input/output 488B.21 General utilities 491B.22 _Noreturn 493B.23 String handling .493B.24 Type-generic math .495B.25 Threads .495B.

40、26 Date and time 496B.27 Unicode utilities .497B.28 Extended multibyte/wide character utilities 497B.29 Wide character classification and mapping utilities .502Annex C (informative) Sequence points .503Contents ixISO/IEC 9899:2011 (E) ISO/IEC 2011 All rights reservedAnnex D (normative) Universal cha

41、racter names for identifiers .504D.1 Ranges of characters allowed .504D.2 Ranges of characters disallowed initially .504Annex E (informative) Implementation limits 505Annex F (normative) IEC 60559 floating-point arithmetic 507F.1 Introduction 507F.2 Types .507F.3 Operators and functions .508F.4 Floa

42、ting to integer conversion .510F.5 Binary-decimal conversion 510F.6 The return statement 511F.7 Contracted expressions 511F.8 Floating-point environment 511F.9 Optimization 514F.10 Mathematics .517F.10.1 Trigonometric functions 518F.10.2 Hyperbolic functions .520F.10.3 Exponential and logarithmic fu

43、nctions 520F.10.4 Power and absolute value functions .524F.10.5 Error and gamma functions .525F.10.6 Nearest integer functions 526F.10.7 Remainder functions .528F.10.8 Manipulation functions 529F.10.9 Maximum, minimum, and positive difference functions .530F.10.10 Floating multiply-add .530F.10.11 C

44、omparison macros 531Annex G (normative) IEC 60559-compatible complex arithmetic .532G.1 Introduction 532G.2 Types .532G.3 Conventions 532G.4 Conversions 533G.4.1 Imaginary types .533G.4.2 Real and imaginary 533G.4.3 Imaginary and complex 533G.5 Binary operators 533G.5.1 Multiplicative operators 534G

45、.5.2 Additive operators 537G.6 Complex arithmetic 537G.6.1 Trigonometric functions 539G.6.2 Hyperbolic functions .539G.6.3 Exponential and logarithmic functions 543G.6.4 Power and absolute-value functions .544G.7 Type-generic math .545x Contents ISO/IEC 2011 All rights reserved ISO/IEC 9899:2011 (E)

46、Annex H (informative) Language independent arithmetic 546H.1 Introduction 546H.2 Types .546H.3 Notification 550Annex I (informative) Common warnings 552Annex J (informative) Portability issues .554J.1 Unspecified behavior .554J.2 Undefined behavior .557J.3 Implementation-defined behavior 571J.4 Loca

47、le-specific behavior .578J.5 Common extensions .579Annex K (normative) Bounds-checking interfaces .582K.1 Background 582K.2 Scope .583K.3 Library 583K.3.1 Introduction .583K.3.1.1 Standard headers .583K.3.1.2 Reserved identifiers 584K.3.1.3 Use of errno .584K.3.1.4 Runtime-constraint violations 584K

48、.3.2 Errors .585K.3.3 Common definitions .585K.3.4 Integer types 585K.3.5 Input/output .586K.3.5.1 Operations on files 586K.3.5.2 File access functions 588K.3.5.3 Formatted input/output functions .591K.3.5.4 Character input/output functions .602K.3.6 General utilities .604K.3.6.1 Runtime-constraint

49、handling 604K.3.6.2 Communication with the environment .606K.3.6.3 Searching and sorting utilities 607K.3.6.4 Multibyte/wide character conversion functions .610K.3.6.5 Multibyte/wide string conversion functions .611K.3.7 String handling .614K.3.7.1 Copying functions 614K.3.7.2 Concatenation functions 617K.3.7.3 Search functions .620K.3.7.4 Miscellaneous functions 621K.3.8 Date and time .624K.3.8.1 Components of time 624K.3.8.2 Time conversion fun

展开阅读全文
相关资源
  • ANSI Z97 1-2009 American National Standard for Safety Glazing Materials used in Buildings - Safety Performance Specifications and Methods of Test《建筑物中窗用玻璃材料安全性用.pdfANSI Z97 1-2009 American National Standard for Safety Glazing Materials used in Buildings - Safety Performance Specifications and Methods of Test《建筑物中窗用玻璃材料安全性用.pdf
  • ANSI Z97 1 ERTA-2010 Re ANSI Z97 1 - 2009 Errata《修订版 美国国家标准学会Z97 1-2009标准的勘误表》.pdfANSI Z97 1 ERTA-2010 Re ANSI Z97 1 - 2009 Errata《修订版 美国国家标准学会Z97 1-2009标准的勘误表》.pdf
  • ANSI Z21 40 2a-1997 Gas-Fired Work Activated Air-Conditioning and Heat Pump Appliances (Same as CGA 2 92a)《燃气、工作激活空气调节和热泵器具(同 CGA 2 92a)》.pdfANSI Z21 40 2a-1997 Gas-Fired Work Activated Air-Conditioning and Heat Pump Appliances (Same as CGA 2 92a)《燃气、工作激活空气调节和热泵器具(同 CGA 2 92a)》.pdf
  • ANSI Z124 9-2004 American National Standard for Plastic Urinal Fixtures《塑料小便器用美国国家标准》.pdfANSI Z124 9-2004 American National Standard for Plastic Urinal Fixtures《塑料小便器用美国国家标准》.pdf
  • ANSI Z124 4-2006 American National Standard for Plastic Water Closet Bowls and Tanks《塑料抽水马桶和水箱用美国国家标准》.pdfANSI Z124 4-2006 American National Standard for Plastic Water Closet Bowls and Tanks《塑料抽水马桶和水箱用美国国家标准》.pdf
  • ANSI Z124 3-2005 American National Standard for Plastic Lavatories《塑料洗脸盆用美国国家标准》.pdfANSI Z124 3-2005 American National Standard for Plastic Lavatories《塑料洗脸盆用美国国家标准》.pdf
  • ANSI T1 659-1996 Telecommunications - Mobility Management Application Protocol (MMAP) RCF-RACF Operations《电信 可移动管理应用协议(MMAP) RCF-RACF操作》.pdfANSI T1 659-1996 Telecommunications - Mobility Management Application Protocol (MMAP) RCF-RACF Operations《电信 可移动管理应用协议(MMAP) RCF-RACF操作》.pdf
  • ANSI T1 651-1996 Telecommunications – Mobility Management Application Protocol (MMAP)《电信 可移动性管理应用协议》.pdfANSI T1 651-1996 Telecommunications – Mobility Management Application Protocol (MMAP)《电信 可移动性管理应用协议》.pdf
  • ANSI T1 609-1999 Interworking between the ISDN User-Network Interface Protocol and the Signalling System Number 7 ISDN User Part《电信 ISDN用户间网络接口协议和7号信令系统ISDN用户部分.pdfANSI T1 609-1999 Interworking between the ISDN User-Network Interface Protocol and the Signalling System Number 7 ISDN User Part《电信 ISDN用户间网络接口协议和7号信令系统ISDN用户部分.pdf
  • ANSI T1 605-1991 Integrated Services Digital Network (ISDN) - Basic Access Interface for S and T Reference Points (Layer 1 Specification)《综合服务数字网络(ISDN) S和T基准点的.pdfANSI T1 605-1991 Integrated Services Digital Network (ISDN) - Basic Access Interface for S and T Reference Points (Layer 1 Specification)《综合服务数字网络(ISDN) S和T基准点的.pdf
  • 猜你喜欢
    相关搜索

    当前位置:首页 > 标准规范 > 国际标准 > ANSI

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1