PATCH [c c++ objc]: POINTER_TYPE_P & INDIRECT_TYPE_P

Greg McGary gkm@eng.ascend.com
Fri Dec 17 17:25:00 GMT 1999


To pave the way for bounded pointers types, which will be
RECORD_TYPE nodes, I need a macro that means a type is logically
a pointer type (either POINTER_TYPE or BP RECORD_TYPE).
The current POINTER_TYPE_P matches POINTER_TYPE or REFERENCE_TYPE,
and isn't the best choice of name.

In the new world:

* POINTER_TYPE_P means only POINTER_TYPE (and later BP RECORD_TYPE),
  not REFERENCE_TYPE.

* A new macro INDIRECT_TYPE_P means POINTER_TYPE_P or REFERENCE_TYPE.

Please review this soon, so I can move on to the first large
bounded-pointer checkin!

Thanks

1999-12-17  Greg McGary  <gkm@gnu.org>

	* tree.h (POINTER_TYPE_P): Redefine: matches only POINTER_TYPE.
	(INDIRECT_TYPE_P): New macro: matches POINTER_TYPE & REFERENCE_TYPE.
	* builtins.c (get_pointer_alignment): Use redef'd POINTER_TYPE_P.
	(get_memory_rtx): Use redef'd POINTER_TYPE_P.
	(expand_builtin_constant_p): Use INDIRECT_TYPE_P.
	(expand_builtin_strlen): Use redef'd POINTER_TYPE_P.
	(expand_builtin_memcpy): Use redef'd POINTER_TYPE_P.
	(expand_builtin_strcpy): Use redef'd POINTER_TYPE_P.
	(expand_builtin_memset): Use redef'd POINTER_TYPE_P.
	(expand_builtin_memcmp): Use redef'd POINTER_TYPE_P.
	(expand_builtin_strcmp): Use redef'd POINTER_TYPE_P.
	(stabilize_va_list): Use INDIRECT_TYPE_P.
	(expand_builtin_va_arg): Use redef'd POINTER_TYPE_P.
	(expand_builtin): Use INDIRECT_TYPE_P.  Use redef'd POINTER_TYPE_P.
	* c-common.c (decl_attributes): Use redef'd POINTER_TYPE_P.
	(check_format_info): Use redef'd POINTER_TYPE_P.
	(c_build_qualified_type): Use INDIRECT_TYPE_P.
	(c_apply_type_quals_to_decl): Use INDIRECT_TYPE_P.
	(c_find_base_decl): Use INDIRECT_TYPE_P.
	(c_get_alias_set): Use redef'd POINTER_TYPE_P.
	* c-convert.c (convert): Use redef'd POINTER_TYPE_P.
	* c-decl.c (duplicate_decls): Use redef'd POINTER_TYPE_P.
	(grokparms): Use redef'd POINTER_TYPE_P.
	(start_function): Use redef'd POINTER_TYPE_P.
	* c-typeck.c (c_alignof_expr): Use redef'd POINTER_TYPE_P.
	(build_indirect_ref): Use redef'd POINTER_TYPE_P.
	(build_array_ref): Use redef'd POINTER_TYPE_P.
	(build_function_call): Use redef'd POINTER_TYPE_P.
	(build_binary_op): Use redef'd POINTER_TYPE_P.
	(build_unary_op): Use redef'd POINTER_TYPE_P.
	(build_conditional_expr): Use redef'd POINTER_TYPE_P.
	(build_c_cast): Use redef'd POINTER_TYPE_P.
	(convert_for_assignment): Use redef'd POINTER_TYPE_P.
	(digest_init): Use redef'd POINTER_TYPE_P.
	(c_expand_return): Use INDIRECT_TYPE_P.
	* calls.c (expand_call): Use INDIRECT_TYPE_P.
	Use redef'd POINTER_TYPE_P.
	* dwarfout.c (type_attribute): Use INDIRECT_TYPE_P.
	* expr.c (expand_assignment): Use redef'd POINTER_TYPE_P.
	(expand_expr): Use INDIRECT_TYPE_P.
	(do_compare_and_jump): Use redef'd POINTER_TYPE_P.
	(do_store_flag): Use redef'd POINTER_TYPE_P.
	* fold-const.c	(force_fit_type): Use INDIRECT_TYPE_P.
	(fold_convert): Use INDIRECT_TYPE_P.
	(fold): Use INDIRECT_TYPE_P.
	* function.c (assign_parms): Use INDIRECT_TYPE_P.
	(init_function_start): Use INDIRECT_TYPE_P.
	* integrate.c (expand_inline_function): Use INDIRECT_TYPE_P.
	(build_message_expr): Use redef'd POINTER_TYPE_P.
	(encode_type): Use redef'd POINTER_TYPE_P.
	(is_complex_decl): Use redef'd POINTER_TYPE_P.
	* sdbout.c (sdbout_field_types): Use INDIRECT_TYPE_P.
	* stmt.c (expand_decl): Use INDIRECT_TYPE_P.
	(expand_decl_init): Use INDIRECT_TYPE_P.
	* tree.c (integer_pow2p): Use INDIRECT_TYPE_P.
	(tree_log2): Use INDIRECT_TYPE_P.
	(valid_machine_attribute): Use INDIRECT_TYPE_P.
	* varasm.c (initializer_constant_valid_p): Use INDIRECT_TYPE_P.
	* config/alpha/alpha.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.
	* config/i860/fx2800.h (DATA_ALIGNMENT): Use INDIRECT_TYPE_P.
	* config/m68k/a-ux.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.
	* config/m68k/linux.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.
	* config/m68k/m68kv4.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.
	* config/m68k/mot3300.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.
	* config/mn10300/mn10300.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.
	* config/rs6000/rs6000.h (FUNCTION_VALUE): Use INDIRECT_TYPE_P.

cp:	
	* cp-tree.h (TYPE_PTRMEM_P): Use redef'd POINTER_TYPE_P.
	(TYPE_PTR_P): Use redef'd POINTER_TYPE_P.
	(TYPE_PTRFN_P): Use redef'd POINTER_TYPE_P.
	* call.c (build_field_call): Use redef'd POINTER_TYPE_P.
	(standard_conversion): Use redef'd POINTER_TYPE_P.
	(add_builtin_candidate): Use redef'd POINTER_TYPE_P.
	(build_object_call): Use redef'd POINTER_TYPE_P.
	(build_over_call): Use redef'd POINTER_TYPE_P.
	* class.c (build_vbase_path): Use redef'd POINTER_TYPE_P.
	(finish_struct_1): Use redef'd POINTER_TYPE_P.
	(resolves_to_fixed_type_p): Use INDIRECT_TYPE_P.
	(resolve_address_of_overloaded_function): Use redef'd POINTER_TYPE_P.
	* cvt.c (cp_convert_to_pointer): Use INDIRECT_TYPE_P.
	Use redef'd POINTER_TYPE_P.
	(convert_to_pointer_force): Use redef'd POINTER_TYPE_P.
	(convert_to_reference): Use redef'd POINTER_TYPE_P.
	(ocp_convert): Use INDIRECT_TYPE_P.  Use redef'd POINTER_TYPE_P.
	(convert): Use INDIRECT_TYPE_P.
	(convert_force): Use redef'd POINTER_TYPE_P.
	(perform_qualification_conversions): Use redef'd POINTER_TYPE_P.
	* decl.c (grokparms): Use INDIRECT_TYPE_P.
	(start_function): Use redef'd POINTER_TYPE_P.
	(lang_mark_tree): Use redef'd POINTER_TYPE_P.
	* decl2.c (grok_alignof): Use redef'd POINTER_TYPE_P.
	(acceptable_java_type): Use redef'd POINTER_TYPE_P.
	* error.c (dump_type_prefix): Use redef'd POINTER_TYPE_P.
	(dump_expr): Use redef'd POINTER_TYPE_P.
	* except.c (initialize_handler_parm): Use redef'd POINTER_TYPE_P.
	(complete_ptr_ref_or_void_ptr_p): Use redef'd POINTER_TYPE_P.
	* expr.c (do_case): Use INDIRECT_TYPE_P.
	* init.c (resolve_offset_ref): Use redef'd POINTER_TYPE_P.
	(build_new_1): Use redef'd POINTER_TYPE_P.
	(build_delete): Use redef'd POINTER_TYPE_P.
	(build_vec_delete): Use redef'd POINTER_TYPE_P.
	* pt.c (tsubst): Use redef'd POINTER_TYPE_P.
	(unify): Use redef'd POINTER_TYPE_P.
	* rtti.c (build_headof): Use redef'd POINTER_TYPE_P.
	(build_x_typeid): Use redef'd POINTER_TYPE_P.
	(get_tinfo_var): Use redef'd POINTER_TYPE_P.
	(build_dynamic_cast_1): Use redef'd POINTER_TYPE_P.
	(synthesize_tinfo_fn): Use redef'd POINTER_TYPE_P.
	* search.c (covariant_return_p): Use redef'd POINTER_TYPE_P.
	* tree.c (cp_build_qualified_type_real): Use INDIRECT_TYPE_P.
	Use redef'd POINTER_TYPE_P.
	* typeck.c (target_type): Use redef'd POINTER_TYPE_P.
	(fntype_p): Use redef'd POINTER_TYPE_P.
	(common_type): Use redef'd POINTER_TYPE_P.
	(comp_except_types): Use redef'd POINTER_TYPE_P.
	(comp_target_types): Use redef'd POINTER_TYPE_P.
	(comp_target_parms): Use redef'd POINTER_TYPE_P.
	(string_conv_p): Use redef'd POINTER_TYPE_P.
	(build_array_ref): Use redef'd POINTER_TYPE_P.
	(build_x_function_call): Use redef'd POINTER_TYPE_P.
	(build_function_call_real): Use redef'd POINTER_TYPE_P.
	(build_binary_op_nodefault): Use redef'd POINTER_TYPE_P.
	(build_unary_op): Use redef'd POINTER_TYPE_P.
	(build_const_cast): Use INDIRECT_TYPE_P.  Use redef'd POINTER_TYPE_P.
	(build_c_cast): Use redef'd POINTER_TYPE_P.
	(comp_ptr_ttypes_real): Use redef'd POINTER_TYPE_P.
	(ptr_reasonably_similar): Use redef'd POINTER_TYPE_P.
	(comp_ptr_ttypes_const): Use redef'd POINTER_TYPE_P.
	(comp_ptr_ttypes_reinterpret): Use redef'd POINTER_TYPE_P.
	(casts_away_constness_r): Use redef'd POINTER_TYPE_P.
	(casts_away_constness): Use redef'd POINTER_TYPE_P.
	* typeck2.c (digest_init): Use INDIRECT_TYPE_P.
	(build_x_arrow): Use redef'd POINTER_TYPE_P.
	(add_exception_specifier): Use redef'd POINTER_TYPE_P.

objc:
	* objc-act.c (objc_comptypes): Use redef'd POINTER_TYPE_P.

Index: builtins.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/builtins.c,v
retrieving revision 1.19
diff -u -p -r1.19 builtins.c
--- builtins.c	1999/10/27 01:25:12	1.19
+++ builtins.c	1999/12/18 01:04:01
@@ -101,7 +101,7 @@ get_pointer_alignment (exp, max_align)
 {
   unsigned align, inner;
 
-  if (TREE_CODE (TREE_TYPE (exp)) != POINTER_TYPE)
+  if (! POINTER_TYPE_P (TREE_TYPE (exp)))
     return 0;
 
   align = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp)));
@@ -115,7 +115,7 @@ get_pointer_alignment (exp, max_align)
 	case CONVERT_EXPR:
 	case NON_LVALUE_EXPR:
 	  exp = TREE_OPERAND (exp, 0);
-	  if (TREE_CODE (TREE_TYPE (exp)) != POINTER_TYPE)
+	  if (! POINTER_TYPE_P (TREE_TYPE (exp)))
 	    return align;
 	  inner = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp)));
 	  align = MIN (inner, max_align);
@@ -508,7 +508,7 @@ get_memory_rtx (exp)
   while (TREE_CODE (exp) == NOP_EXPR)
     {
       tree cast_type = TREE_TYPE (exp);
-      if (TREE_CODE (cast_type) == POINTER_TYPE
+      if (POINTER_TYPE_P (cast_type)
 	  && AGGREGATE_TYPE_P (TREE_TYPE (cast_type)))
 	{
 	  is_aggregate = 1;
@@ -1145,7 +1145,7 @@ expand_builtin_constant_p (exp)
 	 when generating RTL, not later.  */
       if (TREE_SIDE_EFFECTS (arg) || cse_not_expected
 	  || AGGREGATE_TYPE_P (TREE_TYPE (arg))
-	  || POINTER_TYPE_P (TREE_TYPE (arg)))
+	  || INDIRECT_TYPE_P (TREE_TYPE (arg)))
 	return const0_rtx;
 
       /* Otherwise, emit (constant_p_rtx (ARG)) and let CSE get a
@@ -1284,7 +1284,7 @@ expand_builtin_strlen (exp, target, mode
 
   if (arglist == 0
       /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE)
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))))
     return 0;
   else
     {
@@ -1374,10 +1374,9 @@ expand_builtin_memcpy (arglist)
 {
   if (arglist == 0
       /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
       || TREE_CHAIN (arglist) == 0
-      || (TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
-	  != POINTER_TYPE)
+      || (! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))))
       || TREE_CHAIN (TREE_CHAIN (arglist)) == 0
       || (TREE_CODE (TREE_TYPE (TREE_VALUE
 				(TREE_CHAIN (TREE_CHAIN (arglist)))))
@@ -1434,9 +1433,9 @@ expand_builtin_strcpy (exp)
 
   if (arglist == 0
       /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
       || TREE_CHAIN (arglist) == 0
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))) != POINTER_TYPE)
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))))
     return 0;
   else
     {
@@ -1465,7 +1464,7 @@ expand_builtin_memset (exp)
 
   if (arglist == 0
       /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
       || TREE_CHAIN (arglist) == 0
       || (TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
 	  != INTEGER_TYPE)
@@ -1546,9 +1545,9 @@ expand_builtin_memcmp (exp, arglist, tar
 
   if (arglist == 0
       /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
       || TREE_CHAIN (arglist) == 0
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))) != POINTER_TYPE
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
       || TREE_CHAIN (TREE_CHAIN (arglist)) == 0
       || TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))))) != INTEGER_TYPE)
     return 0;
@@ -1615,9 +1614,9 @@ expand_builtin_strcmp (exp, target)
 
   if (arglist == 0
       /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
       || TREE_CHAIN (arglist) == 0
-      || TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))) != POINTER_TYPE)
+      || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))))
     return 0;
   else if (!HAVE_cmpstrsi)
     return 0;
@@ -1852,7 +1851,7 @@ stabilize_va_list (valist, was_ptr)
 	}
       else
 	{
-	  if (! POINTER_TYPE_P (TREE_TYPE (valist))
+	  if (! INDIRECT_TYPE_P (TREE_TYPE (valist))
 	      || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (valist)))
 		  != TYPE_MAIN_VARIANT (TREE_TYPE (va_list_type_node))))
 	    abort ();
@@ -2006,7 +2005,7 @@ expand_builtin_va_arg (valist, type)
          In that case, unwrap both types so that we can compare the
 	 underlying records.  */
       if (TREE_CODE (have_va_type) == ARRAY_TYPE
-	  || TREE_CODE (have_va_type) == POINTER_TYPE)
+	  || POINTER_TYPE_P (have_va_type))
 	{
 	  want_va_type = TREE_TYPE (want_va_type);
 	  have_va_type = TREE_TYPE (have_va_type);
@@ -2305,9 +2304,9 @@ expand_builtin (exp, target, subtarget, 
     case BUILT_IN_APPLY:
       if (arglist == 0
 	  /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-	  || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
+	  || ! INDIRECT_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
 	  || TREE_CHAIN (arglist) == 0
-	  || TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))) != POINTER_TYPE
+	  || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
 	  || TREE_CHAIN (TREE_CHAIN (arglist)) == 0
 	  || TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))))) != INTEGER_TYPE)
 	return const0_rtx;
@@ -2329,7 +2328,7 @@ expand_builtin (exp, target, subtarget, 
     case BUILT_IN_RETURN:
       if (arglist
 	  /* Arg could be non-pointer if user redeclared this fcn wrong.  */
-	  && TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) == POINTER_TYPE)
+	  && POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))))
 	expand_builtin_return (expand_expr (TREE_VALUE (arglist),
 					    NULL_RTX, VOIDmode, 0));
       return const0_rtx;
@@ -2423,7 +2422,7 @@ expand_builtin (exp, target, subtarget, 
 
     case BUILT_IN_SETJMP:
       if (arglist == 0
-	  || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE)
+	  || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))))
 	break;
       else
 	{
@@ -2440,7 +2439,7 @@ expand_builtin (exp, target, subtarget, 
 	 __builtin_setjmp above.  */
     case BUILT_IN_LONGJMP:
       if (arglist == 0 || TREE_CHAIN (arglist) == 0
-	  || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE)
+	  || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))))
 	break;
       else
 	{
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-common.c,v
retrieving revision 1.79
diff -u -p -r1.79 c-common.c
--- c-common.c	1999/12/10 04:26:05	1.79
+++ c-common.c	1999/12/18 01:04:13
@@ -610,7 +610,7 @@ decl_attributes (node, attributes, prefi
 	case A_NORETURN:
 	  if (TREE_CODE (decl) == FUNCTION_DECL)
 	    TREE_THIS_VOLATILE (decl) = 1;
-	  else if (TREE_CODE (type) == POINTER_TYPE
+	  else if (POINTER_TYPE_P (type)
 		   && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
 	    TREE_TYPE (decl) = type
 	      = build_pointer_type
@@ -642,7 +642,7 @@ decl_attributes (node, attributes, prefi
 	case A_CONST:
 	  if (TREE_CODE (decl) == FUNCTION_DECL)
 	    TREE_READONLY (decl) = 1;
-	  else if (TREE_CODE (type) == POINTER_TYPE
+	  else if (POINTER_TYPE_P (type)
 		   && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
 	    TREE_TYPE (decl) = type
 	      = build_pointer_type
@@ -885,7 +885,7 @@ decl_attributes (node, attributes, prefi
 		    argument = TREE_CHAIN (argument);
 		  }
 		if (! argument
-		    || TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE
+		    || ! POINTER_TYPE_P (TREE_VALUE (argument))
 		  || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (argument)))
 		      != char_type_node))
 		  {
@@ -953,7 +953,7 @@ decl_attributes (node, attributes, prefi
 		    argument = TREE_CHAIN (argument);
 		  }
 		if (! argument
-		    || TREE_CODE (TREE_VALUE (argument)) != POINTER_TYPE
+		    || ! POINTER_TYPE_P (TREE_VALUE (argument))
 		  || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (argument)))
 		      != char_type_node))
 		  {
@@ -962,7 +962,7 @@ decl_attributes (node, attributes, prefi
 		  }
 	      }
 
-	    if (TREE_CODE (TREE_TYPE (TREE_TYPE (decl))) != POINTER_TYPE
+	    if (! POINTER_TYPE_P (TREE_TYPE (TREE_TYPE (decl)))
 		|| (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (TREE_TYPE (decl))))
 		    != char_type_node))
 	      {
@@ -1940,7 +1940,7 @@ check_format_info (info, params)
 	 that precede the "real" argument.  */
       for (i = 0; i < fci->pointer_count + aflag; ++i)
 	{
-	  if (TREE_CODE (cur_type) == POINTER_TYPE)
+	  if (POINTER_TYPE_P (cur_type))
 	    {
 	      cur_type = TREE_TYPE (cur_type);
 
@@ -2004,7 +2004,7 @@ check_format_info (info, params)
 	  if (TREE_CODE (cur_type) != ERROR_MARK
 	      && TYPE_NAME (cur_type) != 0
 	      && TREE_CODE (cur_type) != INTEGER_TYPE
-	      && !(TREE_CODE (cur_type) == POINTER_TYPE
+	      && !(POINTER_TYPE_P (cur_type)
 		   && TREE_CODE (TREE_TYPE (cur_type)) == INTEGER_TYPE))
 	    {
 	      if (TREE_CODE (TYPE_NAME (cur_type)) == TYPE_DECL
@@ -2019,7 +2019,7 @@ check_format_info (info, params)
 	     Make up a string to describe vaguely what it is.  */
 	  if (that == 0)
 	    {
-	      if (TREE_CODE (cur_type) == POINTER_TYPE)
+	      if (POINTER_TYPE_P (cur_type))
 		that = "pointer";
 	      else
 		that = "different type";
@@ -3214,14 +3214,14 @@ c_build_qualified_type (type, type_quals
      int type_quals;
 {
   /* A restrict-qualified pointer type must be a pointer to object or
-     incomplete type.  Note that the use of POINTER_TYPE_P also allows
+     incomplete type.  Note that the use of INDIRECT_TYPE_P also allows
      REFERENCE_TYPEs, which is appropriate for C++.  Unfortunately,
      the C++ front-end also use POINTER_TYPE for pointer-to-member
      values, so even though it should be illegal to use `restrict'
      with such an entity we don't flag that here.  Thus, special case
      code for that case is required in the C++ front-end.  */
   if ((type_quals & TYPE_QUAL_RESTRICT)
-      && (!POINTER_TYPE_P (type)
+      && (!INDIRECT_TYPE_P (type)
 	  || !C_TYPE_OBJECT_OR_INCOMPLETE_P (TREE_TYPE (type))))
     {
       error ("invalid use of `restrict'");
@@ -3252,7 +3252,7 @@ c_apply_type_quals_to_decl (type_quals, 
   if (type_quals & TYPE_QUAL_RESTRICT)
     {
       if (!TREE_TYPE (decl)
-	  || !POINTER_TYPE_P (TREE_TYPE (decl))
+	  || !INDIRECT_TYPE_P (TREE_TYPE (decl))
 	  || !C_TYPE_OBJECT_OR_INCOMPLETE_P (TREE_TYPE (TREE_TYPE (decl))))
 	error ("invalid use of `restrict'");
       else if (flag_strict_aliasing)
@@ -3296,7 +3296,7 @@ c_find_base_decl (t)
   if (t == NULL_TREE || t == error_mark_node)
     return NULL_TREE;
 
-  if (!POINTER_TYPE_P (TREE_TYPE (t)))
+  if (!INDIRECT_TYPE_P (TREE_TYPE (t)))
     return NULL_TREE;
 
   decl = NULL_TREE;
@@ -3445,7 +3445,7 @@ c_get_alias_set (t)
        whose type is the same as one of the fields, recursively, but
        we don't yet make any use of that information.)  */
     TYPE_ALIAS_SET (type) = 0;
-  else if (TREE_CODE (type) == POINTER_TYPE
+  else if (POINTER_TYPE_P (type)
 	   || TREE_CODE (type) == REFERENCE_TYPE)
     {
       tree t;
@@ -3474,7 +3474,7 @@ c_get_alias_set (t)
 	 the pointed-to types.  This issue has been reported to the
 	 C++ committee.  */
       t = TYPE_MAIN_VARIANT (TREE_TYPE (type));
-      t = ((TREE_CODE (type) == POINTER_TYPE)
+      t = ((POINTER_TYPE_P (type))
 	   ? build_pointer_type (t) : build_reference_type (t));
       if (t != type)
 	TYPE_ALIAS_SET (type) = c_get_alias_set (t);
Index: c-convert.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-convert.c,v
retrieving revision 1.6
diff -u -p -r1.6 c-convert.c
--- c-convert.c	1999/09/07 05:47:26	1.6
+++ c-convert.c	1999/12/18 01:04:13
@@ -1,5 +1,5 @@
 /* Language-level data type conversion for GNU C.
-   Copyright (C) 1987, 1988, 1991, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1991, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -86,7 +86,7 @@ convert (type, expr)
 #endif
   if (code == INTEGER_TYPE || code == ENUMERAL_TYPE)
     return fold (convert_to_integer (type, e));
-  if (code == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     return fold (convert_to_pointer (type, e));
   if (code == REAL_TYPE)
     return fold (convert_to_real (type, e));
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-decl.c,v
retrieving revision 1.91
diff -u -p -r1.91 c-decl.c
--- c-decl.c	1999/12/04 03:00:02	1.91
+++ c-decl.c	1999/12/18 01:04:34
@@ -1549,8 +1549,8 @@ duplicate_decls (newdecl, olddecl, diffe
   else if (!types_match
 	   && TREE_CODE (olddecl) == FUNCTION_DECL
 	   && TREE_CODE (newdecl) == FUNCTION_DECL
-	   && TREE_CODE (TREE_TYPE (oldtype)) == POINTER_TYPE
-	   && TREE_CODE (TREE_TYPE (newtype)) == POINTER_TYPE
+	   && POINTER_TYPE_P (TREE_TYPE (oldtype))
+	   && POINTER_TYPE_P (TREE_TYPE (newtype))
 	   && (DECL_IN_SYSTEM_HEADER (olddecl)
 	       || DECL_IN_SYSTEM_HEADER (newdecl))
 	   && ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (newtype))) == void_type_node
@@ -4998,7 +4998,7 @@ grokparms (parms_info, funcdef_flag)
 	      else
 		{
 		  /* Now warn if is a pointer to an incomplete type.  */
-		  while (TREE_CODE (type) == POINTER_TYPE
+		  while (POINTER_TYPE_P (type)
 			 || TREE_CODE (type) == REFERENCE_TYPE)
 		    type = TREE_TYPE (type);
 		  type = TYPE_MAIN_VARIANT (type);
@@ -6002,8 +6002,8 @@ start_function (declspecs, declarator, p
 	      break;
 
 	    case 2:
-	      if (TREE_CODE (type) != POINTER_TYPE
-		  || TREE_CODE (TREE_TYPE (type)) != POINTER_TYPE
+	      if (! POINTER_TYPE_P (type)
+		  || ! POINTER_TYPE_P (TREE_TYPE (type))
 		  || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (type)))
 		      != char_type_node))
 		pedwarn_with_decl (decl1,
@@ -6011,8 +6011,8 @@ start_function (declspecs, declarator, p
 	      break;
 
 	    case 3:
-	      if (TREE_CODE (type) != POINTER_TYPE
-		  || TREE_CODE (TREE_TYPE (type)) != POINTER_TYPE
+	      if (! POINTER_TYPE_P (type)
+		  || ! POINTER_TYPE_P (TREE_TYPE (type))
 		  || (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (type)))
 		      != char_type_node))
 		pedwarn_with_decl (decl1,
Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-typeck.c,v
retrieving revision 1.43
diff -u -p -r1.43 c-typeck.c
--- c-typeck.c	1999/11/25 16:58:31	1.43
+++ c-typeck.c	1999/12/18 01:04:50
@@ -1,5 +1,5 @@
 /* Build expressions with type checking for C compiler.
-   Copyright (C) 1987, 88, 91-97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 91-97, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -819,7 +819,7 @@ c_alignof_expr (expr)
       int bestalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t)));
  
       while (TREE_CODE (t) == NOP_EXPR
-	      && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE)
+	      && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0))))
 	{
 	  int thisalign;
 
@@ -1206,7 +1206,7 @@ build_indirect_ref (ptr, errorstring)
   register tree pointer = default_conversion (ptr);
   register tree type = TREE_TYPE (pointer);
 
-  if (TREE_CODE (type) == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     {
       if (TREE_CODE (pointer) == ADDR_EXPR
 	  && !flag_volatile
@@ -1377,7 +1377,7 @@ build_array_ref (array, index)
     if (ar == error_mark_node)
       return ar;
 
-    if (TREE_CODE (TREE_TYPE (ar)) != POINTER_TYPE
+    if (! POINTER_TYPE_P (TREE_TYPE (ar))
 	|| TREE_CODE (TREE_TYPE (TREE_TYPE (ar))) == FUNCTION_TYPE)
       {
 	error ("subscripted value is neither array nor pointer");
@@ -1433,7 +1433,7 @@ build_function_call (function, params)
   if (TREE_CODE (fntype) == ERROR_MARK)
     return error_mark_node;
 
-  if (!(TREE_CODE (fntype) == POINTER_TYPE
+  if (!(POINTER_TYPE_P (fntype)
 	&& TREE_CODE (TREE_TYPE (fntype)) == FUNCTION_TYPE))
     {
       error ("called object is not a function");
@@ -1886,9 +1886,9 @@ build_binary_op (code, orig_op0, orig_op
     {
     case PLUS_EXPR:
       /* Handle the pointer + int case.  */
-      if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	return pointer_int_sum (PLUS_EXPR, op0, op1);
-      else if (code1 == POINTER_TYPE && code0 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type1) && code0 == INTEGER_TYPE)
 	return pointer_int_sum (PLUS_EXPR, op1, op0);
       else
 	common = 1;
@@ -1897,11 +1897,11 @@ build_binary_op (code, orig_op0, orig_op
     case MINUS_EXPR:
       /* Subtraction of two similar pointers.
 	 We must subtract them as integers, then divide by object size.  */
-      if (code0 == POINTER_TYPE && code1 == POINTER_TYPE
+      if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1)
 	  && comp_target_types (type0, type1))
 	return pointer_diff (op0, op1);
       /* Handle pointer minus int.  Just like pointer plus int.  */
-      else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	return pointer_int_sum (MINUS_EXPR, op0, op1);
       else
 	common = 1;
@@ -1991,9 +1991,9 @@ build_binary_op (code, orig_op0, orig_op
     case TRUTH_AND_EXPR:
     case TRUTH_OR_EXPR:
     case TRUTH_XOR_EXPR:
-      if ((code0 == INTEGER_TYPE || code0 == POINTER_TYPE
+      if ((code0 == INTEGER_TYPE || POINTER_TYPE_P (type0)
 	   || code0 == REAL_TYPE || code0 == COMPLEX_TYPE)
-	  && (code1 == INTEGER_TYPE || code1 == POINTER_TYPE
+	  && (code1 == INTEGER_TYPE || POINTER_TYPE_P (type1)
 	      || code1 == REAL_TYPE || code1 == COMPLEX_TYPE))
 	{
 	  /* Result of these operations is always an int,
@@ -2109,7 +2109,7 @@ build_binary_op (code, orig_op0, orig_op
 	  && (code1 == INTEGER_TYPE || code1 == REAL_TYPE
 	      || code1 == COMPLEX_TYPE))
 	short_compare = 1;
-      else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE)
+      else if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1))
 	{
 	  register tree tt0 = TREE_TYPE (type0);
 	  register tree tt1 = TREE_TYPE (type1);
@@ -2138,19 +2138,19 @@ build_binary_op (code, orig_op0, orig_op
 	  if (result_type == NULL_TREE)
 	    result_type = ptr_type_node;
 	}
-      else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST
+      else if (POINTER_TYPE_P (type0) && TREE_CODE (op1) == INTEGER_CST
 	       && integer_zerop (op1))
 	result_type = type0;
-      else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST
+      else if (POINTER_TYPE_P (type1) && TREE_CODE (op0) == INTEGER_CST
 	       && integer_zerop (op0))
 	result_type = type1;
-      else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	{
 	  result_type = type0;
 	  if (! flag_traditional)
 	    pedwarn ("comparison between pointer and integer");
 	}
-      else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
+      else if (code0 == INTEGER_TYPE && POINTER_TYPE_P (type1))
 	{
 	  result_type = type1;
 	  if (! flag_traditional)
@@ -2163,7 +2163,7 @@ build_binary_op (code, orig_op0, orig_op
       if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE)
 	  && (code1 == INTEGER_TYPE || code1 == REAL_TYPE))
 	shorten = 1;
-      else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE)
+      else if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1))
 	{
 	  if (comp_target_types (type0, type1))
 	    {
@@ -2188,7 +2188,7 @@ build_binary_op (code, orig_op0, orig_op
       if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE)
 	  && (code1 == INTEGER_TYPE || code1 == REAL_TYPE))
 	short_compare = 1;
-      else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE)
+      else if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1))
 	{
 	  if (comp_target_types (type0, type1))
 	    {
@@ -2206,27 +2206,27 @@ build_binary_op (code, orig_op0, orig_op
 	      pedwarn ("comparison of distinct pointer types lacks a cast");
 	    }
 	}
-      else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST
+      else if (POINTER_TYPE_P (type0) && TREE_CODE (op1) == INTEGER_CST
 	       && integer_zerop (op1))
 	{
 	  result_type = type0;
 	  if (pedantic || extra_warnings)
 	    pedwarn ("ordered comparison of pointer with integer zero");
 	}
-      else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST
+      else if (POINTER_TYPE_P (type1) && TREE_CODE (op0) == INTEGER_CST
 	       && integer_zerop (op0))
 	{
 	  result_type = type1;
 	  if (pedantic)
 	    pedwarn ("ordered comparison of pointer with integer zero");
 	}
-      else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	{
 	  result_type = type0;
 	  if (! flag_traditional)
 	    pedwarn ("comparison between pointer and integer");
 	}
-      else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
+      else if (code0 == INTEGER_TYPE && POINTER_TYPE_P (type1))
 	{
 	  result_type = type1;
 	  if (! flag_traditional)
@@ -2747,7 +2747,7 @@ build_unary_op (code, xarg, noconvert)
 
     case TRUTH_NOT_EXPR:
       if (typecode != INTEGER_TYPE
-	  && typecode != REAL_TYPE && typecode != POINTER_TYPE
+	  && typecode != REAL_TYPE && ! POINTER_TYPE_P (TREE_TYPE (arg))
 	  && typecode != COMPLEX_TYPE
 	  /* These will convert to a pointer.  */
 	  && typecode != ARRAY_TYPE && typecode != FUNCTION_TYPE)
@@ -2803,7 +2803,7 @@ build_unary_op (code, xarg, noconvert)
 
       /* Report invalid types.  */
 
-      if (typecode != POINTER_TYPE
+      if (! POINTER_TYPE_P (TREE_TYPE (arg))
 	  && typecode != INTEGER_TYPE && typecode != REAL_TYPE)
 	{
 	  error ("wrong type argument to %s",
@@ -2821,7 +2821,7 @@ build_unary_op (code, xarg, noconvert)
 
 	/* Compute the increment.  */
 
-	if (typecode == POINTER_TYPE)
+	if (POINTER_TYPE_P (TREE_TYPE (arg)))
 	  {
 	    /* If pointer target is an undefined struct,
 	       we just cannot know how to do the arithmetic.  */
@@ -3369,7 +3369,7 @@ build_conditional_expr (ifexp, op1, op2)
 	pedwarn ("ANSI C forbids conditional expr with only one void side");
       result_type = void_type_node;
     }
-  else if (code1 == POINTER_TYPE && code2 == POINTER_TYPE)
+  else if (POINTER_TYPE_P (type1) && POINTER_TYPE_P (type2))
     {
       if (comp_target_types (type1, type2))
 	result_type = common_type (type1, type2);
@@ -3397,7 +3397,7 @@ build_conditional_expr (ifexp, op1, op2)
 	  result_type = build_pointer_type (void_type_node);
 	}
     }
-  else if (code1 == POINTER_TYPE && code2 == INTEGER_TYPE)
+  else if (POINTER_TYPE_P (type1) && code2 == INTEGER_TYPE)
     {
       if (! integer_zerop (op2))
 	pedwarn ("pointer/integer type mismatch in conditional expression");
@@ -3411,7 +3411,7 @@ build_conditional_expr (ifexp, op1, op2)
 	}
       result_type = type1;
     }
-  else if (code2 == POINTER_TYPE && code1 == INTEGER_TYPE)
+  else if (POINTER_TYPE_P (type2) && code1 == INTEGER_TYPE)
     {
       if (!integer_zerop (op1))
 	pedwarn ("pointer/integer type mismatch in conditional expression");
@@ -3656,16 +3656,16 @@ build_c_cast (type, expr)
       /* Optionally warn about potentially worrisome casts.  */
 
       if (warn_cast_qual
-	  && TREE_CODE (type) == POINTER_TYPE
-	  && TREE_CODE (otype) == POINTER_TYPE)
+	  && POINTER_TYPE_P (type)
+	  && POINTER_TYPE_P (otype))
 	{
 	  /* Go to the innermost object being pointed to.  */
 	  tree in_type = type;
 	  tree in_otype = otype;
 
-	  while (TREE_CODE (in_type) == POINTER_TYPE)
+	  while (POINTER_TYPE_P (in_type))
 	    in_type = TREE_TYPE (in_type);
-	  while (TREE_CODE (in_otype) == POINTER_TYPE)
+	  while (POINTER_TYPE_P (in_otype))
 	    in_otype = TREE_TYPE (in_otype);
 	  
 	  if (TYPE_QUALS (in_otype) & ~TYPE_QUALS (in_type))
@@ -3676,8 +3676,8 @@ build_c_cast (type, expr)
 
       /* Warn about possible alignment problems.  */
       if (STRICT_ALIGNMENT && warn_cast_align
-	  && TREE_CODE (type) == POINTER_TYPE
-	  && TREE_CODE (otype) == POINTER_TYPE
+	  && POINTER_TYPE_P (type)
+	  && POINTER_TYPE_P (otype)
 	  && TREE_CODE (TREE_TYPE (otype)) != VOID_TYPE
 	  && TREE_CODE (TREE_TYPE (otype)) != FUNCTION_TYPE
 	  /* Don't warn about opaque types, where the actual alignment
@@ -3689,7 +3689,7 @@ build_c_cast (type, expr)
 	warning ("cast increases required alignment of target type");
 
       if (TREE_CODE (type) == INTEGER_TYPE
-	  && TREE_CODE (otype) == POINTER_TYPE
+	  && POINTER_TYPE_P (otype)
 	  && TYPE_PRECISION (type) != TYPE_PRECISION (otype)
 	  && !TREE_CONSTANT (value))
 	warning ("cast from pointer to integer of different size");
@@ -3699,7 +3699,7 @@ build_c_cast (type, expr)
 	  && TREE_CODE (type) != TREE_CODE (otype))
 	warning ("cast does not match function type");
 
-      if (TREE_CODE (type) == POINTER_TYPE
+      if (POINTER_TYPE_P (type)
 	  && TREE_CODE (otype) == INTEGER_TYPE
 	  && TYPE_PRECISION (type) != TYPE_PRECISION (otype)
 #if 0
@@ -3982,10 +3982,10 @@ convert_for_assignment (type, rhs, errty
 			 TYPE_MAIN_VARIANT (rhstype)))
 	    break;
 
-	  if (TREE_CODE (memb_type) != POINTER_TYPE)
+	  if (! POINTER_TYPE_P (memb_type))
 	    continue;
 
-	  if (coder == POINTER_TYPE)
+	  if (POINTER_TYPE_P (rhstype))
 	    {
 	      register tree ttl = TREE_TYPE (memb_type);
 	      register tree ttr = TREE_TYPE (rhstype);
@@ -4061,7 +4061,7 @@ convert_for_assignment (type, rhs, errty
     }
 
   /* Conversions among pointers */
-  else if (codel == POINTER_TYPE && coder == POINTER_TYPE)
+  else if (POINTER_TYPE_P (type) && POINTER_TYPE_P (rhstype))
     {
       register tree ttl = TREE_TYPE (type);
       register tree ttr = TREE_TYPE (rhstype);
@@ -4122,7 +4122,7 @@ convert_for_assignment (type, rhs, errty
 			     errtype, funname, parmnum);
       return convert (type, rhs);
     }
-  else if (codel == POINTER_TYPE && coder == INTEGER_TYPE)
+  else if (POINTER_TYPE_P (type) && coder == INTEGER_TYPE)
     {
       /* An explicit constant 0 can convert to a pointer,
 	 or one that results from arithmetic, even including
@@ -4140,7 +4140,7 @@ convert_for_assignment (type, rhs, errty
 	}
       return null_pointer_node;
     }
-  else if (codel == INTEGER_TYPE && coder == POINTER_TYPE)
+  else if (codel == INTEGER_TYPE && POINTER_TYPE_P (rhstype))
     {
       warn_for_assignment ("%s makes integer from pointer without a cast",
 			   errtype, funname, parmnum);
@@ -4571,13 +4571,13 @@ digest_init (type, init, require_constan
 		     TYPE_MAIN_VARIANT (type))
 	  || (code == ARRAY_TYPE
 	      && comptypes (TREE_TYPE (inside_init), type))
-	  || (code == POINTER_TYPE
+	  || (POINTER_TYPE_P (type)
 	      && (TREE_CODE (TREE_TYPE (inside_init)) == ARRAY_TYPE
 		  || TREE_CODE (TREE_TYPE (inside_init)) == FUNCTION_TYPE)
 	      && comptypes (TREE_TYPE (TREE_TYPE (inside_init)),
 			    TREE_TYPE (type)))))
     {
-      if (code == POINTER_TYPE
+      if (POINTER_TYPE_P (type)
 	  && (TREE_CODE (TREE_TYPE (inside_init)) == ARRAY_TYPE
 	      || TREE_CODE (TREE_TYPE (inside_init)) == FUNCTION_TYPE))
 	inside_init = default_conversion (inside_init);
@@ -4624,7 +4624,7 @@ digest_init (type, init, require_constan
 
   /* Handle scalar types, including conversions.  */
 
-  if (code == INTEGER_TYPE || code == REAL_TYPE || code == POINTER_TYPE
+  if (code == INTEGER_TYPE || code == REAL_TYPE || POINTER_TYPE_P (type)
       || code == ENUMERAL_TYPE || code == COMPLEX_TYPE)
     {
       /* Note that convert_for_assignment calls default_conversion
@@ -6647,13 +6647,13 @@ c_expand_return (retval)
 	      {
 		tree op1 = TREE_OPERAND (inner, 1);
 
-		while (! POINTER_TYPE_P (TREE_TYPE (op1))
+		while (! INDIRECT_TYPE_P (TREE_TYPE (op1))
 		       && (TREE_CODE (op1) == NOP_EXPR
 			   || TREE_CODE (op1) == NON_LVALUE_EXPR
 			   || TREE_CODE (op1) == CONVERT_EXPR))
 		  op1 = TREE_OPERAND (op1, 0);
 
-		if (POINTER_TYPE_P (TREE_TYPE (op1)))
+		if (INDIRECT_TYPE_P (TREE_TYPE (op1)))
 		  break;
 
 		inner = TREE_OPERAND (inner, 0);
Index: calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.74
diff -u -p -r1.74 calls.c
--- calls.c	1999/12/09 14:38:11	1.74
+++ calls.c	1999/12/18 01:05:02
@@ -1908,7 +1908,7 @@ expand_call (exp, target, ignore)
 
   /* Operand 0 is a pointer-to-function; get the type of the function.  */
   funtype = TREE_TYPE (TREE_OPERAND (exp, 0));
-  if (! POINTER_TYPE_P (funtype))
+  if (! INDIRECT_TYPE_P (funtype))
     abort ();
   funtype = TREE_TYPE (funtype);
 
@@ -2345,7 +2345,7 @@ expand_call (exp, target, ignore)
       rtx insns;
 
       /* Mark the return value as a pointer if needed.  */
-      if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE)
+      if (POINTER_TYPE_P (TREE_TYPE (exp)))
 	{
 	  tree pointed_to = TREE_TYPE (TREE_TYPE (exp));
 	  mark_reg_pointer (temp, TYPE_ALIGN (pointed_to) / BITS_PER_UNIT);
@@ -2383,7 +2383,7 @@ expand_call (exp, target, ignore)
       rtx last, insns;
 
       /* The return value from a malloc-like function is a pointer. */
-      if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE)
+      if (POINTER_TYPE_P (TREE_TYPE (exp)))
 	mark_reg_pointer (temp, BIGGEST_ALIGNMENT / BITS_PER_UNIT);
 
       emit_move_insn (temp, valreg);
Index: dwarfout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarfout.c,v
retrieving revision 1.44
diff -u -p -r1.44 dwarfout.c
--- dwarfout.c	1999/11/29 18:11:35	1.44
+++ dwarfout.c	1999/12/18 01:05:22
@@ -3140,7 +3140,7 @@ type_attribute (type, decl_const, decl_v
 	 && TREE_TYPE (type) != 0)
     type = TREE_TYPE (type), code = TREE_CODE (type);
 
-  root_type_modified = (code == POINTER_TYPE || code == REFERENCE_TYPE
+  root_type_modified = (INDIRECT_TYPE_P (type)
 			|| decl_const || decl_volatile
 			|| TYPE_READONLY (type) || TYPE_VOLATILE (type));
 
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.184
diff -u -p -r1.184 expr.c
--- expr.c	1999/11/29 22:44:52	1.184
+++ expr.c	1999/12/18 01:05:53
@@ -3475,7 +3475,7 @@ expand_assignment (to, from, want_value,
 	{
 #ifdef POINTERS_EXTEND_UNSIGNED
 	  if (TREE_CODE (TREE_TYPE (to)) == REFERENCE_TYPE
-	     || TREE_CODE (TREE_TYPE (to)) == POINTER_TYPE)
+	     || POINTER_TYPE_P (TREE_TYPE (to)))
 	    value = convert_memory_address (GET_MODE (to_rtx), value);
 #endif
 	  emit_move_insn (to_rtx, value);
@@ -6162,7 +6162,7 @@ expand_expr (exp, target, tmode, modifie
 		       || TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
 		       || TREE_CODE_CLASS (TREE_CODE (elt)) == 'e')
 		    ? TREE_OPERAND (elt, 0) : 0))
-	      if (POINTER_TYPE_P (TREE_TYPE (elt))
+	      if (INDIRECT_TYPE_P (TREE_TYPE (elt))
 		  && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (elt)))
 		      == need_type))
 		object = build1 (INDIRECT_REF, need_type, elt);
@@ -9883,7 +9883,7 @@ do_compare_and_jump (exp, signed_code, u
   /* If function pointers need to be "canonicalized" before they can
      be reliably compared, then canonicalize them.  */
   if (HAVE_canonicalize_funcptr_for_compare
-      && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE
+      && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))
       && (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))))
 	  == FUNCTION_TYPE))
     {
@@ -9894,7 +9894,7 @@ do_compare_and_jump (exp, signed_code, u
     }
 
   if (HAVE_canonicalize_funcptr_for_compare
-      && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 1))) == POINTER_TYPE
+      && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 1)))
       && (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 1))))
 	  == FUNCTION_TYPE))
     {
@@ -9976,10 +9976,10 @@ do_store_flag (exp, target, mode, only_c
      when function pointers must be canonicalized before comparisons.  */
 #ifdef HAVE_canonicalize_funcptr_for_compare
   if (HAVE_canonicalize_funcptr_for_compare
-      && ((TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE
+      && ((POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))
 	   && (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))))
 	       == FUNCTION_TYPE))
-	  || (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 1))) == POINTER_TYPE
+	  || (POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 1)))
 	      && (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 1))))
 		  == FUNCTION_TYPE))))
     return 0;
Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fold-const.c,v
retrieving revision 1.90
diff -u -p -r1.90 fold-const.c
--- fold-const.c	1999/12/06 17:28:18	1.90
+++ fold-const.c	1999/12/18 01:06:14
@@ -185,7 +185,7 @@ force_fit_type (t, overflow)
   low = TREE_INT_CST_LOW (t);
   high = TREE_INT_CST_HIGH (t);
 
