Information technology — Programming languages — C

ISO/IEC 9899:2011 specifies the form and establishes the interpretation of programs written in the C programming language.It specifies the representation of C programs; the syntax and constraints of the C language; the semantic rules for interpreting C programs; the representation of input data to be processed by C programs; the representation of output data produced by C programs; the restrictions and limits imposed by a conforming implementation of C. ISO/IEC 9899:2011 does not specify the mechanism by which C programs are transformed for use by a data-processing system; the mechanism by which C programs are invoked for use by a data-processing system; the mechanism by which input data are transformed for use by a C program; the mechanism by which output data are transformed after being produced by a C program; the size or complexity of a program and its data that will exceed the capacity of any specific data-processing system or the capacity of a particular processor; all minimal requirements of a data-processing system that is capable of supporting a conforming implementation. ISO/IEC 9899:2011 is designed to promote the portability of C programs among a variety of data-processing systems. It is intended for use by implementers and programmers.

Technologies de l'information — Langages de programmation — C

General Information

Status
Withdrawn
Publication Date
07-Dec-2011
Withdrawal Date
07-Dec-2011
Current Stage
9599 - Withdrawal of International Standard
Completion Date
05-Jul-2018
Ref Project

Relations

Effective Date
04-Dec-2010

Buy Standard

Standard
ISO/IEC 9899:2011 - Information technology -- Programming languages -- C
English language
683 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
ISO/IEC 9899:2011 - Information technology -- Programming languages -- C
English language
683 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL ISO/IEC
STANDARD 9899
Third edition
2011-12-15


Information technology — Programming
languages — C
Technologies de l'information — Langages de programmation — C



Reference number
ISO/IEC 9899:2011(E)
©
ISO/IEC 2011

---------------------- Page: 1 ----------------------
ISO/IEC 9899:2011(E)

COPYRIGHT PROTECTED DOCUMENT


©  ISO/IEC 2011
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56  CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland

ii © ISO/IEC 2011 – All rights reserved

---------------------- Page: 2 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
Contents
Foreword . xiii
Introduction . xvii
1. Scope . 1
2. Normative references . 2
3. Terms, definitions, and symbols . 3
4. Conformance . 8
5. Environment . 10
5.1 Conceptualmodels . 10
5.1.1 Translation environment . 10
5.1.2 Execution environments . 12
5.2 Environmental considerations . 22
5.2.1 Charactersets . 22
5.2.2 Characterdisplay semantics . 24
5.2.3 Signalsand interrupts . 25
5.2.4 Environmental limits . 25
6. Language . 35
6.1 Notation . 35
6.2 Concepts . 35
6.2.1 Scopesof identifiers . 35
6.2.2 Linkagesof identifiers . 36
6.2.3 Name spaces of identifiers . 37
6.2.4 Storage durations of objects . 38
6.2.5 Types . 39
6.2.6 Representationsof types . 44
6.2.7 Compatible type and composite type . 47
6.2.8 Alignmentof objects . 48
6.3 Conversions . 50
6.3.1 Arithmeticoperands . 50
6.3.2 Otheroperands . 54
6.4 Lexical elements . 57
6.4.1 Keywords . 58
6.4.2 Identifiers . 59
6.4.3 Universal character names . 61
6.4.4 Constants . 62
6.4.5 Stringliterals . 70
6.4.6 Punctuators . 72
6.4.7 Headernames . 73
6.4.8 Preprocessingnumbers . 74
6.4.9 Comments . 75
Contents iii

---------------------- Page: 3 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
6.5 Expressions . 76
6.5.1 Primaryexpressions . 78
6.5.2 Postfixoperators . 79
6.5.3 Unaryoperators . 88
6.5.4 Castoperators . 91
6.5.5 Multiplicative operators . 92
6.5.6 Additive operators . 92
6.5.7 Bitwiseshift operators . 94
6.5.8 Relationaloperators . 95
6.5.9 Equalityoperators . 96
AND operator . 97
6.5.10 Bitwise
OR operator . 98
6.5.11 Bitwiseexclusive
OR operator . 98
6.5.12 Bitwiseinclusive
AND operator . 99
6.5.13 Logical
OR operator . 99
6.5.14 Logical
6.5.15 Conditionaloperator . 100
6.5.16 Assignmentoperators . 101
6.5.17 Commaoperator . 105
6.6 Constantexpressions . 106
6.7 Declarations . 108
6.7.1 Storage-classspecifiers . 109
6.7.2 Type specifiers . 111
6.7.3 Type qualifiers . 121
6.7.4 Functionspecifiers . 125
6.7.5 Alignmentspecifier . 127
6.7.6 Declarators . 128
6.7.7 Type names . 136
6.7.8 Type definitions . 137
6.7.9 Initialization . 139
6.7.10 Staticassertions . 145
6.8 Statementsand blocks . 146
6.8.1 Labeledstatements . 146
6.8.2 Compoundstatement . 147
6.8.3 Expression and null statements . 147
6.8.4 Selectionstatements . 148
6.8.5 Iterationstatements . 150
6.8.6 Jumpstatements . 151
6.9 Externaldefinitions . 155
6.9.1 Functiondefinitions . 156
6.9.2 Externalobject definitions . 158
6.10 Preprocessingdirectives . 160
6.10.1 Conditionalinclusion . 162
6.10.2 Sourcefile inclusion . 164
6.10.3 Macroreplacement . 166
iv Contents

