public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ typeinfo and vtables vs. DECL_CONTEXT.
@ 2009-05-07 20:08 Dave Korn
  2009-05-07 21:49 ` Dave Korn
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Korn @ 2009-05-07 20:08 UTC (permalink / raw)
  To: gcc


    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?

  (On i386/PE, this leads to typeinfo not being dllexported.)

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: C++ typeinfo and vtables vs. DECL_CONTEXT.
  2009-05-07 20:08 C++ typeinfo and vtables vs. DECL_CONTEXT Dave Korn
@ 2009-05-07 21:49 ` Dave Korn
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Korn @ 2009-05-07 21:49 UTC (permalink / raw)
  To: Dave Korn; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-07 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 20:08 C++ typeinfo and vtables vs. DECL_CONTEXT Dave Korn
2009-05-07 21:49 ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).