-  if (POINTER_TYPE_P (TREE_TYPE (t)))
+  if (INDIRECT_TYPE_P (TREE_TYPE (t)))
     prec = POINTER_SIZE;
   else
     prec = TYPE_PRECISION (TREE_TYPE (t));
@@ -1909,7 +1909,7 @@ fold_convert (t, arg1)
   register tree type = TREE_TYPE (t);
   int overflow = 0;
 
-  if (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type))
+  if (INDIRECT_TYPE_P (type) || INTEGRAL_TYPE_P (type))
     {
       if (TREE_CODE (arg1) == INTEGER_CST)
 	{
@@ -1933,7 +1933,7 @@ fold_convert (t, arg1)
 				(TREE_INT_CST_HIGH (arg1) < 0
 				 && (TREE_UNSIGNED (type)
 				    < TREE_UNSIGNED (TREE_TYPE (arg1)))))
-		&& ! POINTER_TYPE_P (TREE_TYPE (arg1)))
+		&& ! INDIRECT_TYPE_P (TREE_TYPE (arg1)))
 	       || TREE_OVERFLOW (arg1));
 	  TREE_CONSTANT_OVERFLOW (t)
 	    = TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
@@ -4930,17 +4930,17 @@ fold (expr) 
 	  tree inter_type = TREE_TYPE (TREE_OPERAND (t, 0));
 	  tree final_type = TREE_TYPE (t);
 	  int inside_int = INTEGRAL_TYPE_P (inside_type);
-	  int inside_ptr = POINTER_TYPE_P (inside_type);
+	  int inside_ptr = INDIRECT_TYPE_P (inside_type);
 	  int inside_float = FLOAT_TYPE_P (inside_type);
 	  int inside_prec = TYPE_PRECISION (inside_type);
 	  int inside_unsignedp = TREE_UNSIGNED (inside_type);
 	  int inter_int = INTEGRAL_TYPE_P (inter_type);
-	  int inter_ptr = POINTER_TYPE_P (inter_type);
+	  int inter_ptr = INDIRECT_TYPE_P (inter_type);
 	  int inter_float = FLOAT_TYPE_P (inter_type);
 	  int inter_prec = TYPE_PRECISION (inter_type);
 	  int inter_unsignedp = TREE_UNSIGNED (inter_type);
 	  int final_int = INTEGRAL_TYPE_P (final_type);
-	  int final_ptr = POINTER_TYPE_P (final_type);
+	  int final_ptr = INDIRECT_TYPE_P (final_type);
 	  int final_float = FLOAT_TYPE_P (final_type);
 	  int final_prec = TYPE_PRECISION (final_type);
 	  int final_unsignedp = TREE_UNSIGNED (final_type);
@@ -5977,7 +5977,7 @@ fold (expr) 
 	       if CONST+INCR overflows or if foo+incr might overflow.
 	       This optimization is invalid for floating point due to rounding.
 	       For pointer types we assume overflow doesn't happen.  */
-	    if (POINTER_TYPE_P (TREE_TYPE (varop))
+	    if (INDIRECT_TYPE_P (TREE_TYPE (varop))
 		|| (! FLOAT_TYPE_P (TREE_TYPE (varop))
 		    && (code == EQ_EXPR || code == NE_EXPR)))
 	      {
@@ -6036,7 +6036,7 @@ fold (expr) 
 	  }
 	else if (constop && TREE_CODE (varop) == POSTDECREMENT_EXPR)
 	  {
-	    if (POINTER_TYPE_P (TREE_TYPE (varop))
+	    if (INDIRECT_TYPE_P (TREE_TYPE (varop))
 		|| (! FLOAT_TYPE_P (TREE_TYPE (varop))
 		    && (code == EQ_EXPR || code == NE_EXPR)))
 	      {
@@ -6305,7 +6305,7 @@ fold (expr) 
       /* An unsigned comparison against 0 can be simplified.  */
       if (integer_zerop (arg1)
 	  && (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
-	      || POINTER_TYPE_P (TREE_TYPE (arg1)))
+	      || INDIRECT_TYPE_P (TREE_TYPE (arg1)))
 	  && TREE_UNSIGNED (TREE_TYPE (arg1)))
 	{
 	  switch (TREE_CODE (t))
@@ -6341,7 +6341,7 @@ fold (expr) 
 	    && ! TREE_CONSTANT_OVERFLOW (arg1)
 	    && width <= HOST_BITS_PER_WIDE_INT
 	    && (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
-		|| POINTER_TYPE_P (TREE_TYPE (arg1))))
+		|| INDIRECT_TYPE_P (TREE_TYPE (arg1))))
 	  {
 	    if (TREE_INT_CST_HIGH (arg1) == 0
 		&& (TREE_INT_CST_LOW (arg1)
Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.140
diff -u -p -r1.140 function.c
--- function.c	1999/12/05 00:13:53	1.140
+++ function.c	1999/12/18 01:06:37
@@ -4723,7 +4723,7 @@ assign_parms (fndecl)
 	    }
 
 	  /* For pointer data type, suggest pointer register.  */
-	  if (POINTER_TYPE_P (TREE_TYPE (parm)))
+	  if (INDIRECT_TYPE_P (TREE_TYPE (parm)))
 	    mark_reg_pointer (parmreg,
 			      (TYPE_ALIGN (TREE_TYPE (TREE_TYPE (parm)))
 			       / BITS_PER_UNIT));
@@ -5895,7 +5895,7 @@ init_function_start (subr, filename, lin
     warning ("function returns an aggregate");
 
   current_function_returns_pointer
-    = POINTER_TYPE_P (TREE_TYPE (DECL_RESULT (subr)));
+    = INDIRECT_TYPE_P (TREE_TYPE (DECL_RESULT (subr)));
 }
 
 /* Make sure all values used by the optimization passes have sane
Index: integrate.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/integrate.c,v
retrieving revision 1.82
diff -u -p -r1.82 integrate.c
--- integrate.c	1999/11/28 07:47:57	1.82
+++ integrate.c	1999/12/18 01:06:46
@@ -676,7 +676,7 @@ expand_inline_function (fndecl, parms, t
 	arg_vals[i] = copy_to_mode_reg (GET_MODE (loc), arg_vals[i]);
 
       if (arg_vals[i] != 0 && GET_CODE (arg_vals[i]) == REG
-	  && POINTER_TYPE_P (TREE_TYPE (formal)))
+	  && INDIRECT_TYPE_P (TREE_TYPE (formal)))
 	mark_reg_pointer (arg_vals[i],
 			  (TYPE_ALIGN (TREE_TYPE (TREE_TYPE (formal)))
 			   / BITS_PER_UNIT));
Index: sdbout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/sdbout.c,v
retrieving revision 1.20
diff -u -p -r1.20 sdbout.c
--- sdbout.c	1999/04/18 13:09:29	1.20
+++ sdbout.c	1999/12/18 01:06:51
@@ -1095,7 +1095,7 @@ sdbout_field_types (type)
 	&& TREE_CODE (DECL_SIZE (tail)) == INTEGER_CST
 	&& TREE_CODE (DECL_FIELD_BITPOS (tail)) == INTEGER_CST)
       {
-	if (POINTER_TYPE_P (TREE_TYPE (tail)))
+	if (INDIRECT_TYPE_P (TREE_TYPE (tail)))
 	  sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
 	else
 	  sdbout_one_type (TREE_TYPE (tail));
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stmt.c,v
retrieving revision 1.111
diff -u -p -r1.111 stmt.c
--- stmt.c	1999/12/12 18:32:36	1.111
+++ stmt.c	1999/12/18 01:07:11
@@ -3744,7 +3744,7 @@ expand_decl (decl)
       DECL_RTL (decl) = gen_reg_rtx (reg_mode);
       mark_user_reg (DECL_RTL (decl));
 
-      if (POINTER_TYPE_P (type))
+      if (INDIRECT_TYPE_P (type))
 	mark_reg_pointer (DECL_RTL (decl),
 			  (TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl)))
 			   / BITS_PER_UNIT));
@@ -3900,7 +3900,7 @@ expand_decl_init (decl)
       enum tree_code code = TREE_CODE (TREE_TYPE (decl));
 
       if (code == INTEGER_TYPE || code == REAL_TYPE || code == ENUMERAL_TYPE
-	  || code == POINTER_TYPE || code == REFERENCE_TYPE)
+	  || INDIRECT_TYPE_P (TREE_TYPE (decl)))
 	expand_assignment (decl, convert (TREE_TYPE (decl), integer_zero_node),
 			   0, 0);
       emit_queue ();
Index: tree.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tree.c,v
retrieving revision 1.107
diff -u -p -r1.107 tree.c
--- tree.c	1999/12/09 18:59:30	1.107
+++ tree.c	1999/12/18 01:07:35
@@ -1705,7 +1705,7 @@ integer_pow2p (expr)
   if (TREE_CODE (expr) != INTEGER_CST || TREE_CONSTANT_OVERFLOW (expr))
     return 0;
 
-  prec = (POINTER_TYPE_P (TREE_TYPE (expr))
+  prec = (INDIRECT_TYPE_P (TREE_TYPE (expr))
 	  ? POINTER_SIZE : TYPE_PRECISION (TREE_TYPE (expr)));
   high = TREE_INT_CST_HIGH (expr);
   low = TREE_INT_CST_LOW (expr);
@@ -1746,7 +1746,7 @@ tree_log2 (expr)
   if (TREE_CODE (expr) == COMPLEX_CST)
     return tree_log2 (TREE_REALPART (expr));
 
-  prec = (POINTER_TYPE_P (TREE_TYPE (expr))
+  prec = (INDIRECT_TYPE_P (TREE_TYPE (expr))
 	  ? POINTER_SIZE : TYPE_PRECISION (TREE_TYPE (expr)));
 
   high = TREE_INT_CST_HIGH (expr);
@@ -3489,7 +3489,7 @@ valid_machine_attribute (attr_name, attr
 
   /* Handle putting a type attribute on pointer-to-function-type by putting
      the attribute on the function type.  */
-  else if (POINTER_TYPE_P (type)
+  else if (INDIRECT_TYPE_P (type)
 	   && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE
 	   && VALID_MACHINE_TYPE_ATTRIBUTE (TREE_TYPE (type), type_attr_list,
 					    attr_name, attr_args))
Index: tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tree.h,v
retrieving revision 1.108
diff -u -p -r1.108 tree.h
--- tree.h	1999/12/05 17:53:14	1.108
+++ tree.h	1999/12/18 01:07:44
@@ -448,8 +448,12 @@ extern void tree_class_check_failed PROT
 
 /* Nonzero if TYPE represents a pointer type.  */
 
-#define POINTER_TYPE_P(TYPE) \
-  (TREE_CODE (TYPE) == POINTER_TYPE || TREE_CODE (TYPE) == REFERENCE_TYPE)
+#define POINTER_TYPE_P(TYPE) (TREE_CODE (TYPE) == POINTER_TYPE)
+
+/* Nonzero if TYPE represents a pointer or reference type.  */
+
+#define INDIRECT_TYPE_P(TYPE) \
+  (POINTER_TYPE_P (TYPE) || TREE_CODE (TYPE) == REFERENCE_TYPE)
 
 /* Nonzero if TYPE represents a type.  */
 
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.90
diff -u -p -r1.90 varasm.c
--- varasm.c	1999/11/22 14:20:35	1.90
+++ varasm.c	1999/12/18 01:07:57
@@ -4047,8 +4047,8 @@ initializer_constant_valid_p (value, end
     case CONVERT_EXPR:
     case NOP_EXPR:
       /* Allow conversions between pointer types.  */
-      if (POINTER_TYPE_P (TREE_TYPE (value))
-	  && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0))))
+      if (INDIRECT_TYPE_P (TREE_TYPE (value))
+	  && INDIRECT_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0))))
 	return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype);
 
       /* Allow conversions between real types.  */
