summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-26 01:48:51 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-26 01:48:51 +0000
commitf702522a4b9deb5a774b5a8816ae4866a0d80be4 (patch)
tree6b883b48ad099b4300499d50d53577f4236b37ce /gcc/cp/class.c
parent6b064ed551601a6cbb6f6a1811f72eaaf761b7fe (diff)
downloadgcc-f702522a4b9deb5a774b5a8816ae4866a0d80be4.tar.gz
* class.c (add_method): Use memcpy/memmove, not bcopy.
* decl.c (duplicate_decls): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b4838b17bcf..f99fc3c1cdf 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -1218,9 +1218,8 @@ add_method (type, method, error_p)
new_len = len + 1;
new_vec = make_tree_vec (new_len);
- bcopy ((PTR) &TREE_VEC_ELT (method_vec, 0),
- (PTR) &TREE_VEC_ELT (new_vec, 0),
- len * sizeof (tree));
+ memcpy (&TREE_VEC_ELT (new_vec, 0), &TREE_VEC_ELT (method_vec, 0),
+ len * sizeof (tree));
len = new_len;
method_vec = CLASSTYPE_METHOD_VEC (type) = new_vec;
}
@@ -1257,9 +1256,9 @@ add_method (type, method, error_p)
/* We know the last slot in the vector is empty
because we know that at this point there's room
for a new function. */
- bcopy ((PTR) &TREE_VEC_ELT (method_vec, slot),
- (PTR) &TREE_VEC_ELT (method_vec, slot + 1),
- (len - slot - 1) * sizeof (tree));
+ memmove (&TREE_VEC_ELT (method_vec, slot + 1),
+ &TREE_VEC_ELT (method_vec, slot),
+ (len - slot - 1) * sizeof (tree));
TREE_VEC_ELT (method_vec, slot) = NULL_TREE;
}
}