home *** CD-ROM | disk | FTP | other *** search
- 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
-
- * class.c (finish_base_struct): Allow non-COM bases for COM classes
- except at the leftmost position.
- (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
- Pass the binfo's class, not the most derived, to skip_rtti_stuff.
- * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
-
- Index: gcc-2.95.2/gcc/cp/class.c
- ===================================================================
- RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/cp/class.c,v
- retrieving revision 1.3
- diff -u -3 -p -r1.3 class.c
- --- gcc-2.95.2/gcc/cp/class.c 1999/11/05 06:15:59 1.3
- +++ gcc-2.95.2/gcc/cp/class.c 1999/11/05 06:16:10
- @@ -1648,7 +1648,7 @@ finish_base_struct (t, b)
- ("COM interface type `%T' must be the leftmost base class",
- basetype);
- }
- - else if (CLASSTYPE_COM_INTERFACE (t))
- + else if (CLASSTYPE_COM_INTERFACE (t) && i == 0)
- {
- cp_error ("COM interface type `%T' with non-COM base class `%T'",
- t, basetype);
- @@ -2355,7 +2355,7 @@ modify_one_vtable (binfo, t, fndecl, pfn
- if (fndecl == NULL_TREE)
- return;
-
- - n = skip_rtti_stuff (&virtuals, t);
- + n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
-
- while (virtuals)
- {
- @@ -2449,7 +2449,7 @@ fixup_vtable_deltas1 (binfo, t)
- tree virtuals = BINFO_VIRTUALS (binfo);
- unsigned HOST_WIDE_INT n;
-
- - n = skip_rtti_stuff (&virtuals, t);
- + n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
-
- while (virtuals)
- {
- @@ -2622,8 +2622,8 @@ override_one_vtable (binfo, old, t)
- if (BINFO_NEW_VTABLE_MARKED (binfo))
- choose = NEITHER;
-
- - skip_rtti_stuff (&virtuals, t);
- - skip_rtti_stuff (&old_virtuals, t);
- + skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
- + skip_rtti_stuff (&old_virtuals, BINFO_TYPE (binfo));
-
- while (virtuals)
- {
- Index: gcc-2.95.2/gcc/cp/search.c
- ===================================================================
- RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/cp/search.c,v
- retrieving revision 1.2
- diff -u -3 -p -r1.2 search.c
- --- gcc-2.95.2/gcc/cp/search.c 1999/11/05 06:16:00 1.2
- +++ gcc-2.95.2/gcc/cp/search.c 1999/11/05 06:16:10
- @@ -2013,7 +2013,7 @@ get_abstract_virtuals (type)
- {
- tree virtuals = BINFO_VIRTUALS (vbases);
-
- - skip_rtti_stuff (&virtuals, type);
- + skip_rtti_stuff (&virtuals, BINFO_TYPE (vbases));
-
- while (virtuals)
- {
- @@ -2488,7 +2488,7 @@ expand_upcast_fixups (binfo, addr, orig_
- *vbase_offsets = delta;
- }
-
- - n = skip_rtti_stuff (&virtuals, t);
- + n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
-
- while (virtuals)
- {
-