Commit 1ddb2906 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
        (add_method): Likewise for arguments 1 & 2 of `bcopy'.
        * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
        * pt.c (process_partial_specialization): Cast 1st argument of
        `bzero' to (PTR).
        * tree.c (build_base_fields): Cast `base_align' to (int) when
        comparing against one.

From-SVN: r23156
parent 79c9824e
Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
(add_method): Likewise for arguments 1 & 2 of `bcopy'.
* decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
* pt.c (process_partial_specialization): Cast 1st argument of
`bzero' to (PTR).
* tree.c (build_base_fields): Cast `base_align' to (int) when
comparing against one.
1998-10-16 Mark Mitchell <mark@markmitchell.com> 1998-10-16 Mark Mitchell <mark@markmitchell.com>
* decl.c (lookup_name_real): Handle template parameters for member * decl.c (lookup_name_real): Handle template parameters for member
......
...@@ -1091,7 +1091,7 @@ make_method_vec (n) ...@@ -1091,7 +1091,7 @@ make_method_vec (n)
new_vec = *t; new_vec = *t;
*t = TREE_CHAIN (new_vec); *t = TREE_CHAIN (new_vec);
TREE_CHAIN (new_vec) = NULL_TREE; TREE_CHAIN (new_vec) = NULL_TREE;
bzero (&TREE_VEC_ELT (new_vec, 0), n * sizeof (tree)); bzero ((PTR) &TREE_VEC_ELT (new_vec, 0), n * sizeof (tree));
return new_vec; return new_vec;
} }
...@@ -1175,8 +1175,8 @@ add_method (type, fields, method) ...@@ -1175,8 +1175,8 @@ add_method (type, fields, method)
{ {
/* We need a bigger method vector. */ /* We need a bigger method vector. */
tree new_vec = make_method_vec (2 * len); tree new_vec = make_method_vec (2 * len);
bcopy (&TREE_VEC_ELT (method_vec, 0), bcopy ((PTR) &TREE_VEC_ELT (method_vec, 0),
&TREE_VEC_ELT (new_vec, 0), (PTR) &TREE_VEC_ELT (new_vec, 0),
len * sizeof (tree)); len * sizeof (tree));
free_method_vec (method_vec); free_method_vec (method_vec);
len = 2 * len; len = 2 * len;
...@@ -1263,8 +1263,8 @@ add_method (type, fields, method) ...@@ -1263,8 +1263,8 @@ add_method (type, fields, method)
/* 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 for because we know that at this point there's room for
a new function. */ a new function. */
bcopy (&TREE_VEC_ELT (method_vec, i), bcopy ((PTR) &TREE_VEC_ELT (method_vec, i),
&TREE_VEC_ELT (method_vec, i + 1), (PTR) &TREE_VEC_ELT (method_vec, i + 1),
(len - i - 1) * sizeof (tree)); (len - i - 1) * sizeof (tree));
TREE_VEC_ELT (method_vec, i) = NULL_TREE; TREE_VEC_ELT (method_vec, i) = NULL_TREE;
} }
......
...@@ -146,7 +146,7 @@ static void resume_binding_level PROTO((struct binding_level *)); ...@@ -146,7 +146,7 @@ static void resume_binding_level PROTO((struct binding_level *));
static struct binding_level *make_binding_level PROTO((void)); static struct binding_level *make_binding_level PROTO((void));
static int namespace_bindings_p PROTO((void)); static int namespace_bindings_p PROTO((void));
static void declare_namespace_level PROTO((void)); static void declare_namespace_level PROTO((void));
static void signal_catch PROTO((int)); static void signal_catch PROTO((int)) ATTRIBUTE_NORETURN;
static void storedecls PROTO((tree)); static void storedecls PROTO((tree));
static void storetags PROTO((tree)); static void storetags PROTO((tree));
static void require_complete_types_for_parms PROTO((tree)); static void require_complete_types_for_parms PROTO((tree));
......
...@@ -1907,10 +1907,10 @@ process_partial_specialization (decl) ...@@ -1907,10 +1907,10 @@ process_partial_specialization (decl)
or some such would have been OK. */ or some such would have been OK. */
tpd.level = TMPL_PARMS_DEPTH (current_template_parms); tpd.level = TMPL_PARMS_DEPTH (current_template_parms);
tpd.parms = alloca (sizeof (int) * ntparms); tpd.parms = alloca (sizeof (int) * ntparms);
bzero (tpd.parms, sizeof (int) * ntparms); bzero ((PTR) tpd.parms, sizeof (int) * ntparms);
tpd.arg_uses_template_parms = alloca (sizeof (int) * nargs); tpd.arg_uses_template_parms = alloca (sizeof (int) * nargs);
bzero (tpd.arg_uses_template_parms, sizeof (int) * nargs); bzero ((PTR) tpd.arg_uses_template_parms, sizeof (int) * nargs);
for (i = 0; i < nargs; ++i) for (i = 0; i < nargs; ++i)
{ {
tpd.current_arg = i; tpd.current_arg = i;
...@@ -1993,7 +1993,7 @@ process_partial_specialization (decl) ...@@ -1993,7 +1993,7 @@ process_partial_specialization (decl)
template, not in the specialization. */ template, not in the specialization. */
tpd2.current_arg = i; tpd2.current_arg = i;
tpd2.arg_uses_template_parms[i] = 0; tpd2.arg_uses_template_parms[i] = 0;
bzero (tpd2.parms, sizeof (int) * nargs); bzero ((PTR) tpd2.parms, sizeof (int) * nargs);
for_each_template_parm (type, for_each_template_parm (type,
&mark_template_parm, &mark_template_parm,
&tpd2); &tpd2);
......
...@@ -806,7 +806,7 @@ build_base_fields (rec) ...@@ -806,7 +806,7 @@ build_base_fields (rec)
base_align = MAX (base_align, DECL_ALIGN (decl)); base_align = MAX (base_align, DECL_ALIGN (decl));
DECL_SIZE (decl) DECL_SIZE (decl)
= size_int (MAX (TREE_INT_CST_LOW (DECL_SIZE (decl)), = size_int (MAX (TREE_INT_CST_LOW (DECL_SIZE (decl)),
base_align)); (int) base_align));
} }
else if (DECL_SIZE (decl) == integer_zero_node) else if (DECL_SIZE (decl) == integer_zero_node)
saw_empty = 1; saw_empty = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment