From e1e4cdc42c8b28235ab637dc5df2b4ef159c5b98 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 20 Jun 2008 03:46:09 +0000 Subject: collect2.c (main, [...]): Fix for -Wc++-compat. * 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. From-SVN: r136980 --- gcc/java/expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/java/expr.c') diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 75c18e5..654a25e 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -430,7 +430,7 @@ type_assertion_eq (const void * k1_p, const void * k2_p) static hashval_t type_assertion_hash (const void *p) { - const type_assertion *k_p = p; + const type_assertion *k_p = (const type_assertion *) p; hashval_t hash = iterative_hash (&k_p->assertion_code, sizeof k_p->assertion_code, 0); @@ -3009,7 +3009,7 @@ note_instructions (JCF *jcf, tree method) JCF_SEEK (jcf, DECL_CODE_OFFSET (method)); byte_ops = jcf->read_ptr; - instruction_bits = xrealloc (instruction_bits, length + 1); + instruction_bits = XRESIZEVAR (char, instruction_bits, length + 1); memset (instruction_bits, 0, length + 1); type_states = VEC_alloc (tree, gc, length + 1); VEC_safe_grow_cleared (tree, gc, type_states, length + 1); -- cgit v1.1