diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9e4b37e205da2b582f52c317512de33b147e8d8..debc696c52e25294a6589cc0de5651093b0f1107 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 f03f3e2794932f463fe3ab2af540021561101400..98229d598153b80d01090efb5d075aab8fa2e037 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 41e90f7daab506388ad7cd66df0e07294c10e206..0a53e3c60f0c2a4a579be86816f2e337afed4975 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 abd738c027e0f11716190241ad705d81108bbce6..b350a21e9428c1e5d5abcca367d24143baeefad3 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 fd77f663bba6ff2bf717af1da07c1f162ee7429a..82e367f2929b67d7493217befab1828974de8873 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 e6640875054a80609eadad7932db3285cfc7a5f3..078c7c03b544329405350101af3c90dbec25efd0 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 47f3edde76f0302ba66fc721b9fdaf77bb30ccbd..80bb2b12fdb023f9d15fa180c4423043e11e22bd 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 6f81c807a030536a73561e4e1df108b503772b5d..663c337120d39ffe14792b128d384bb12ea6668c 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 454e1ef901e7fa4d57d8d94bd3116b64b77c93ca..d76133a0f4aefd9e98881881a7a76f6f87bea079 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 926b26d5c5575c6e4adc10800e95de7ae95e4831..67e0eb0f1ff5a6ed29936a7c4370704e5ea76fee 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 7bab0b1e0ba2c857af9d752b5492097214026c52..0cc769ed8ce1a189a249e66a5587d05c206410b5 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 64aa2db5d8eac5889e264619c81998724c6f3a5d..92c1ab39951e3bcc7392fb280f29b1aa04667f82 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 292026a6cce9f6fc365c9188c86d472276e297b7..5a284d4575bfb7dd477bd06c8880981d0523be88 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 77bf9c07439e95f72335b9dd20ee3bd08c9dcd52..018085a8346a0771ac785fd53dba5a9b22c7374f 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 cace8b9f5db9f5d6081a5a369387b6435ac1cf83..e1d125e4b4d05b20d6c5f8eb6dbf12d5fc9b10ed 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 a729a22589cbabe55970c6426ea4af4856280569..f80c2926a0835f57b407cbae8cce1f622f40174c 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 84467e9c63d397502063847edbca6ae05fda7b5a..6007c56c3ee7cc304ea6f109aad25b0a5e72c48c 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 efc734ead8e7e0f5d5a70624711312b603491e35..6210ab91f858f7c2e528c59b792d4a0a6b34ecc6 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 28b8efe5cadcedc2172add1177118fec8dce0130..0ea1fc7bf096def6ce5d690d9a64c8d916ca12bf 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 83240c682da7f2f13352904d8929ea725b615554..db52ee36500d470aa62c51ac0f7a62d327abd03c 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 394d947f113233846153782ade6614f6c7802c1e..589e7f577b6ed496a4a2533fb1ebb1c491444db6 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 0e53f4152baa0067ffa752ab73a7440f67e704bc..5ead9fe86f42df52f67918a981806ee10b317402 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 25b7103dc01cea832bb7c0c9130aaebfe0165657..3f795549df8b6665984161027511c9a1cfaa41da 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 04ac6c7bde9822aa4d47fadd3b728fac6aed19b6..e35ffc614ab37a9b5b21dbe946281eab3feb2b41 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 2f464cf2a62ccdff8b77e321bffdb385c4849d59..044a64382d2a282eaaad825896399e1073e3768c 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 979c33533205a7460375c9336072fa0ddc5a6008..32bbcf26028de3eef637c3607483217914674e7f 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 d5636084ce7d6fa686a0fab9b8e2f282153136f7..1cc668004efe5d1c8f22a5305d4d3989ceecd4ce 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 ee5fb2b2212c9560b42a2236989753b4a48550ac..1112f534ebc70b47a5faf8e56b5b91c1a57fc50b 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 b3f6404ba33a5414119313c1d93af171f286f381..86898f388501d32c9003ec2ce9ea2bc55f3c7891 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 84788f0bd3a8e7141ea459dea6a1ccd077e3c492..7ae08da5789d6b234c6091d2822062e2bcfd5d38 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 fc7b474fea52d83f255ecdba20e930ea8e4e4612..0ac08f9e7b46e08af8cfddef55ff7ee5bc725c70 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 2e91ae1b8d0d4385c447177e8f05db98eb43e01d..8e06b8db7cc2282174b594d6365ebd817fd9abc7 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 cc094547738215971843b788bf02dde336bb0987..ae7edab06d5a3c7ee824b8e8d27e27c6bba26525 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 44486b4e500281aa0d555827197eb0be3339d474..2296a8a748cd0a26c967d9b6dfeff07d4d8c5474 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 c7b7840fa677252dd358f5b62eb5521f49208d22..920e15d1a61427e372c124fda3a5e21d437c0ea2 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 0c573cd4d8290246e1157fe728dfaea2b60ac145..8b1b2e9161e754cbce6f33d7def83449efb70008 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 54fdba5382c264e425fb4a4eed9253596959e488..bcd0a7f7f3ae3328846971f8fb44f713ef72afe6 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 24edb05cca8998c2b2b778211134416a70d18429..fd17bd04072c97e57e16c676baea3d08394c0a64 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 86af35f721f62083c8f90c86df410c13814a17d1..38aa5160a11f3083e91bdb48dc2cbb510be928e4 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 2462d0f288ac8c3980ef34f3f08887f07b1ea708..9e51c6020e8e133dded04b2f54cd40b1e54b62b7 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 ce60ca8a78335b150386267d3ba070281582845b..2c4ac155a92df27592c5c230f801ac587d5fe5b1 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 6ccc222cea669e84678747eb8b387a8fd49bb035..1c480dc102499c65ec64faceceeca7ee6a3a6c9c 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 (&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 --git a/gcc/stringpool.c b/gcc/stringpool.c
index afb9bdb0972023d1577e56b9dcc7cb1c31af4fc1..7a5d51ac03fd4c1d7265cd8ff9a92a03adf1acf1 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 6da909c7baa2277f632d0743c7b69995eff2c7f0..98acd086e23179f9fbd395ef7d07a40725554445 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 ad4f51c973addf9f93133590346376017b51b090..9b434d8c0fb0f6bb2396498c771247499c0069a3 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 387659a9bb482f07a8a6d4dfd2e0af6a6dd55466..6879559d4bfbbe1d184a450384d153875e8c4be7 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 8eb6a6235203536638b1de09929e703b40ad1426..8e8d02903633cbd3cba26768074c643c9555cdd3 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 },