This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dynamic_cast & RTTI (c++)


>>>>> "Richard" == Richard von Lehe <Richard.von.Lehe@gd-ais.com> writes:

    Richard> Where can I find out if the powerpc cross-compiler
    Richard> (powerpc-eabi-g++) supports RTTI? Everywhere I look
    Richard> people always use the option -fno_rtti, but I want to
    Richard> know for sure that it's not supported.

AFAIK RTTI should work fine if you don't disable it with -fno-rtti.
The reason eCos disables it by default is to save memory: RTTI
requires some extra data in every object, plus the typeid data itself.

You do have to be somewhat careful not to mix code that has been
compiled with and without -fno-rtti. RTTI support can change the
layout of C++ objects, so if e.g. an object is created in code
compiled with -fno-rtti and then used in code compiled with RTTI then
things can get very confusing.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]