RTTI | NORTTI (C++ only)

Category

Object code control

Pragma equivalent

None.

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
   .-NORTTI-.                              
>>-+-RTTI---+--+-----------------------+-----------------------><
               '-(--+-ALL---------+--)-'   
                    '-DYNAMICCAST-'        

Defaults

NORTTI

Parameters

ALL
The compiler generates the information needed for the RTTI typeid and dynamic_cast operators. If you specify just RTTI, this is the default suboption.
DYNAMICCAST
The compiler generates the information needed for the RTTI dynamic_cast operator, but the information needed for typeid operator is not generated.

Usage

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

Notes:
  • The string output from RTTI function std::typeinfo::name() is always in EBCDIC code page.
  • Even though the default is NORTTI, if you specify LANGLVL(EXTENDED) or LANGLVL(ANSI), you will also implicitly select RTTI.

IPA effects

The IPA link step does not accept the RTTI option. The compiler issues a warning message if you specify this option in the IPA link step.

Predefined macros

Related information

For more information about the LANGLVL(EXTENDED) compiler option, see LANGLVL.