From: Steve Ellcey Date: Mon, 30 Sep 2002 18:06:58 +0000 (+0000) Subject: class.c (build_vtbl_initializer): Add cast. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7befdb9fca2b38967408c54b4f2179f1f25875ae;p=gcc.git class.c (build_vtbl_initializer): Add cast. * class.c (build_vtbl_initializer): Add cast. (add_vcall_offset_vtbl_entries_1): Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. From-SVN: r57659 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1fef98d22b8..c3690f3dca1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-09-30 Steve Ellcey + + * 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 * class.c (walk_subobject_offsets): Correct the calculation of diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b97b2683ee1..5d46eaa3c4e 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -7616,7 +7616,10 @@ build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo, non_fn_entries_p) 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; } } @@ -8061,7 +8064,8 @@ add_vcall_offset_vtbl_entries_1 (binfo, vid) /* 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);