diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-16 21:41:10 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-16 21:41:10 +0000 |
commit | b9a7cc698921e2a5cee2afd48b6556af5f7fbf1f (patch) | |
tree | 5aa9e7cef82d21751e0893c56bdaeadef5722525 | |
parent | 5ffca67a18abd443db0424475a141aa1ec601450 (diff) | |
download | gcc-b9a7cc698921e2a5cee2afd48b6556af5f7fbf1f.tar.gz |
cp:
* cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
macro.
gcc:
* bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c,
config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c,
dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c,
function.c, gcc.c, genoutput.c, gensupport.c, global.c,
haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c,
loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c,
read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c,
stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use
the PTR macro.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68043 138bc75d-0d04-0410-961f-82ee72b054a4
47 files changed, 202 insertions, 188 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9e4b37e205..debc696c52e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, + config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, + dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, + function.c, gcc.c, genoutput.c, gensupport.c, global.c, + haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, + loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, + read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, + stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use + the PTR macro. + * gengtype.c: Don't use UNION_INIT_ZERO. * system.h (UNION_INIT_ZERO): Delete. diff --git a/gcc/bitmap.c b/gcc/bitmap.c index f03f3e27949..98229d59815 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -729,9 +729,9 @@ debug_bitmap_file (FILE *file, bitmap head) bitmap_element *ptr; fprintf (file, "\nfirst = "); - fprintf (file, HOST_PTR_PRINTF, (PTR) head->first); + fprintf (file, HOST_PTR_PRINTF, (void *) head->first); fprintf (file, " current = "); - fprintf (file, HOST_PTR_PRINTF, (PTR) head->current); + fprintf (file, HOST_PTR_PRINTF, (void *) head->current); fprintf (file, " indx = %u\n", head->indx); for (ptr = head->first; ptr; ptr = ptr->next) @@ -739,11 +739,11 @@ debug_bitmap_file (FILE *file, bitmap head) unsigned int i, j, col = 26; fprintf (file, "\t"); - fprintf (file, HOST_PTR_PRINTF, (PTR) ptr); + fprintf (file, HOST_PTR_PRINTF, (void *) ptr); fprintf (file, " next = "); - fprintf (file, HOST_PTR_PRINTF, (PTR) ptr->next); + fprintf (file, HOST_PTR_PRINTF, (void *) ptr->next); fprintf (file, " prev = "); - fprintf (file, HOST_PTR_PRINTF, (PTR) ptr->prev); + fprintf (file, HOST_PTR_PRINTF, (void *) ptr->prev); fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) diff --git a/gcc/builtins.c b/gcc/builtins.c index 41e90f7daab..0a53e3c60f0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2277,11 +2277,11 @@ expand_builtin_memcpy (tree arglist, rtx target, enum machine_mode mode) && GET_CODE (len_rtx) == CONST_INT && (unsigned HOST_WIDE_INT) INTVAL (len_rtx) <= strlen (src_str) + 1 && can_store_by_pieces (INTVAL (len_rtx), builtin_memcpy_read_str, - (PTR) src_str, dest_align)) + (void *) src_str, dest_align)) { dest_mem = store_by_pieces (dest_mem, INTVAL (len_rtx), builtin_memcpy_read_str, - (PTR) src_str, dest_align, 0); + (void *) src_str, dest_align, 0); dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); #ifdef POINTERS_EXTEND_UNSIGNED if (GET_MODE (dest_mem) != ptr_mode) @@ -2374,13 +2374,13 @@ expand_builtin_mempcpy (tree arglist, rtx target, enum machine_mode mode, && GET_CODE (len_rtx) == CONST_INT && (unsigned HOST_WIDE_INT) INTVAL (len_rtx) <= strlen (src_str) + 1 && can_store_by_pieces (INTVAL (len_rtx), builtin_memcpy_read_str, - (PTR) src_str, dest_align)) + (void *) src_str, dest_align)) { dest_mem = get_memory_rtx (dest); set_mem_align (dest_mem, dest_align); dest_mem = store_by_pieces (dest_mem, INTVAL (len_rtx), builtin_memcpy_read_str, - (PTR) src_str, dest_align, endp); + (void *) src_str, dest_align, endp); dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); #ifdef POINTERS_EXTEND_UNSIGNED if (GET_MODE (dest_mem) != ptr_mode) @@ -2626,13 +2626,13 @@ expand_builtin_strncpy (tree arglist, rtx target, enum machine_mode mode) if (!p || dest_align == 0 || !host_integerp (len, 1) || !can_store_by_pieces (tree_low_cst (len, 1), builtin_strncpy_read_str, - (PTR) p, dest_align)) + (void *) p, dest_align)) return 0; dest_mem = get_memory_rtx (dest); store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_strncpy_read_str, - (PTR) p, dest_align, 0); + (void *) p, dest_align, 0); dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); #ifdef POINTERS_EXTEND_UNSIGNED if (GET_MODE (dest_mem) != ptr_mode) @@ -2743,7 +2743,7 @@ expand_builtin_memset (tree arglist, rtx target, enum machine_mode mode) c = 1; if (!can_store_by_pieces (tree_low_cst (len, 1), builtin_memset_read_str, - (PTR) &c, dest_align)) + &c, dest_align)) return 0; val = fold (build1 (CONVERT_EXPR, unsigned_char_type_node, val)); @@ -2753,7 +2753,7 @@ expand_builtin_memset (tree arglist, rtx target, enum machine_mode mode) dest_mem = get_memory_rtx (dest); store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_memset_gen_str, - (PTR) val_rtx, dest_align, 0); + val_rtx, dest_align, 0); dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); #ifdef POINTERS_EXTEND_UNSIGNED if (GET_MODE (dest_mem) != ptr_mode) @@ -2770,14 +2770,14 @@ expand_builtin_memset (tree arglist, rtx target, enum machine_mode mode) if (!host_integerp (len, 1)) return 0; if (!can_store_by_pieces (tree_low_cst (len, 1), - builtin_memset_read_str, (PTR) &c, + builtin_memset_read_str, &c, dest_align)) return 0; dest_mem = get_memory_rtx (dest); store_by_pieces (dest_mem, tree_low_cst (len, 1), builtin_memset_read_str, - (PTR) &c, dest_align, 0); + &c, dest_align, 0); dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX); #ifdef POINTERS_EXTEND_UNSIGNED if (GET_MODE (dest_mem) != ptr_mode) diff --git a/gcc/c-incpath.c b/gcc/c-incpath.c index abd738c027e..b350a21e942 100644 --- a/gcc/c-incpath.c +++ b/gcc/c-incpath.c @@ -83,7 +83,7 @@ free_path (path, reason) break; } - free ((PTR) path->name); + free (path->name); free (path); } diff --git a/gcc/cgraph.c b/gcc/cgraph.c index fd77f663bba..82e367f2929 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -57,14 +57,14 @@ bool cgraph_global_info_ready = false; static struct cgraph_edge *create_edge PARAMS ((struct cgraph_node *, struct cgraph_node *)); static void cgraph_remove_edge PARAMS ((struct cgraph_node *, struct cgraph_node *)); -static hashval_t hash_node PARAMS ((const PTR)); -static int eq_node PARAMS ((const PTR, const PTR)); +static hashval_t hash_node PARAMS ((const void *)); +static int eq_node PARAMS ((const void *, const void *)); /* Returns a hash code for P. */ static hashval_t hash_node (p) - const PTR p; + const void *p; { return (hashval_t) htab_hash_pointer (DECL_ASSEMBLER_NAME @@ -75,8 +75,8 @@ hash_node (p) static int eq_node (p1, p2) - const PTR p1; - const PTR p2; + const void *p1; + const void *p2; { return ((DECL_ASSEMBLER_NAME (((struct cgraph_node *) p1)->decl)) == DECL_ASSEMBLER_NAME ((tree) p2)); diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index e6640875054..078c7c03b54 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -1689,7 +1689,7 @@ frv_function_epilogue (file, size) frv_stack_cache = (frv_stack_t *)0; /* zap last used registers for conditional execution. */ - memset ((PTR) &frv_ifcvt.tmp_reg, 0, sizeof (frv_ifcvt.tmp_reg)); + memset (&frv_ifcvt.tmp_reg, 0, sizeof (frv_ifcvt.tmp_reg)); /* release the bitmap of created insns. */ BITMAP_XFREE (frv_ifcvt.scratch_insns_bitmap); @@ -6565,7 +6565,7 @@ frv_ifcvt_modify_tests (ce_info, p_true, p_false) consider registers that are not preserved across function calls and are not fixed. However, allow the ICC/ICR temporary registers to be allocated if we did not need to use them in reloading other registers. */ - memset ((PTR) &tmp_reg->regs, 0, sizeof (tmp_reg->regs)); + memset (&tmp_reg->regs, 0, sizeof (tmp_reg->regs)); COPY_HARD_REG_SET (tmp_reg->regs, call_used_reg_set); AND_COMPL_HARD_REG_SET (tmp_reg->regs, fixed_reg_set); SET_HARD_REG_BIT (tmp_reg->regs, ICC_TEMP); @@ -8650,7 +8650,7 @@ frv_pack_insns () /* Set up the instruction and register states. */ dfa_start (); frv_state = (state_t) xmalloc (state_size ()); - memset ((PTR) reg_state, REGSTATE_DEAD, sizeof (reg_state)); + memset (reg_state, REGSTATE_DEAD, sizeof (reg_state)); /* Go through the insns, and repack the insns. */ state_reset (frv_state); @@ -8783,7 +8783,7 @@ frv_pack_insns () } } - free ((PTR) frv_state); + free (frv_state); dfa_finish (); return; } diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 47f3edde76f..80bb2b12fdb 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -272,8 +272,8 @@ static void iris6_asm_named_section_1 PARAMS ((const char *, unsigned int)); static void iris6_asm_named_section PARAMS ((const char *, unsigned int)); -static int iris_section_align_entry_eq PARAMS ((const PTR, const PTR)); -static hashval_t iris_section_align_entry_hash PARAMS ((const PTR)); +static int iris_section_align_entry_eq PARAMS ((const void *, const void *)); +static hashval_t iris_section_align_entry_hash PARAMS ((const void *)); static int iris6_section_align_1 PARAMS ((void **, void *)); static void iris6_file_end PARAMS ((void)); #endif @@ -10684,8 +10684,8 @@ static FILE *iris_orig_asm_out_file; static int iris_section_align_entry_eq (p1, p2) - const PTR p1; - const PTR p2; + const void *p1; + const void *p2; { const struct iris_section_align_entry *old = p1; const char *new = p2; @@ -10695,7 +10695,7 @@ iris_section_align_entry_eq (p1, p2) static hashval_t iris_section_align_entry_hash (p) - const PTR p; + const void *p; { const struct iris_section_align_entry *old = p; return htab_hash_string (old->name); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6f81c807a03..663c337120d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR + macro. + 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org> * tree.c: Convert to ISO C. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 454e1ef901e..d76133a0f4a 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5384,7 +5384,7 @@ build_typename_type (tree context, tree name, tree fullname) { tree t; tree d; - PTR *e; + void **e; if (typename_htab == NULL) { diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 926b26d5c55..67e0eb0f1ff 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2433,10 +2433,10 @@ process_partial_specialization (decl) or some such would have been OK. */ tpd.level = TMPL_PARMS_DEPTH (current_template_parms); tpd.parms = alloca (sizeof (int) * ntparms); - memset ((PTR) tpd.parms, 0, sizeof (int) * ntparms); + memset (tpd.parms, 0, sizeof (int) * ntparms); tpd.arg_uses_template_parms = alloca (sizeof (int) * nargs); - memset ((PTR) tpd.arg_uses_template_parms, 0, sizeof (int) * nargs); + memset (tpd.arg_uses_template_parms, 0, sizeof (int) * nargs); for (i = 0; i < nargs; ++i) { tpd.current_arg = i; @@ -2521,7 +2521,7 @@ process_partial_specialization (decl) template, not in the specialization. */ tpd2.current_arg = i; tpd2.arg_uses_template_parms[i] = 0; - memset ((PTR) tpd2.parms, 0, sizeof (int) * nargs); + memset (tpd2.parms, 0, sizeof (int) * nargs); for_each_template_parm (type, &mark_template_parm, &tpd2, diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 7bab0b1e0ba..0cc769ed8ce 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1262,7 +1262,7 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type) n_calls_lookup_field++; #endif /* GATHER_STATISTICS */ - memset ((PTR) &lfi, 0, sizeof (lfi)); + memset (&lfi, 0, sizeof (lfi)); lfi.type = type; lfi.name = name; lfi.want_type = want_type; diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 64aa2db5d8e..92c1ab39951 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -852,7 +852,7 @@ tree hash_tree_cons (tree purpose, tree value, tree chain) { int hashcode = 0; - PTR* slot; + void **slot; struct list_proxy proxy; /* Hash the list node. */ @@ -867,7 +867,7 @@ hash_tree_cons (tree purpose, tree value, tree chain) INSERT); /* If not, create a new node. */ if (!*slot) - *slot = (PTR) tree_cons (purpose, value, chain); + *slot = tree_cons (purpose, value, chain); return *slot; } diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 292026a6cce..5a284d4575b 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -560,7 +560,7 @@ purge_cache (inc) { if (inc->buffer) { - free ((PTR) inc->buffer); + free ((void *) inc->buffer); inc->buffer = NULL; } } @@ -708,8 +708,7 @@ _cpp_report_missing_guards (pfile) cpp_reader *pfile; { int banner = 0; - splay_tree_foreach (pfile->all_include_files, report_missing_guard, - (PTR) &banner); + splay_tree_foreach (pfile->all_include_files, report_missing_guard, &banner); } /* Callback function for splay_tree_foreach(). */ diff --git a/gcc/cpphash.c b/gcc/cpphash.c index 77bf9c07439..018085a8346 100644 --- a/gcc/cpphash.c +++ b/gcc/cpphash.c @@ -42,7 +42,7 @@ alloc_node (table) node = (cpp_hashnode *) obstack_alloc (&table->pfile->hash_ob, sizeof (cpp_hashnode)); - memset ((PTR) node, 0, sizeof (cpp_hashnode)); + memset (node, 0, sizeof (cpp_hashnode)); return node; } @@ -123,7 +123,7 @@ void cpp_forall_identifiers (pfile, cb, v) cpp_reader *pfile; cpp_cb cb; - PTR v; + void *v; { /* We don't need a proxy since the hash table's identifier comes first in cpp_hashnode. */ diff --git a/gcc/cppinit.c b/gcc/cppinit.c index cace8b9f5db..e1d125e4b4d 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -221,7 +221,7 @@ cpp_destroy (pfile) if (pfile->macro_buffer) { - free ((PTR) pfile->macro_buffer); + free (pfile->macro_buffer); pfile->macro_buffer = NULL; pfile->macro_buffer_len = 0; } diff --git a/gcc/cpplib.c b/gcc/cpplib.c index a729a22589c..f80c2926a08 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -681,7 +681,7 @@ do_include_common (pfile, type) _cpp_execute_include (pfile, fname, angle_brackets, type); } - free ((PTR) fname); + free ((void *) fname); } static void @@ -1320,7 +1320,7 @@ do_pragma_dependency (pfile) } } - free ((PTR) fname); + free ((void *) fname); } /* Get a token but skip padding. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 84467e9c63d..6007c56c3ee 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4692,7 +4692,7 @@ add_AT_string (die, attr_kind, str) { dw_attr_ref attr = (dw_attr_ref) ggc_alloc (sizeof (dw_attr_node)); struct indirect_string_node *node; - PTR *slot; + void **slot; if (! debug_str_hash) debug_str_hash = htab_create_ggc (10, debug_str_do_hash, diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index efc734ead8e..6210ab91f85 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -6367,7 +6367,7 @@ dwarfout_init (main_input_filename) fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION); ASM_OUTPUT_LABEL (asm_out_file, DEBUG_BEGIN_LABEL); - output_die (output_compile_unit_die, (PTR) main_input_filename); + output_die (output_compile_unit_die, (void *) main_input_filename); ASM_OUTPUT_POP_SECTION (asm_out_file); fputc ('\n', asm_out_file); diff --git a/gcc/except.c b/gcc/except.c index 28b8efe5cad..0ea1fc7bf09 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -255,9 +255,9 @@ struct eh_status GTY(()) }; -static int t2r_eq PARAMS ((const PTR, - const PTR)); -static hashval_t t2r_hash PARAMS ((const PTR)); +static int t2r_eq PARAMS ((const void *, + const void *)); +static hashval_t t2r_hash PARAMS ((const void *)); static void add_type_for_runtime PARAMS ((tree)); static tree lookup_type_for_runtime PARAMS ((tree)); @@ -275,12 +275,12 @@ static struct eh_region *duplicate_eh_region_1 PARAMS ((struct eh_region *, struct inline_remap *)); static void duplicate_eh_region_2 PARAMS ((struct eh_region *, struct eh_region **)); -static int ttypes_filter_eq PARAMS ((const PTR, - const PTR)); -static hashval_t ttypes_filter_hash PARAMS ((const PTR)); -static int ehspec_filter_eq PARAMS ((const PTR, - const PTR)); -static hashval_t ehspec_filter_hash PARAMS ((const PTR)); +static int ttypes_filter_eq PARAMS ((const void *, + const void *)); +static hashval_t ttypes_filter_hash PARAMS ((const void *)); +static int ehspec_filter_eq PARAMS ((const void *, + const void *)); +static hashval_t ehspec_filter_hash PARAMS ((const void *)); static int add_ttypes_entry PARAMS ((htab_t, tree)); static int add_ehspec_entry PARAMS ((htab_t, htab_t, tree)); @@ -302,14 +302,14 @@ static void sjlj_emit_dispatch_table PARAMS ((rtx, struct sjlj_lp_info *)); static void sjlj_build_landing_pads PARAMS ((void)); -static hashval_t ehl_hash PARAMS ((const PTR)); -static int ehl_eq PARAMS ((const PTR, - const PTR)); +static hashval_t ehl_hash PARAMS ((const void *)); +static int ehl_eq PARAMS ((const void *, + const void *)); static void add_ehl_entry PARAMS ((rtx, struct eh_region *)); static void remove_exception_handler_label PARAMS ((rtx)); static void remove_eh_handler PARAMS ((struct eh_region *)); -static int for_each_eh_label_1 PARAMS ((PTR *, PTR)); +static int for_each_eh_label_1 PARAMS ((void **, void *)); struct reachable_info; @@ -333,9 +333,9 @@ static void add_reachable_handler static enum reachable_code reachable_next_level PARAMS ((struct eh_region *, tree, struct reachable_info *)); -static int action_record_eq PARAMS ((const PTR, - const PTR)); -static hashval_t action_record_hash PARAMS ((const PTR)); +static int action_record_eq PARAMS ((const void *, + const void *)); +static hashval_t action_record_hash PARAMS ((const void *)); static int add_action_record PARAMS ((htab_t, int, int)); static int collect_one_action_chain PARAMS ((htab_t, struct eh_region *)); @@ -1418,8 +1418,8 @@ duplicate_eh_regions (ifun, map) static int t2r_eq (pentry, pdata) - const PTR pentry; - const PTR pdata; + const void *pentry; + const void *pdata; { tree entry = (tree) pentry; tree data = (tree) pdata; @@ -1429,7 +1429,7 @@ t2r_eq (pentry, pdata) static hashval_t t2r_hash (pentry) - const PTR pentry; + const void *pentry; { tree entry = (tree) pentry; return TYPE_HASH (TREE_PURPOSE (entry)); @@ -1477,8 +1477,8 @@ struct ttypes_filter GTY(()) static int ttypes_filter_eq (pentry, pdata) - const PTR pentry; - const PTR pdata; + const void *pentry; + const void *pdata; { const struct ttypes_filter *entry = (const struct ttypes_filter *) pentry; tree data = (tree) pdata; @@ -1488,7 +1488,7 @@ ttypes_filter_eq (pentry, pdata) static hashval_t ttypes_filter_hash (pentry) - const PTR pentry; + const void *pentry; { const struct ttypes_filter *entry = (const struct ttypes_filter *) pentry; return TYPE_HASH (entry->t); @@ -1501,8 +1501,8 @@ ttypes_filter_hash (pentry) static int ehspec_filter_eq (pentry, pdata) - const PTR pentry; - const PTR pdata; + const void *pentry; + const void *pdata; { const struct ttypes_filter *entry = (const struct ttypes_filter *) pentry; const struct ttypes_filter *data = (const struct ttypes_filter *) pdata; @@ -1514,7 +1514,7 @@ ehspec_filter_eq (pentry, pdata) static hashval_t ehspec_filter_hash (pentry) - const PTR pentry; + const void *pentry; { const struct ttypes_filter *entry = (const struct ttypes_filter *) pentry; hashval_t h = 0; @@ -2314,7 +2314,7 @@ finish_eh_generation () static hashval_t ehl_hash (pentry) - const PTR pentry; + const void *pentry; { struct ehl_map_entry *entry = (struct ehl_map_entry *) pentry; @@ -2325,8 +2325,8 @@ ehl_hash (pentry) static int ehl_eq (pentry, pdata) - const PTR pentry; - const PTR pdata; + const void *pentry; + const void *pdata; { struct ehl_map_entry *entry = (struct ehl_map_entry *) pentry; struct ehl_map_entry *data = (struct ehl_map_entry *) pdata; @@ -2499,8 +2499,8 @@ for_each_eh_label (callback) static int for_each_eh_label_1 (pentry, data) - PTR *pentry; - PTR data; + void **pentry; + void *data; { struct ehl_map_entry *entry = *(struct ehl_map_entry **)pentry; void (*callback) PARAMS ((rtx)) = (void (*) PARAMS ((rtx))) data; @@ -3166,8 +3166,8 @@ struct action_record static int action_record_eq (pentry, pdata) - const PTR pentry; - const PTR pdata; + const void *pentry; + const void *pdata; { const struct action_record *entry = (const struct action_record *) pentry; const struct action_record *data = (const struct action_record *) pdata; @@ -3176,7 +3176,7 @@ action_record_eq (pentry, pdata) static hashval_t action_record_hash (pentry) - const PTR pentry; + const void *pentry; { const struct action_record *entry = (const struct action_record *) pentry; return entry->next * 1009 + entry->filter; diff --git a/gcc/expr.c b/gcc/expr.c index 83240c682da..db52ee36500 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -125,8 +125,8 @@ struct store_by_pieces int explicit_inc_to; unsigned HOST_WIDE_INT len; HOST_WIDE_INT offset; - rtx (*constfun) PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); - PTR constfundata; + rtx (*constfun) PARAMS ((void *, HOST_WIDE_INT, enum machine_mode)); + void *constfundata; int reverse; }; @@ -141,7 +141,7 @@ static bool emit_block_move_via_movstr PARAMS ((rtx, rtx, rtx, unsigned)); static rtx emit_block_move_via_libcall PARAMS ((rtx, rtx, rtx)); static tree emit_block_move_libcall_fn PARAMS ((int)); static void emit_block_move_via_loop PARAMS ((rtx, rtx, rtx, unsigned)); -static rtx clear_by_pieces_1 PARAMS ((PTR, HOST_WIDE_INT, +static rtx clear_by_pieces_1 PARAMS ((void *, HOST_WIDE_INT, enum machine_mode)); static void clear_by_pieces PARAMS ((rtx, unsigned HOST_WIDE_INT, unsigned int)); @@ -2718,8 +2718,8 @@ use_group_regs (call_fusage, regs) int can_store_by_pieces (len, constfun, constfundata, align) unsigned HOST_WIDE_INT len; - rtx (*constfun) PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); - PTR constfundata; + rtx (*constfun) PARAMS ((void *, HOST_WIDE_INT, enum machine_mode)); + void *constfundata; unsigned int align; { unsigned HOST_WIDE_INT max_size, l; @@ -2801,8 +2801,8 @@ rtx store_by_pieces (to, len, constfun, constfundata, align, endp) rtx to; unsigned HOST_WIDE_INT len; - rtx (*constfun) PARAMS ((PTR, HOST_WIDE_INT, enum machine_mode)); - PTR constfundata; + rtx (*constfun) PARAMS ((void *, HOST_WIDE_INT, enum machine_mode)); + void *constfundata; unsigned int align; int endp; { @@ -2871,7 +2871,7 @@ clear_by_pieces (to, len, align) static rtx clear_by_pieces_1 (data, offset, mode) - PTR data ATTRIBUTE_UNUSED; + void *data ATTRIBUTE_UNUSED; HOST_WIDE_INT offset ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED; { diff --git a/gcc/expr.h b/gcc/expr.h index 394d947f113..589e7f577b6 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -470,9 +470,9 @@ extern int can_move_by_pieces PARAMS ((unsigned HOST_WIDE_INT, unsigned int)); in every CONSTFUN call. ALIGN is maximum alignment we can assume. */ extern int can_store_by_pieces PARAMS ((unsigned HOST_WIDE_INT, - rtx (*) (PTR, HOST_WIDE_INT, + rtx (*) (void *, HOST_WIDE_INT, enum machine_mode), - PTR, unsigned int)); + void *, unsigned int)); /* Generate several move instructions to store LEN bytes generated by CONSTFUN to block TO. (A MEM rtx with BLKmode). CONSTFUNDATA is a @@ -480,9 +480,9 @@ extern int can_store_by_pieces PARAMS ((unsigned HOST_WIDE_INT, ALIGN is maximum alignment we can assume. Returns TO + LEN. */ extern rtx store_by_pieces PARAMS ((rtx, unsigned HOST_WIDE_INT, - rtx (*) (PTR, HOST_WIDE_INT, + rtx (*) (void *, HOST_WIDE_INT, enum machine_mode), - PTR, unsigned int, int)); + void *, unsigned int, int)); /* Emit insns to set X from Y. */ extern rtx emit_move_insn PARAMS ((rtx, rtx)); diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 0e53f4152ba..5ead9fe86f4 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1444,7 +1444,7 @@ size_int_type_wide (number, type) HOST_WIDE_INT number; tree type; { - PTR *slot; + void **slot; if (size_htab == 0) { @@ -1466,7 +1466,7 @@ size_int_type_wide (number, type) { tree t = new_const; - *slot = (PTR) new_const; + *slot = new_const; new_const = make_node (INTEGER_CST); return t; } diff --git a/gcc/function.c b/gcc/function.c index 25b7103dc01..3f795549df8 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3384,7 +3384,7 @@ insns_for_mem_walk (r, data) if (ifmwi->pass == 0 && *r && GET_CODE (*r) == ADDRESSOF && GET_CODE (XEXP (*r, 0)) == REG) { - PTR *e; + void **e; tmp.key = XEXP (*r, 0); e = htab_find_slot (ifmwi->ht, &tmp, INSERT); if (*e == NULL) diff --git a/gcc/gcc.c b/gcc/gcc.c index 04ac6c7bde9..e35ffc614ab 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1759,7 +1759,7 @@ set_spec (name, spec) /* Free the old spec. */ if (old_spec && sl->alloc_p) - free ((PTR) old_spec); + free ((void *) old_spec); sl->alloc_p = 1; } @@ -2058,7 +2058,7 @@ read_specs (filename, main_p) set_spec (p2, *(sl->ptr_spec)); if (sl->alloc_p) - free ((PTR) *(sl->ptr_spec)); + free ((void *) *(sl->ptr_spec)); *(sl->ptr_spec) = ""; sl->alloc_p = 0; @@ -2784,7 +2784,7 @@ execute () pfatal_pexecute (errmsg_fmt, errmsg_arg); if (string != commands[i].prog) - free ((PTR) string); + free ((void *) string); } execution_count++; diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 2f464cf2a62..044a64382d2 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -389,7 +389,7 @@ output_insn_data (void) break; case INSN_OUTPUT_FORMAT_MULTI: case INSN_OUTPUT_FORMAT_FUNCTION: - printf (" (const PTR) output_%d,\n", d->code_number); + printf (" (const void *) output_%d,\n", d->code_number); break; default: abort (); diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 979c3353320..32bbcf26028 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -930,8 +930,8 @@ init_md_reader (const char *filename) hash_c_test, cmp_c_test, NULL); for (i = 0; i < n_insn_conditions; i++) - *(htab_find_slot (condition_table, (PTR) &insn_conditions[i], INSERT)) - = (PTR) &insn_conditions[i]; + *(htab_find_slot (condition_table, &insn_conditions[i], INSERT)) + = (void *) &insn_conditions[i]; obstack_init (rtl_obstack); errors = 0; diff --git a/gcc/global.c b/gcc/global.c index d5636084ce7..1cc668004ef 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -289,7 +289,7 @@ static int n_regs_set; static HARD_REG_SET eliminable_regset; -static int allocno_compare PARAMS ((const PTR, const PTR)); +static int allocno_compare PARAMS ((const void *, const void *)); static void global_conflicts PARAMS ((void)); static void mirror_conflicts PARAMS ((void)); static void expand_preferences PARAMS ((void)); @@ -600,8 +600,8 @@ global_alloc (file) static int allocno_compare (v1p, v2p) - const PTR v1p; - const PTR v2p; + const void *v1p; + const void *v2p; { int v1 = *(const int *)v1p, v2 = *(const int *)v2p; /* Note that the quotient will never be bigger than diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index ee5fb2b2212..1112f534ebc 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -480,7 +480,7 @@ static int actual_hazard PARAMS ((int, rtx, int, int)); static int potential_hazard PARAMS ((int, rtx, int)); static int priority PARAMS ((rtx)); -static int rank_for_schedule PARAMS ((const PTR, const PTR)); +static int rank_for_schedule PARAMS ((const void *, const void *)); static void swap_sort PARAMS ((rtx *, int)); static void queue_insn PARAMS ((rtx, int)); static int schedule_insn PARAMS ((rtx, struct ready_list *, int)); @@ -1007,8 +1007,8 @@ while (0) static int rank_for_schedule (x, y) - const PTR x; - const PTR y; + const void *x; + const void *y; { rtx tmp = *(const rtx *) y; rtx tmp2 = *(const rtx *) x; diff --git a/gcc/hashtable.c b/gcc/hashtable.c index b3f6404ba33..86898f38850 100644 --- a/gcc/hashtable.c +++ b/gcc/hashtable.c @@ -127,7 +127,7 @@ ht_lookup (table, str, len, insert) if (insert == HT_ALLOCED) /* The string we search for was placed at the end of the obstack. Release it. */ - obstack_free (&table->stack, (PTR) str); + obstack_free (&table->stack, (void *) str); return node; } @@ -203,7 +203,7 @@ void ht_forall (table, cb, v) hash_table *table; ht_cb cb; - const PTR v; + const void *v; { hashnode *p, *limit; diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 84788f0bd3a..7ae08da5789 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2160,7 +2160,7 @@ find_if_header (test_bb, pass) /* Otherwise this must be a multiway branch of some sort. */ return NULL; - memset ((PTR) &ce_info, '\0', sizeof (ce_info)); + memset (&ce_info, '\0', sizeof (ce_info)); ce_info.test_bb = test_bb; ce_info.then_bb = then_edge->dest; ce_info.else_bb = else_edge->dest; @@ -2566,7 +2566,7 @@ find_cond_trap (test_bb, then_edge, else_edge) { struct ce_if_block new_ce_info; delete_insn (jump); - memset ((PTR) &new_ce_info, '\0', sizeof (new_ce_info)); + memset (&new_ce_info, '\0', sizeof (new_ce_info)); new_ce_info.test_bb = test_bb; new_ce_info.then_bb = NULL; new_ce_info.else_bb = NULL; diff --git a/gcc/integrate.c b/gcc/integrate.c index fc7b474fea5..0ac08f9e7b4 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -94,8 +94,8 @@ static void copy_insn_list PARAMS ((rtx, struct inline_remap *, rtx)); static void copy_insn_notes PARAMS ((rtx, struct inline_remap *, int)); -static int compare_blocks PARAMS ((const PTR, const PTR)); -static int find_block PARAMS ((const PTR, const PTR)); +static int compare_blocks PARAMS ((const void *, const void *)); +static int find_block PARAMS ((const void *, const void *)); /* Used by copy_rtx_and_substitute; this indicates whether the function is called for the purpose of inlining or some other purpose (i.e. loop @@ -613,8 +613,8 @@ process_reg_param (map, loc, copy) static int compare_blocks (v1, v2) - const PTR v1; - const PTR v2; + const void *v1; + const void *v2; { tree b1 = *((const tree *) v1); tree b2 = *((const tree *) v2); @@ -631,8 +631,8 @@ compare_blocks (v1, v2) static int find_block (v1, v2) - const PTR v1; - const PTR v2; + const void *v1; + const void *v2; { const union tree_node *b1 = (const union tree_node *) v1; tree b2 = *((const tree *) v2); diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index 2e91ae1b8d0..8e06b8db7cc 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -283,9 +283,9 @@ static void update_equiv_regs PARAMS ((void)); static void no_equiv PARAMS ((rtx, rtx, void *)); static void block_alloc PARAMS ((int)); static int qty_sugg_compare PARAMS ((int, int)); -static int qty_sugg_compare_1 PARAMS ((const PTR, const PTR)); +static int qty_sugg_compare_1 PARAMS ((const void *, const void *)); static int qty_compare PARAMS ((int, int)); -static int qty_compare_1 PARAMS ((const PTR, const PTR)); +static int qty_compare_1 PARAMS ((const void *, const void *)); static int combine_regs PARAMS ((rtx, rtx, int, int, rtx, int)); static int reg_meets_class_p PARAMS ((int, enum reg_class)); static void update_qty_class PARAMS ((int, int)); @@ -1701,8 +1701,8 @@ qty_compare (q1, q2) static int qty_compare_1 (q1p, q2p) - const PTR q1p; - const PTR q2p; + const void *q1p; + const void *q2p; { int q1 = *(const int *) q1p, q2 = *(const int *) q2p; int tem = QTY_CMP_PRI (q2) - QTY_CMP_PRI (q1); @@ -1741,8 +1741,8 @@ qty_sugg_compare (q1, q2) static int qty_sugg_compare_1 (q1p, q2p) - const PTR q1p; - const PTR q2p; + const void *q1p; + const void *q2p; { int q1 = *(const int *) q1p, q2 = *(const int *) q2p; int tem = QTY_CMP_SUGG (q1) - QTY_CMP_SUGG (q2); diff --git a/gcc/loop.c b/gcc/loop.c index cc094547738..ae7edab06d5 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -314,7 +314,7 @@ static int consec_sets_giv PARAMS ((const struct loop *, int, rtx, static int check_dbra_loop PARAMS ((struct loop *, int)); static rtx express_from_1 PARAMS ((rtx, rtx, rtx)); static rtx combine_givs_p PARAMS ((struct induction *, struct induction *)); -static int cmp_combine_givs_stats PARAMS ((const PTR, const PTR)); +static int cmp_combine_givs_stats PARAMS ((const void *, const void *)); static void combine_givs PARAMS ((struct loop_regs *, struct iv_class *)); static int product_cheap_p PARAMS ((rtx, rtx)); static int maybe_eliminate_biv PARAMS ((const struct loop *, struct iv_class *, @@ -7645,8 +7645,8 @@ struct combine_givs_stats static int cmp_combine_givs_stats (xp, yp) - const PTR xp; - const PTR yp; + const void *xp; + const void *yp; { const struct combine_givs_stats * const x = (const struct combine_givs_stats *) xp; diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c index 44486b4e500..2296a8a748c 100644 --- a/gcc/mips-tdump.c +++ b/gcc/mips-tdump.c @@ -234,7 +234,7 @@ ulong *rfile_desc; /* relative file tables */ PDR *proc_desc; /* procedure tables */ /* Forward reference for functions. */ -static PTR read_seek PARAMS ((PTR, size_t, off_t, const char *)); +static void *read_seek PARAMS ((void *, size_t, off_t, const char *)); static void read_tfile PARAMS ((void)); static void print_global_hdr PARAMS ((struct filehdr *)); static void print_sym_hdr PARAMS ((HDRR *)); @@ -271,9 +271,9 @@ static const struct option options[] = /* Read some bytes at a specified location, and return a pointer. */ -static PTR +static void * read_seek (ptr, size, offset, context) - PTR ptr; /* pointer to buffer or NULL */ + void *ptr; /* pointer to buffer or NULL */ size_t size; /* # bytes to read */ off_t offset; /* offset to read at */ const char *context; /* context for error message */ @@ -1349,12 +1349,12 @@ read_tfile () short magic; off_t sym_hdr_offset = 0; - (void) read_seek ((PTR) &magic, sizeof (magic), (off_t) 0, "Magic number"); + (void) read_seek (&magic, sizeof (magic), (off_t) 0, "Magic number"); if (!tfile) { /* Print out the global header, since this is not a T-file. */ - (void) read_seek ((PTR) &global_hdr, sizeof (global_hdr), (off_t) 0, + (void) read_seek (&global_hdr, sizeof (global_hdr), (off_t) 0, "Global file header"); print_global_hdr (&global_hdr); @@ -1368,7 +1368,7 @@ read_tfile () sym_hdr_offset = global_hdr.f_symptr; } - (void) read_seek ((PTR) &sym_hdr, + (void) read_seek (&sym_hdr, sizeof (sym_hdr), sym_hdr_offset, "Symbolic header"); diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index c7b7840fa67..920e15d1a61 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -4060,7 +4060,7 @@ write_varray (vp, offset, str) if (debug) { fputs ("\twarray\tvp = ", stderr); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) vp); + fprintf (stderr, HOST_PTR_PRINTF, (void *) vp); fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n", (unsigned long) offset, vp->num_allocated * vp->object_size, str); } @@ -4075,7 +4075,7 @@ write_varray (vp, offset, str) ? vp->objects_last_page * vp->object_size : vp->objects_per_page * vp->object_size; - sys_write = fwrite ((PTR) ptr->datum, 1, num_write, object_stream); + sys_write = fwrite (ptr->datum, 1, num_write, object_stream); if (sys_write <= 0) pfatal_with_name (object_name); @@ -4102,12 +4102,12 @@ write_object () if (debug) { fputs ("\n\twrite\tvp = ", stderr); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) &symbolic_header); + fprintf (stderr, HOST_PTR_PRINTF, (void *) &symbolic_header); fprintf (stderr, ", offset = %7u, size = %7lu, %s\n", 0, (unsigned long) sizeof (symbolic_header), "symbolic header"); } - sys_write = fwrite ((PTR) &symbolic_header, + sys_write = fwrite (&symbolic_header, 1, sizeof (symbolic_header), object_stream); @@ -4135,13 +4135,13 @@ write_object () if (debug) { fputs ("\twrite\tvp = ", stderr); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) &orig_linenum); + fprintf (stderr, HOST_PTR_PRINTF, (void *) &orig_linenum); fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n", (long) symbolic_header.cbLineOffset, (long) symbolic_header.cbLine, "Line numbers"); } - sys_write = fwrite ((PTR) orig_linenum, + sys_write = fwrite (orig_linenum, 1, symbolic_header.cbLine, object_stream); @@ -4170,13 +4170,13 @@ write_object () if (debug) { fputs ("\twrite\tvp = ", stderr); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) &orig_opt_syms); + fprintf (stderr, HOST_PTR_PRINTF, (void *) &orig_opt_syms); fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n", (long) symbolic_header.cbOptOffset, num_write, "Optimizer symbols"); } - sys_write = fwrite ((PTR) orig_opt_syms, + sys_write = fwrite (orig_opt_syms, 1, num_write, object_stream); @@ -4262,7 +4262,7 @@ write_object () if (debug) { fputs ("\twrite\tvp = ", stderr); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) &file_ptr->fdr); + fprintf (stderr, HOST_PTR_PRINTF, (void *) &file_ptr->fdr); fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n", file_offset, (unsigned long) sizeof (FDR), "File header"); @@ -4298,7 +4298,7 @@ write_object () if (debug) { fputs ("\twrite\tvp = ", stderr); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) &orig_rfds); + fprintf (stderr, HOST_PTR_PRINTF, (void *) &orig_rfds); fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n", (long) symbolic_header.cbRfdOffset, num_write, "Relative file descriptors"); @@ -4378,7 +4378,7 @@ read_seek (size, offset, str) pfatal_with_name (obj_in_name); } - sys_read = fread ((PTR) ptr, 1, size, obj_in_stream); + sys_read = fread (ptr, 1, size, obj_in_stream); if (sys_read <= 0) pfatal_with_name (obj_in_name); @@ -4421,7 +4421,7 @@ copy_object () || fseek (obj_in_stream, 0L, SEEK_SET) != 0) pfatal_with_name (obj_in_name); - sys_read = fread ((PTR) &orig_file_header, + sys_read = fread (&orig_file_header, 1, sizeof (struct filehdr), obj_in_stream); @@ -4448,7 +4448,7 @@ copy_object () if (fseek (obj_in_stream, (long) orig_file_header.f_symptr, SEEK_SET) != 0) pfatal_with_name (input_name); - sys_read = fread ((PTR) &orig_sym_hdr, + sys_read = fread (&orig_sym_hdr, 1, sizeof (orig_sym_hdr), obj_in_stream); @@ -4746,7 +4746,7 @@ copy_object () num_write = (remaining <= (int) sizeof (buffer)) ? remaining : (int) sizeof (buffer); - sys_read = fread ((PTR) buffer, 1, num_write, obj_in_stream); + sys_read = fread (buffer, 1, num_write, obj_in_stream); if (sys_read <= 0) pfatal_with_name (obj_in_name); @@ -5104,7 +5104,7 @@ allocate_cluster (npages) { fprintf (stderr, "\talloc\tnpages = %lu, value = ", (unsigned long) npages); - fprintf (stderr, HOST_PTR_PRINTF, (PTR) ptr); + fprintf (stderr, HOST_PTR_PRINTF, (void *) ptr); fputs ("\n", stderr); } @@ -5175,7 +5175,7 @@ free_multiple_pages (page_ptr, npages) the free pages is done right after an allocate. */ #else /* MALLOC_CHECK */ - free ((char *) page_ptr); + free (page_ptr); #endif /* MALLOC_CHECK */ } @@ -5255,7 +5255,7 @@ free_scope (ptr) alloc_counts[ (int) alloc_type_scope ].free_list.f_scope = ptr; #else - free ((PTR) ptr); + free (ptr); #endif } @@ -5412,7 +5412,7 @@ free_tag (ptr) alloc_counts[ (int) alloc_type_tag ].free_list.f_tag = ptr; #else - free ((PTR) ptr); + free (ptr); #endif } @@ -5470,7 +5470,7 @@ free_forward (ptr) alloc_counts[ (int) alloc_type_forward ].free_list.f_forward = ptr; #else - free ((PTR) ptr); + free (ptr); #endif } @@ -5528,7 +5528,7 @@ free_thead (ptr) alloc_counts[ (int) alloc_type_thead ].free_list.f_thead = ptr; #else - free ((PTR) ptr); + free (ptr); #endif } diff --git a/gcc/mkdeps.c b/gcc/mkdeps.c index 0c573cd4d82..8b1b2e9161e 100644 --- a/gcc/mkdeps.c +++ b/gcc/mkdeps.c @@ -137,14 +137,14 @@ deps_free (d) if (d->targetv) { for (i = 0; i < d->ntargets; i++) - free ((PTR) d->targetv[i]); + free ((void *) d->targetv[i]); free (d->targetv); } if (d->depv) { for (i = 0; i < d->ndeps; i++) - free ((PTR) d->depv[i]); + free ((void *) d->depv[i]); free (d->depv); } diff --git a/gcc/protoize.c b/gcc/protoize.c index 54fdba5382c..bcd0a7f7f3a 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -84,8 +84,8 @@ static void notice PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; static char *savestring PARAMS ((const char *, unsigned int)); static char *dupnstr PARAMS ((const char *, size_t)); static const char *substr PARAMS ((const char *, const char * const)); -static int safe_read PARAMS ((int, PTR, int)); -static void safe_write PARAMS ((int, PTR, int, const char *)); +static int safe_read PARAMS ((int, void *, int)); +static void safe_write PARAMS ((int, void *, int, const char *)); static void save_pointers PARAMS ((void)); static void restore_pointers PARAMS ((void)); static int is_id_char PARAMS ((int)); @@ -590,7 +590,7 @@ outer: static int safe_read (desc, ptr, len) int desc; - PTR ptr; + void *ptr; int len; { int left = len; @@ -619,7 +619,7 @@ safe_read (desc, ptr, len) static void safe_write (desc, ptr, len, out_fname) int desc; - PTR ptr; + void *ptr; int len; const char *out_fname; { @@ -1020,7 +1020,7 @@ static void free_def_dec (p) def_dec_info *p; { - free ((NONCONST PTR) p->ansi_decl); + free ((NONCONST void *) p->ansi_decl); #ifndef UNPROTOIZE { @@ -1030,7 +1030,7 @@ free_def_dec (p) for (curr = p->f_list_chain; curr; curr = next) { next = curr->chain_next; - free ((NONCONST PTR) curr); + free ((NONCONST void *) curr); } } #endif /* !defined (UNPROTOIZE) */ diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index 24edb05cca8..fd17bd04072 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -653,7 +653,7 @@ again: { ungetc (c, infile); list_counter++; - obstack_ptr_grow (&vector_stack, (PTR) read_rtx (infile)); + obstack_ptr_grow (&vector_stack, read_rtx (infile)); } if (list_counter > 0) { diff --git a/gcc/recog.h b/gcc/recog.h index 86af35f721f..38aa5160a11 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -241,7 +241,7 @@ struct insn_operand_data struct insn_data { const char *const name; - const PTR output; + const void *output; const insn_gen_fn genfun; const struct insn_operand_data *const operand; diff --git a/gcc/reload1.c b/gcc/reload1.c index 2462d0f288a..9e51c6020e8 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -402,7 +402,7 @@ static void count_pseudo PARAMS ((int)); static void order_regs_for_reload PARAMS ((struct insn_chain *)); static void reload_as_needed PARAMS ((int)); static void forget_old_reloads_1 PARAMS ((rtx, rtx, void *)); -static int reload_reg_class_lower PARAMS ((const PTR, const PTR)); +static int reload_reg_class_lower PARAMS ((const void *, const void *)); static void mark_reload_reg_in_use PARAMS ((unsigned int, int, enum reload_type, enum machine_mode)); @@ -1548,8 +1548,8 @@ calculate_needs_all_insns (global) static int reload_reg_class_lower (r1p, r2p) - const PTR r1p; - const PTR r2p; + const void *r1p; + const void *r2p; { int r1 = *(const short *) r1p, r2 = *(const short *) r2p; int t; diff --git a/gcc/sbitmap.c b/gcc/sbitmap.c index ce60ca8a783..2c4ac155a92 100644 --- a/gcc/sbitmap.c +++ b/gcc/sbitmap.c @@ -68,14 +68,14 @@ sbitmap_resize (bmap, n_elms, def) { amt = (sizeof (struct simple_bitmap_def) + bytes - sizeof (SBITMAP_ELT_TYPE)); - bmap = (sbitmap) xrealloc ((PTR) bmap, amt); + bmap = (sbitmap) xrealloc (bmap, amt); } if (n_elms > bmap->n_bits) { if (def) { - memset ((PTR) (bmap->elms + bmap->size), -1, bytes - bmap->bytes); + memset (bmap->elms + bmap->size, -1, bytes - bmap->bytes); /* Set the new bits if the original last element. */ last_bit = bmap->n_bits % SBITMAP_ELT_BITS; @@ -90,7 +90,7 @@ sbitmap_resize (bmap, n_elms, def) &= (SBITMAP_ELT_TYPE)-1 >> (SBITMAP_ELT_BITS - last_bit); } else - memset ((PTR) (bmap->elms + bmap->size), 0, bytes - bmap->bytes); + memset (bmap->elms + bmap->size, 0, bytes - bmap->bytes); } else if (n_elms < bmap->n_bits) { @@ -173,7 +173,7 @@ void sbitmap_zero (bmap) sbitmap bmap; { - memset ((PTR) bmap->elms, 0, bmap->bytes); + memset (bmap->elms, 0, bmap->bytes); } /* Set all elements in a bitmap to ones. */ @@ -184,7 +184,7 @@ sbitmap_ones (bmap) { unsigned int last_bit; - memset ((PTR) bmap->elms, -1, bmap->bytes); + memset (bmap->elms, -1, bmap->bytes); last_bit = bmap->n_bits % SBITMAP_ELT_BITS; if (last_bit) diff --git a/gcc/ssa-dce.c b/gcc/ssa-dce.c index 6ccc222cea6..1c480dc1024 100644 --- a/gcc/ssa-dce.c +++ b/gcc/ssa-dce.c @@ -211,7 +211,7 @@ control_dependent_block_to_edge_map_free (c) int i; for (i = 0; i < c->length; ++i) BITMAP_XFREE (c->data[i]); - free ((PTR) c); + free (c); } /* Record all blocks' control dependences on all edges in the edge @@ -566,7 +566,7 @@ ssa_eliminate_dead_code () /* Propagate through the operands. */ for_each_rtx (¤t_instruction, &propagate_necessity_through_operand, - (PTR) &unprocessed_instructions); + &unprocessed_instructions); /* PHI nodes are somewhat special in that each PHI alternative has data and control dependencies. The data dependencies @@ -738,6 +738,6 @@ ssa_eliminate_dead_code () if (VARRAY_ACTIVE_SIZE (unprocessed_instructions) != 0) abort (); control_dependent_block_to_edge_map_free (cdbte); - free ((PTR) pdom); + free (pdom); free_edge_list (el); } diff --git a/gcc/stringpool.c b/gcc/stringpool.c index afb9bdb0972..7a5d51ac03f 100644 --- a/gcc/stringpool.c +++ b/gcc/stringpool.c @@ -50,7 +50,7 @@ struct ht *ident_hash; static struct obstack string_stack; static hashnode alloc_node PARAMS ((hash_table *)); -static int mark_ident PARAMS ((struct cpp_reader *, hashnode, const PTR)); +static int mark_ident PARAMS ((struct cpp_reader *, hashnode, const void *)); static int ht_copy_and_clear PARAMS ((struct cpp_reader *, hashnode, const void *)); /* Initialize the string pool. */ @@ -158,7 +158,7 @@ static int mark_ident (pfile, h, v) struct cpp_reader *pfile ATTRIBUTE_UNUSED; hashnode h; - const PTR v ATTRIBUTE_UNUSED; + const void *v ATTRIBUTE_UNUSED; { gt_ggc_m_9tree_node (HT_IDENT_TO_GCC_IDENT (h)); return 1; diff --git a/gcc/tlink.c b/gcc/tlink.c index 6da909c7baa..98acd086e23 100644 --- a/gcc/tlink.c +++ b/gcc/tlink.c @@ -120,7 +120,7 @@ symbol_hash_lookup (string, create) const char *string; int create; { - PTR *e; + void **e; e = htab_find_slot_with_hash (symbol_table, string, (*htab_hash_string) (string), create ? INSERT : NO_INSERT); @@ -143,7 +143,7 @@ static struct file_hash_entry * file_hash_lookup (string) const char *string; { - PTR *e; + void **e; e = htab_find_slot_with_hash (file_table, string, (*htab_hash_string) (string), INSERT); @@ -165,7 +165,7 @@ demangled_hash_lookup (string, create) const char *string; int create; { - PTR *e; + void **e; e = htab_find_slot_with_hash (demangled_table, string, (*htab_hash_string) (string), create ? INSERT : NO_INSERT); diff --git a/gcc/tree.c b/gcc/tree.c index ad4f51c973a..9b434d8c0fb 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -47,7 +47,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "langhooks.h" /* obstack.[ch] explicitly declined to prototype this. */ -extern int _obstack_allocated_p PARAMS ((struct obstack *h, PTR obj)); +extern int _obstack_allocated_p PARAMS ((struct obstack *h, void *obj)); #ifdef GATHER_STATISTICS /* Statistics-gathering stuff. */ @@ -293,7 +293,7 @@ make_node (code) t = ggc_alloc_tree (length); - memset ((PTR) t, 0, length); + memset (t, 0, length); TREE_SET_CODE (t, code); @@ -609,7 +609,7 @@ make_tree_vec (len) t = ggc_alloc_tree (length); - memset ((PTR) t, 0, length); + memset (t, 0, length); TREE_SET_CODE (t, TREE_VEC); TREE_VEC_LENGTH (t) = len; @@ -2514,7 +2514,7 @@ build1 (code, type, node) t = ggc_alloc_tree (length); - memset ((PTR) t, 0, sizeof (struct tree_common)); + memset (t, 0, sizeof (struct tree_common)); TREE_SET_CODE (t, code); diff --git a/gcc/varasm.c b/gcc/varasm.c index 387659a9bb4..6879559d4bf 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -166,8 +166,8 @@ static void output_constructor PARAMS ((tree, unsigned HOST_WIDE_INT, unsigned int)); static void globalize_decl PARAMS ((tree)); static void maybe_assemble_visibility PARAMS ((tree)); -static int in_named_entry_eq PARAMS ((const PTR, const PTR)); -static hashval_t in_named_entry_hash PARAMS ((const PTR)); +static int in_named_entry_eq PARAMS ((const void *, const void *)); +static hashval_t in_named_entry_hash PARAMS ((const void *)); #ifdef ASM_OUTPUT_BSS static void asm_output_bss PARAMS ((FILE *, tree, const char *, unsigned HOST_WIDE_INT, @@ -310,8 +310,8 @@ in_data_section () static int in_named_entry_eq (p1, p2) - const PTR p1; - const PTR p2; + const void *p1; + const void *p2; { const struct in_named_entry *old = p1; const char *new = p2; @@ -321,7 +321,7 @@ in_named_entry_eq (p1, p2) static hashval_t in_named_entry_hash (p) - const PTR p; + const void *p; { const struct in_named_entry *old = p; return htab_hash_string (old->name); diff --git a/gcc/varray.c b/gcc/varray.c index 8eb6a623520..8e8d0290363 100644 --- a/gcc/varray.c +++ b/gcc/varray.c @@ -46,7 +46,7 @@ static const struct { { sizeof (unsigned long), 1 }, { sizeof (HOST_WIDE_INT), 1 }, { sizeof (unsigned HOST_WIDE_INT), 1 }, - { sizeof (PTR), 1 }, + { sizeof (void *), 1 }, { sizeof (char *), 1 }, { sizeof (struct rtx_def *), 1 }, { sizeof (struct rtvec_def *), 1 }, |