+2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * call.c (alloc_conversion): Use cast when converting from void *.
+ (alloc_conversions): Likewise.
+ (add_candidate): Likewise.
+ (print_z_candidates): Likewise.
+ (add_warning): Likewise.
+ * pt.c (retrieve_local_specialization): Likewise.
+ (process_partial_specialization): Likewise.
+ (mangle_class_name_for_template): Likewise.
+ (tsubst_template_args): Likewise.
+ * typeck2.c (pat_calc_hash): Likewise.
+ (pat_compare): Likewise.
+ (abstract_virtuals_error): Likewise.
+ * class.c (method_name_cmp): Likewise.
+ (resort_method_name_cmp): Likewise.
+ (get_vfield_name): Likewise.
+ * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
+ * lex.c (init_reswords): Likewise.
+ * rtti.c (create_pseudo_type_info): Likewise.
+ * search.c (dfs_lookup_base): Likewise.
+ (dfs_dcast_hint_pre): Likewise.
+ (dfs_dcast_hint_post): Likewise.
+ * tree.c (hash_tree_cons): Likewise.
+ * repo.c (extract_string): Likewise.
+ (afgets): Likewise.
+ * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
+ * g++spec.c (lang_specific_driver): Likewise.
+
2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
* class.c (check_bases): Likewise.
alloc_conversion (conversion_kind kind)
{
conversion *c;
- c = conversion_obstack_alloc (sizeof (conversion));
+ c = (conversion *) conversion_obstack_alloc (sizeof (conversion));
c->kind = kind;
return c;
}
static conversion **
alloc_conversions (size_t n)
{
- return conversion_obstack_alloc (n * sizeof (conversion *));
+ return (conversion **) conversion_obstack_alloc (n * sizeof (conversion *));
}
static conversion *
tree access_path, tree conversion_path,
int viable)
{
- struct z_candidate *cand
- = conversion_obstack_alloc (sizeof (struct z_candidate));
+ struct z_candidate *cand = (struct z_candidate *)
+ conversion_obstack_alloc (sizeof (struct z_candidate));
cand->fn = fn;
cand->args = args;
/* Indent successive candidates by the width of the translation
of the above string. */
size_t len = gcc_gettext_width (str) + 1;
- char *spaces = alloca (len);
+ char *spaces = (char *) alloca (len);
memset (spaces, ' ', len-1);
spaces[len - 1] = '\0';
static void
add_warning (struct z_candidate *winner, struct z_candidate *loser)
{
- candidate_warning *cw;
-
- cw = conversion_obstack_alloc (sizeof (candidate_warning));
+ candidate_warning *cw = (candidate_warning *)
+ conversion_obstack_alloc (sizeof (candidate_warning));
cw->loser = loser;
cw->next = winner->warnings;
winner->warnings = cw;
static int
method_name_cmp (const void* m1_p, const void* m2_p)
{
- const tree *const m1 = m1_p;
- const tree *const m2 = m2_p;
+ const tree *const m1 = (const tree *) m1_p;
+ const tree *const m2 = (const tree *) m2_p;
if (*m1 == NULL_TREE && *m2 == NULL_TREE)
return 0;
static int
resort_method_name_cmp (const void* m1_p, const void* m2_p)
{
- const tree *const m1 = m1_p;
- const tree *const m2 = m2_p;
+ const tree *const m1 = (const tree *) m1_p;
+ const tree *const m2 = (const tree *) m2_p;
if (*m1 == NULL_TREE && *m2 == NULL_TREE)
return 0;
if (*m1 == NULL_TREE)
}
type = BINFO_TYPE (binfo);
- buf = alloca (sizeof (VFIELD_NAME_FORMAT) + TYPE_NAME_LENGTH (type) + 2);
+ buf = (char *) alloca (sizeof (VFIELD_NAME_FORMAT)
+ + TYPE_NAME_LENGTH (type) + 2);
sprintf (buf, VFIELD_NAME_FORMAT,
IDENTIFIER_POINTER (constructor_name (type)));
return get_identifier (buf);
struct tree_map *h, in;
in.from = from;
- h = htab_find_with_hash (shadowed_var_for_decl, &in,
- htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (shadowed_var_for_decl, &in,
+ htab_hash_pointer (from));
if (h)
return h->to;
return NULL_TREE;
static int
generate_ctor_and_dtor_functions_for_priority (splay_tree_node n, void * data)
{
- location_t *locus = data;
+ location_t *locus = (location_t *) data;
int priority = (int) n->key;
priority_info pi = (priority_info) n->value;
argv = *in_argv;
added_libraries = *in_added_libraries;
- args = xcalloc (argc, sizeof (int));
+ args = XCNEWVEC (int, argc);
for (i = 1; i < argc; i++)
{
| D_OBJC
| (flag_no_gnu_keywords ? D_EXT : 0));
- ridpointers = ggc_calloc ((int) RID_MAX, sizeof (tree));
+ ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX);
for (i = 0; i < ARRAY_SIZE (reswords); i++)
{
id = get_identifier (reswords[i].word);
static tree
retrieve_local_specialization (tree tmpl)
{
- tree spec = htab_find_with_hash (local_specializations, tmpl,
- htab_hash_pointer (tmpl));
+ tree spec = (tree) htab_find_with_hash (local_specializations, tmpl,
+ htab_hash_pointer (tmpl));
return spec ? TREE_PURPOSE (spec) : NULL_TREE;
}
or some such would have been OK. */
tpd.level = TMPL_PARMS_DEPTH (current_template_parms);
- tpd.parms = alloca (sizeof (int) * ntparms);
+ tpd.parms = (int *) alloca (sizeof (int) * ntparms);
memset (tpd.parms, 0, sizeof (int) * ntparms);
- tpd.arg_uses_template_parms = alloca (sizeof (int) * nargs);
+ tpd.arg_uses_template_parms = (int *) alloca (sizeof (int) * nargs);
memset (tpd.arg_uses_template_parms, 0, sizeof (int) * nargs);
for (i = 0; i < nargs; ++i)
{
{
/* We haven't yet initialized TPD2. Do so now. */
tpd2.arg_uses_template_parms
- = alloca (sizeof (int) * nargs);
+ = (int *) alloca (sizeof (int) * nargs);
/* The number of parameters here is the number in the
main template, which, as checked in the assertion
above, is NARGS. */
- tpd2.parms = alloca (sizeof (int) * nargs);
+ tpd2.parms = (int *) alloca (sizeof (int) * nargs);
tpd2.level =
TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (maintmpl));
}
gcc_obstack_init (&scratch_obstack);
else
obstack_free (&scratch_obstack, scratch_firstobj);
- scratch_firstobj = obstack_alloc (&scratch_obstack, 1);
+ scratch_firstobj = (char *) obstack_alloc (&scratch_obstack, 1);
#define ccat(C) obstack_1grow (&scratch_obstack, (C));
#define cat(S) obstack_grow (&scratch_obstack, (S), strlen (S))
{
int len = TREE_VEC_LENGTH (t);
int need_new = 0, i;
- tree *elts = alloca (len * sizeof (tree));
+ tree *elts = (tree *) alloca (len * sizeof (tree));
for (i = 0; i < len; i++)
{
va_start (ap, real_name);
/* Generate the pseudo type name. */
- pseudo_name = alloca (strlen (real_name) + 30);
+ pseudo_name = (char *) alloca (strlen (real_name) + 30);
strcpy (pseudo_name, real_name);
strcat (pseudo_name, "_pseudo");
if (tk >= TK_FIXED)
static tree
dfs_lookup_base (tree binfo, void *data_)
{
- struct lookup_base_data_s *data = data_;
+ struct lookup_base_data_s *data = (struct lookup_base_data_s *) data_;
if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), data->base))
{
static tree
dfs_dcast_hint_pre (tree binfo, void *data_)
{
- struct dcast_data_s *data = data_;
+ struct dcast_data_s *data = (struct dcast_data_s *) data_;
if (BINFO_VIRTUAL_P (binfo))
data->virt_depth++;
static tree
dfs_dcast_hint_post (tree binfo, void *data_)
{
- struct dcast_data_s *data = data_;
+ struct dcast_data_s *data = (struct dcast_data_s *) data_;
if (BINFO_VIRTUAL_P (binfo))
data->virt_depth--;
/* If not, create a new node. */
if (!*slot)
*slot = tree_cons (purpose, value, chain);
- return *slot;
+ return (tree) *slot;
}
/* Constructor for hashed lists. */
static hashval_t
pat_calc_hash (const void* val)
{
- const struct pending_abstract_type* pat = val;
+ const struct pending_abstract_type *pat =
+ (const struct pending_abstract_type *) val;
return (hashval_t) TYPE_UID (pat->type);
}
static int
pat_compare (const void* val1, const void* val2)
{
- const struct pending_abstract_type* pat1 = val1;
+ const struct pending_abstract_type *pat1 =
+ (const struct pending_abstract_type *) val1;
tree type2 = (tree)val2;
return (pat1->type == type2);
? DECL_SOURCE_LOCATION (decl)
: input_location);
- pat->next = *slot;
+ pat->next = (struct pending_abstract_type *) *slot;
*slot = pat;
return 0;