summaryrefslogtreecommitdiff
path: root/gcc/tlink.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-20 03:46:09 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-20 03:46:09 +0000
commit25a1c410afaab87df3781967042d56395c6d0472 (patch)
treea9a495581b5ae5ebeabcad170ec8ae93f77566c2 /gcc/tlink.c
parentdb5a0563b18ade8c700e1118b59160444dbaf287 (diff)
downloadgcc-25a1c410afaab87df3781967042d56395c6d0472.tar.gz
* collect2.c (main, add_to_list): Fix for -Wc++-compat.
* gcc.c (translate_options, init_spec, store_arg, read_specs, add_to_obstack, file_at_path, find_a_file, execute, add_preprocessor_option, add_assembler_option, add_linker_option, process_command, insert_wrapper, do_option_spec, do_self_spec, spec_path, do_spec_1, is_directory, main, used_arg, getenv_spec_function): Likewise. * tlink.c (symbol_hash_lookup, file_hash_lookup, demangled_hash_lookup, symbol_push, file_push, frob_extension): Likewise. java: * class.c (ident_subst, mangled_classname, unmangle_classname, gen_indirect_dispatch_tables, add_method_1, build_fieldref_cache_entry, make_local_function_alias, layout_class, java_treetreehash_find, java_treetreehash_new, split_qualified_name): Fix for -Wc++-compat. * constants.c (set_constant_entry, cpool_for_class): Likewise. * decl.c (make_binding_level, java_dup_lang_specific_decl, start_java_method): Likewise. * except.c (prepare_eh_table_type): Likewise. * expr.c (type_assertion_hash, note_instructions): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC, MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class): Likewise. * jcf-parse.c (reverse, java_read_sourcefilenames, annotation_grow, rewrite_reflection_indexes, java_parse_file, process_zip_dir): Likewise. * jcf-path.c (add_entry, add_path, jcf_path_init, jcf_path_extdirs_arg): Likewise. * jcf-reader.c (jcf_parse_constant_pool): Likewise. * jvgenmain.c (do_mangle_classname): Likewise. * lang.c (put_decl_string): Likewise. * verify-impl.c (make_state_copy, make_state, add_new_state): Likewise. objc: * objc-act.c (setup_string_decl, objc_build_string_object, hash_interface, eq_interface, objc_begin_try_stmt, encode_method_prototype, build_ivar_list_initializer, objc_build_encode_expr): Fix for -Wc++-compat. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136980 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r--gcc/tlink.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 53c51dc2ed4..51f371715ff 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -127,7 +127,7 @@ symbol_hash_lookup (const char *string, int create)
*e = v = XCNEW (struct symbol_hash_entry);
v->key = xstrdup (string);
}
- return *e;
+ return (struct symbol_hash_entry *) *e;
}
static htab_t file_table;
@@ -147,7 +147,7 @@ file_hash_lookup (const char *string)
*e = v = XCNEW (struct file_hash_entry);
v->key = xstrdup (string);
}
- return *e;
+ return (struct file_hash_entry *) *e;
}
static htab_t demangled_table;
@@ -169,7 +169,7 @@ demangled_hash_lookup (const char *string, int create)
*e = v = XCNEW (struct demangled_hash_entry);
v->key = xstrdup (string);
}
- return *e;
+ return (struct demangled_hash_entry *) *e;
}
/* Stack code. */
@@ -193,8 +193,8 @@ struct file_stack_entry *file_stack;
static void
symbol_push (symbol *p)
{
- struct symbol_stack_entry *ep = obstack_alloc
- (&symbol_stack_obstack, sizeof (struct symbol_stack_entry));
+ struct symbol_stack_entry *ep
+ = XOBNEW (&symbol_stack_obstack, struct symbol_stack_entry);
ep->value = p;
ep->next = symbol_stack;
symbol_stack = ep;
@@ -221,8 +221,7 @@ file_push (file *p)
if (p->tweaking)
return;
- ep = obstack_alloc
- (&file_stack_obstack, sizeof (struct file_stack_entry));
+ ep = XOBNEW (&file_stack_obstack, struct file_stack_entry);
ep->value = p;
ep->next = file_stack;
file_stack = ep;
@@ -298,7 +297,7 @@ frob_extension (const char *s, const char *ext)
p = s + strlen (s);
obstack_grow (&temporary_obstack, s, p - s);
- return obstack_copy0 (&temporary_obstack, ext, strlen (ext));
+ return (char *) obstack_copy0 (&temporary_obstack, ext, strlen (ext));
}
static char *