---------------------- Page: 4 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
6.10.4 Linecontrol . 173
6.10.5 Errordirective . 174
6.10.6 Pragmadirective . 174
6.10.7 Nulldirective . 175
6.10.8 Predefinedmacro names . 175
6.10.9 Pragmaoperator . 178
6.11 Futurelanguage directions . 179
6.11.1 Floatingtypes . 179
6.11.2 Linkagesof identifiers . 179
6.11.3 Externalnames . 179
6.11.4 Characterescape sequences . 179
6.11.5 Storage-classspecifiers . 179
6.11.6 Functiondeclarators . 179
6.11.7 Functiondefinitions . 179
6.11.8 Pragmadirectives . 179
6.11.9 Predefinedmacro names . 179
7. Library . 180
7.1 Introduction . 180
7.1.1 Definitionsof terms . 180
7.1.2 Standardheaders . 181
7.1.3 Reserved identifiers . 182
7.1.4 Use of library functions . 183
7.2 Diagnostics . 186
7.2.1 Programdiagnostics . 186
7.3 Complexarithmetic . 188
7.3.1 Introduction . 188
7.3.2 Conventions . 189
7.3.3 Branchcuts . 189
7.3.4 TheCX_LIMITED_RANGE pragma . 189
7.3.5 Trigonometric functions . 190
7.3.6 Hyperbolicfunctions . 192
7.3.7 Exponential and logarithmic functions . 194
7.3.8 Power and absolute-value functions . 195
7.3.9 Manipulationfunctions . 196
7.4 Characterhandling . 200
7.4.1 Characterclassification functions . 200
7.4.2 Character case mapping functions . 203
7.5 Errors . 205
7.6 Floating-pointenvironment . 206
7.6.1 TheFENV_ACCESS pragma . 208
7.6.2 Floating-pointexceptions . 209
7.6.3 Rounding . 212
7.6.4 Environment . 213
7.7 Characteristics of floating types . 216
Contents v

---------------------- Page: 5 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
7.8 Format conversion of integer types . 217
7.8.1 Macros for format specifiers . 217
7.8.2 Functions for greatest-width integer types . 218
7.9 Alternative spellings . 221
7.10 Sizes of integer types . 222
7.11 Localization . 223
7.11.1 Localecontrol . 224
7.11.2 Numeric formatting convention inquiry . 225
7.12 Mathematics . 231
7.12.1 Treatment of error conditions . 233
7.12.2 TheFP_CONTRACT pragma . 235
7.12.3 Classificationmacros . 235
7.12.4 Trigonometric functions . 238
7.12.5 Hyperbolicfunctions . 240
7.12.6 Exponential and logarithmic functions . 242
7.12.7 Power and absolute-value functions . 247
7.12.8 Error and gamma functions . 249
7.12.9 Nearestinteger functions . 251
7.12.10 Remainderfunctions . 254
7.12.11 Manipulationfunctions . 255
7.12.12 Maximum, minimum, and positive difference functions . 257
7.12.13 Floatingmultiply-add . 258
7.12.14 Comparisonmacros . 259
7.13 Nonlocaljumps . 262
7.13.1 Save calling environment . 262
7.13.2 Restorecalling environment . 263
7.14 Signalhandling . 265
7.14.1 Specifysignal handling . 266
7.14.2 Sendsignal . 267
7.15 Alignment . 268
7.16 Variable arguments . 269
7.16.1 Variable argument list access macros . 269
7.17 Atomics . 273
7.17.1 Introduction . 273
7.17.2 Initialization . 274
7.17.3 Orderand consistency . 275
7.17.4 Fences . 278
7.17.5 Lock-freeproperty . 279
7.17.6 Atomicinteger types . 280
7.17.7 Operations on atomic types . 282
7.17.8 Atomic flag type and operations . 285
7.18 Boolean type and values . 287
7.19 Commondefinitions . 288
7.20 Integer types . 289
vi Contents

