About This Reference

The C/C++ Language Reference describes the syntax, semantics, and IBM implementation of the C and C++ programming languages. Syntax and semantics constitute a complete specification of a programming language, but conforming implementations of a language specification can differ because of language extensions. The IBM implementations of C and C++ attest to the organic nature of programming languages, reflecting pragmatic considerations and advances in programming techniques. The language extensions to C and C++ reflect the changing needs of modern programming environments.

The aims of this reference are to provide descriptions of the C and C++ languages and to promote a programming style that emphasizes portability. The expression Standard C is a specific term for the current formal definition of the C language, preprocessor, and run-time library. The same naming convention exists for C++. This reference describes an implementation that is consistent with Standard C and Standard C++. The compiler also supports previous language levels.

This reference 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.

The depth of coverage assumes some previous experience with C or another programming language. The intent is to present the syntax and semantics of each language implementation to help you write good programs. The compiler does not enforce certain conventions of programming style, even though they lead to well-ordered programs.

A program that conforms strictly to its language specification will have maximum portability among different environments. In theory, a program that compiles correctly with one standards-conforming compiler will compile and execute correctly under all other conforming compilers, insofar as hardware differences permit. A program that correctly exploits the extensions to the language that are provided by the language implementation can improve the efficiency of its object code.


Supported language standards

The C and C++ languages described in this reference are based on the following standards:

The C language described in this reference is consistent with C99 and documents the features supported by XL C/C++. The compiler supports all language features specified in the Standard. Note that the Standard also specifies features in the run-time library. These features may not be supported in the current run-time library and operating environment.

The C++ language described in this reference is consistent with Standard C++ and documents the features supported by XL C/C++. IBM Copyright 2003