aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-03-22 02:57:27 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-03-22 02:57:27 +0000
commit400e39e37d046a34d076806ecb5d5a8dc1611ceb (patch)
treea58465330fa743ce33f43c71477dcf5b003ce91a /gcc
parentbd8ec6a7cdf75d6441b8a784e962cf177f237b34 (diff)
downloadgcc-400e39e37d046a34d076806ecb5d5a8dc1611ceb.zip
gcc-400e39e37d046a34d076806ecb5d5a8dc1611ceb.tar.gz
gcc-400e39e37d046a34d076806ecb5d5a8dc1611ceb.tar.bz2
bt-load.c, [...]: Remove unnecessary casts.
* bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c, ggc-page.c, integrate.c, var-tracking.c, web.c: Remove unnecessary casts. From-SVN: r79811
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/bt-load.c3
-rw-r--r--gcc/builtins.c2
-rw-r--r--gcc/cfghooks.c4
-rw-r--r--gcc/cfgrtl.c4
-rw-r--r--gcc/gcse.c7
-rw-r--r--gcc/ggc-page.c8
-rw-r--r--gcc/integrate.c10
-rw-r--r--gcc/var-tracking.c20
-rw-r--r--gcc/web.c10
10 files changed, 38 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f67a556..1478197 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-21 Kazu Hirata <kazu@cs.umass.edu>
+
+ * bt-load.c, builtins.c, cfghooks.c, cfgrtl.c, gcse.c,
+ ggc-page.c, integrate.c, var-tracking.c, web.c: Remove
+ unnecessary casts.
+
2004-03-22 Danny Smith <dannysmith@users.sourceforge.net>
PR target/14291
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 1a81c45..0008f3c 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -1385,8 +1385,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
while (!fibheap_empty (all_btr_defs))
{
- btr_def def =
- (btr_def) fibheap_extract_min (all_btr_defs);
+ btr_def def = fibheap_extract_min (all_btr_defs);
int min_cost = -fibheap_min_key (all_btr_defs);
if (migrate_btr_def (def, min_cost))
{
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 58565f7..fd1b295 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -4650,7 +4650,7 @@ expand_builtin_printf (tree arglist, rtx target, enum machine_mode mode,
{
/* Create a NUL-terminated string that's one char shorter
than the original, stripping off the trailing '\n'. */
- char *newstr = (char *) alloca (len);
+ char *newstr = alloca (len);
memcpy (newstr, fmt_str, len - 1);
newstr[len - 1] = 0;
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index 183d54e..9f70604 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -206,8 +206,8 @@ dump_bb (basic_block bb, FILE *outf, int indent)
edge e;
char *s_indent;
- s_indent = (char *) alloca ((size_t) indent + 1);
- memset ((void *) s_indent, ' ', (size_t) indent);
+ s_indent = alloca ((size_t) indent + 1);
+ memset (s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0';
fprintf (outf, ";;%s basic block %d, loop depth %d, count ",
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index a1524e5..20de625 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1665,8 +1665,8 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent)
rtx last;
char *s_indent;
- s_indent = (char *) alloca ((size_t) indent + 1);
- memset ((void *) s_indent, ' ', (size_t) indent);
+ s_indent = alloca ((size_t) indent + 1);
+ memset (s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0';
fprintf (outf, ";;%s Registers live at start: ", s_indent);
diff --git a/gcc/gcse.c b/gcc/gcse.c
index d75d459..eb37e18 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -8366,7 +8366,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
ok_count += pred->count;
if (EDGE_CRITICAL_P (pred))
critical_count += pred->count;
- occr = (struct unoccr *) gmalloc (sizeof (struct unoccr));
+ occr = gmalloc (sizeof (struct unoccr));
occr->insn = avail_insn;
occr->pred = pred;
occr->next = avail_occrs;
@@ -8377,7 +8377,7 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
not_ok_count += pred->count;
if (EDGE_CRITICAL_P (pred))
critical_count += pred->count;
- unoccr = (struct unoccr *) gmalloc (sizeof (struct unoccr));
+ unoccr = gmalloc (sizeof (struct unoccr));
unoccr->insn = NULL_RTX;
unoccr->pred = pred;
unoccr->next = unavail_occrs;
@@ -8616,8 +8616,7 @@ compute_hash_table_after_reload (struct hash_table *table)
clear_modify_mem_tables ();
/* Some working arrays used to track first and last set in each block. */
- reg_avail_info = (struct reg_avail_info*)
- gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
+ reg_avail_info = gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
for (i = 0; i < max_gcse_regno; ++i)
reg_avail_info[i].last_bb = NULL;
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index a45c76a..4fc6887 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -652,12 +652,12 @@ static inline char *
alloc_anon (char *pref ATTRIBUTE_UNUSED, size_t size)
{
#ifdef HAVE_MMAP_ANON
- char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#endif
#ifdef HAVE_MMAP_DEV_ZERO
- char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
- MAP_PRIVATE, G.dev_zero_fd, 0);
+ char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE, G.dev_zero_fd, 0);
#endif
if (page == (char *) MAP_FAILED)
diff --git a/gcc/integrate.c b/gcc/integrate.c
index b9f4681..d715ef2 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1667,11 +1667,11 @@ copy_insn_list (rtx insns, struct inline_remap *map, rtx static_chain_value)
tree *mapped_block_p;
mapped_block_p
- = (tree *) bsearch (NOTE_BLOCK (insn),
- &VARRAY_TREE (map->block_map, 0),
- map->block_map->elements_used,
- sizeof (tree),
- find_block);
+ = bsearch (NOTE_BLOCK (insn),
+ &VARRAY_TREE (map->block_map, 0),
+ map->block_map->elements_used,
+ sizeof (tree),
+ find_block);
if (!mapped_block_p)
abort ();
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 5da2376..d26893b 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -1297,8 +1297,8 @@ dataflow_set_different_1 (void **slot, void *data)
variable var1, var2;
var1 = *(variable *) slot;
- var2 = (variable) htab_find_with_hash (htab, var1->decl,
- VARIABLE_HASH_VAL (var1->decl));
+ var2 = htab_find_with_hash (htab, var1->decl,
+ VARIABLE_HASH_VAL (var1->decl));
if (!var2)
{
dataflow_set_different_value = true;
@@ -1329,8 +1329,8 @@ dataflow_set_different_2 (void **slot, void *data)
variable var1, var2;
var1 = *(variable *) slot;
- var2 = (variable) htab_find_with_hash (htab, var1->decl,
- VARIABLE_HASH_VAL (var1->decl));
+ var2 = htab_find_with_hash (htab, var1->decl,
+ VARIABLE_HASH_VAL (var1->decl));
if (!var2)
{
dataflow_set_different_value = true;
@@ -1671,8 +1671,8 @@ vt_find_locations (void)
/* Compute reverse completion order of depth first search of the CFG
so that the data-flow runs faster. */
- rc_order = (int *) xmalloc (n_basic_blocks * sizeof (int));
- bb_order = (int *) xmalloc (last_basic_block * sizeof (int));
+ rc_order = xmalloc (n_basic_blocks * sizeof (int));
+ bb_order = xmalloc (last_basic_block * sizeof (int));
flow_depth_first_order_compute (NULL, rc_order);
for (i = 0; i < n_basic_blocks; i++)
bb_order[rc_order[i]] = i;
@@ -2272,8 +2272,8 @@ emit_notes_for_differences_1 (void **slot, void *data)
variable old_var, new_var;
old_var = *(variable *) slot;
- new_var = (variable) htab_find_with_hash (new_vars, old_var->decl,
- VARIABLE_HASH_VAL (old_var->decl));
+ new_var = htab_find_with_hash (new_vars, old_var->decl,
+ VARIABLE_HASH_VAL (old_var->decl));
if (!new_var)
{
@@ -2305,8 +2305,8 @@ emit_notes_for_differences_2 (void **slot, void *data)
variable old_var, new_var;
new_var = *(variable *) slot;
- old_var = (variable) htab_find_with_hash (old_vars, new_var->decl,
- VARIABLE_HASH_VAL (new_var->decl));
+ old_var = htab_find_with_hash (old_vars, new_var->decl,
+ VARIABLE_HASH_VAL (new_var->decl));
if (!old_var)
{
/* Variable has appeared. */
diff --git a/gcc/web.c b/gcc/web.c
index 7d1f39e..af006bf 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -267,12 +267,10 @@ web_main (void)
df = df_init ();
df_analyze (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES);
- def_entry =
- (struct web_entry *) xcalloc (df->n_defs, sizeof (struct web_entry));
- use_entry =
- (struct web_entry *) xcalloc (df->n_uses, sizeof (struct web_entry));
- used = (char *) xcalloc (max, sizeof (char));
- use_addressof = (char *) xcalloc (max, sizeof (char));
+ def_entry = xcalloc (df->n_defs, sizeof (struct web_entry));
+ use_entry = xcalloc (df->n_uses, sizeof (struct web_entry));
+ used = xcalloc (max, sizeof (char));
+ use_addressof = xcalloc (max, sizeof (char));
if (dump_file)
df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, dump_file);