---------------------- Page: 6 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
7.20.1 Integer types . 289
7.20.2 Limits of specified-width integer types . 291
7.20.3 Limits of other integer types . 293
7.20.4 Macros for integer constants . 294
7.21 Input/output . 296
7.21.1 Introduction . 296
7.21.2 Streams . 298
7.21.3 Files . 300
7.21.4 Operationson files . 302
7.21.5 Fileaccess functions . 304
7.21.6 Formatted input/output functions . 309
7.21.7 Characterinput/output functions . 330
7.21.8 Directinput/output functions . 335
7.21.9 Filepositioning functions . 336
7.21.10 Error-handling functions . 338
7.22 Generalutilities . 340
7.22.1 Numericconversion functions . 341
7.22.2 Pseudo-random sequence generation functions . 346
7.22.3 Memorymanagement functions . 347
7.22.4 Communication with the environment . 350
7.22.5 Searching and sorting utilities . 354
7.22.6 Integer arithmetic functions . 356
7.22.7 Multibyte/wide character conversion functions . 357
7.22.8 Multibyte/wide string conversion functions . 359
7.23 _Noreturn . 361
7.24 Stringhandling . 362
7.24.1 Stringfunction conventions . 362
7.24.2 Copying functions . 362
7.24.3 Concatenationfunctions . 364
7.24.4 Comparisonfunctions . 365
7.24.5 Searchfunctions . 367
7.24.6 Miscellaneousfunctions . 371
7.25 Type-generic math . 373
7.26 Threads . 376
7.26.1 Introduction . 376
7.26.2 Initializationfunctions . 378
7.26.3 Conditionvariable functions . 378
7.26.4 Mutexfunctions . 380
7.26.5 Threadfunctions . 383
7.26.6 Thread-specificstorage functions . 386
7.27 Dateand time . 388
7.27.1 Componentsof time . 388
7.27.2 Time manipulation functions . 389
7.27.3 Time conversion functions . 392
Contents vii

---------------------- Page: 7 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
7.28 Unicodeutilities . 398
7.28.1 Restartable multibyte/wide character conversion functions . 398
7.29 Extended multibyte and wide character utilities . 402
7.29.1 Introduction . 402
7.29.2 Formatted wide character input/output functions . 403
7.29.3 Wide character input/output functions . 421
7.29.4 General wide string utilities . 426
7.29.4.1 Wide string numeric conversion functions . 426
7.29.4.2 Wide string copying functions . 430
7.29.4.3 Wide string concatenation functions . 432
7.29.4.4 Wide string comparison functions . 433
7.29.4.5 Wide string search functions . 435
7.29.4.6 Miscellaneousfunctions . 439
7.29.5 Wide character time conversion functions . 439
7.29.6 Extended multibyte/wide character conversion utilities . 440
7.29.6.1 Single-byte/wide character conversion functions . 441
7.29.6.2 Conversion state functions . 441
7.29.6.3 Restartable multibyte/wide character conversion
functions . 442
7.29.6.4 Restartable multibyte/wide string conversion
functions . 444
7.30 Wide character classification and mapping utilities . 447
7.30.1 Introduction . 447
7.30.2 Wide character classification utilities . 448
7.30.2.1 Wide character classification functions . 448
7.30.2.2 Extensible wide character classification
functions . 451
7.30.3 Wide character case mapping utilities . 453
7.30.3.1 Wide character case mapping functions . 453
7.30.3.2 Extensible wide character case mapping
functions . 453
7.31 Futurelibrary directions . 455
7.31.1 Complexarithmetic . 455
7.31.2 Characterhandling . 455
7.31.3 Errors . 455
7.31.4 Floating-pointenvironment . 455
7.31.5 Format conversion of integer types . 455
7.31.6 Localization . 455
7.31.7 Signalhandling . 455
7.31.8 Atomics . 455
7.31.9 Boolean type and values . 456
7.31.10 Integer types . 456
7.31.11 Input/output . 456
7.31.12 Generalutilities . 456
viii Contents

