rtti data structures (again)

Jason Merrill jason at cygnus.com
Sat Jan 29 01:55:53 UTC 2000


>>>>> Nathan Sidwell <sidwell at codesourcery.com> writes:

 > 1) The amended (25th Jan) RTTI says
 > 	'Note that the full structure described by an RTTI descriptor may
 > 	include incomplete types not required by the Standard to be
 > 	completed, although not in contexts where it would cause ambiguity.'
 > I don't believe this is the case, the example I posted a couple of weeks
 > back pointed this out. Here it is, in a slightly more compact form

 > 	struct A;
 > 	struct B;

 > 	int main ()
 > 	{
 > 	  try {
 > 	    throw (B **)0;
 > 	  } catch (A const * const *) { 
 > 	    abort ();
 > 	  } catch (B const * const *) {
 > 	    ;//ok
 > 	  } catch (...) {
 > 	    abort ();
 >  	  }
 > 	}

We decided on Thursday that this can be handled by not emitting info for A
and B, just referring to them using weak references.  The EH matcher will
never look past the inner pointers.

 > 2) __si_class_type_info is documented for a single non-virtual heirarcy,
 > and __vmi_class_type_info for a class containing (directly or indirectly)
 > a multiple or virtual inheritance component. My mistake was to use
 > __si_class_type_info for a class with a single base, regardless of the
 > heirachy within the base (that is the current g++ behaviour).

 > 3) __si_class_type_info is for both public and non-public inheritance
 > (again, something I'd not noticed, thinking it was for public only).

We decided on Thursday was that your "mistakes" are what we want.  __si
will be for any class with a single direct base at offset 0 which is public
and non-virtual.

We also decided that the flags should move from __class_type_info into
__vmi_class_type_info, and that the polymorphic flag should be removed.

Note that you're probably thinking about this stuff in greater depth than
any of us who are actually at the meetings, so if you think something
should change, please feel free to propose it.

Jason




More information about the cxx-abi-dev mailing list