-qrtti (C++ only)

Category

Object code control

Pragma equivalent

#pragma options rtti

Purpose

Generates 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---.   
>>- -q--+-nortti-+---------------------------------------------><

Defaults

-qrtti

Usage

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

You should be aware of the following effects when specifying the -qrtti compiler option:
  • Contents of the virtual function table will be different when -qrtti is specified.
  • When linking objects together, all corresponding source files must be compiled with the correct -qrtti option specified.
  • If you compile a library with mixed objects (-qrtti specified for some objects, -qnortti specified for others), you may get an undefined symbol error.

Predefined macros

Related information