Language levels and language extensions

We refer to the following language specifications as "base language levels" in order to introduce the notion of an extension to a base. In this context the base language levels refer to the following specifications:

In addition to the features supported by the base levels, XL C/C++ contains language extensions that enhance usability and facilitate porting programs to different platforms, including:

You can control the language level to be used for compilation through several mechanisms, including:

With a few exceptions, almost all of the language extensions are supported when you compile using the basic invocation commands xlc (for C) and xlC or xlc++ (for C++).

The default language level for the xlc invocation command is extc89, which includes most of the IBM extensions described in this document, as well as most of the features introduced by the C99 standard. In addition, in the default configuration file which is shipped with the compiler, the stanza for the xlc command enables some compiler options that control C99 features not included in extc89. For a complete listing of the C extensions and methods for enabling them, see Appendix A. The IBM XL C language extensions.

The default language level for the xlC and xlc++ invocation commands is extended, which includes most of the IBM extensions described in this document, as well as many C99 features. For a complete listing of the C++ extensions and methods for enabling them, see Appendix B. The IBM XL C++ language extensions.

For information on the various methods for controlling the language level for compilation, see "How to choose a compiler invocation", -qlanglvl, and #pragma langlvl .