Стандарт языка Си С99 TC (1113411), страница 3
Текст из файла (страница 3)
ISO and IECtechnical committees collaborate in fields of mutual interest. Other internationalorganizations, governmental and non-governmental, in liaison with ISO and IEC, alsotake part in the work.2International Standards are drafted in accordance with the rules given in the ISO/IECDirectives, Part 3.3In the field of information technology, ISO and IEC have established a joint technicalcommittee, ISO/IEC JTC 1. Draft International Standards adopted by the joint technicalcommittee are circulated to national bodies for voting. Publication as an InternationalStandard requires approval by at least 75% of the national bodies casting a vote.4International Standard ISO/IEC 9899 was prepared by Joint Technical CommitteeISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages,their environments and system software interfaces.
The Working Group responsible forthis standard (WG 14) maintains a site on the World Wide Web athttp://www.open-std.org/JTC1/SC22/WG14/containingadditionalinformation relevant to this standard such as a Rationale for many of the decisions madeduring its preparation and a log of Defect Reports and Responses.5This second edition cancels and replaces the first edition, ISO/IEC 9899:1990, asamended and corrected by ISO/IEC 9899/COR1:1994, ISO/IEC 9899/AMD1:1995, andISO/IEC 9899/COR2:1996. Major changes from the previous edition include:— restricted character set support via digraphs and <iso646.h> (originally specifiedin AMD1)— wide character library support in <wchar.h> and <wctype.h> (originallyspecified in AMD1)— 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 <complex.h>— type-generic math macros in <tgmath.h>— the long long int type and library functionsForewordxiISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— increased minimum translation limits— additional floating-point characteristics in <float.h>— remove implicit int— reliable integer division— universal character names (\u and \U)— extended identifiers— hexadecimal floating-point constants and %a and %A printf/scanf conversionspecifiers— compound literals— designated initializers— // comments— extended integer types and library functions in <inttypes.h> and <stdint.h>— remove implicit function declaration— preprocessor arithmetic done in intmax_t/uintmax_t— mixed declarations and code— new block scopes for selection and iteration statements— integer constant type rules— integer promotion rules— macros with a variable number of arguments— the vscanf family of functions in <stdio.h> and <wchar.h>— additional math library functions in <math.h>— treatment of error conditions by math library functions (math_errhandling)— floating-point environment access in <fenv.h>— IEC 60559 (also known as IEC 559 or IEEE arithmetic) support— trailing comma allowed in enum declaration— %lf conversion specifier allowed in printf— inline functions— the snprintf family of functions in <stdio.h>— boolean type in <stdbool.h>— idempotent type qualifiers— empty macro argumentsxiiForewordWG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— new structure type compatibility rules (tag compatibility)— additional predefined macro names— _Pragma preprocessing operator— standard pragmas— _ _func_ _ predefined identifier— va_copy macro— additional strftime conversion specifiers— LIA compatibility annex— deprecate ungetc 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 viceversa)6Annexes D and F form a normative part of this standard; annexes A, B, C, E, G, H, I, J,the bibliography, and the index are for information only.
In accordance with Part 3 of theISO/IEC Directives, this foreword, the introduction, notes, footnotes, and examples arealso for information only.ForewordxiiiISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256Introduction1With the introduction of new devices and extended character sets, new features may beadded to this International Standard. Subclauses in the language and library clauses warnimplementors and programmers of usages which, though valid in themselves, mayconflict with future additions.2Certain features are obsolescent, which means that they may be considered forwithdrawal in future revisions of this International Standard.
They are retained becauseof their widespread use, but their use in new implementations (for implementationfeatures) or new programs (for language [6.11] or library features [7.26]) is discouraged.3This 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).4Examples are provided to illustrate possible forms of the constructions described.Footnotes are provided to emphasize consequences of the rules described in thatsubclause or elsewhere in this International Standard.
References are used to refer toother related subclauses. Recommendations are provided to give advice or guidance toimplementors. Annexes provide additional information and summarize the informationcontained in this International Standard. A bibliography lists documents that werereferred to during the preparation of the standard.5The language clause (clause 6) is derived from ‘‘The C Reference Manual’’.6The library clause (clause 7) is based on the 1984 /usr/group Standard.xivIntroductionINTERNATIONAL STANDARD©ISO/IECISO/IEC 9899:TC3Programming languages — C1.
Scope1This International Standard specifies the form and establishes the interpretation ofprograms written in the C programming language.1) 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.2This International Standard does not specify— the mechanism by which C programs are transformed for use by a data-processingsystem;— the mechanism by which C programs are invoked for use by a data-processingsystem;— 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 Cprogram;— the size or complexity of a program and its data that will exceed the capacity of anyspecific data-processing system or the capacity of a particular processor;1)§1This International Standard is designed to promote the portability of C programs among a variety ofdata-processing systems.
It is intended for use by implementors and programmers.General1ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— all minimal requirements of a data-processing system that is capable of supporting aconforming implementation.2. Normative references1The following normative documents contain provisions which, through reference in thistext, constitute provisions of this International Standard. For dated references,subsequent amendments to, or revisions of, any of these publications do not apply.However, parties to agreements based on this International Standard are encouraged toinvestigate the possibility of applying the most recent editions of the normativedocuments indicated below.
For undated references, the latest edition of the normativedocument referred to applies. Members of ISO and IEC maintain registers of currentlyvalid International Standards.2ISO 31−11:1992, Quantities and units — Part 11: Mathematical signs and symbols foruse in the physical sciences and technology.3ISO/IEC 646, Information technology — ISO 7-bit coded character set for informationinterchange.4ISO/IEC 2382−1:1993, Information technology — Vocabulary — Part 1: Fundamentalterms.5ISO 4217, Codes for the representation of currencies and funds.6ISO 8601, Data elements and interchange formats — Information interchange —Representation of dates and times.7ISO/IEC 10646 (all parts), Information technology — Universal Multiple-Octet CodedCharacter Set (UCS).8IEC 60559:1989, Binary floating-point arithmetic for microprocessor systems (previouslydesignated IEC 559:1989).2General§2WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC33.
Terms, definitions, and symbols1For the purposes of this International Standard, the following definitions apply. Otherterms are defined where they appear in italic type or on the left side of a syntax rule.Terms explicitly defined in this International Standard are not to be presumed to referimplicitly to similar terms defined elsewhere. Terms not defined in this InternationalStandard are to be interpreted according to ISO/IEC 2382−1.