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
This commit is contained in:
parent
eb40d6b94a
commit
730e15561d
@ -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>
|
2001-03-23 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* mangle.c (write_discriminator): Use `_0' for discriminator 1,
|
* mangle.c (write_discriminator): Use `_0' for discriminator 1,
|
||||||
|
@ -1218,8 +1218,7 @@ add_method (type, method, error_p)
|
|||||||
new_len = len + 1;
|
new_len = len + 1;
|
||||||
|
|
||||||
new_vec = make_tree_vec (new_len);
|
new_vec = make_tree_vec (new_len);
|
||||||
bcopy ((PTR) &TREE_VEC_ELT (method_vec, 0),
|
memcpy (&TREE_VEC_ELT (new_vec, 0), &TREE_VEC_ELT (method_vec, 0),
|
||||||
(PTR) &TREE_VEC_ELT (new_vec, 0),
|
|
||||||
len * sizeof (tree));
|
len * sizeof (tree));
|
||||||
len = new_len;
|
len = new_len;
|
||||||
method_vec = CLASSTYPE_METHOD_VEC (type) = new_vec;
|
method_vec = CLASSTYPE_METHOD_VEC (type) = new_vec;
|
||||||
@ -1257,8 +1256,8 @@ add_method (type, method, error_p)
|
|||||||
/* We know the last slot in the vector is empty
|
/* We know the last slot in the vector is empty
|
||||||
because we know that at this point there's room
|
because we know that at this point there's room
|
||||||
for a new function. */
|
for a new function. */
|
||||||
bcopy ((PTR) &TREE_VEC_ELT (method_vec, slot),
|
memmove (&TREE_VEC_ELT (method_vec, slot + 1),
|
||||||
(PTR) &TREE_VEC_ELT (method_vec, slot + 1),
|
&TREE_VEC_ELT (method_vec, slot),
|
||||||
(len - slot - 1) * sizeof (tree));
|
(len - slot - 1) * sizeof (tree));
|
||||||
TREE_VEC_ELT (method_vec, slot) = NULL_TREE;
|
TREE_VEC_ELT (method_vec, slot) = NULL_TREE;
|
||||||
}
|
}
|
||||||
|
@ -3722,8 +3722,8 @@ duplicate_decls (newdecl, olddecl)
|
|||||||
|
|
||||||
function_size = sizeof (struct tree_decl);
|
function_size = sizeof (struct tree_decl);
|
||||||
|
|
||||||
bcopy ((char *) newdecl + sizeof (struct tree_common),
|
memcpy ((char *) olddecl + sizeof (struct tree_common),
|
||||||
(char *) olddecl + sizeof (struct tree_common),
|
(char *) newdecl + sizeof (struct tree_common),
|
||||||
function_size - sizeof (struct tree_common));
|
function_size - sizeof (struct tree_common));
|
||||||
|
|
||||||
if (DECL_TEMPLATE_INSTANTIATION (newdecl))
|
if (DECL_TEMPLATE_INSTANTIATION (newdecl))
|
||||||
@ -3760,8 +3760,8 @@ duplicate_decls (newdecl, olddecl)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bcopy ((char *) newdecl + sizeof (struct tree_common),
|
memcpy ((char *) olddecl + sizeof (struct tree_common),
|
||||||
(char *) olddecl + sizeof (struct tree_common),
|
(char *) newdecl + sizeof (struct tree_common),
|
||||||
sizeof (struct tree_decl) - sizeof (struct tree_common)
|
sizeof (struct tree_decl) - sizeof (struct tree_common)
|
||||||
+ tree_code_length [(int)TREE_CODE (newdecl)] * sizeof (char *));
|
+ tree_code_length [(int)TREE_CODE (newdecl)] * sizeof (char *));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user