aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2005-12-17 20:45:46 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2005-12-17 20:45:46 +0000
commitcceb18855ea7d7f2e897858656481174b6da5e93 (patch)
tree50983d29e1f2d95d1c133d691fc5d44215ddacbf /gcc/cgraph.c
parentef98c52a44394a1f9e9d91662cace6294e0ba2db (diff)
downloadgcc-cceb18855ea7d7f2e897858656481174b6da5e93.zip
gcc-cceb18855ea7d7f2e897858656481174b6da5e93.tar.gz
gcc-cceb18855ea7d7f2e897858656481174b6da5e93.tar.bz2
tree-inline.c (copy_body_r): Use explicit cast when converting from void *.
* tree-inline.c (copy_body_r): Use explicit cast when converting from void *. (copy_bb): Likewise. (copy_edges_for_bb): Likewise. (remap_decl_1): Likewise. (estimate_num_insns_1): Likewise. * cgraph.c (hash_node): Use explicit cast when converting from void *. (eq_node): Likewise. (cgraph_create_node): Use GGC_CNEW. (cgraph_create_edge): Use GGC_NEW. (cgraph_remove_node): Use explicit cast when converting from void *. (hash_varpool_node): Likewise. (eq_varpool_node): Likewise. (cgraph_varpool_node): Use GGC_CNEW. * lambda.h (lambda_vector_new): Use GGC_CNEWVEC. * tree-scalar-evolution.c (new_scev_info_str): Use XNEW. (eq_scev_info): Use explicit cast when converting from void *. (find_var_scev_info): Likewise. (set_instantiated_value): Likewise. (gather_stats_on_scev_database_1): Likewise. * cfgloop.h (simple_loop_desc): Use explicit cast when converting from void *. * c-pch.c (c_common_write_pch): Use XNEWVEC. (c_common_read_pch): Likewise. * prefix.c (save_string): Use XNEWVEC. (translate_name): Use explicit cast when converting from void *. * c-ppoutput.c (print_line): Use explicit cast when converting from void *. (pp_dir_change): Likewise. * c-cppbuiltin.c (builtin_define_std): Likewise. (builtin_define_with_value): Likewise. (builtin_define_with_value_n): Likewise. (builtin_define_with_int_value): Likewise. (builtin_define_type_max): Likewise. * c-incpath.c (add_env_var_paths): Use XNEWVEC. (add_path): Use XNEW. * c-format.c (check_format_info_main): Use GGC_NEW. (format_type_warning): Use explicit cast when converting from void *. * c-typeck.c (alloc_tagged_tu_seen_cache): Use XNEW instead of xmalloc. (start_init): Likewise. * tree-flow-inline.h (first_referenced_var): Use explicit cast when converting from void *. (next_referenced_var): Likewise. * c-pragma.c (push_alignment): Use GGC_NEW instead of ggc_alloc. * gensupport.c (lookup_predicate): Use explicit cast to convert from void *. (init_predicate_table): Use XCNEW instead of xcalloc. * genpreds.c (process_define_predicate): Likewise. From-SVN: r108723
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 33eb1fe..ab45f04 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -146,7 +146,7 @@ static int eq_node (const void *, const void *);
static hashval_t
hash_node (const void *p)
{
- const struct cgraph_node *n = p;
+ const struct cgraph_node *n = (const struct cgraph_node *) p;
return (hashval_t) DECL_UID (n->decl);
}
@@ -155,7 +155,8 @@ hash_node (const void *p)
static int
eq_node (const void *p1, const void *p2)
{
- const struct cgraph_node *n1 = p1, *n2 = p2;
+ const struct cgraph_node *n1 = (const struct cgraph_node *) p1;
+ const struct cgraph_node *n2 = (const struct cgraph_node *) p2;
return DECL_UID (n1->decl) == DECL_UID (n2->decl);
}
@@ -165,7 +166,7 @@ cgraph_create_node (void)
{
struct cgraph_node *node;
- node = ggc_alloc_cleared (sizeof (*node));
+ node = GGC_CNEW (struct cgraph_node);
node->next = cgraph_nodes;
node->uid = cgraph_max_uid++;
if (cgraph_nodes)
@@ -286,7 +287,7 @@ struct cgraph_edge *
cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
tree call_stmt, gcov_type count, int nest)
{
- struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge));
+ struct cgraph_edge *edge = GGC_NEW (struct cgraph_edge);
#ifdef ENABLE_CHECKING
struct cgraph_edge *e;
@@ -472,7 +473,7 @@ cgraph_remove_node (struct cgraph_node *node)
*/
if (!kill_body && *slot)
{
- struct cgraph_node *n = *slot;
+ struct cgraph_node *n = (struct cgraph_node *) *slot;
if (!n->next_clone && !n->global.inlined_to
&& (cgraph_global_info_ready
&& (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl))))
@@ -697,7 +698,7 @@ dump_varpool (FILE *f)
static hashval_t
hash_varpool_node (const void *p)
{
- const struct cgraph_varpool_node *n = p;
+ const struct cgraph_varpool_node *n = (const struct cgraph_varpool_node *) p;
return (hashval_t) DECL_UID (n->decl);
}
@@ -706,7 +707,10 @@ hash_varpool_node (const void *p)
static int
eq_varpool_node (const void *p1, const void *p2)
{
- const struct cgraph_varpool_node *n1 = p1, *n2 = p2;
+ const struct cgraph_varpool_node *n1 =
+ (const struct cgraph_varpool_node *) p1;
+ const struct cgraph_varpool_node *n2 =
+ (const struct cgraph_varpool_node *) p2;
return DECL_UID (n1->decl) == DECL_UID (n2->decl);
}
@@ -726,7 +730,7 @@ cgraph_varpool_node (tree decl)
htab_find_slot (cgraph_varpool_hash, &key, INSERT);
if (*slot)
return *slot;
- node = ggc_alloc_cleared (sizeof (*node));
+ node = GGC_CNEW (struct cgraph_varpool_node);
node->decl = decl;
node->next = cgraph_varpool_nodes;
cgraph_varpool_nodes = node;