This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] Inheritance chain enumeration
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Piotr Wyderski <piotr dot wyderski at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 08 May 2009 15:42:42 +0100
- Subject: Re: [C++] Inheritance chain enumeration
- References: <9f8a01cd0905080655x4bc20fc6md3e5206061e90390@mail.gmail.com>
Piotr Wyderski wrote:
> Namely, where do you keep the "direct base information about
> a class type" and what data structures from libstdc++ should I
> become familiar with? And the last question: is the format
> expected to stable in terms of GCC development?
libstdc++-v3/libsupc++/typeinfo.
Anything defined in the ABI docs should be pretty stable.
To find the base classes, look at the typeinfo for the class, which will be
abi::__class_type_info or one of its derivatives as specified in the ABI doc
section 2.9.5; the derived types have pointers to (one or more) base class
typeinfos.
cheers,
DaveK