This is the mail archive of the
mailing list for the GCC project.
Re: C++ typeinfo and vtables vs. DECL_CONTEXT.
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 07 May 2009 21:19:47 +0100
- Subject: Re: C++ typeinfo and vtables vs. DECL_CONTEXT.
- References: <4A033D8E.email@example.com>
Dave Korn wrote:
> This may be a bit of a noob question, but why does the var_decl for a class'
> vtable have a DECL_CONTEXT referring to the owning record_type, but the
> var_decl for its typeinfo doesn't?
Hmm, I think I found the answer: because it's secretly actually an internal
POD type that is carefully laid out to match the library's std::type_info
object. Ah. I need to find a way to identify typeinfos and get a handle back
on their class record_type.