Language levels and language extensions
The C language described in this reference is based on the standards listed in Standards and specifications.
- C99
- C89
This information uses the term K&R C to refer to the C language plus the generally accepted extensions produced by Brian Kernighan and Dennis Ritchie that were in use prior to the ISO standardization of C.
- various invocation commands
- the -qlanglvl option
With a few exceptions, almost all of the language extensions are supported when you compile using the basic invocation command xlc.
The default language level for the xlc invocation command is extc99, which includes all of the features introduced by the C99 standard, and most of the IBM extensions described in this information. For a complete listing of the C extensions and various methods for enabling them, see The IBM XL C language extensions.
For information on the various methods for controlling the language level for compilation, see Invoking the compiler and -qlanglvl.
Extensions related to C11 standard features
XL C supports the currently implemented C11 features as part of a continual phased release process leading towards full compliance with C11. A complete list of C11 features supported in XL C is provided in C11 compatibility.
Extensions related to GNU C
Certain language extensions that correspond to GNU C features are implemented to facilitate portability. These include extensions to C89 and C99. Throughout this information, the text indicates the IBM® extensions that have been implemented for compatibility with GNU C ; a complete list of these is provided in Extensions for GNU C compatibility for C++ only.
Extensions supporting and extending the AltiVec Programming Interface
XL C supports and extends AltiVec vector types when vector support is enabled. These language extensions exploit the SIMD and parallel processing capabilities of the PowerPC® processor, and facilitate the associated optimization techniques. The IBM implementation of the AltiVec Programming Interface specification is an extended implementation, which, for the most part, matches the syntax and semantics of the GNU C implementation. In addition to the text provided throughout this information that describes the behavior of the vector extensions, a list of the IBM extensions to the AltiVec Programming Interface is also provided in Extensions for vector processing support.
Extensions supporting Unicode
The Unicode Standard is the specification of an encoding scheme for written characters and text. It is a universal standard that enables consistent encoding of multilingual text and allows text data to be interchanged internationally without conflict. The ISO C Committee has approved the implementation of u-literals and U-literals to support Unicode UTF-16 and UTF-32 character literals, respectively. See Extensions for Unicode support for details.