Selecting an appropriate object model

C++ only

XL C/C++ lets you compile your program to either of two object models. The two object models are:

The object models differ in the following areas:

Select classic if you need your runtime module to be compatible with any runtime modules compiled with previous versions of IBM C++ compilers.

Select ibm if you want improved performance. This is especially true for class hierarchies with many virtual base classes. The size of the derived class is considerably smaller and access to the virtual function table is faster.

All classes in the same inheritance hierarchy must have the same object model.

Use the -qobjmodel compiler option or the object_model pragma to specify a target object model.

Related information