Category
Object code control
Purpose
Generates runtime type identification (RTTI)
information for exception handling and for use by the typeid and dynamic_cast operators.
Syntax
.-NORTTI-.
>>-+-RTTI---+--+-----------------------+-----------------------><
'-(--+-ALL---------+--)-'
'-DYNAMICCAST-'
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
- __RTTI_DYNAMIC_CAST__ is predefined to a value of 1 when the RTTI,
RTTI(ALL), or RTTI(DYNAMICCAST) compiler options are in effect; otherwise,
it is not defined.
- __RTTI_ALL__ is predefined to a value of 1 when the RTTI or RTTI(ALL)
compiler options are in effect; otherwise, it is not defined.
- __NO_RTTI__ is predefined to a value of 1 when the NORTTI compiler
option is in effect; otherwise, it is not defined.
Related information
For more information
about the LANGLVL(EXTENDED) compiler option, see LANGLVL.