diff options
author | Steve Ellcey <sje@cup.hp.com> | 2002-09-30 18:06:58 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2002-09-30 18:06:58 +0000 |
commit | 7befdb9fca2b38967408c54b4f2179f1f25875ae (patch) | |
tree | 8bde1465090dcea7cb5f04c2cb04135030fea85d /gcc | |
parent | f2bf5da86df7166c04d59d3cd9d3902eb424fbbb (diff) | |
download | gcc-7befdb9fca2b38967408c54b4f2179f1f25875ae.zip gcc-7befdb9fca2b38967408c54b4f2179f1f25875ae.tar.gz gcc-7befdb9fca2b38967408c54b4f2179f1f25875ae.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/class.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1fef98d..c3690f3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b97b268..5d46eaa 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); |