+2002-09-30 Steve Ellcey <sje@cup.hp.com>
+
+ * class.c (build_vtbl_initializer): Add cast.
+ (add_vcall_offset_vtbl_entries_1):
+ Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
+
2002-09-30 Mark Mitchell <mark@codesourcery.com>
* class.c (walk_subobject_offsets): Correct the calculation of
int i;
for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
- add = tree_cons (NULL_TREE, null_pointer_node, add);
+ add = tree_cons (NULL_TREE,
+ build_c_cast (vtable_entry_type,
+ size_zero_node),
+ add);
*prev = add;
}
}
/* The next vcall offset will be found at a more negative
offset. */
- vid->index = size_binop (MINUS_EXPR, vid->index, ssize_int (1));
+ vid->index = size_binop (MINUS_EXPR, vid->index,
+ ssize_int (TARGET_VTABLE_DATA_ENTRY_DISTANCE));
/* Keep track of this function. */
VARRAY_PUSH_TREE (vid->fns, derived_virtuals);