---------------------- Page: 8 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
7.31.13 Stringhandling . 456
7.31.14 Dateand time . 456
7.31.15 Threads . 456
7.31.16 Extended multibyte and wide character utilities
. 456
7.31.17 Wide character classification and mapping utilities
. 457
Annex A (informative) Language syntax summary . 458
A.1 Lexical grammar . 458
A.2 Phrasestructure grammar . 465
A.3 Preprocessingdirectives . 473
Annex B (informative) Library summary . 475
B.1 Diagnostics . 475
B.2 Complex . 475
B.3 Characterhandling . 477
B.4 Errors . 477
B.5 Floating-pointenvironment . 477
B.6 Characteristics of floating types . 478
B.7 Format conversion of integer types . 478
B.8 Alternative spellings . 479
B.9 Sizes of integer types . 479
B.10 Localization . 479
B.11 Mathematics . 479
B.12 Nonlocaljumps . 484
B.13 Signalhandling . 484
B.14 Alignment . 485
B.15 Variable arguments . 485
B.16 Atomics . 485
B.17 Boolean type and values . 487
B.18 Commondefinitions . 487
B.19 Integer types . 487
B.20 Input/output . 488
B.21 Generalutilities . 491
B.22 _Noreturn . 493
B.23 Stringhandling . 493
B.24 Type-generic math . 495
B.25 Threads . 495
B.26 Dateand time . 496
B.27 Unicodeutilities . 497
B.28 Extended multibyte/wide character utilities . 497
B.29 Wide character classification and mapping utilities . 502
Annex C (informative) Sequence points . 503
Contents ix

---------------------- Page: 9 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
Annex D (normative) Universal character names for identifiers . 504
D.1 Ranges of characters allowed . 504
D.2 Ranges of characters disallowed initially . 504
Annex E (informative) Implementation limits . 505
Annex F (normative) IEC 60559 floating-point arithmetic . 507
F.1 Introduction . 507
F.2 Types . 507
F.3 Operators and functions . 508
F.4 Floating to integer conversion . 510
F.5 Binary-decimal conversion . 510
F.6 Thereturn statement . 511
F.7 Contracted expressions . 511
F.8 Floating-point environment . 511
F.9 Optimization . 514
F.10 Mathematics . 517
F.10.1 Trigonometric functions . 518
F.10.2 Hyperbolicfunctions . 520
F.10.3 Exponential and logarithmic functions . 520
F.10.4 Power and absolute value functions . 524
F.10.5 Error and gamma functions . 525
F.10.6 Nearestinteger functions . 526
F.10.7 Remainderfunctions . 528
F.10.8 Manipulationfunctions . 529
F.10.9 Maximum, minimum, and positive difference functions . 530
F.10.10 Floatingmultiply-add . 530
F.10.11 Comparisonmacros . 531
Annex G (normative) IEC 60559-compatible complex arithmetic . 532
G.1 Introduction . 532
G.2 Types . 532
G.3 Conventions . 532
G.4 Conversions . 533
G.4.1 Imaginarytypes . 533
G.4.2 Realand imaginary . 533
G.4.3 Imaginaryand complex . 533
G.5 Binaryoperators . 533
G.5.1 Multiplicative operators . 534
G.5.2 Additive operators . 537
G.6 Complexarithmetic . 537
G.6.1 Trigonometric functions . 539
G.6.2 Hyperbolicfunctions . 539
G.6.3 Exponential and logarithmic functions . 543
G.6.4 Power and absolute-value functions . 544
G.7 Type-generic math . 545
x Contents

---------------------- Page: 10 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
Annex H (informative) Language independent arithmetic . 546
H.1 Introduction . 546
H.2 Types . 546
H.3 Notification . 550
Annex I (informative) Common warnings . 552
Annex J (informative) Portability issues . 554
J.1 Unspecifiedbehavior . 554
J.2 Undefinedbehavior . 557
J.3 Implementation-definedbehavior . 571
J.4 Locale-specificbehavior . 578
J.5 Commonextensions . 579
Annex K (normative) Bounds-checking interfaces . 582
K.1 Background . 582
K.2 Scope . 583
K.3 Library . 583
K.3.1 Introduction . 583
K.3.1.1 Standardheaders . 583
K.3.1.2 Reserved identifiers . 584
K.3.1.3 Useof errno . 584
K.3.1.4 Runtime-constraintviolations . 584
K.3.2 Errors . 585
K.3.3 Commondefinitions . 585
K.3.4 Integer types . 585
K.3.5 Input/output . 586
K.3.5.1 Operationson files . 586
K.3.5.2 Fileaccess functions . 588
K.3.5.3 Formatted input/output functions . 591
K.3.5.4 Characterinput/output functions . 602
K.3.6 Generalutilities . 604
K.3.6.1 Runtime-constrainthandling . 604
K.3.6.2 Communication with the environment . 606
K.3.6.3 Searching and sorting utilities . 607
K.3.6.4 Multibyte/wide character conversion functions . 610
K.3.6.5 Multibyte/wide string conversion functions . 611
K.3.7 Stringhandling . 614
K.3.7.1 Copying functions . 614
K.3.7.2 Concatenationfunctions . 617
K.3.7.3 Searchfunctions . 620
K.3.7.4 Miscellaneousfunctions . 621
K.3.8 Dateand time . 624
K.3.8.1 Componentsof time . 624
K.3.8.2 Time conversion functions . 624
Contents xi

