#pragma object_model

C++ only

Description

The #pragma object_model directive specifies the object model to use for the structures, unions, and classes that follow it.

Syntax

Read syntax diagramSkip visual syntax diagram                               .-compat-.
>>-#--pragma--object_model--(--+-ibm----+--)-------------------><
                               +-gccv3--+
                               '-pop----'

where choices for object model are:

compat Uses the xlC object model compatible with previous versions of the compiler.
ibm Uses the modified object model which performs more efficiently than the compat object model.
pop Reverts to the object model setting previously in effect. If no previous object model setting exists, sets the object model to the default setting.

Notes

This pragma affects the structures, unions, and classes that follow it, until another #pragma object_model statement is reached.

When this pragma is used, the current object model setting is placed on a stack. Subsequent use of this pragma places the newest setting on top of the stack. Specifying #pragma object_model(pop) removes the current object model setting from the stack, and sets the object model to the next setting in the stack.

Related information