GCC 3.x: dynamic_casts and dll
Danny Smith
danny_r_smith_2001@yahoo.co.nz
Sun Jul 21 05:01:00 GMT 2002
The following patch fixes the GCC 3.1 dynamic_cast bug reported by Colin Peters
http://sourceforge.net/tracker/?func=detail&atid=102435&aid=568054&group_id=2435
Using the more efficient address lookup for typeinfo works using linkonce
semantics in static libs and objs but not with dll's.
OK to commit to cygwin-mingw branch?
libstdc++-v3/ChangeLog-cygwin-mingw
2002-07-21 Danny Smith <dannysmith@users.sourceforge.net>
* libsupc++/typeinfo (__GXX_MERGED_TYPEINFO_NAMES): Define to
0 for win32 targets to allow typeinfo lookup to work across
dll boundaries.
Index: typeinfo
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/typeinfo,v
retrieving revision 1.12.4.1
diff -u -p -r1.12.4.1 typeinfo
--- typeinfo 19 Apr 2002 07:59:16 -0000 1.12.4.1
+++ typeinfo 21 Jul 2002 08:00:26 -0000
@@ -44,8 +44,10 @@ namespace __cxxabiv1
class __class_type_info;
} // namespace __cxxabiv1
-#if !__GXX_WEAK__
+#if !__GXX_WEAK__ || defined (__MINGW32__) || defined (__CYGWIN__)
// If weak symbols are not supported, typeinfo names are not merged.
+ // For PE COFF dll libraries linkonce semantics does not work, so
+ // fallback to using __name value comparisons.
#define __GXX_MERGED_TYPEINFO_NAMES 0
#else
// On platforms that support weak symbols, typeinfo names are merged.
http://www.sold.com.au - SOLD.com.au
- Find yourself a bargain!
More information about the Cygwin-apps
mailing list