C99

C99

C99 is a modern dialect of the C programming language.

History

After the ANSI standardization process, the C language specification remained relatively static for some time, whereas C++ continued to evolve, largely during its own standardization effort. Normative Amendment 1 created a new standard for the C language in 1995, but only to correct some details of the C89 standard and to add more extensive support for international character sets. However, the standard underwent further revision in the late 1990s, leading to the publication of ISO/IEC 9899:1999 in 1999. This standard is commonly referred to as "C99." It was adopted as an ANSI standard in May 2000. The international C standard is maintained by the working group ISO/IEC JTC1/SC22/WG14.

New features

C99 introduced several new features, many of which had already been implemented as extensions in several compilers:

* inline functions
* variable declaration no longer restricted to file scope or the start of a compound statement
* several new data types, including long long int, optional extended integer types, an explicit boolean data type, and a complex type to represent complex numbers
* variable-length arrays
* support for one-line comments beginning with //, as in BCPL or C++
* new library functions, such as snprintf
* new header files, such as stdbool.h and inttypes.h
* type-generic math functions (tgmath.h)
* improved support for IEEE floating point
* designated initializers
* compound literals
* support for variadic macros (macros of variable arity)
* restrict qualification to allow more aggressive code optimization

Backward compatibility with C90

C99 is for the most part backward compatible with C90, but is stricter in some ways; in particular, a declaration that lacks a type specifier no longer has int implicitly assumed. The C standards committee decided that it was of more value for compilers to diagnose inadvertent omission of the type specifier than to silently process legacy code that relied on implicit int. In practice, compilers are likely to diagnose the omission but also assume int and continue translating the program.

Support by major compilers

GCC and other C compilers now support many of the new features of C99. However, there has been less support from vendors such as Microsoft and Borland that have mainly focused on C++, since C++ provides similar functionality improvement.

GCC, despite its extensive C99 support, is still not a completely compliant implementation; some features are missing or do not work correctly. [cite web
url=http://gcc.gnu.org/c99status.html
title=Status of C99 features in GCC
publisher=Free Software Foundation, Inc.
date=2007-11-22
accessdate=2008-01-09
]

According to Sun Microsystems, Sun Studio (which is freely downloadable) now supports the full C99 standard. [cite web
url=http://developers.sun.com/sunstudio/documentation/ss12/mr/READMEs/c.html#about
title=Sun Studio 12: C Compiler 5.9 Readme
publisher=Sun Microsystems, Inc.
date=2007-05-31
accessdate=2008-01-09
]

The C interpreter Ch supports major C99 features [cite web
url=http://www.softintegration.com/demos/chstandard/c99.html
title=C/C++ interpreter Ch C99 features
publisher=SoftIntegration, Inc.
date=2008-02-15
accessdate=2008-02-15
] and it is freely available in Windows, Linux, Mac OS X, Solaris, QNX and FreeBSD.

Version detection

A standard macro __STDC_VERSION__ is defined with value 199901L to indicate that C99 support is available. As with the __STDC__ macro for C90, __STDC_VERSION__ can be used to write code that will compile differently for C90 and C99 compilers, as in this example that ensures that inline is available in either case.


#if __STDC_VERSION__ >= 199901L /* "inline" is a keyword */
#else
# define inline /* nothing */
#endif

Future standards directions

Since ratification of the 1999 C standard, the standards working group has prepared technical reports specifying improved support for embedded processing, additional character data types (Unicode support), and library functions with improved bounds checking. Work continues on technical reports addressing decimal floating point, additional mathematical special functions, and additional dynamic memory allocation functions. The C and C++ standards committees have been collaborating on specifications for threaded programming.

As of 2007, work has begun in anticipation of another revision of the C standard, informally called "C1"x". The C standards committee has adopted guidelines that should limit the adoption of new features that have not been tested by existing implementations.

It is likely that the standard gets function, which was officially deprecated in response to a defect report concerning its unsafe interface design, will not be specified in the next revision of the C standard.

See also

* List of programming languages

References

External links

*
* [http://www.ibm.com/developerworks/library/l-c99.html IBM developerWorks: Open source development using C99]
* [http://www.kuro5hin.org/story/2001/2/23/194544/139 Kuro5hin: Are you Ready For C99?]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • C99 — C99  современный стандарт языка программирования Си. Определен в ISO/IEC 9899:1999, современная версия ISO/IEC 9899:1999/Cor 3:2007 от 2007 11 15. Является развитием стандарта C90. Содержание 1 История 2 Новые возможности …   Википедия

  • C99 — Inhaltsverzeichnis 1 K R C 2 C89, C90 3 C95 4 C99 5 Beispiele für den Unterschied zwischen verschiedenen Fassungen der Sprache C 6 Weblinks …   Deutsch Wikipedia

  • C99 — Cette page d’homonymie répertorie les différents sujets et articles partageant un même nom.   Sigles d’une seule lettre   Sigles de deux lettres > Sigles de trois lettres   Sigles de quatre lettres …   Wikipédia en Français

  • C99 (disambiguation) — C99 may refer to : * C99, the modern dialect of the C programming language * a C compiler for the Texas Instruments TI 99/4A home computer * Ruy Lopez chess openings ECO code * HMS Blake (C99), a 1945 British Royal Navy cruiser * a model of… …   Wikipedia

  • C99 — ● np. m. ►LANG Version normalisée par l ISO du langage C définie en 1999. Les améliorations sont tellement nombreuses que cette version est devenue incompatible avec le C++. À l heure actuelle, seules certaines versions de compilateurs libres… …   Dictionnaire d'informatique francophone

  • HMS Blake (C99) — was a guided missile cruiser of the Tiger class of the Royal Navy, the last of the Royal Navy cruisers. She was named after Admiral Robert Blake, a 17th century admiral who was the Father of the Royal Navy . She was ordered in 1942 as one of the… …   Wikipedia

  • C (programming language) — C The C Programming Language[1] (aka K R ) is the seminal book on C …   Wikipedia

  • Си (язык программирования) — У этого термина существуют и другие значения, см. Си. Запрос «Язык программирования Си» перенаправляется сюда; см. также другие значения. Си Класс языка: процедурный Тип исполнения: компилируемый Появился в: 1969 1973 Автор( …   Википедия

  • Varianten der Programmiersprache C — Seit dem Erscheinen der Programmiersprache C im Jahre 1972 wurden mehrere Varianten (Spezifikationen und internationale Standards) veröffentlicht. Inhaltsverzeichnis 1 K R C 2 C89, C90 2.1 Wichtigste Neuerungen von C90 …   Deutsch Wikipedia

  • Comparison of programming languages (basic instructions) — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”