Rationale for International Standard - Programming Language - C

Rationale for International Standard - Programming Language - C

Rationale for International Standard - Programming Language - C UNIX is a trademark of X/Open Co., Ltd.. DEC and PDP-11 are trademarks of Digital Equipment Corporation. POSIX is a trademark of IEEE. CONTENTS 1. SCOPE...........................................................................................................................................................1 1.2 ORGANIZATION OF THE DOCUMENT............................................................................................................5 2. NORMATIVE REFERENCES.....................................................................................................................7 3. DEFINITIONS AND CONVENTIONS ........................................................................................................9 4. COMPLIANCE ...........................................................................................................................................11 5. ENVIRONMENT......................................................................................................................................13 5.1 CONCEPTUAL MODELS..............................................................................................................................13 5.1.1 Translation environment ................................................................................................................13 5.1.1.1 Program structure......................................................................................................................................13 5.1.1.2 Translation phases .......................................................................................................................................13 5.1.1.3 Diagnostics .................................................................................................................................................14 5.1.2 Execution environments....................................................................................................................14 5.1.2.1 Freestanding environment.............................................................................................................................14 5.1.2.2 Hosted environment.....................................................................................................................................15 5.1.2.3 Program execution .......................................................................................................................................15 5.2 ENVIRONMENTAL CONSIDERATIONS ..........................................................................................................17 5.2.1 Character sets ...................................................................................................................................17 5.2.1.1 Trigraph sequences ......................................................................................................................................17 5.2.1.2 Multibyte characters.....................................................................................................................................18 5.2.2 Character display semantics ..............................................................................................................19 5.2.3 Signals and interrupts .......................................................................................................................20 5.2.4 Environmental limits.........................................................................................................................20 5.2.4.1 Translation limits.........................................................................................................................................20 5.2.4.2 Numerical limits..........................................................................................................................................20 5.2.4.2.1 Sizes of integer types <limits.h> ............................................................................................................21 5.2.4.2.2 Characteristics of floating types <float.h> ...............................................................................................21 6. LANGUAGE.................................................................................................................................................23 6.1 LEXICAL ELEMENTS .................................................................................................................................23 6.1.1 Keywords..........................................................................................................................................23 6.1.2 Identifiers .........................................................................................................................................23 6.1.2.1 Scopes of identifiers.....................................................................................................................................25 6.1.2.2 Linkages of identifiers..................................................................................................................................26 6.1.2.3 Name spaces of identifiers ............................................................................................................................27 6.1.2.4 Storage durations of objects ..........................................................................................................................28 6.1.2.5 Types .........................................................................................................................................................28 6.1.2.6 Compatible type and composite type..............................................................................................................30 6.1.2.7 Predefined identifiers...................................................................................................................................31 6.1.2.8 Representations of types ...............................................................................................................................31 6.1.2.8.1 General...............................................................................................................................................31 6.1.8.2 Integer types...........................................................................................................................................31 6.1.3 Constants..........................................................................................................................................31 6.1.3.1 Floating constants ........................................................................................................................................31 6.1.3.2 Integer constants..........................................................................................................................................31 6.1.3.3 Enumeration constants .................................................................................................................................32 6.1.3.4 Character constants......................................................................................................................................32 6.1.4 String literals ....................................................................................................................................33 6.1.5 Operators..........................................................................................................................................35 6.1.6 Punctuators ......................................................................................................................................35 6.1.7 Header names...................................................................................................................................35 6.1.8 Preprocessing numbers .....................................................................................................................36 6.1.9 Comments ........................................................................................................................................36 6.2 CONVERSIONS ..........................................................................................................................................37 i CONTENTS 6.2.1 Arithmetic operands..........................................................................................................................37 6.2.1.1 Characters and integers ................................................................................................................................37 6.2.1.2 Signed and unsigned integers........................................................................................................................38 6.2.1.3 Real floating and integer...............................................................................................................................38 6.2.1.4 Real floating types .......................................................................................................................................38 6.2.1.5 Complex types.............................................................................................................................................39 6.2.1.6 Real and complex ........................................................................................................................................39 6.2.1.7 Usual arithmetic conversions ........................................................................................................................39

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    166 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us