Run-time support routines for throwing bad_cast and bad_typeid

Mark Mitchell mark at codesourcery.com
Thu Jun 29 17:32:47 UTC 2000


  I suggest the following

	extern "C" void *__cxa_bad_cast ();
	extern "C" const void *__cxa_bad_typeid ();

That's a reasonable suggestion, too.  With a `void' return, you can
always do: 

  (__cxa_bad_cast (), (void*) NULL)

or whatever, in the compiler, to make the arms of the conditional have
the right type.

I have no preference -- but I do think we need such functions.

Thanks,

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list