This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[Patch} Fix dynamic casts across dll boundaries on windows targets


Hello
This fixes a long standing libstdc++ bug in windows targets, where dynamic casts
that cross dll boundaries fail. The bug was  first reported to
mingw lists by Colin Peters in Jun 2002 as a regression against 2.95

http://sourceforge.net/tracker/?func=detail&atid=102435&aid=568054&group_id=2435

and fixed locally by a cygwin/mingw specific hack to the typeinfo header:

http://www.cygwin.com/ml/cygwin-apps/2002-07/msg00550.html

The following uses Mark Mitchell's fix for the same problem on bpabi
targets.  Tested on i686-pc-mingw32 with no new regressions.

2004-10-16  Danny Smith  <dannysmith@users.sourceforge.net>

	* config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Define
	__GXX_MERGED_TYPEINFO_NAMES to 0.


Index: config/i386/cygming.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/cygming.h,v
retrieving revision 1.21
diff -c -3 -p -r1.21 cygming.h
*** config/i386/cygming.h	9 Sep 2004 17:11:17 -0000	1.21
--- config/i386/cygming.h	16 Oct 2004 08:23:59 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 86,91 ****
--- 86,94 ----
  	    builtin_define ("_fastcall=__attribute__((__fastcall__))");	\
  	    builtin_define ("_cdecl=__attribute__((__cdecl__))");	\
  	  }								\
+ 	/* Even though linkonce works with static libs, this is needed 	\
+ 	    to compare typeinfo symbols across dll boundaries.  */	\
+ 	builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0");		\
  	MAYBE_UWIN_CPP_BUILTINS ();					\
  	EXTRA_OS_CPP_BUILTINS ();					\
    }									\

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com


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