public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40068]  New: GCC fails to apply dllexport attribute to typeinfo.
@ 2009-05-08 11:52 dave dot korn dot cygwin at gmail dot com
  2009-05-10  1:11 ` [Bug target/40068] " dave dot korn dot cygwin at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: dave dot korn dot cygwin at gmail dot com @ 2009-05-08 11:52 UTC (permalink / raw)
  To: gcc-bugs

Precisely as subject.  All other class members and related data (e.g. vtables,
synthetic ctors) will be tagged dllexport if the class itself is dllexport, and
-export comments will be added listing their symbols in the .drectve section. 
Typeinfo data alone will not receive the dllexport attribute, because it is not
a class member.  (Theoretically, I think it counts as a static class data
member of type std::type_info, but internally) It is generated as a synthetic
POD data type, and hence does not appear to the i386 backend as belonging to
the class it represents.

The description in bug 17300 suggests that there could be a problem further
down the line with dllimporting such typeinfos, but right now they simply can't
be referenced outside the enclosing DLL at all, i.e. clients of a DLL can't
dynamically cast class pointers to the classes it implements, only routines
within the DLL which have local linkage to the typeinfo.  This is a separate
problem, which I think can be resolved further down the toolchain using
pseudo-relocs; I don't think it's a reason not to make export work.


-- 
           Summary: GCC fails to apply dllexport attribute to typeinfo.
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dave dot korn dot cygwin at gmail dot com
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40068


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

end of thread, other threads:[~2013-09-13  7:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-40068-4@http.gcc.gnu.org/bugzilla/>
2012-02-02 21:01 ` [Bug target/40068] GCC fails to apply dllexport attribute to typeinfo ktietz at gcc dot gnu.org
2012-02-07 10:47 ` ktietz at gcc dot gnu.org
2012-02-07 10:49 ` ktietz at gcc dot gnu.org
2012-02-07 11:49 ` ktietz at gcc dot gnu.org
2013-09-13  7:52 ` mattyclarkson at gmail dot com
2013-09-13  7:54 ` mattyclarkson at gmail dot com
2009-05-08 11:52 [Bug c++/40068] New: " dave dot korn dot cygwin at gmail dot com
2009-05-10  1:11 ` [Bug target/40068] " dave dot korn dot cygwin at gmail dot com
2009-05-10  5:01 ` dannysmith at users dot sourceforge dot net
2009-05-10 11:18 ` dave dot korn dot cygwin at gmail dot com
2009-05-13  8:12 ` dannysmith at users dot sourceforge dot net
2009-06-25 15:37 ` dave dot korn dot cygwin at gmail dot com

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).