This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch installed to delete most PTR macro uses


This patch converts all but a few uses of the PTR macro into ISO C
void*.  In a couple of places, gengtype required PTR for parsing so I
didn't touch those.  Where PTR was used in a cast and I could deduce
that it wasn't necessary, I simply deleted it.

Bootstrapped on sparc-sun-solaris2.7 and installed.



2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

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.
	
diff -rup orig/egcc-CVS20030615/gcc/bitmap.c egcc-CVS20030615/gcc/bitmap.c
--- orig/egcc-CVS20030615/gcc/bitmap.c	Sun Jun 15 20:01:10 2003
+++ egcc-CVS20030615/gcc/bitmap.c	Mon Jun 16 11:03:45 2003
@@ -729,9 +729,9 @@ debug_bitmap_file (FILE *file, bitmap he
   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 he
       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 -rup orig/egcc-CVS20030615/gcc/builtins.c egcc-CVS20030615/gcc/builtins.c
--- orig/egcc-CVS20030615/gcc/builtins.c	Sun Jun 15 20:01:10 2003
+++ egcc-CVS20030615/gcc/builtins.c	Mon Jun 16 11:06:59 2003
@@ -2269,11 +2269,11 @@ expand_builtin_memcpy (tree arglist, rtx
 	  && 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)
@@ -2366,13 +2366,13 @@ expand_builtin_mempcpy (tree arglist, rt
 	  && 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)
@@ -2618,13 +2618,13 @@ expand_builtin_strncpy (tree arglist, rt
 	  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)
@@ -2735,7 +2735,7 @@ expand_builtin_memset (tree arglist, rtx
 	  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));
@@ -2745,7 +2745,7 @@ expand_builtin_memset (tree arglist, rtx
 	  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)
@@ -2762,14 +2762,14 @@ expand_builtin_memset (tree arglist, rtx
 	  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 -rup orig/egcc-CVS20030615/gcc/c-incpath.c egcc-CVS20030615/gcc/c-incpath.c
--- orig/egcc-CVS20030615/gcc/c-incpath.c	Tue Mar 25 21:01:15 2003
+++ egcc-CVS20030615/gcc/c-incpath.c	Mon Jun 16 12:22:33 2003
@@ -83,7 +83,7 @@ free_path (path, reason)
       break;
     }
 
-  free ((PTR) path->name);
+  free (path->name);
   free (path);
 }
 
diff -rup orig/egcc-CVS20030615/gcc/cgraph.c egcc-CVS20030615/gcc/cgraph.c
--- orig/egcc-CVS20030615/gcc/cgraph.c	Thu Jun 12 20:01:26 2003
+++ egcc-CVS20030615/gcc/cgraph.c	Mon Jun 16 12:21:02 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/config/frv/frv.c egcc-CVS20030615/gcc/config/frv/frv.c
--- orig/egcc-CVS20030615/gcc/config/frv/frv.c	Sun Jun 15 01:48:38 2003
+++ egcc-CVS20030615/gcc/config/frv/frv.c	Mon Jun 16 12:15:16 2003
@@ -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,
      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 -rup orig/egcc-CVS20030615/gcc/config/mips/mips.c egcc-CVS20030615/gcc/config/mips/mips.c
--- orig/egcc-CVS20030615/gcc/config/mips/mips.c	Mon Jun  9 10:44:12 2003
+++ egcc-CVS20030615/gcc/config/mips/mips.c	Mon Jun 16 12:17:32 2003
@@ -272,8 +272,8 @@ static void iris6_asm_named_section_1		P
 							 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 -rup orig/egcc-CVS20030615/gcc/cp/decl.c egcc-CVS20030615/gcc/cp/decl.c
