diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-03-26 01:48:51 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-03-26 01:48:51 +0000 |
commit | 730e15561d35b15a74b45688d40c9639e077dbca (patch) | |
tree | 6b883b48ad099b4300499d50d53577f4236b37ce | |
parent | eb40d6b94a706837f4fa87106b60fb1aa2aaa4f4 (diff) | |
download | gcc-730e15561d35b15a74b45688d40c9639e077dbca.zip gcc-730e15561d35b15a74b45688d40c9639e077dbca.tar.gz gcc-730e15561d35b15a74b45688d40c9639e077dbca.tar.bz2 |
class.c (add_method): Use memcpy/memmove, not bcopy.
* class.c (add_method): Use memcpy/memmove, not bcopy.
* decl.c (duplicate_decls): Likewise.
From-SVN: r40835
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/class.c | 11 | ||||
-rw-r--r-- | gcc/cp/decl.c | 14 |
3 files changed, 18 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5f63a67..63ce6c9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * class.c (add_method): Use memcpy/memmove, not bcopy. + + * decl.c (duplicate_decls): Likewise. + 2001-03-23 Jakub Jelinek <jakub@redhat.com> * mangle.c (write_discriminator): Use `_0' for discriminator 1, diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b4838b1..f99fc3c 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; } } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 4794f65..04d4c4f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3722,9 +3722,9 @@ duplicate_decls (newdecl, olddecl) function_size = sizeof (struct tree_decl); - bcopy ((char *) newdecl + sizeof (struct tree_common), - (char *) olddecl + sizeof (struct tree_common), - function_size - sizeof (struct tree_common)); + memcpy ((char *) olddecl + sizeof (struct tree_common), + (char *) newdecl + sizeof (struct tree_common), + function_size - sizeof (struct tree_common)); if (DECL_TEMPLATE_INSTANTIATION (newdecl)) { @@ -3760,10 +3760,10 @@ duplicate_decls (newdecl, olddecl) } else { - bcopy ((char *) newdecl + sizeof (struct tree_common), - (char *) olddecl + sizeof (struct tree_common), - sizeof (struct tree_decl) - sizeof (struct tree_common) - + tree_code_length [(int)TREE_CODE (newdecl)] * sizeof (char *)); + memcpy ((char *) olddecl + sizeof (struct tree_common), + (char *) newdecl + sizeof (struct tree_common), + sizeof (struct tree_decl) - sizeof (struct tree_common) + + tree_code_length [(int)TREE_CODE (newdecl)] * sizeof (char *)); } DECL_UID (olddecl) = olddecl_uid; |