---------------------- Page: 11 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
K.3.9 Extended multibyte and wide character utilities
. 627
K.3.9.1 Formatted wide character input/output functions . 628
K.3.9.2 General wide string utilities . 639
K.3.9.3 Extended multibyte/wide character conversion
utilities . 647
Annex L (normative) Analyzability . 652
L.1 Scope . 652
L.2 Definitions . 652
L.3 Requirements . 653
Bibliography . 654
Index . 657
xii Contents

---------------------- Page: 12 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
Foreword
1 ISO (the International Organization for Standardization) and IEC (the International
Electrotechnical Commission) form the specialized system for worldwide
standardization. National bodies that are member of ISO or IEC participate in the
development of International Standards through technical committees established by the
respective org anization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international
organizations, governmental and non-governmental, in liaison with ISO and IEC, also
take part in the work. In the field of information technology, ISO and IEC have
established a joint technical committee, ISO/IEC JTC 1.
2 International Standards are drafted in accordance with the rules given in the ISO/IEC
Directives, Part 2.
3 The main task of the joint technical committee is to prepare International Standards.
Draft International Standards adopted by the joint technical committee are circulated to
national bodies for voting. Publication as an International Standard requires approval by
at least 75% of the national bodies casting a vote.
4 Attention is drawn to the possibility that some of the elements of this document may be
the subject of patent rights. ISO and IEC shall not be held responsible for identifying any
or all such patent rights.
5 ISO/IEC 9899 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information
technology, Subcommittee SC22, Programming languages, their environments and
system software interfaces.
6 This third edition cancels and replaces the second edition, ISO/IEC 9899:1999, which has
been technically revised. It also incorporates the Technical Corrigenda
ISO/IEC 9899:1999/Cor 1:2001, ISO/IEC 9899:1999/Cor 2:2004, and
ISO/IEC 9899:1999/Cor 3:2007. Major changes from the previous edition include:
— conditional (optional) features (including some that were previously mandatory)
— support for multiple threads of execution including an improved memory sequencing
model, atomic objects, and thread-local storage ( and
)
— additional floating-point characteristic macros ()
— querying and specifying alignment of objects (,)
—Unicode characters and strings () (originally specified in
ISO/IEC TR 19769:2004)
— type-generic expressions
— static assertions
— anonymous structures and unions
Foreword xiii

---------------------- Page: 13 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
— no-return functions
— macros to create complex numbers ()
— support for opening files for exclusive access
— removed thegets function ()
— added the aligned_alloc, at_quick_exit, and quick_exit functions
()
— (conditional) support for bounds-checking interfaces (originally specified in
ISO/IEC TR 24731−1:2007)
— (conditional) support for analyzability
7 Major changes in the second edition included:
— restricted character set support via digraphs and (originally specified
in ISO/IEC 9899:1990/Amd.1:1995)
— wide character library support in and (originally
specified in ISO/IEC 9899:1990/Amd.1:1995)
— more precise aliasing rules via effective type
— restricted pointers
— variable length arrays
— flexible array members
— static and type qualifiers in parameter array declarators
— complex (and imaginary) support in
— type-generic math macros in
— thelong long int type and library functions
— extended integer types
— increased minimum translation limits
— additional floating-point characteristics in
— remove implicitint
— reliable integer division
— universal character names (\u and\U)
— extended identifiers
— hexadecimal floating-point constants and %a and %A printf/scanf conversion
specifiers
— compound literals
xiv Foreword