--- orig/egcc-CVS20030615/gcc/cp/decl.c	Sat Jun 14 14:32:38 2003
+++ egcc-CVS20030615/gcc/cp/decl.c	Mon Jun 16 12:10:58 2003
@@ -5384,7 +5384,7 @@ build_typename_type (tree context, tree 
 {
   tree t;
   tree d;
-  PTR *e;
+  void **e;
 
   if (typename_htab == NULL)
     {
diff -rup orig/egcc-CVS20030615/gcc/cp/pt.c egcc-CVS20030615/gcc/cp/pt.c
--- orig/egcc-CVS20030615/gcc/cp/pt.c	Tue Jun 10 20:02:00 2003
+++ egcc-CVS20030615/gcc/cp/pt.c	Mon Jun 16 12:11:14 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/cp/search.c egcc-CVS20030615/gcc/cp/search.c
--- orig/egcc-CVS20030615/gcc/cp/search.c	Sun May 18 11:42:44 2003
+++ egcc-CVS20030615/gcc/cp/search.c	Mon Jun 16 12:11:26 2003
@@ -1262,7 +1262,7 @@ lookup_member (tree xbasetype, tree name
   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 -rup orig/egcc-CVS20030615/gcc/cp/tree.c egcc-CVS20030615/gcc/cp/tree.c
--- orig/egcc-CVS20030615/gcc/cp/tree.c	Wed Jun 11 20:01:42 2003
+++ egcc-CVS20030615/gcc/cp/tree.c	Mon Jun 16 12:11:58 2003
@@ -883,7 +883,7 @@ hash_tree_cons (purpose, value, chain)
      tree purpose, value, chain;
 {
   int hashcode = 0;
-  PTR* slot;
+  void **slot;
   struct list_proxy proxy;
 
   /* Hash the list node.  */
@@ -898,7 +898,7 @@ hash_tree_cons (purpose, value, 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 -rup orig/egcc-CVS20030615/gcc/cppfiles.c egcc-CVS20030615/gcc/cppfiles.c
--- orig/egcc-CVS20030615/gcc/cppfiles.c	Fri May 16 19:42:19 2003
+++ egcc-CVS20030615/gcc/cppfiles.c	Mon Jun 16 11:09:11 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/cpphash.c egcc-CVS20030615/gcc/cpphash.c
--- orig/egcc-CVS20030615/gcc/cpphash.c	Mon Dec 16 13:19:15 2002
+++ egcc-CVS20030615/gcc/cpphash.c	Mon Jun 16 11:10:00 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/cppinit.c egcc-CVS20030615/gcc/cppinit.c
--- orig/egcc-CVS20030615/gcc/cppinit.c	Thu Jun 12 20:01:29 2003
+++ egcc-CVS20030615/gcc/cppinit.c	Mon Jun 16 12:24:32 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/cpplib.c egcc-CVS20030615/gcc/cpplib.c
--- orig/egcc-CVS20030615/gcc/cpplib.c	Thu Jun 12 20:01:30 2003
+++ egcc-CVS20030615/gcc/cpplib.c	Mon Jun 16 11:10:43 2003
@@ -683,7 +683,7 @@ do_include_common (pfile, type)
       _cpp_execute_include (pfile, fname, angle_brackets, type);
     }
 
-  free ((PTR) fname);
+  free ((void *) fname);
 }
 
 static void
@@ -1322,7 +1322,7 @@ do_pragma_dependency (pfile)
 	}
     }
 
-  free ((PTR) fname);
+  free ((void *) fname);
 }
 
 /* Get a token but skip padding.  */
diff -rup orig/egcc-CVS20030615/gcc/dwarf2out.c egcc-CVS20030615/gcc/dwarf2out.c
--- orig/egcc-CVS20030615/gcc/dwarf2out.c	Thu Jun 12 20:01:32 2003
+++ egcc-CVS20030615/gcc/dwarf2out.c	Mon Jun 16 11:11:03 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/dwarfout.c egcc-CVS20030615/gcc/dwarfout.c
--- orig/egcc-CVS20030615/gcc/dwarfout.c	Thu Jun 12 20:01:32 2003
+++ egcc-CVS20030615/gcc/dwarfout.c	Mon Jun 16 11:11:29 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/except.c egcc-CVS20030615/gcc/except.c
--- orig/egcc-CVS20030615/gcc/except.c	Tue Jun 10 20:01:29 2003
+++ egcc-CVS20030615/gcc/except.c	Mon Jun 16 11:14:10 2003
@@ -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_re
 						     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 -rup orig/egcc-CVS20030615/gcc/expr.c egcc-CVS20030615/gcc/expr.c
--- orig/egcc-CVS20030615/gcc/expr.c	Sat Jun 14 14:32:14 2003
+++ egcc-CVS20030615/gcc/expr.c	Mon Jun 16 11:05:56 2003
@@ -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 P
 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 -rup orig/egcc-CVS20030615/gcc/expr.h egcc-CVS20030615/gcc/expr.h
--- orig/egcc-CVS20030615/gcc/expr.h	Sun Jun 15 20:01:11 2003
+++ egcc-CVS20030615/gcc/expr.h	Mon Jun 16 11:05:23 2003
@@ -470,9 +470,9 @@ extern int can_move_by_pieces PARAMS ((u
    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 ((
    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 -rup orig/egcc-CVS20030615/gcc/fold-const.c egcc-CVS20030615/gcc/fold-const.c
--- orig/egcc-CVS20030615/gcc/fold-const.c	Fri Jun 13 20:01:17 2003
+++ egcc-CVS20030615/gcc/fold-const.c	Mon Jun 16 11:14:48 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/function.c egcc-CVS20030615/gcc/function.c
--- orig/egcc-CVS20030615/gcc/function.c	Sat Jun 14 14:32:15 2003
+++ egcc-CVS20030615/gcc/function.c	Mon Jun 16 11:15:18 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/gcc.c egcc-CVS20030615/gcc/gcc.c
--- orig/egcc-CVS20030615/gcc/gcc.c	Wed Jun  4 13:54:02 2003
+++ egcc-CVS20030615/gcc/gcc.c	Mon Jun 16 11:15:39 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/genoutput.c egcc-CVS20030615/gcc/genoutput.c
--- orig/egcc-CVS20030615/gcc/genoutput.c	Sun Jun  1 20:01:18 2003
+++ egcc-CVS20030615/gcc/genoutput.c	Mon Jun 16 11:15:54 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/gensupport.c egcc-CVS20030615/gcc/gensupport.c
--- orig/egcc-CVS20030615/gcc/gensupport.c	Sun Jun  1 20:01:20 2003
+++ egcc-CVS20030615/gcc/gensupport.c	Mon Jun 16 11:16:23 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/global.c egcc-CVS20030615/gcc/global.c
--- orig/egcc-CVS20030615/gcc/global.c	Mon Apr 14 21:01:55 2003
+++ egcc-CVS20030615/gcc/global.c	Mon Jun 16 11:16:57 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/haifa-sched.c egcc-CVS20030615/gcc/haifa-sched.c
--- orig/egcc-CVS20030615/gcc/haifa-sched.c	Fri Jun 13 20:01:18 2003
+++ egcc-CVS20030615/gcc/haifa-sched.c	Mon Jun 16 11:17:35 2003
@@ -480,7 +480,7 @@ static int actual_hazard PARAMS ((int, r
 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 -rup orig/egcc-CVS20030615/gcc/hashtable.c egcc-CVS20030615/gcc/hashtable.c
--- orig/egcc-CVS20030615/gcc/hashtable.c	Sun May 18 11:42:10 2003
+++ egcc-CVS20030615/gcc/hashtable.c	Mon Jun 16 11:17:54 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/ifcvt.c egcc-CVS20030615/gcc/ifcvt.c
--- orig/egcc-CVS20030615/gcc/ifcvt.c	Sun Jun  8 20:01:27 2003
+++ egcc-CVS20030615/gcc/ifcvt.c	Mon Jun 16 11:18:22 2003
@@ -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
     {
       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 -rup orig/egcc-CVS20030615/gcc/integrate.c egcc-CVS20030615/gcc/integrate.c
--- orig/egcc-CVS20030615/gcc/integrate.c	Sun Jun  8 20:01:27 2003
+++ egcc-CVS20030615/gcc/integrate.c	Mon Jun 16 11:18:53 2003
@@ -95,8 +95,8 @@ static void copy_insn_list              
 						 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
@@ -614,8 +614,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);
@@ -632,8 +632,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 -rup orig/egcc-CVS20030615/gcc/local-alloc.c egcc-CVS20030615/gcc/local-alloc.c
--- orig/egcc-CVS20030615/gcc/local-alloc.c	Thu Jan 16 22:28:08 2003
+++ egcc-CVS20030615/gcc/local-alloc.c	Mon Jun 16 11:19:19 2003
@@ -283,9 +283,9 @@ static void update_equiv_regs	PARAMS ((v
 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 -rup orig/egcc-CVS20030615/gcc/loop.c egcc-CVS20030615/gcc/loop.c
--- orig/egcc-CVS20030615/gcc/loop.c	Sun Jun  1 20:01:22 2003
+++ egcc-CVS20030615/gcc/loop.c	Mon Jun 16 11:19:34 2003
@@ -314,7 +314,7 @@ static int consec_sets_giv PARAMS ((cons
 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 -rup orig/egcc-CVS20030615/gcc/mips-tdump.c egcc-CVS20030615/gcc/mips-tdump.c
--- orig/egcc-CVS20030615/gcc/mips-tdump.c	Thu May 29 20:01:38 2003
+++ egcc-CVS20030615/gcc/mips-tdump.c	Mon Jun 16 11:20:39 2003
@@ -234,7 +234,7 @@ ulong	*rfile_desc;		/* relative file tab
 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 -rup orig/egcc-CVS20030615/gcc/mips-tfile.c egcc-CVS20030615/gcc/mips-tfile.c
--- orig/egcc-CVS20030615/gcc/mips-tfile.c	Thu May 29 20:01:39 2003
+++ egcc-CVS20030615/gcc/mips-tfile.c	Mon Jun 16 11:22:50 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/mkdeps.c egcc-CVS20030615/gcc/mkdeps.c
--- orig/egcc-CVS20030615/gcc/mkdeps.c	Thu Jan  9 21:22:03 2003
+++ egcc-CVS20030615/gcc/mkdeps.c	Mon Jun 16 11:23:15 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/protoize.c egcc-CVS20030615/gcc/protoize.c
--- orig/egcc-CVS20030615/gcc/protoize.c	Sat May 17 18:18:41 2003
+++ egcc-CVS20030615/gcc/protoize.c	Mon Jun 16 12:21:21 2003
@@ -84,8 +84,8 @@ static void notice PARAMS ((const char *
 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 -rup orig/egcc-CVS20030615/gcc/read-rtl.c egcc-CVS20030615/gcc/read-rtl.c
--- orig/egcc-CVS20030615/gcc/read-rtl.c	Sat May 17 18:18:41 2003
+++ egcc-CVS20030615/gcc/read-rtl.c	Mon Jun 16 11:25:01 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/recog.h egcc-CVS20030615/gcc/recog.h
--- orig/egcc-CVS20030615/gcc/recog.h	Tue Jul 23 08:08:10 2002
+++ egcc-CVS20030615/gcc/recog.h	Mon Jun 16 12:05:46 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/reload1.c egcc-CVS20030615/gcc/reload1.c
--- orig/egcc-CVS20030615/gcc/reload1.c	Thu Jun 12 20:01:39 2003
+++ egcc-CVS20030615/gcc/reload1.c	Mon Jun 16 11:25:18 2003
@@ -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));
@@ -1551,8 +1551,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 -rup orig/egcc-CVS20030615/gcc/sbitmap.c egcc-CVS20030615/gcc/sbitmap.c
--- orig/egcc-CVS20030615/gcc/sbitmap.c	Fri Mar  7 22:23:07 2003
+++ egcc-CVS20030615/gcc/sbitmap.c	Mon Jun 16 12:06:35 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/ssa-dce.c egcc-CVS20030615/gcc/ssa-dce.c
--- orig/egcc-CVS20030615/gcc/ssa-dce.c	Thu Dec 26 13:15:56 2002
+++ egcc-CVS20030615/gcc/ssa-dce.c	Mon Jun 16 12:07:29 2003
@@ -211,7 +211,7 @@ control_dependent_block_to_edge_map_free
   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 (&current_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 -rup orig/egcc-CVS20030615/gcc/stringpool.c egcc-CVS20030615/gcc/stringpool.c
--- orig/egcc-CVS20030615/gcc/stringpool.c	Thu Apr  3 18:27:22 2003
+++ egcc-CVS20030615/gcc/stringpool.c	Mon Jun 16 12:07:56 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/tlink.c egcc-CVS20030615/gcc/tlink.c
--- orig/egcc-CVS20030615/gcc/tlink.c	Fri May 23 20:01:22 2003
+++ egcc-CVS20030615/gcc/tlink.c	Mon Jun 16 12:08:18 2003
@@ -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 -rup orig/egcc-CVS20030615/gcc/tree.c egcc-CVS20030615/gcc/tree.c
--- orig/egcc-CVS20030615/gcc/tree.c	Tue May 27 20:01:31 2003
+++ egcc-CVS20030615/gcc/tree.c	Mon Jun 16 12:08:42 2003
@@ -47,7 +47,7 @@ Software Foundation, 59 Temple Place - S
 #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 -rup orig/egcc-CVS20030615/gcc/varasm.c egcc-CVS20030615/gcc/varasm.c
--- orig/egcc-CVS20030615/gcc/varasm.c	Sun Jun  8 22:19:50 2003
+++ egcc-CVS20030615/gcc/varasm.c	Mon Jun 16 12:09:37 2003
@@ -166,8 +166,8 @@ static void output_constructor		PARAMS (
 						 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 -rup orig/egcc-CVS20030615/gcc/varray.c egcc-CVS20030615/gcc/varray.c
--- orig/egcc-CVS20030615/gcc/varray.c	Wed Feb 12 20:47:23 2003
+++ egcc-CVS20030615/gcc/varray.c	Mon Jun 16 12:09:52 2003
@@ -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 },


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]