aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2003-07-19 14:47:15 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2003-07-19 14:47:15 +0000
commit703ad42b4be14b9b1e84816dede360721361ed86 (patch)
treef3d03226f923b6c64639256ed34bd193427950a7 /gcc/c-decl.c
parent308ca868d327f306ac4b87741ed828a56e524fd0 (diff)
downloadgcc-703ad42b4be14b9b1e84816dede360721361ed86.zip
gcc-703ad42b4be14b9b1e84816dede360721361ed86.tar.gz
gcc-703ad42b4be14b9b1e84816dede360721361ed86.tar.bz2
alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. From-SVN: r69587
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d6dfcb7..bd3b761 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -360,8 +360,7 @@ make_binding_level (void)
memset (result, 0, sizeof(struct binding_level));
}
else
- result = (struct binding_level *)
- ggc_alloc_cleared (sizeof (struct binding_level));
+ result = ggc_alloc_cleared (sizeof (struct binding_level));
return result;
}
@@ -1732,8 +1731,7 @@ pushdecl (tree x)
/* Functions need the lang_decl data. */
if (TREE_CODE (x) == FUNCTION_DECL && ! DECL_LANG_SPECIFIC (x))
- DECL_LANG_SPECIFIC (x) = (struct lang_decl *)
- ggc_alloc_cleared (sizeof (struct lang_decl));
+ DECL_LANG_SPECIFIC (x) = ggc_alloc_cleared (sizeof (struct lang_decl));
/* A local extern declaration for a function doesn't constitute nesting.
A local auto declaration does, since it's a forward decl
@@ -4375,8 +4373,8 @@ grokdeclarator (tree declarator, tree declspecs,
decl = build_decl (FUNCTION_DECL, declarator, type);
decl = build_decl_attribute_variant (decl, decl_attr);
- DECL_LANG_SPECIFIC (decl) = (struct lang_decl *)
- ggc_alloc_cleared (sizeof (struct lang_decl));
+ DECL_LANG_SPECIFIC (decl)
+ = ggc_alloc_cleared (sizeof (struct lang_decl));
if (pedantic && type_quals && ! DECL_IN_SYSTEM_HEADER (decl))
pedwarn ("ISO C forbids qualified function types");
@@ -6630,8 +6628,7 @@ void
c_push_function_context (struct function *f)
{
struct language_function *p;
- p = ((struct language_function *)
- ggc_alloc (sizeof (struct language_function)));
+ p = ggc_alloc (sizeof (struct language_function));
f->language = p;
p->base.x_stmt_tree = c_stmt_tree;
@@ -6694,9 +6691,8 @@ c_dup_lang_specific_decl (tree decl)
if (!DECL_LANG_SPECIFIC (decl))
return;
- ld = (struct lang_decl *) ggc_alloc (sizeof (struct lang_decl));
- memcpy ((char *) ld, (char *) DECL_LANG_SPECIFIC (decl),
- sizeof (struct lang_decl));
+ ld = ggc_alloc (sizeof (struct lang_decl));
+ memcpy (ld, DECL_LANG_SPECIFIC (decl), sizeof (struct lang_decl));
DECL_LANG_SPECIFIC (decl) = ld;
}
@@ -6943,7 +6939,7 @@ merge_translation_unit_decls (void)
if (TREE_PUBLIC (decl) && DECL_EXTERNAL (decl))
{
tree global_decl;
- global_decl = (tree) htab_find (link_hash_table, decl);
+ global_decl = htab_find (link_hash_table, decl);
if (! global_decl)
continue;
@@ -6967,7 +6963,7 @@ c_write_global_declarations(void)
{
tree globals = BLOCK_VARS (DECL_INITIAL (link));
int len = list_length (globals);
- tree *vec = (tree *) xmalloc (sizeof (tree) * len);
+ tree *vec = xmalloc (sizeof (tree) * len);
int i;
tree decl;