---------------------- Page: 14 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
— designated initializers
— // comments
— specified width integer types and corresponding library functions in
and
— remove implicit function declaration
— preprocessor arithmetic done inintmax_t/uintmax_t
— mixed declarations and statements
— new block scopes for selection and iteration statements
— integer constant type rules
— integer promotion rules
— macros with a variable number of arguments
— thevscanf family of functions in and
— additional math library functions in
— treatment of error conditions by math library functions (math_errhandling)
— floating-point environment access in
— IEC 60559 (also known as IEC 559 or IEEE arithmetic) support
— trailing comma allowed inenum declaration
— %lf conversion specifier allowed inprintf
— inline functions
— thesnprintf family of functions in
— boolean type in
— idempotent type qualifiers
— empty macro arguments
— new structure type compatibility rules (tag compatibility)
— additional predefined macro names
— _Pragma preprocessing operator
— standard pragmas
— __func_ _ predefined identifier
— va_copy macro
— additionalstrftime conversion specifiers
— LIA compatibility annex
Foreword xv

---------------------- Page: 15 ----------------------
ISO/IEC 9899:2011 (E) © ISO/IEC 2011 − All rights reserved
— deprecateungetc at the beginning of a binary file
— remove deprecation of aliased array parameters
— conversion of array to pointer not limited to lvalues
— relaxed constraints on aggregate and union initialization
— relaxed restrictions on portable header names
— return without expression not permitted in function that returns a value (and vice
versa)
xvi Foreword

---------------------- Page: 16 ----------------------
© ISO/IEC 2011 − All rights reserved ISO/IEC 9899:2011 (E)
Introduction
1 With the introduction of new devices and extended character sets, new features may be
added to this International Standard. Subclauses in the language and library clauses warn
implementors and programmers of usages which, though valid in themselves, may
conflict with future additions.
2 Certain features are obsolescent, which means that they may be considered for
withdrawal in future revisions of this International Standard. They are retained because
of their widespread use, but their use in new implementations (for implementation
features) or new programs (for language [6.11] or library features [7.31]) is discouraged.
3 This International Standard is divided into four major subdivisions:
— preliminary elements (clauses 1−4);
— the characteristics of environments that translate and execute C programs (clause 5);
— the language syntax, constraints, and semantics (clause 6);
— the library facilities (clause 7).
4 Examples are provided to illustrate possible forms of the constructions described.
Footnotes are provided to emphasize consequences of the rules described in that
subclause or elsewhere in this International Standard. References are used to refer to
other related subclauses. Recommendations are provided to give advice or guidance to
implementors. Annexes provide additional information and summarize the information
contained in this International Standard. A bibliography lists documents that were
referred to during the preparation of the standard.
5 The language clause (clause 6) is derived from ‘‘The C Reference Manual’’.
6 The library clause (clause 7) is based
...

INTERNATIONAL ISO/IEC
STANDARD 9899
Third edition
2011-12-15

Information technology — Programming
languages — C
Technologies de l'information — Langages de programmation — C




Reference number
ISO/IEC 9899:2011(E)
©
ISO/IEC 2011

---------------------- Page: 1 ----------------------
ISO/IEC 9899:2011(E)


This CD-ROM contains the publication ISO/IEC 9899:2011 in portable document format (PDF), which can be
viewed using Adobe® Acrobat® Reader.
Adobe and Acrobat are trademarks of Adobe Systems Incorporated.

This third edition cancels and replaces the second edition (ISO/IEC 9899:1999), which has been technically
revised. It also incorporates the Technical Corrigenda ISO/IEC 9899:1999/Cor.1:2001,
ISO/IEC 9899:1999/Cor.2:2004 and ISO/IEC 9899:1999/Cor.3:2007.
COPYRIGHT PROTECTED DOCUMENT


©  ISO/IEC 2011
All rights reserved. Unless required for installation or otherwise specified, no part of this CD-ROM may be reproduced, stored in a retrieval
system or transmitted in any form or by any means without prior permission from ISO. Requests for permission to reproduce this product
should be addressed to
ISO copyright office  Case postale 56  CH-1211 Geneva 20  Switzerland
Internet copyright@iso.org
Reproduction may be subject to royalty payments or a licensing agreement.
Violators may be prosecuted.
Published in Switzerland

ii © ISO/IEC 2011 – All rights reserved

---------------------- Page: 2 ----------------------
ISO/IEC 9899:2011(E)
Installation
If this publication has been packaged as a zipped file, do NOT open the file from the CD-ROM, but cop
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.