@@ -4077,7 +4077,7 @@ initializer_constant_valid_p (value, end
 
       /* Allow (int) &foo provided int is as wide as a pointer.  */
       if (INTEGRAL_TYPE_P (TREE_TYPE (value))
-	  && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0)))
+	  && INDIRECT_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0)))
 	  && (TYPE_PRECISION (TREE_TYPE (value))
 	      >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (value, 0)))))
 	return initializer_constant_valid_p (TREE_OPERAND (value, 0),
@@ -4085,7 +4085,7 @@ initializer_constant_valid_p (value, end
 
       /* Likewise conversions from int to pointers, but also allow
 	 conversions from 0.  */
-      if (POINTER_TYPE_P (TREE_TYPE (value))
+      if (INDIRECT_TYPE_P (TREE_TYPE (value))
 	  && INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (value, 0))))
 	{
 	  if (integer_zerop (TREE_OPERAND (value, 0)))
Index: config/alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.83
diff -u -p -r1.83 alpha.h
--- alpha.h	1999/10/30 21:46:57	1.83
+++ alpha.h	1999/12/18 01:08:08
@@ -979,7 +979,7 @@ extern int alpha_memory_latency;
 #define FUNCTION_VALUE(VALTYPE, FUNC)	\
   gen_rtx_REG (((INTEGRAL_TYPE_P (VALTYPE)			\
 		 && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD)	\
-		|| POINTER_TYPE_P (VALTYPE))			\
+		|| INDIRECT_TYPE_P (VALTYPE))			\
 	       ? word_mode : TYPE_MODE (VALTYPE),		\
 	       ((TARGET_FPREGS					\
 		 && (TREE_CODE (VALTYPE) == REAL_TYPE		\
Index: config/i860/fx2800.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i860/fx2800.h,v
retrieving revision 1.4
diff -u -p -r1.4 fx2800.h
--- fx2800.h	1999/09/15 21:41:14	1.4
+++ fx2800.h	1999/12/18 01:08:11
@@ -252,7 +252,7 @@ Boston, MA 02111-1307, USA.  */
 
 #define DATA_ALIGNMENT(dummy,align)	\
 	((TREE_PUBLIC (decl) &&	\
-	 (POINTER_TYPE_P (TREE_TYPE (decl)))) ? 64: align)
+	 (INDIRECT_TYPE_P (TREE_TYPE (decl)))) ? 64: align)
 
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO)	\
Index: config/m68k/a-ux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/a-ux.h,v
retrieving revision 1.5
diff -u -p -r1.5 a-ux.h
--- a-ux.h	1999/09/15 21:41:15	1.5
+++ a-ux.h	1999/12/18 01:08:11
@@ -117,7 +117,7 @@ crt2.o%s "
 #define FUNCTION_VALUE(VALTYPE, FUNC)                                  \
   (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881                    \
    ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16)                            \
-   : (POINTER_TYPE_P (VALTYPE)		                               \
+   : (INDIRECT_TYPE_P (VALTYPE)		                               \
       ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8)                           \
       : gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))
                     
Index: config/m68k/linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/linux.h,v
retrieving revision 1.9
diff -u -p -r1.9 linux.h
--- linux.h	1999/09/07 05:48:41	1.9
+++ linux.h	1999/12/18 01:08:12
@@ -271,7 +271,7 @@ Boston, MA 02111-1307, USA.  */
 #define FUNCTION_VALUE(VALTYPE, FUNC)					\
   (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881			\
    ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16)				\
-   : (POINTER_TYPE_P (VALTYPE)						\
+   : (INDIRECT_TYPE_P (VALTYPE)						\
       ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8)				\
       : gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))
 
Index: config/m68k/m68kv4.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/m68kv4.h,v
retrieving revision 1.6
diff -u -p -r1.6 m68kv4.h
--- m68kv4.h	1999/09/07 05:48:42	1.6
+++ m68kv4.h	1999/12/18 01:08:14
@@ -168,7 +168,7 @@ while (0)
 #define FUNCTION_VALUE(VALTYPE, FUNC)					\
   (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881			\
    ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16)				\
-   : (POINTER_TYPE_P (VALTYPE)						\
+   : (INDIRECT_TYPE_P (VALTYPE)						\
       ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8)				\
       : gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))
 
Index: config/m68k/mot3300.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68k/mot3300.h,v
retrieving revision 1.11
diff -u -p -r1.11 mot3300.h
--- mot3300.h	1999/09/15 21:41:15	1.11
+++ mot3300.h	1999/12/18 01:08:17
@@ -299,7 +299,7 @@ dtors_section ()							\
 #define FUNCTION_VALUE(VALTYPE,FUNC) \
   (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 	\
    ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16)		\
-   : (POINTER_TYPE_P (VALTYPE)				\
+   : (INDIRECT_TYPE_P (VALTYPE)				\
       ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8)		\
       : gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))
 
Index: config/mn10300/mn10300.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.h,v
retrieving revision 1.22
diff -u -p -r1.22 mn10300.h
--- mn10300.h	1999/12/02 00:21:59	1.22
+++ mn10300.h	1999/12/18 01:08:21
@@ -523,7 +523,7 @@ extern struct rtx_def *function_arg ();
    otherwise, FUNC is 0.   */
 
 #define FUNCTION_VALUE(VALTYPE, FUNC) \
-  gen_rtx_REG (TYPE_MODE (VALTYPE), POINTER_TYPE_P (VALTYPE) ? 4 : 0)
+  gen_rtx_REG (TYPE_MODE (VALTYPE), INDIRECT_TYPE_P (VALTYPE) ? 4 : 0)
 
 /* Define how to find the value returned by a library function
    assuming the value has mode MODE.  */
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.64
diff -u -p -r1.64 rs6000.h
--- rs6000.h	1999/11/15 23:40:14	1.64
+++ rs6000.h	1999/12/18 01:08:36
@@ -1360,7 +1360,7 @@ extern int rs6000_sysv_varargs_p;
 #define FUNCTION_VALUE(VALTYPE, FUNC)				\
   gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE)			\
 		&& TYPE_PRECISION (VALTYPE) < BITS_PER_WORD)	\
-	       || POINTER_TYPE_P (VALTYPE)			\
+	       || INDIRECT_TYPE_P (VALTYPE)			\
 	       ? word_mode : TYPE_MODE (VALTYPE),		\
 	       TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_HARD_FLOAT ? 33 : 3)
 
