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

Reply via email to