public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch} Fix dynamic casts across dll boundaries on windows targets
@ 2004-10-16  9:47 Danny Smith
  2004-10-17 22:25 ` Christopher Faylor
  2004-10-19  6:21 ` Aaron W. LaFramboise
  0 siblings, 2 replies; 5+ messages in thread
From: Danny Smith @ 2004-10-16  9:47 UTC (permalink / raw)
  To: GCC Patches; +Cc: Christopher Faylor

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

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

end of thread, other threads:[~2004-10-21  3:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-16  9:47 [Patch} Fix dynamic casts across dll boundaries on windows targets Danny Smith
2004-10-17 22:25 ` Christopher Faylor
2004-10-19  6:21 ` Aaron W. LaFramboise
2004-10-19 10:52   ` Danny Smith
2004-10-21  3:59     ` Aaron W. LaFramboise

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