Index: cp/call.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/call.c,v
retrieving revision 1.182
diff -u -p -r1.182 call.c
--- call.c	1999/11/14 20:29:02	1.182
+++ call.c	1999/12/18 01:08:52
@@ -155,7 +155,7 @@ build_field_call (basetype_path, instanc
       if (IS_AGGR_TYPE (TREE_TYPE (instance)))
 	return build_opfncall (CALL_EXPR, LOOKUP_NORMAL,
 			       instance, parms, NULL_TREE);
-      else if (TREE_CODE (TREE_TYPE (instance)) == POINTER_TYPE)
+      else if (POINTER_TYPE_P (TREE_TYPE (instance)))
 	{
 	  if (TREE_CODE (TREE_TYPE (TREE_TYPE (instance))) == FUNCTION_TYPE)
 	    return build_function_call (instance, parms);
@@ -661,12 +661,12 @@ standard_conversion (to, from, expr)
   if (same_type_p (from, to))
     return conv;
 
-  if ((tcode == POINTER_TYPE || TYPE_PTRMEMFUNC_P (to))
+  if ((POINTER_TYPE_P (to) || TYPE_PTRMEMFUNC_P (to))
       && expr && null_ptr_cst_p (expr))
     {
       conv = build_conv (STD_CONV, to, conv);
     }
-  else if (tcode == POINTER_TYPE && fcode == POINTER_TYPE)
+  else if (POINTER_TYPE_P (to) && POINTER_TYPE_P (from))
     {
       enum tree_code ufcode = TREE_CODE (TREE_TYPE (from));
       enum tree_code utcode = TREE_CODE (TREE_TYPE (to));
@@ -750,11 +750,11 @@ standard_conversion (to, from, expr)
   else if (tcode == BOOLEAN_TYPE)
     {
       if (! (INTEGRAL_CODE_P (fcode) || fcode == REAL_TYPE
-	     || fcode == POINTER_TYPE || TYPE_PTRMEMFUNC_P (from)))
+	     || POINTER_TYPE_P (from) || TYPE_PTRMEMFUNC_P (from)))
 	return 0;
 
       conv = build_conv (STD_CONV, to, conv);
-      if (fcode == POINTER_TYPE
+      if (POINTER_TYPE_P (from)
 	  || (TYPE_PTRMEMFUNC_P (from) && ICS_STD_RANK (conv) < PBOOL_RANK))
 	ICS_STD_RANK (conv) = PBOOL_RANK;
     }
@@ -1572,7 +1572,7 @@ add_builtin_candidate (candidates, code,
 	     T&      operator*(T*);  */
 
     case INDIRECT_REF:
-      if (TREE_CODE (type1) == POINTER_TYPE
+      if (POINTER_TYPE_P (type1)
 	  && (TYPE_PTROB_P (type1)
 	      || TREE_CODE (TREE_TYPE (type1)) == FUNCTION_TYPE))
 	break;
@@ -1587,7 +1587,7 @@ add_builtin_candidate (candidates, code,
 	     T       operator-(T);  */
 
     case CONVERT_EXPR: /* unary + */
-      if (TREE_CODE (type1) == POINTER_TYPE
+      if (POINTER_TYPE_P (type1)
 	  && TREE_CODE (TREE_TYPE (type1)) != OFFSET_TYPE)
 	break;
     case NEGATE_EXPR:
@@ -1612,7 +1612,7 @@ add_builtin_candidate (candidates, code,
      where CV12 is the union of CV1 and CV2.  */
 
     case MEMBER_REF:
-      if (TREE_CODE (type1) == POINTER_TYPE
+      if (POINTER_TYPE_P (type1)
 	  && (TYPE_PTRMEMFUNC_P (type2) || TYPE_PTRMEM_P (type2)))
 	{
 	  tree c1 = TREE_TYPE (type1);
@@ -1827,7 +1827,7 @@ add_builtin_candidate (candidates, code,
 	      || (TYPE_PTR_P (type1) && TYPE_PTR_P (type2))
 	      || (TYPE_PTRMEM_P (type1) && TYPE_PTRMEM_P (type2))
 	      || ((TYPE_PTRMEMFUNC_P (type1)
-		   || TREE_CODE (type1) == POINTER_TYPE)
+		   || POINTER_TYPE_P (type1))
 		  && null_ptr_cst_p (args[1])))
 	    {
 	      type2 = type1;
@@ -1862,10 +1862,10 @@ add_builtin_candidate (candidates, code,
 	break;
 
       /* Otherwise, the types should be pointers.  */
-      if (!(TREE_CODE (type1) == POINTER_TYPE
+      if (!(POINTER_TYPE_P (type1)
 	    || TYPE_PTRMEM_P (type1)
 	    || TYPE_PTRMEMFUNC_P (type1))
-	  || !(TREE_CODE (type2) == POINTER_TYPE
+	  || !(POINTER_TYPE_P (type2)
 	       || TYPE_PTRMEM_P (type2)
 	       || TYPE_PTRMEMFUNC_P (type2)))
 	return candidates;
@@ -1888,7 +1888,7 @@ add_builtin_candidate (candidates, code,
   if (type2 && !same_type_p (type1, type2)
       && TREE_CODE (type1) == TREE_CODE (type2)
       && (TREE_CODE (type1) == REFERENCE_TYPE
-	  || (TREE_CODE (type1) == POINTER_TYPE
+	  || (POINTER_TYPE_P (type1)
 	      && TYPE_PTRMEM_P (type1) == TYPE_PTRMEM_P (type2))
 	  || TYPE_PTRMEMFUNC_P (type1)
 	  || IS_AGGR_TYPE (type1)))
@@ -2594,7 +2594,7 @@ build_object_call (obj, args)
       tree fns = TREE_VALUE (convs);
       tree totype = TREE_TYPE (TREE_TYPE (OVL_CURRENT (fns)));
 
-      if ((TREE_CODE (totype) == POINTER_TYPE
+      if ((POINTER_TYPE_P (totype)
 	   || TREE_CODE (totype) == REFERENCE_TYPE)
 	  && TREE_CODE (TREE_TYPE (totype)) == FUNCTION_TYPE)
 	for (; fns; fns = OVL_NEXT (fns))
@@ -3941,7 +3941,7 @@ build_over_call (cand, args, flags)
 
          So we can assume that anything passed as 'this' is non-null, and
 	 optimize accordingly.  */
-      my_friendly_assert (TREE_CODE (parmtype) == POINTER_TYPE, 19990811);
+      my_friendly_assert (POINTER_TYPE_P (parmtype), 19990811);
       t = convert_pointer_to_real (TREE_TYPE (parmtype), TREE_VALUE (arg));
       converted_args = tree_cons (NULL_TREE, t, converted_args);
       parm = TREE_CHAIN (parm);
Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.203
diff -u -p -r1.203 class.c
--- class.c	1999/12/11 19:02:09	1.203
+++ class.c	1999/12/18 01:09:09
@@ -261,7 +261,7 @@ build_vbase_path (code, type, expr, path
 		  ind = build_indirect_ref (nonnull_expr, NULL_PTR);
 		  nonnull_expr = build_vbase_pointer (ind, last_virtual);
 		  if (nonnull == 0
-		      && TREE_CODE (type) == POINTER_TYPE
+		      && POINTER_TYPE_P (type)
 		      && null_expr == NULL_TREE)
 		    {
 		      null_expr = build1 (NOP_EXPR, build_pointer_type (last_virtual), integer_zero_node);
@@ -3631,7 +3631,7 @@ finish_struct_1 (t)
 
       type = strip_array_types (type);
       
-      if (TREE_CODE (type) == POINTER_TYPE)
+      if (POINTER_TYPE_P (type))
 	has_pointers = 1;
 
       if (DECL_MUTABLE_P (x) || TYPE_HAS_MUTABLE_P (type))
@@ -4385,7 +4385,7 @@ resolves_to_fixed_type_p (instance, nonn
   tree fixed = fixed_type_or_null (instance, nonnull);
   if (fixed == NULL_TREE)
     return 0;
-  if (POINTER_TYPE_P (t))
+  if (INDIRECT_TYPE_P (t))
     t = TREE_TYPE (t);
   return same_type_p (TYPE_MAIN_VARIANT (t), TYPE_MAIN_VARIANT (fixed));
 }
@@ -4746,7 +4746,7 @@ resolve_address_of_overloaded_function (
   /* By the time we get here, we should be seeing only real
      pointer-to-member types, not the internal POINTER_TYPE to
      METHOD_TYPE representation.  */
-  my_friendly_assert (!(TREE_CODE (target_type) == POINTER_TYPE
+  my_friendly_assert (!(POINTER_TYPE_P (target_type)
 			&& (TREE_CODE (TREE_TYPE (target_type)) 
 			    == METHOD_TYPE)), 0);
 
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.359
diff -u -p -r1.359 cp-tree.h
--- cp-tree.h	1999/12/11 19:02:10	1.359
+++ cp-tree.h	1999/12/18 01:09:26
@@ -2214,11 +2214,11 @@ extern int flag_new_for_scope;
 #define TYPE_HAS_TRIVIAL_ASSIGN_REF(NODE) \
   (TYPE_HAS_ASSIGN_REF (NODE) && ! TYPE_HAS_COMPLEX_ASSIGN_REF (NODE))
 
-#define TYPE_PTRMEM_P(NODE)					\
-  (TREE_CODE (NODE) == POINTER_TYPE				\
+#define TYPE_PTRMEM_P(NODE)				\
+  (POINTER_TYPE_P (NODE)				\
    && TREE_CODE (TREE_TYPE (NODE)) == OFFSET_TYPE)
 #define TYPE_PTR_P(NODE)				\
-  (TREE_CODE (NODE) == POINTER_TYPE			\
+  (POINTER_TYPE_P (NODE)				\
    && TREE_CODE (TREE_TYPE (NODE)) != OFFSET_TYPE)
 #define TYPE_PTROB_P(NODE)						\
   (TYPE_PTR_P (NODE) && TREE_CODE (TREE_TYPE (NODE)) != FUNCTION_TYPE	\
@@ -2226,7 +2226,7 @@ extern int flag_new_for_scope;
 #define TYPE_PTROBV_P(NODE)						\
   (TYPE_PTR_P (NODE) && TREE_CODE (TREE_TYPE (NODE)) != FUNCTION_TYPE)
 #define TYPE_PTRFN_P(NODE)				\
-  (TREE_CODE (NODE) == POINTER_TYPE			\
+  (POINTER_TYPE_P (NODE)				\
    && TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE)
 
 /* Nonzero for _TYPE node means that this type is a pointer to member
Index: cp/cvt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cvt.c,v
retrieving revision 1.71
diff -u -p -r1.71 cvt.c
--- cvt.c	1999/11/14 20:29:02	1.71
+++ cvt.c	1999/12/18 01:09:29
@@ -96,7 +96,7 @@ cp_convert_to_pointer (type, expr)
     }
 
   /* Handle anachronistic conversions from (::*)() to cv void* or (*)().  */
-  if (TREE_CODE (type) == POINTER_TYPE
+  if (POINTER_TYPE_P (type)
       && (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE
 	  || TYPE_MAIN_VARIANT (TREE_TYPE (type)) == void_type_node))
     {
@@ -114,7 +114,7 @@ cp_convert_to_pointer (type, expr)
 	expr = resolve_offset_ref (expr);
       if (TREE_CODE (TREE_TYPE (expr)) == METHOD_TYPE)
 	expr = build_addr_func (expr);
-      if (TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE)
+      if (POINTER_TYPE_P (TREE_TYPE (expr)))
 	{
 	  if (TREE_CODE (TREE_TYPE (TREE_TYPE (expr))) == METHOD_TYPE)
 	    if (pedantic || warn_pmf2ptr)
@@ -127,12 +127,12 @@ cp_convert_to_pointer (type, expr)
 
   form = TREE_CODE (intype);
 
-  if (POINTER_TYPE_P (intype))
+  if (INDIRECT_TYPE_P (intype))
     {
       intype = TYPE_MAIN_VARIANT (intype);
 
       if (TYPE_MAIN_VARIANT (type) != intype
-	  && TREE_CODE (type) == POINTER_TYPE
+	  && POINTER_TYPE_P (type)
 	  && TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE
 	  && IS_AGGR_TYPE (TREE_TYPE (type))
 	  && IS_AGGR_TYPE (TREE_TYPE (intype))
@@ -283,7 +283,7 @@ convert_to_pointer_force (type, expr)
       return expr;
     }
 
-  if (form == POINTER_TYPE)
+  if (POINTER_TYPE_P (intype))
     {
       intype = TYPE_MAIN_VARIANT (intype);
 
@@ -497,7 +497,7 @@ convert_to_reference (reftype, expr, con
 
       /* B* bp; A& ar = (A&)bp; is valid, but it's probably not what they
          meant.  */
-      if (TREE_CODE (intype) == POINTER_TYPE
+      if (POINTER_TYPE_P (intype)
 	  && (comptypes (TREE_TYPE (intype), type, 
 			 COMPARE_BASE | COMPARE_RELAXED )))
 	cp_warning ("casting `%T' to `%T' does not dereference pointer",
@@ -719,7 +719,7 @@ ocp_convert (type, expr, convtype, flags
          errors.  */
       if (TREE_CODE (type) == ENUMERAL_TYPE
 	  && ((ARITHMETIC_TYPE_P (intype) && ! (convtype & CONV_STATIC))
-	      || (TREE_CODE (intype) == POINTER_TYPE)))
+	      || (POINTER_TYPE_P (intype))))
 	{
 	  cp_pedwarn ("conversion from `%#T' to `%#T'", intype, type);
 
@@ -755,8 +755,7 @@ ocp_convert (type, expr, convtype, flags
 	}
       return fold (convert_to_integer (type, e));
     }
-  if (code == POINTER_TYPE || code == REFERENCE_TYPE
-      || TYPE_PTRMEMFUNC_P (type))
+  if (INDIRECT_TYPE_P (type) || TYPE_PTRMEMFUNC_P (type))
     return fold (cp_convert_to_pointer (type, e));
   if (code == REAL_TYPE || code == COMPLEX_TYPE)
     {
@@ -991,7 +990,7 @@ convert (type, expr)
 
   intype = TREE_TYPE (expr);
 
-  if (POINTER_TYPE_P (type) && POINTER_TYPE_P (intype))
+  if (INDIRECT_TYPE_P (type) && INDIRECT_TYPE_P (intype))
     {
       if (TREE_READONLY_DECL_P (expr))
 	expr = decl_constant_value (expr);
@@ -1021,12 +1020,12 @@ convert_force (type, expr, convtype)
   else if (TREE_CODE (TREE_TYPE (e)) == REFERENCE_TYPE)
     e = convert_from_reference (e);
 
-  if (code == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     return fold (convert_to_pointer_force (type, e));
 
   /* From typeck.c convert_for_assignment */
-  if (((TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE && TREE_CODE (e) == ADDR_EXPR
-	&& TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE
+  if (((POINTER_TYPE_P (TREE_TYPE (e)) && TREE_CODE (e) == ADDR_EXPR
+	&& POINTER_TYPE_P (TREE_TYPE (e))
 	&& TREE_CODE (TREE_TYPE (TREE_TYPE (e))) == METHOD_TYPE)
        || integer_zerop (e)
        || TYPE_PTRMEMFUNC_P (TREE_TYPE (e)))
@@ -1243,8 +1242,8 @@ perform_qualification_conversions (type,
      tree type;
      tree expr;
 {
-  if (TREE_CODE (type) == POINTER_TYPE
-      && TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE
+  if (POINTER_TYPE_P (type)
+      && POINTER_TYPE_P (TREE_TYPE (expr))
       && comp_ptr_ttypes (TREE_TYPE (type), TREE_TYPE (TREE_TYPE (expr))))
     return build1 (NOP_EXPR, type, expr);
   else
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.518
diff -u -p -r1.518 decl.c
--- decl.c	1999/12/11 19:02:10	1.518
+++ decl.c	1999/12/18 01:10:15
@@ -11392,10 +11392,10 @@ grokparms (first_parm, funcdef_flag)
 		    }
                   else if (abstract_virtuals_error (decl, type))
 		    any_error = 1;  /* Seems like a good idea. */
-		  else if (POINTER_TYPE_P (type))
+		  else if (INDIRECT_TYPE_P (type))
 		    {
 		      tree t = type;
-		      while (POINTER_TYPE_P (t)
+		      while (INDIRECT_TYPE_P (t)
 			     || (TREE_CODE (t) == ARRAY_TYPE
 				 && TYPE_DOMAIN (t) != NULL_TREE))
 			t = TREE_TYPE (t);
@@ -12972,7 +12972,7 @@ start_function (declspecs, declarator, a
 	      
       my_friendly_assert (t != NULL_TREE && TREE_CODE (t) == PARM_DECL, 
 			  162);
-      my_friendly_assert (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE,
+      my_friendly_assert (POINTER_TYPE_P (TREE_TYPE (t)),
 			  19990811);
 	  
       cp_function_chain->x_current_class_ref 
@@ -14324,7 +14324,7 @@ lang_mark_tree (t)
     {
       struct lang_type *lt = TYPE_LANG_SPECIFIC (t);
 
-      if (lt && !(TREE_CODE (t) == POINTER_TYPE 
+      if (lt && !(POINTER_TYPE_P (t) 
 		  && TREE_CODE (TREE_TYPE (t)) == METHOD_TYPE))
 	{
 	  ggc_mark (lt);
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.287
diff -u -p -r1.287 decl2.c
--- decl2.c	1999/12/05 00:37:56	1.287
+++ decl2.c	1999/12/18 01:10:30
@@ -1042,7 +1042,7 @@ grok_alignof (expr)
       bestalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t)));
 
       while (TREE_CODE (t) == NOP_EXPR
-	     && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE)
+	     && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0))))
 	{
 	  int thisalign;
 	  t = TREE_OPERAND (t, 0);
@@ -1269,7 +1269,7 @@ acceptable_java_type (type)
 {
   if (TREE_CODE (type) == VOID_TYPE || TYPE_FOR_JAVA (type))
     return 1;
-  if (TREE_CODE (type) == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     {
       type = TREE_TYPE (type);
       if (TREE_CODE (type) == RECORD_TYPE)
@@ -1284,7 +1284,7 @@ acceptable_java_type (type)
 	  while (--i >= 0)
 	    {
 	      type = TREE_VEC_ELT (args, i);
-	      if (TREE_CODE (type) == POINTER_TYPE)
+	      if (POINTER_TYPE_P (type))
 		type = TREE_TYPE (type);
 	      if (! TYPE_FOR_JAVA (type))
 		return 0;
Index: cp/error.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/error.c,v
retrieving revision 1.96
diff -u -p -r1.96 error.c
--- error.c	1999/11/23 02:49:41	1.96
+++ error.c	1999/12/18 01:10:37
@@ -599,7 +599,7 @@ dump_type_prefix (t, flags)
 	      OB_PUTC (' ');
 	    if (TREE_CODE (sub) == ARRAY_TYPE)
 	      OB_PUTC ('(');
-            OB_PUTC ("&*"[TREE_CODE (t) == POINTER_TYPE]);
+            OB_PUTC ("&*"[POINTER_TYPE_P (t)]);
 	    padding = dump_qualifiers (t, none);
 	  }
       }
@@ -1791,11 +1791,11 @@ dump_expr (t, flags)
       /* FIXME: This is a KLUDGE workaround for a parsing problem.  There
 	 should be another level of INDIRECT_REF so that I don't have to do
 	 this.  */
-      if (TREE_TYPE (t) != NULL_TREE && NEXT_CODE (t) == POINTER_TYPE)
+      if (TREE_TYPE (t) != NULL_TREE && POINTER_TYPE_P (t))
 	{
 	  tree next = TREE_TYPE (TREE_TYPE (t));
 
-	  while (TREE_CODE (next) == POINTER_TYPE)
+	  while (POINTER_TYPE_P (next))
 	    next = TREE_TYPE (next);
 	  
 	  if (TREE_CODE (next) == FUNCTION_TYPE)
Index: cp/except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/except.c,v
retrieving revision 1.91
diff -u -p -r1.91 except.c
--- except.c	1999/12/09 23:24:58	1.91
+++ except.c	1999/12/18 01:10:39
@@ -465,7 +465,7 @@ initialize_handler_parm (decl)
   /* Figure out the type that the initializer is.  */
   init_type = TREE_TYPE (decl);
   if (TREE_CODE (init_type) != REFERENCE_TYPE
-      && TREE_CODE (init_type) != POINTER_TYPE)
+      && ! POINTER_TYPE_P (init_type))
     init_type = build_reference_type (init_type);
 
   exp = get_eh_value ();
@@ -473,7 +473,7 @@ initialize_handler_parm (decl)
   /* Since pointers are passed by value, initialize a reference to
      pointer catch parm with the address of the value slot.  */ 
   if (TREE_CODE (init_type) == REFERENCE_TYPE 
-      && TREE_CODE (TREE_TYPE (init_type)) == POINTER_TYPE)
+      && POINTER_TYPE_P (TREE_TYPE (init_type)))
     exp = build_unary_op (ADDR_EXPR, exp, 1);
 
   exp = ocp_convert (init_type , exp, CONV_IMPLICIT|CONV_FORCE_TEMP, 0);
@@ -975,7 +975,7 @@ complete_ptr_ref_or_void_ptr_p (type, fr
     return 0;
   
   /* Or a pointer or ref to one, or cv void *.  */
-  is_ptr = TREE_CODE (type) == POINTER_TYPE;
+  is_ptr = POINTER_TYPE_P (type);
   if (is_ptr || TREE_CODE (type) == REFERENCE_TYPE)
     {
       tree core = TREE_TYPE (type);
Index: cp/expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/expr.c,v
retrieving revision 1.38
diff -u -p -r1.38 expr.c
--- expr.c	1999/12/09 19:13:32	1.38
+++ expr.c	1999/12/18 01:10:40
@@ -285,7 +285,7 @@ do_case (start, end)
   tree value1 = NULL_TREE, value2 = NULL_TREE, label;
 
   if (start != NULL_TREE && TREE_TYPE (start) != NULL_TREE 
-      && POINTER_TYPE_P (TREE_TYPE (start)))
+      && INDIRECT_TYPE_P (TREE_TYPE (start)))
     error ("pointers are not permitted as case values");
 
   if (end && pedantic)
Index: cp/init.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/init.c,v
retrieving revision 1.156
diff -u -p -r1.156 init.c
--- init.c	1999/12/11 19:02:10	1.156
+++ init.c	1999/12/18 01:10:51
@@ -1736,7 +1736,7 @@ resolve_offset_ref (exp)
       return member;
     }
 
-  if (TREE_CODE (TREE_TYPE (member)) == POINTER_TYPE
+  if (POINTER_TYPE_P (TREE_TYPE (member))
       && TREE_CODE (TREE_TYPE (TREE_TYPE (member))) == METHOD_TYPE)
     return member;
 
@@ -2325,7 +2325,7 @@ build_new_1 (exp)
 	    rval = save_expr (rval);
 	  newrval = rval;
 
-	  if (newrval && TREE_CODE (TREE_TYPE (newrval)) == POINTER_TYPE)
+	  if (newrval && POINTER_TYPE_P (TREE_TYPE (newrval)))
 	    newrval = build_indirect_ref (newrval, NULL_PTR);
 
 	  newrval = build_method_call (newrval, ctor_identifier,
@@ -2965,7 +2965,7 @@ build_delete (type, addr, auto_delete, f
 
   type = TYPE_MAIN_VARIANT (type);
 
-  if (TREE_CODE (type) == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     {
       type = TYPE_MAIN_VARIANT (TREE_TYPE (type));
       if (type != void_type_node && !complete_type_or_else (type, addr))
@@ -3218,7 +3218,7 @@ build_vec_delete (base, maxindex, auto_d
   if (TREE_SIDE_EFFECTS (base))
     base = save_expr (base);
 
-  if (TREE_CODE (type) == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     {
       /* Step back one from start of vector, and read dimension.  */
       tree cookie_addr = build (MINUS_EXPR, build_pointer_type (BI_header_type),
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/pt.c,v
retrieving revision 1.387
diff -u -p -r1.387 pt.c
--- pt.c	1999/12/11 19:02:10	1.387
+++ pt.c	1999/12/18 01:11:18
@@ -6454,7 +6454,7 @@ tsubst (t, args, complain, in_decl)
 		  cp_error ("forming reference to void");
 		else
 		  cp_error ("forming %s to reference type `%T'",
-			    (code == POINTER_TYPE) ? "pointer" : "reference",
+			    POINTER_TYPE_P (t) ? "pointer" : "reference",
 			    type);
 		last_line = lineno;
 		last_file = input_filename;
@@ -6462,7 +6462,7 @@ tsubst (t, args, complain, in_decl)
 
 	    return error_mark_node;
 	  }
-	else if (code == POINTER_TYPE)
+	else if (POINTER_TYPE_P (t))
 	  r = build_pointer_type (type);
 	else
 	  r = build_reference_type (type);
@@ -8401,7 +8401,7 @@ unify (tparms, targs, parm, arg, strict)
       {
 	int sub_strict;
 
-	if (TREE_CODE (arg) != POINTER_TYPE)
+	if (! POINTER_TYPE_P (arg))
 	  return 1;
 	
 	/* [temp.deduct.call]
Index: cp/rtti.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/rtti.c,v
retrieving revision 1.48
diff -u -p -r1.48 rtti.c
--- rtti.c	1999/11/14 20:29:06	1.48
+++ rtti.c	1999/12/18 01:11:31
@@ -95,7 +95,7 @@ build_headof (exp)
   tree aref;
   tree offset;
 
-  if (TREE_CODE (type) != POINTER_TYPE)
+  if (! POINTER_TYPE_P (type))
     {
       error ("`headof' applied to non-pointer type");
       return error_mark_node;
@@ -273,7 +273,7 @@ build_x_typeid (exp)
     return build_min_nt (TYPEID_EXPR, exp);
 
   if (TREE_CODE (exp) == INDIRECT_REF
-      && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE
+      && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))
       && TYPE_VIRTUAL_P (TREE_TYPE (exp))
       && ! resolves_to_fixed_type_p (exp, &nonnull)
       && ! nonnull)
@@ -319,7 +319,7 @@ get_tinfo_var (type)
      need to be modified.  */
   if (TYPE_QUALS (type) != TYPE_UNQUALIFIED)
     size = 3 * POINTER_SIZE + INT_TYPE_SIZE;
-  else if (TREE_CODE (type) == POINTER_TYPE
+  else if (POINTER_TYPE_P (type)
 	   && ! (TREE_CODE (TREE_TYPE (type)) == OFFSET_TYPE
 		 || TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE))
     size = 3 * POINTER_SIZE;
@@ -499,7 +499,7 @@ build_dynamic_cast_1 (type, expr)
 	  exprtype = TREE_TYPE (expr);
 	  ec = TREE_CODE (exprtype);
 	}
-      if (ec != POINTER_TYPE)
+      if (! POINTER_TYPE_P (exprtype))
 	goto fail;
       if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE)
 	goto fail;
@@ -575,7 +575,7 @@ build_dynamic_cast_1 (type, expr)
     {
       tree expr1;
       /* if TYPE is `void *', return pointer to complete object.  */
-      if (tc == POINTER_TYPE
+      if (POINTER_TYPE_P (type)
 	  && TYPE_MAIN_VARIANT (TREE_TYPE (type)) == void_type_node)
 	{
 	  /* if b is an object, dynamic_cast<void *>(&b) == (void *)&b.  */
@@ -635,7 +635,7 @@ build_dynamic_cast_1 (type, expr)
 	  /* Build run-time conversion.  */
 	  expr2 = build_headof (expr1);
 
-	  if (ec == POINTER_TYPE)
+	  if (POINTER_TYPE_P (exprtype)
 	    td1 = get_tinfo_fn_dynamic (build_indirect_ref (expr, NULL_PTR));
 	  else
 	    td1 = get_tinfo_fn_dynamic (expr);
@@ -1156,7 +1156,7 @@ synthesize_tinfo_fn (fndecl)
     expand_generic_desc (tdecl, type, "__rtti_array");
   else if (TYPE_QUALS (type) != TYPE_UNQUALIFIED)
     expand_attr_desc (tdecl, type);
-  else if (TREE_CODE (type) == POINTER_TYPE)
+  else if (POINTER_TYPE_P (type))
     {
       if (TREE_CODE (TREE_TYPE (type)) == OFFSET_TYPE)
 	expand_generic_desc (tdecl, type, "__rtti_ptmd");
Index: cp/search.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/search.c,v
retrieving revision 1.132
diff -u -p -r1.132 search.c
--- search.c	1999/11/25 02:33:31	1.132
+++ search.c	1999/12/18 01:11:33
@@ -1934,7 +1934,7 @@ covariant_return_p (brettype, drettype)
     return 0;
 
   if (! (TREE_CODE (brettype) == TREE_CODE (drettype)
-	 && (TREE_CODE (brettype) == POINTER_TYPE
+	 && (POINTER_TYPE_P (brettype)
 	     || TREE_CODE (brettype) == REFERENCE_TYPE)
 	 && TYPE_QUALS (brettype) == TYPE_QUALS (drettype)))
     return 0;
Index: cp/tree.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/tree.c,v
retrieving revision 1.166
diff -u -p -r1.166 tree.c
--- tree.c	1999/12/09 19:13:33	1.166
+++ tree.c	1999/12/18 01:11:40
@@ -556,7 +556,7 @@ cp_build_qualified_type_real (type, type
      to object or incomplete type.  */
   if ((type_quals & TYPE_QUAL_RESTRICT)
       && TREE_CODE (type) != TEMPLATE_TYPE_PARM
-      && (!POINTER_TYPE_P (type)
+      && (!INDIRECT_TYPE_P (type)
 	  || TYPE_PTRMEM_P (type)
 	  || TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE))
     {
@@ -638,7 +638,7 @@ cp_build_qualified_type_real (type, type
      pointer-to-member-function type; it is not valid for the new
      type.  */
   if (result != type 
-      && TREE_CODE (type) == POINTER_TYPE
+      && POINTER_TYPE_P (type)
       && TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE)
     TYPE_SET_PTRMEMFUNC_TYPE (result, NULL_TREE);
 
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.228
diff -u -p -r1.228 typeck.c
--- typeck.c	1999/12/09 09:07:29	1.228
+++ typeck.c	1999/12/18 01:12:00
@@ -75,7 +75,7 @@ target_type (type)
 {
   if (TREE_CODE (type) == REFERENCE_TYPE)
     type = TREE_TYPE (type);
-  while (TREE_CODE (type) == POINTER_TYPE
+  while (POINTER_TYPE_P (type)
 	 || TREE_CODE (type) == ARRAY_TYPE
 	 || TREE_CODE (type) == FUNCTION_TYPE
 	 || TREE_CODE (type) == METHOD_TYPE
@@ -204,7 +204,7 @@ fntype_p (t)
      tree t;
 {
   return (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE
-	  || (TREE_CODE (t) == POINTER_TYPE
+	  || (POINTER_TYPE_P (t)
 	      && (TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE
 		  || TREE_CODE (TREE_TYPE (t)) == METHOD_TYPE)));
 }
@@ -627,7 +627,7 @@ common_type (t1, t2)
 	      target = build_offset_type (b1, target);
 	  }
 
-	if (code1 == POINTER_TYPE)
+	if (POINTER_TYPE_P (type1))
 	  t1 = build_pointer_type (target);
 	else
 	  t1 = build_reference_type (target);
@@ -782,8 +782,8 @@ comp_except_types (a, b, exact)
       if (CP_TYPE_QUALS (a) || CP_TYPE_QUALS (b))
         return 0;
       
-      if (TREE_CODE (a) == POINTER_TYPE
-          && TREE_CODE (b) == POINTER_TYPE)
+      if (POINTER_TYPE_P (a)
+          && POINTER_TYPE_P (b))
         {
           a = TREE_TYPE (a);
           b = TREE_TYPE (b);
@@ -1135,7 +1135,7 @@ comp_target_types (ttl, ttr, nptrs)
   if (TREE_CODE (ttr) != TREE_CODE (ttl))
     return 0;
 
-  if ((TREE_CODE (ttr) == POINTER_TYPE
+  if ((POINTER_TYPE_P (ttr)
        || TREE_CODE (ttr) == REFERENCE_TYPE)
       /* If we get a pointer with nptrs == 0, we don't allow any tweaking
 	 of the type pointed to.  This is necessary for reference init
@@ -1143,7 +1143,7 @@ comp_target_types (ttl, ttr, nptrs)
 	 for multi-level pointers we end up in comp_ptr_ttypes.  */
       && nptrs > 0)
     {
-      int is_ptr = TREE_CODE (ttr) == POINTER_TYPE;
+      int is_ptr = POINTER_TYPE_P (ttr);
 
       ttl = TREE_TYPE (ttl);
       ttr = TREE_TYPE (ttr);
@@ -1163,7 +1163,7 @@ comp_target_types (ttl, ttr, nptrs)
 		   && TREE_CODE (ttl) != METHOD_TYPE
 		   && TREE_CODE (ttl) != OFFSET_TYPE)
 	    return -1;
-	  else if (TREE_CODE (ttl) == POINTER_TYPE
+	  else if (POINTER_TYPE_P (ttl)
 		   || TREE_CODE (ttl) == ARRAY_TYPE)
 	    {
 	      if (comp_ptr_ttypes (ttl, ttr))
@@ -1261,7 +1261,7 @@ comp_target_types (ttl, ttr, nptrs)
       ttl = TREE_TYPE (ttl);
       ttr = TREE_TYPE (ttr);
 
-      if (TREE_CODE (ttl) == POINTER_TYPE
+      if (POINTER_TYPE_P (ttl)
 	  || TREE_CODE (ttl) == ARRAY_TYPE)
 	{
 	  if (comp_ptr_ttypes (ttl, ttr))
@@ -1494,7 +1494,7 @@ comp_target_parms (parms1, parms2, stric
       if (pedantic)
 	return 0;
 
-      if ((TREE_CODE (p1) == POINTER_TYPE && TREE_CODE (p2) == POINTER_TYPE)
+      if ((POINTER_TYPE_P (p1) && POINTER_TYPE_P (p2))
 	  || (TREE_CODE (p1) == REFERENCE_TYPE
 	      && TREE_CODE (p2) == REFERENCE_TYPE))
 	{
@@ -1842,7 +1842,7 @@ string_conv_p (totype, exp, warn)
 {
   tree t;
 
-  if (! flag_const_strings || TREE_CODE (totype) != POINTER_TYPE)
+  if (! flag_const_strings || ! POINTER_TYPE_P (totype))
     return 0;
 
   t = TREE_TYPE (totype);
@@ -2496,7 +2496,7 @@ build_array_ref (array, idx)
     if (ar == error_mark_node)
       return ar;
 
-    if (TREE_CODE (TREE_TYPE (ar)) != POINTER_TYPE)
+    if (! POINTER_TYPE_P (TREE_TYPE (ar)))
       {
 	error ("subscripted value is neither array nor pointer");
 	return error_mark_node;
@@ -2641,7 +2641,7 @@ build_x_function_call (function, params,
 	      return error_mark_node;
 	    }
 	  /* What other type of POINTER_TYPE could this be? */
-	  if (TREE_CODE (TREE_TYPE (function)) != POINTER_TYPE
+	  if (! POINTER_TYPE_P (TREE_TYPE (function))
 	      && ! TYPE_PTRMEMFUNC_P (TREE_TYPE (function))
 	      && TREE_CODE (function) != OFFSET_REF)
 	    function = build (OFFSET_REF, TREE_TYPE (type), NULL_TREE,
@@ -2780,7 +2780,7 @@ build_x_function_call (function, params,
 	    error ("pointer to member function called, but not in class scope");
 	  return error_mark_node;
 	}
-      if (TREE_CODE (TREE_TYPE (decl)) != POINTER_TYPE
+      if (! POINTER_TYPE_P (TREE_TYPE (decl))
 	  && ! TYPE_PTRMEMFUNC_P (TREE_TYPE (decl)))
 	{
 	  decl = build_unary_op (ADDR_EXPR, decl, 0);
@@ -2973,10 +2973,10 @@ build_function_call_real (function, para
       return error_mark_node;
     }
 
-  is_method = (TREE_CODE (fntype) == POINTER_TYPE
+  is_method = (POINTER_TYPE_P (fntype)
 	       && TREE_CODE (TREE_TYPE (fntype)) == METHOD_TYPE);
 
-  if (!((TREE_CODE (fntype) == POINTER_TYPE
+  if (!((POINTER_TYPE_P (fntype)
 	 && TREE_CODE (TREE_TYPE (fntype)) == FUNCTION_TYPE)
 	|| is_method
 	|| TREE_CODE (function) == TEMPLATE_ID_EXPR))
@@ -3383,9 +3383,9 @@ build_binary_op_nodefault (code, orig_op
     {
     case PLUS_EXPR:
       /* Handle the pointer + int case.  */
-      if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	return pointer_int_sum (PLUS_EXPR, op0, op1);
-      else if (code1 == POINTER_TYPE && code0 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type1) && code0 == INTEGER_TYPE)
 	return pointer_int_sum (PLUS_EXPR, op1, op0);
       else
 	common = 1;
@@ -3394,11 +3394,11 @@ build_binary_op_nodefault (code, orig_op
     case MINUS_EXPR:
       /* Subtraction of two similar pointers.
 	 We must subtract them as integers, then divide by object size.  */
-      if (code0 == POINTER_TYPE && code1 == POINTER_TYPE
+      if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1)
 	  && comp_target_types (type0, type1, 1))
 	return pointer_diff (op0, op1, common_type (type0, type1));
       /* Handle pointer minus int.  Just like pointer plus int.  */
-      else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	return pointer_int_sum (MINUS_EXPR, op0, op1);
       else
 	common = 1;
@@ -3589,7 +3589,7 @@ build_binary_op_nodefault (code, orig_op
 	  && (code1 == INTEGER_TYPE || code1 == REAL_TYPE
 	      || code1 == COMPLEX_TYPE))
 	short_compare = 1;
-      else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE)
+      else if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1))
 	{
 	  register tree tt0 = TYPE_MAIN_VARIANT (TREE_TYPE (type0));
 	  register tree tt1 = TYPE_MAIN_VARIANT (TREE_TYPE (type1));
@@ -3617,16 +3617,16 @@ build_binary_op_nodefault (code, orig_op
 	  if (result_type == NULL_TREE)
 	    result_type = ptr_type_node;
 	}
-      else if (code0 == POINTER_TYPE && null_ptr_cst_p (op1))
+      else if (POINTER_TYPE_P (type0) && null_ptr_cst_p (op1))
 	result_type = type0;
-      else if (code1 == POINTER_TYPE && null_ptr_cst_p (op0))
+      else if (POINTER_TYPE_P (type1) && null_ptr_cst_p (op0))
 	result_type = type1;
-      else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	{
 	  result_type = type0;
 	  error ("ANSI C++ forbids comparison between pointer and integer");
 	}
-      else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
+      else if (code0 == INTEGER_TYPE && POINTER_TYPE_P (type1))
 	{
 	  result_type = type1;
 	  error ("ANSI C++ forbids comparison between pointer and integer");
@@ -3736,7 +3736,7 @@ build_binary_op_nodefault (code, orig_op
       if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE)
 	   && (code1 == INTEGER_TYPE || code1 == REAL_TYPE))
 	shorten = 1;
-      else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE)
+      else if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1))
 	{
 	  if (comp_target_types (type0, type1, 1))
 	    result_type = common_type (type0, type1);
@@ -3757,7 +3757,7 @@ build_binary_op_nodefault (code, orig_op
       if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE)
 	   && (code1 == INTEGER_TYPE || code1 == REAL_TYPE))
 	short_compare = 1;
-      else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE)
+      else if (POINTER_TYPE_P (type0) && POINTER_TYPE_P (type1))
 	{
 	  if (comp_target_types (type0, type1, 1))
 	    result_type = common_type (type0, type1);
@@ -3768,18 +3768,18 @@ build_binary_op_nodefault (code, orig_op
 	      result_type = ptr_type_node;
 	    }
 	}
-      else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST
+      else if (POINTER_TYPE_P (type0) && TREE_CODE (op1) == INTEGER_CST
 	       && integer_zerop (op1))
 	result_type = type0;
-      else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST
+      else if (POINTER_TYPE_P (type1) && TREE_CODE (op0) == INTEGER_CST
 	       && integer_zerop (op0))
 	result_type = type1;
-      else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
+      else if (POINTER_TYPE_P (type0) && code1 == INTEGER_TYPE)
 	{
 	  result_type = type0;
 	  pedwarn ("ANSI C++ forbids comparison between pointer and integer");
 	}
-      else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
+      else if (code0 == INTEGER_TYPE && POINTER_TYPE_P (type1))
 	{
 	  result_type = type1;
 	  pedwarn ("ANSI C++ forbids comparison between pointer and integer");
@@ -4060,10 +4060,10 @@ build_binary_op_nodefault (code, orig_op
       !(code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR)
       && (/* If OP0 is NULL and OP1 is not a pointer, or vice versa.  */
 	  (orig_op0 == null_node
-	   && TREE_CODE (TREE_TYPE (op1)) != POINTER_TYPE)
+	   && ! POINTER_TYPE_P (TREE_TYPE (op1)))
 	  /* Or vice versa.  */
 	  || (orig_op1 == null_node
-	      && TREE_CODE (TREE_TYPE (op0)) != POINTER_TYPE)
+	      && ! POINTER_TYPE_P (TREE_TYPE (op0)))
 	  /* Or, both are NULL and the operation was not a comparison.  */
 	  || (orig_op0 == null_node && orig_op1 == null_node 
 	      && code != EQ_EXPR && code != NE_EXPR)))
@@ -4522,7 +4522,7 @@ build_unary_op (code, xarg, noconvert)
 	    
 	/* Compute the increment.  */
 
-	if (TREE_CODE (argtype) == POINTER_TYPE)
+	if (POINTER_TYPE_P (argtype))
 	  {
 	    enum tree_code tmp = TREE_CODE (TREE_TYPE (argtype));
 	    if (TYPE_SIZE (complete_type (TREE_TYPE (argtype))) == 0)
@@ -4769,7 +4769,7 @@ build_unary_op (code, xarg, noconvert)
 	if (staticp (arg))
 	  TREE_CONSTANT (addr) = 1;
 
-	if (TREE_CODE (argtype) == POINTER_TYPE
+	if (POINTER_TYPE_P (argtype)
 	    && TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE)
 	  {
 	    build_ptrmemfunc_type (argtype);
@@ -5341,7 +5341,7 @@ build_const_cast (type, expr)
       return t;
     }
 
-  if (!POINTER_TYPE_P (type))
+  if (!INDIRECT_TYPE_P (type))
     {
       cp_error ("`%T' is not a pointer, reference, or pointer-to-data-member type",
 		type);
@@ -5385,8 +5385,8 @@ build_const_cast (type, expr)
 	  return convert_from_reference (expr);
 	}
     }
-  else if (TREE_CODE (type) == POINTER_TYPE
-	   && TREE_CODE (intype) == POINTER_TYPE
+  else if (POINTER_TYPE_P (type)
+	   && POINTER_TYPE_P (intype)
 	   && comp_ptr_ttypes_const (TREE_TYPE (type), TREE_TYPE (intype)))
     return cp_convert (type, expr);
 
@@ -5424,7 +5424,7 @@ build_c_cast (type, expr)
       /* Allow casting from T1* to T2[] because Cfront allows it.
 	 NIHCL uses it. It is not valid ANSI C however, and hence, not
 	 valid ANSI C++.  */
-      if (TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE)
+      if (POINTER_TYPE_P (TREE_TYPE (expr)))
 	{
 	  if (pedantic)
 	    pedwarn ("ANSI C++ forbids casting to an array type");
@@ -5477,7 +5477,7 @@ build_c_cast (type, expr)
       if (TREE_CODE (TREE_TYPE (value)) == FUNCTION_TYPE
 	  || (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE
 	      /* Don't do the default conversion on a ->* expression.  */
-	      && ! (TREE_CODE (type) == POINTER_TYPE
+	      && ! (POINTER_TYPE_P (type)
 		    && bound_pmf_p (value)))
 	  || TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE
 	  || TREE_CODE (TREE_TYPE (value)) == REFERENCE_TYPE)
@@ -5495,16 +5495,16 @@ build_c_cast (type, expr)
   /* Optionally warn about potentially worrisome casts.  */
 
   if (warn_cast_qual
-      && TREE_CODE (type) == POINTER_TYPE
-      && TREE_CODE (otype) == POINTER_TYPE
+      && POINTER_TYPE_P (type)
+      && POINTER_TYPE_P (otype)
       && !at_least_as_qualified_p (TREE_TYPE (type),
 				   TREE_TYPE (otype)))
     cp_warning ("cast discards qualifiers from pointer target type");
 
   /* Warn about possible alignment problems.  */
   if (STRICT_ALIGNMENT && warn_cast_align
-      && TREE_CODE (type) == POINTER_TYPE
-      && TREE_CODE (otype) == POINTER_TYPE
+      && POINTER_TYPE_P (type)
+      && POINTER_TYPE_P (otype)
       && TREE_CODE (TREE_TYPE (otype)) != VOID_TYPE
       && TREE_CODE (TREE_TYPE (otype)) != FUNCTION_TYPE
       && TYPE_ALIGN (TREE_TYPE (type)) > TYPE_ALIGN (TREE_TYPE (otype)))
@@ -5514,11 +5514,11 @@ build_c_cast (type, expr)
   /* We should see about re-enabling these, they seem useful to
      me.  */
   if (TREE_CODE (type) == INTEGER_TYPE
-      && TREE_CODE (otype) == POINTER_TYPE
+      && POINTER_TYPE_P (otype)
       && TYPE_PRECISION (type) != TYPE_PRECISION (otype))
     warning ("cast from pointer to integer of different size");
 
-  if (TREE_CODE (type) == POINTER_TYPE
+  if (POINTER_TYPE_P (type)
       && TREE_CODE (otype) == INTEGER_TYPE
       && TYPE_PRECISION (type) != TYPE_PRECISION (otype)
       /* Don't warn about converting 0 to pointer,
@@ -6923,7 +6923,7 @@ comp_ptr_ttypes_real (to, from, constp)
 	    constp &= TYPE_READONLY (to);
 	}
 
-      if (TREE_CODE (to) != POINTER_TYPE)
+      if (! POINTER_TYPE_P (to))
 	return 
 	  same_type_p (TYPE_MAIN_VARIANT (to), TYPE_MAIN_VARIANT (from))
 	  && (constp >= 0 || to_more_cv_qualified);
@@ -6959,7 +6959,7 @@ ptr_reasonably_similar (to, from)
 			COMPARE_BASE | COMPARE_RELAXED))
 	continue;
 
-      if (TREE_CODE (to) != POINTER_TYPE)
+      if (! POINTER_TYPE_P (to))
 	return comptypes
 	  (TYPE_MAIN_VARIANT (to), TYPE_MAIN_VARIANT (from), 
 	   COMPARE_BASE | COMPARE_RELAXED);
@@ -6982,7 +6982,7 @@ comp_ptr_ttypes_const (to, from)
 			  TYPE_OFFSET_BASETYPE (to)))
 	  continue;
 
-      if (TREE_CODE (to) != POINTER_TYPE)
+      if (! POINTER_TYPE_P (to))
 	return same_type_p (TYPE_MAIN_VARIANT (to), 
 			    TYPE_MAIN_VARIANT (from));
     }
@@ -7017,8 +7017,8 @@ comp_ptr_ttypes_reinterpret (to, from)
 	  constp &= TYPE_READONLY (to);
 	}
 
-      if (TREE_CODE (from) != POINTER_TYPE
-	  || TREE_CODE (to) != POINTER_TYPE)
+      if (! POINTER_TYPE_P (from)
+	  || ! POINTER_TYPE_P (to))
 	return 1;
     }
 }
@@ -7098,8 +7098,8 @@ casts_away_constness_r (t1, t2)
 
             Tcv2,(M-K+1) * cv2,(M-K+2) * ... cv2,M *.  */
 
-  if (TREE_CODE (*t1) != POINTER_TYPE
-      || TREE_CODE (*t2) != POINTER_TYPE)
+  if (! POINTER_TYPE_P (*t1)
+      || ! POINTER_TYPE_P (*t2))
     {
       *t1 = cp_build_qualified_type (void_type_node,
 				     CP_TYPE_QUALS (*t1));
@@ -7155,8 +7155,7 @@ casts_away_constness (t1, t2)
 
   /* Casting away constness is only something that makes sense for
      pointer or reference types.  */
-  if (TREE_CODE (t1) != POINTER_TYPE 
-      || TREE_CODE (t2) != POINTER_TYPE)
+  if (! POINTER_TYPE_P (t1) || ! POINTER_TYPE_P (t2))
     return 0;
 
   /* Top-level qualifiers don't matter.  */
Index: cp/typeck2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck2.c,v
retrieving revision 1.68
diff -u -p -r1.68 typeck2.c
--- typeck2.c	1999/11/05 09:21:53	1.68
+++ typeck2.c	1999/12/18 01:12:05
@@ -618,10 +618,9 @@ digest_init (type, init, tail)
   /* Handle scalar types, including conversions,
      and signature pointers and references.  */
 
-  if (code == INTEGER_TYPE || code == REAL_TYPE || code == POINTER_TYPE
-      || code == ENUMERAL_TYPE || code == REFERENCE_TYPE
-      || code == BOOLEAN_TYPE || code == COMPLEX_TYPE
-      || TYPE_PTRMEMFUNC_P (type))
+  if (code == INTEGER_TYPE || code == REAL_TYPE || INDIRECT_TYPE_P (type)
+      || code == ENUMERAL_TYPE || || code == BOOLEAN_TYPE
+      || code == COMPLEX_TYPE || TYPE_PTRMEMFUNC_P (type))
     {
       if (raw_constructor)
 	{
@@ -1149,7 +1148,7 @@ build_x_arrow (datum)
   else
     last_rval = default_conversion (rval);
 
-  if (TREE_CODE (TREE_TYPE (last_rval)) == POINTER_TYPE)
+  if (POINTER_TYPE_P (TREE_TYPE (last_rval)))
     return build_indirect_ref (last_rval, NULL_PTR);
 
   if (types_memoized)
@@ -1487,7 +1486,7 @@ add_exception_specifier (list, spec, com
   /* [except.spec] 1, type in an exception specifier shall not be
      incomplete, or pointer or ref to incomplete other than pointer
      to cv void.  */
-  is_ptr = TREE_CODE (core) == POINTER_TYPE;
+  is_ptr = POINTER_TYPE_P (core);
   if (is_ptr || TREE_CODE (core) == REFERENCE_TYPE)
     core = TREE_TYPE (core);
   if (complain < 0)
Index: objc/objc-act.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/objc/objc-act.c,v
retrieving revision 1.33
diff -u -p -r1.33 objc-act.c
--- objc-act.c	1999/09/24 10:07:04	1.33
+++ objc-act.c	1999/12/18 01:12:25
@@ -1,5 +1,5 @@
 /* Implement classes and message passing for Objective C.
-   Copyright (C) 1992, 93-95, 97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 93-95, 97, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Steve Naroff.
 
 This file is part of GNU CC.
@@ -850,9 +850,9 @@ objc_comptypes (lhs, rhs, reflexive)
 {
   /* New clause for protocols.  */
 
-  if (TREE_CODE (lhs) == POINTER_TYPE
+  if (POINTER_TYPE_P (lhs)
       && TREE_CODE (TREE_TYPE (lhs)) == RECORD_TYPE
-      && TREE_CODE (rhs) == POINTER_TYPE
+      && POINTER_TYPE_P (rhs)
       && TREE_CODE (TREE_TYPE (rhs)) == RECORD_TYPE)
     {
       int lhs_is_proto = IS_PROTOCOL_QUALIFIED_ID (lhs);
@@ -4946,7 +4946,7 @@ build_message_expr (mess)
     {
       if (TREE_STATIC_TEMPLATE (rtype))
 	statically_allocated = 1;
-      else if (TREE_CODE (rtype) == POINTER_TYPE
+      else if (POINTER_TYPE_P (rtype)
 	       && TREE_STATIC_TEMPLATE (TREE_TYPE (rtype)))
 	statically_typed = 1;
       else if ((flag_next_runtime
@@ -6849,7 +6849,7 @@ encode_type (type, curtype, format)
   else if (code == ARRAY_TYPE)
     encode_array (type, curtype, format);
 
-  else if (code == POINTER_TYPE)
+  else if (POINTER_TYPE_P (type))
     encode_pointer (type, curtype, format);
 
   else if (code == RECORD_TYPE || code == UNION_TYPE || code == ENUMERAL_TYPE)
@@ -7463,7 +7463,7 @@ is_complex_decl (type)
 {
   return (TREE_CODE (type) == ARRAY_TYPE
 	  || TREE_CODE (type) == FUNCTION_TYPE
-	  || (TREE_CODE (type) == POINTER_TYPE && ! IS_ID (type)));
+	  || (POINTER_TYPE_P (type) && ! IS_ID (type)));
 }
 
 


More information about the Gcc-patches mailing list