-qrtti (C++ only)
Category
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
.-nortti-------------------. >>- -q--+-rtti--=--+-all---------+-+--------------------------->< +-type--------+ +-typeinfo----+ +-dyna--------+ '-dynamiccast-'
Defaults
-qnortti
Parameters
- all
- The compiler generates the information needed for the RTTI typeid and dynamic_cast operators.
- 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.
Specifying -qrtti with no suboptions is equivalent to -qrtti=all.
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
- __GXX_RTTI is predefined to a value of 1 when -qrtti is in effect; otherwise, it is undefined.
- __NO_RTTI__ is defined to 1 when -qnortti is in effect; otherwise, it is undefined.
- __RTTI_ALL__ is defined to 1 when -qrtti or -qrtti=all is in effect; otherwise, it is undefined.



