The Standard

From C

Jump to: navigation, search

Contents

The Standard

Note: Prices quoted here are current as of the date each was written but are not guaranteed to remain unchanged.

The international standard which defines the C programming language is ISO/IEC 9899 a joint effort of ISO and IEC and the participating countries via their national body's all of which make the standard available via whatever publishing arrangement(s) each makes, many of which are available via the web for easy purchasing. Each participating country adopts the standard into their own standards system (some use the same document number) though in some cases changes are made to the document -- the technical content should (and really must) remain the same.

The working group (WG14) makes some of the drafts, the rationale by which they made their decisions (The Rationale) and issues raised against the standard (Defect Reports) available for free from their web site, see Web_resources#Secondary_materials for the links.

The latest freely available working paper (draft) by WG14 is n3047 (aka C2x).

The primary output of WG14 is ISO/IEC 9899, the C Standard. The following is a list of revisions to ISO/IEC 9899 that the committee has produced:

Project status and milestones

ISO/IEC JTC1/SC22/WG14 is the international standardization working group for the programming language C.

The primary output of WG14 is ISO/IEC 9899, the C Standard. The following is a list of revisions to ISO/IEC 9899 that the committee has produced:

Revision ISO publication Similar draft

C2y Not available N3301 [2024-07-28]

C23 ISO/IEC 9899:2024 N3220 [2024-02-22] (early C2y draft)

C17 ISO/IEC 9899:2018 N2310 [2018-11-11] (early C2x draft)

C11 ISO/IEC 9899:2011 N1570 [2011-04-04]

C99 ISO/IEC 9899:1999 N1256 [2007-09-07]

C89 ISO/IEC 9899:1990 Not available

C23

The current standard is ISO/IEC 9899:2024 (aka C23) -- this version introduces a significant amount of changes:

  • New keywords (e.g. bool, true, false, static_assert, and thread_local, nullptr).
  • New operators (e.g. typeof).
  • New functions (e.g. memset_explicit, memalignment, strdup).
  • Bit utility header/macro/functions (e.g. <stdbit.h>, stdc_count_ones).
  • New math functions based on IEEE 754-2019 (e.g. timegm).
  • Checked integer arithmetic with <stdckdint.h>.
  • A unified [[attribute]] syntax (e.g. [[likely]], [[unlikely]], [[deprecated]]).
  • Unreachable annotations.
  • Const-correctness of functions (e.g. strstr, memchr).
  • New %b and %B format specifier in printf for binary numbers.
  • Timezone functions.
  • Switch statements fallthrough.
  • Preprocessor stuff (#elifdef, #embed, __has_include, __VA_OPT__)
  • Repurposes auto keyword for generics.
  • Zero initialization with {}.

and much much more (Wikipedia has a more exhaustive list).


Even though N3047 was the last draft before the publication, it is missing thousands of changes that happened subsequently. For that reason, N3220 is the recommended draft to use, despite being after the publication, whose only change is a footnote in preparation for C2y.

This draft is freely available here with the proper Standard available for purchase through ISO there.

C17

The older standard is ISO/IEC 9899:2018 (aka C17) -- this version addresses many defects reported for C11. It incorporates TCs (Technical Corrigenda) and does not introduce new language features. Sometimes mistakenly referred to as C18 because of the ISO publication date.

Sites that make one or more of these (standards) documents available are:

ISO:

IEC:

The latest freely available draft is c17_updated_proposed_fdis.pdf.

C11

The next older standard was ISO/IEC 9899:2011 -- (aka C11 and until it was adopted C1x) will soon be unavailable from official sources due to the adoption of C17.

Sites that make one or more of these (standards) documents available are:

ISO:

USA INCITS (née ANSI) -- essentially identical to the ISO/IEC document:

The latest freely available draft is N1570.

The latest defect report summary for C11 is available at n2244.htm.

C99

The next older standard was ISO/IEC 9899:1999 (aka C99 and C9x) likely unavailable from any official sources, due to the ISO adoption of C11.

The British Standards Institute (BSI) has published C99, TC1 and The Rationale in a bound book, see Books#References for the link.

Sites that make one or more of the documents available are:

USA INCITS (née ANSI) -- PDF format download only:

Techstreet -- PDF format free download, USD 12 for printed edition:

This is also effectively available for free as N1256.

C89 / C90 / C95

The older standards -- ANSI X3.159-1989 (aka C89), ISO/IEC 9899:1990 (aka C90), ISO/IEC 9899:1990/AMD 1:1995 (aka AMD1 or C95) -- are no longer available from official sources, so your best source is a printed book. C89 and C90 are identical except for the frontmatter and section numbering.

AS 3955-1991 (C90) is still available from two sources:

AMD1 (which transforms C90 into C95) can be ordered from IHS (née Global Engineering Documents):

Many standards can be ordered from good technical booksellers, such as Opamp.

Note: Implementations which conform with C89/C90 are more widely available than those which conform with any later revision(s).


Category Language, Category Resources

Personal tools