This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: C++ typeinfo and vtables vs. DECL_CONTEXT.


Dave Korn wrote:
>     Hi,
> 
>   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.

    cheers,
      DaveK


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