This is the mail archive of the mailing list for the Cygwin 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]

GCC 3.x: dynamic_casts and dll

The following patch fixes the GCC 3.1 dynamic_cast bug reported by Colin Peters

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?


2002-07-21  Danny Smith  <>

	* 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
diff -u -p -r1.12.4.1 typeinfo
--- typeinfo	19 Apr 2002 07:59:16 -0000
+++ 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.  	
   // On platforms that support weak symbols, typeinfo names are merged. -
- Find yourself a bargain!

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