-qrtti

C++ only

Description

Use this option to generate runtime type identification (RTTI) information for exception handling and for use by the typeid and dynamic_cast operators.

Syntax

Read syntax diagramSkip visual syntax diagram          .-rtti-.
        .-+------+--=--all---------.
>>- -q--+-nortti-------------------+---------------------------><
        '-rtti--=--+-type--------+-'
                   +-typeinfo----+
                   +-dyna--------+
                   '-dynamiccast-'

where available suboptions are:

all The compiler generates the information needed for the RTTI typeid and dynamic_cast operators.

If you specify -qrtti with no suboptions, this is the default suboption.

type | typeinfo The compiler generates the information needed for the RTTI typeid operator, but the information needed for dynamic_cast operator is not generated.
dyna | dynamiccast The compiler generates the information needed for the RTTI dynamic_cast operator, but the information needed for typeid operator is not generated.

Notes

For best runtime performance, suppress RTTI information generation with the default -qnortti setting.

The C++ language offers a (RTTI) mechanism for determining the class of an object at run time. It consists of two operators:

A type_info class describes the RTTI available and defines the type returned by the typeid operator.

You should be aware of the following effects when specifying the -qrtti compiler option:

Related information