C Programming/Language overloading and extensions

Previous: Common practices C Programming Next: Mixing languages

Most C compilers have one or more "extensions" to the standard C language, to do things that are inconvenient to do in standard, portable C.

Some examples of language extensions:

  • in-line assembly language
  • interrupt service routines
  • variable-length data structure (a structure whose last item is a "zero-length array").[1]
  • re-sizeable multidimensional arrays
  • various "#pragma" settings to compile quickly, to generate fast code, or to generate compact code.
  • bit manipulation, especially bit-rotations and things involving the "carry" bit
  • storage alignment
  • Arrays whose length is computed at run time.
edit
  1. comp.lang.c FAQ list: Question 2.6: "C99 introduces the concept of a flexible array member, which allows the size of an array to be omitted if it is the last member in a structure, thus providing a well-defined solution."
Previous: Common practices C Programming Next: Mixing languages