This is the mail archive of the
mailing list for the GCC project.
Re: operator==() of the type_info class
On Thu, Oct 04, 2001 at 07:43:21PM +0200, Jakub Jelinek wrote:
> On Thu, Oct 04, 2001 at 02:12:39PM +0000, Jörg Budischewski wrote:
> > There is currently some effort underway to port the linux build of
> > openoffice from gcc 2.95.2 to gcc 3.01.
> > The throwing of exceptions via shared library boundaries only works, when
> > the shared library exports the exception's typeinfo symbol. This is due
> > to that the type_info::operator==() is implemented by comparing the
> > type_info-instances-pointers instead of comparing the type-names.
> That's what the new ABI sais.
Yes, exactly. If a particular platform is capable of merging the
typeinfo sections into a single unified section, then pointer comparison
(O(1)) is correct. Otherwise, a strcmp() is performed, which is O(n).
GNU/Linux falls into the "good" category here. :-)
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams