C and C++ notes / Versions and variations

From Helpful
Jump to navigation Jump to search
Notes related to C and C++

Note: Some notes describe behaviour common to most variants - for C mostly meaning C89 (and a bit of C99), unless mentioned otherwise.


C and C++ flavours

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

C

  • ....developed at Bell labs around 1969..1973
  • K&R C refers mostly to the first edition of the 1978 book The C Programming Language, which then became a de facto standard (the second edition, from 1988, describes ANSI C).[1]
  • ANSI developed ANSI X3.159-1989, usually referred to as C89. As such, 'ANSI C' usually refers to C89. ('C89' often seems used when referring to syntax/behaviour compliance, 'ANSI C' in many other references to this early C)[2]
  • C90 informally refers to ISO accepting ANSI's standard with mild changes, as ISO/IEC 9899:1990. (As such, C89 and C90 are almost entirely identical)[3]
  • ISO C
    • can refer to C90
    • or more broadly to the fact that ISO handles C specification now
  • ISO/IEC 9899:1990/AMD1:1995 (C95)[4]
  • C99 (technically ISO/IEC 9899:1999) was the current version of C up to 2012ish[5]
  • C11 (technically ISO/IEC 9899:2011) [6]
nicknamed C1x before its approval
  • C18 fixed some details in C11, not introducing new features [7]


C++

  • ISO/IEC 14882:1998 (informally C++98)
  • ISO/IEC 14882:2003 (informally C++03)
  • 2005 saw C++ Technical Report 1 (a.k.a. TR1), like an addendum to C++03, then expected to be features for the next version (C++0x), and is implemented in most compilers.
  • C++11 is current since August 2011, and a similar story to how C11 became the latest
nicknamed C++0x before its approval
  • C++14 was largely stuff that might have made it into C++11 but didn't
nicknamed C++1y before its approval
  • C++17
nicknamed C++1z before its approval
  • C++20
  • C++23


In function references, you may see references to standards like C89 and C99, but also to (specific versions of) POSIX, BSD, SysV, and more. This because OSes may offer functionality and functions not part of a standard - often when they are useful extensions of the basic C / C++ library.

People may try to avoid this in the name of portability, or use them along with a portable fallback.


See also:


Some related confusion