difference between ANSI C and C89, C99, C11

Source: Internet
Author: User

Summary of different versions of standard differences (image source: HTTP://WWW.CRIFAN.COM/SUMMARY_C_LANGUAGE_VERSION_C89_AMD1_C99_C11):

The following is reproduced:

"K&r C" in 1978, Dennis Ritchie and Brian Kernighan co-launched the first edition of the C programming Language (according to Convention, classics must have abbreviations, the book is referred to as K &R), the Reference Guide at the end of the book (Reference Manual) gives a complete definition of the C language at the time, becoming the de facto standard of C, which people call K&r C. Since that year, C has been ported to various models and has been widely supported, making C language almost eminence in software development at the time.

"C89 (ANSI C)" with the promotion and application of C language in many fields, some new features are constantly implemented and added by various compilers. Therefore, the establishment of a new "non-ambiguous, platform-independent definition of C language" becomes more and more important thing. In 1983, ASC X3 (an agency specializing in information technology standardization under ANSI, which has now been renamed INCITS), established a special technical committee J11 (J11 is the committee number, the full name is X3J11) and is responsible for the drafting of the C language Draft standards . In 1989, the draft was formally adopted by ANSI as the United States national Standard , known as the C89 standard .

"C90 (ISO C)" Subsequently, the second edition of "The C Programming Language" was published and the contents were updated according to ANSI C (C89). In 1990, with the efforts of ISO/IEC JTC1/SC22/WG14 (14th Working Group of the 22nd Sub-Committee of the Committee on ISO/IEC Joint technology), ANSI C was approved as an international standard . So ISO C (also known as C90) was born. ISO C (C90) and ANSI C (C89) are technically identical, in addition to some of the details of the standard document in the typographic arrangement.

"C95" , ISO in 1994, 1996 published the C90 technical Corrigendum document, corrected some typographical errors, and in 1995 passed a C90 technical supplement, a small expansion of C90, the expanded ISO C is known as C9 5.

"C99" in 1999, ANSI and ISO also adopted the latest version of the C language standard and technical errata document , which is known as C99 . This is basically the current and most authoritative definition of C language.

The various C compilers now provide full support for C89 (C90), only partial support for C99 , and some support for some k&r C-style.

Currently the main C language specifications are c89 (C90), C95 (94) and C99. C89, the first C-language specification, was introduced in 89 with the introduction of the ANSI version by the National standards Agency in 90, which was later accepted as an ISO international standard (ISO/IEC 9,899:1990) and is sometimes referred to as c90. However, two bug fixes were made to C90 in 94 and 96, and GCC supported the revised C language specification for the C89 (90) version. A revised version of the 90 specification was proposed in 95, known as C95 or AMD1. GCC also supports the C95 specification. The latest C specification revision was enacted in 99 (ISO/IEC 9,899:1999), known as the C99 specification. The C99 error was corrected in 2001, and GCC supported the revised C99 specification, but so far GCC has not completed full support for the C99 specification.

Also attached: C language Origin

The earliest prototype of the "origin" C language was ALGOL 60 in 1963, when Cambridge University developed it into CPL (Combined programing Language). In 1967, Matin Richards of Cambridge University simplified the CPL language and produced bcpl language. In 1970, Ken Thompson of Bell Labs, BCPL, was modified and named B, which means extracting the essence of the CPL (Boiling CPL to its basic good features) 。 Wrote the first UNIX system in B language. In 1973, Dennis Ritchie (D.m.ritchie) at T-Bell Laboratory designed a new language based on BCPL and B language, taking the second letter of the BCPL as the name, which is the famous C language. Shortly thereafter, the Unix kernel (Kernel) and applications were all rewritten in C, and C became the most widely used programming language in UNIX environments.

Reference documents:

[1] Wikipedia ANSI C

[2] Various versions of the C language: C89,AMD1,C99,C11 "Recommended reading"

difference between ANSI C and C89, C99, C11

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.