This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
IA64 HP-UX patch for C++
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Sep 2002 09:34:01 -0700 (PDT)
- Subject: IA64 HP-UX patch for C++
- Reply-to: sje at cup dot hp dot com
This is a change that was part of some earlier C++ changes that got
checked in. It doesn't affect any platform except IA64 HP-UX because
that is the only platform that sets TARGET_VTABLE_DATA_ENTRY_DISTANCE to
a value other then 1.
Without this change I get errors when building libstdc++-v3 due
to type mismatches when accessing the vtable.
Steve Ellcey
sje@cup.hp.com
Steve Ellcey <sje@cup.hp.com>
* cp/class.c (build_vtbl_initializer): Ensure correct type
for vtable pad entries.
*** gcc.orig/gcc/cp/class.c Wed Sep 25 09:21:48 2002
--- gcc/gcc/cp/class.c Wed Sep 25 09:25:32 2002
*************** build_vtbl_initializer (binfo, orig_binf
*** 7501,7507 ****
int i;
for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
! add = tree_cons (NULL_TREE, null_pointer_node, add);
*prev = add;
}
}
--- 7501,7511 ----
int i;
for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
! add = tree_cons (NULL_TREE,
! build1 (NOP_EXPR,
! vtable_entry_type,
! size_zero_node),
! add);
*prev = add;
}
}