... for concreteness, this is something which actually boots and passes testing on x86_64-linux for the affected languages. I like it ;)

Thanks,
Paolo.

////////////////////////
Index: doc/generic.texi
===================================================================
--- doc/generic.texi    (revision 187395)
+++ doc/generic.texi    (working copy)
@@ -2494,7 +2494,7 @@ should submit your patches for inclusion in GCC@.
 @findex TYPE_PRECISION
 @findex TYPE_ARG_TYPES
 @findex TYPE_METHOD_BASETYPE
-@findex TYPE_PTRMEM_P
+@findex TYPE_PTRDATAMEM_P
 @findex TYPE_OFFSET_BASETYPE
 @findex TREE_TYPE
 @findex TYPE_CONTEXT
@@ -2571,7 +2571,7 @@ This predicate holds for a class-type.
 @item TYPE_BUILT_IN
 This predicate holds for a built-in type.
 
-@item TYPE_PTRMEM_P
+@item TYPE_PTRDATAMEM_P
 This predicate holds if the type is a pointer to data member.
 
 @item TYPE_PTR_P
@@ -2597,7 +2597,7 @@ language-dependent info about GENERIC types.
 @item POINTER_TYPE
 Used to represent pointer types, and pointer to data member types.  If
 @code{TREE_TYPE}
-is a pointer to data member type, then @code{TYPE_PTRMEM_P} will hold.
+is a pointer to data member type, then @code{TYPE_PTRDATAMEM_P} will hold.
 For a pointer to data member type of the form @samp{T X::*},
 @code{TYPE_PTRMEM_CLASS_TYPE} will be the type @code{X}, while
 @code{TYPE_PTRMEM_POINTED_TO_TYPE} will be the type @code{T}.
Index: cp/typeck.c
===================================================================
--- cp/typeck.c (revision 187396)
+++ cp/typeck.c (working copy)
@@ -509,8 +509,7 @@ composite_pointer_type_r (tree t1, tree t2,
     result_type = pointee1;
   else if ((TREE_CODE (pointee1) == POINTER_TYPE
            && TREE_CODE (pointee2) == POINTER_TYPE)
-          || (TYPE_PTR_TO_MEMBER_P (pointee1)
-              && TYPE_PTR_TO_MEMBER_P (pointee2)))
+          || (TYPE_PTRMEM_P (pointee1) && TYPE_PTRMEM_P (pointee2)))
     {
       result_type = composite_pointer_type_r (pointee1, pointee2, operation,
                                              complain);
@@ -530,7 +529,7 @@ composite_pointer_type_r (tree t1, tree t2,
                                          | cp_type_quals (pointee2)));
   /* If the original types were pointers to members, so is the
      result.  */
-  if (TYPE_PTR_TO_MEMBER_P (t1))
+  if (TYPE_PTRMEM_P (t1))
     {
       if (!same_type_p (TYPE_PTRMEM_CLASS_TYPE (t1),
                        TYPE_PTRMEM_CLASS_TYPE (t2)))
@@ -666,7 +665,7 @@ composite_pointer_type (tree t1, tree t2, tree arg
     }
   /* [expr.eq] permits the application of a pointer-to-member
      conversion to change the class type of one of the types.  */
-  else if (TYPE_PTR_TO_MEMBER_P (t1)
+  else if (TYPE_PTRMEM_P (t1)
            && !same_type_p (TYPE_PTRMEM_CLASS_TYPE (t1),
                            TYPE_PTRMEM_CLASS_TYPE (t2)))
     {
@@ -931,7 +930,7 @@ tree
 common_pointer_type (tree t1, tree t2)
 {
   gcc_assert ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2))
-              || (TYPE_PTRMEM_P (t1) && TYPE_PTRMEM_P (t2))
+              || (TYPE_PTRDATAMEM_P (t1) && TYPE_PTRDATAMEM_P (t2))
               || (TYPE_PTRMEMFUNC_P (t1) && TYPE_PTRMEMFUNC_P (t2)));
 
   return composite_pointer_type (t1, t2, error_mark_node, error_mark_node,
@@ -2835,7 +2834,7 @@ cp_build_indirect_ref (tree ptr, ref_operator erro
     ;
   /* `pointer' won't be an error_mark_node if we were given a
      pointer to member, so it's cool to check for this here.  */
-  else if (TYPE_PTR_TO_MEMBER_P (type))
+  else if (TYPE_PTRMEM_P (type))
     switch (errorstring)
       {
          case RO_ARRAY_INDEXING:
@@ -3839,9 +3838,9 @@ cp_build_binary_op (location_t location,
           && code != EQ_EXPR && code != NE_EXPR && code != MINUS_EXPR) 
          /* Or if one of OP0 or OP1 is neither a pointer nor NULL.  */
          || (!null_ptr_cst_p (orig_op0)
-             && !TYPE_PTR_P (type0) && !TYPE_PTR_TO_MEMBER_P (type0))
+             && !TYPE_PTR_OR_PTRMEM_P (type0))
          || (!null_ptr_cst_p (orig_op1) 
-             && !TYPE_PTR_P (type1) && !TYPE_PTR_TO_MEMBER_P (type1)))
+             && !TYPE_PTR_OR_PTRMEM_P (type1)))
       && (complain & tf_warning))
     {
       source_location loc =
@@ -4075,10 +4074,10 @@ cp_build_binary_op (location_t location,
              || code1 == COMPLEX_TYPE || code1 == ENUMERAL_TYPE))
        short_compare = 1;
       else if ((code0 == POINTER_TYPE && code1 == POINTER_TYPE)
-              || (TYPE_PTRMEM_P (type0) && TYPE_PTRMEM_P (type1)))
+              || (TYPE_PTRDATAMEM_P (type0) && TYPE_PTRDATAMEM_P (type1)))
        result_type = composite_pointer_type (type0, type1, op0, op1,
                                              CPO_COMPARISON, complain);
-      else if ((code0 == POINTER_TYPE || TYPE_PTRMEM_P (type0))
+      else if ((code0 == POINTER_TYPE || TYPE_PTRDATAMEM_P (type0))
               && null_ptr_cst_p (op1))
        {
          if (TREE_CODE (op0) == ADDR_EXPR
@@ -4091,7 +4090,7 @@ cp_build_binary_op (location_t location,
            }
          result_type = type0;
        }
-      else if ((code1 == POINTER_TYPE || TYPE_PTRMEM_P (type1))
+      else if ((code1 == POINTER_TYPE || TYPE_PTRDATAMEM_P (type1))
               && null_ptr_cst_p (op0))
        {
          if (TREE_CODE (op1) == ADDR_EXPR 
@@ -4769,7 +4768,7 @@ tree
 cp_truthvalue_conversion (tree expr)
 {
   tree type = TREE_TYPE (expr);
-  if (TYPE_PTRMEM_P (type))
+  if (TYPE_PTRDATAMEM_P (type))
     return build_binary_op (EXPR_LOCATION (expr),
                            NE_EXPR, expr, nullptr_node, 1);
   else if (TYPE_PTR_P (type) || TYPE_PTRMEMFUNC_P (type))
@@ -5855,7 +5854,7 @@ tree
 convert_ptrmem (tree type, tree expr, bool allow_inverse_p,
                bool c_cast_p, tsubst_flags_t complain)
 {
-  if (TYPE_PTRMEM_P (type))
+  if (TYPE_PTRDATAMEM_P (type))
     {
       tree delta;
 
@@ -6088,7 +6087,7 @@ build_static_cast_1 (tree type, tree expr, bool c_
       return cp_fold_convert(type, expr);
     }
 
-  if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype))
+  if ((TYPE_PTRDATAMEM_P (type) && TYPE_PTRDATAMEM_P (intype))
       || (TYPE_PTRMEMFUNC_P (type) && TYPE_PTRMEMFUNC_P (intype)))
     {
       tree c1;
@@ -6099,7 +6098,7 @@ build_static_cast_1 (tree type, tree expr, bool c_
       c1 = TYPE_PTRMEM_CLASS_TYPE (intype);
       c2 = TYPE_PTRMEM_CLASS_TYPE (type);
 
-      if (TYPE_PTRMEM_P (type))
+      if (TYPE_PTRDATAMEM_P (type))
        {
          t1 = (build_ptrmem_type
                (c1,
@@ -6345,14 +6344,14 @@ build_reinterpret_cast_1 (tree type, tree expr, bo
     /* OK */
     ;
   else if ((INTEGRAL_OR_ENUMERATION_TYPE_P (type)
-           || TYPE_PTR_P (type) || TYPE_PTR_TO_MEMBER_P (type))
+           || TYPE_PTR_OR_PTRMEM_P (type))
           && same_type_p (type, intype))
     /* DR 799 */
     return fold_if_not_in_template (build_nop (type, expr));
   else if ((TYPE_PTRFN_P (type) && TYPE_PTRFN_P (intype))
           || (TYPE_PTRMEMFUNC_P (type) && TYPE_PTRMEMFUNC_P (intype)))
     return fold_if_not_in_template (build_nop (type, expr));
-  else if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype))
+  else if ((TYPE_PTRDATAMEM_P (type) && TYPE_PTRDATAMEM_P (intype))
           || (TYPE_PTROBV_P (type) && TYPE_PTROBV_P (intype)))
     {
       tree sexpr = expr;
@@ -6460,7 +6459,7 @@ build_const_cast_1 (tree dst_type, tree expr, tsub
   if (valid_p)
     *valid_p = false;
 
-  if (!POINTER_TYPE_P (dst_type) && !TYPE_PTRMEM_P (dst_type))
+  if (!POINTER_TYPE_P (dst_type) && !TYPE_PTRDATAMEM_P (dst_type))
     {
       if (complain & tf_error)
        error ("invalid use of const_cast with type %qT, "
@@ -6530,7 +6529,7 @@ build_const_cast_1 (tree dst_type, tree expr, tsub
        return error_mark_node;
     }
 
-  if (TYPE_PTR_P (src_type) || TYPE_PTRMEM_P (src_type))
+  if (TYPE_PTR_P (src_type) || TYPE_PTRDATAMEM_P (src_type))
     {
       if (comp_ptr_ttypes_const (dst_type, src_type))
        {
@@ -8191,7 +8190,7 @@ comp_ptr_ttypes_real (tree to, tree from, int cons
       if (TREE_CODE (to) == VECTOR_TYPE)
        is_opaque_pointer = vector_targets_convertible_p (to, from);
 
-      if (TREE_CODE (to) != POINTER_TYPE && !TYPE_PTRMEM_P (to))
+      if (TREE_CODE (to) != POINTER_TYPE && !TYPE_PTRDATAMEM_P (to))
        return ((constp >= 0 || to_more_cv_qualified)
                && (is_opaque_pointer
                    || same_type_ignoring_top_level_qualifiers_p (to, from)));
@@ -8460,8 +8459,8 @@ casts_away_constness_r (tree *t1, tree *t2, tsubst
      to
 
            Tcv2,(M-K+1) * cv2,(M-K+2) * ... cv2,M *.  */
-  if ((!TYPE_PTR_P (*t1) && !TYPE_PTRMEM_P (*t1))
-      || (!TYPE_PTR_P (*t2) && !TYPE_PTRMEM_P (*t2)))
+  if ((!TYPE_PTR_P (*t1) && !TYPE_PTRDATAMEM_P (*t1))
+      || (!TYPE_PTR_P (*t2) && !TYPE_PTRDATAMEM_P (*t2)))
     {
       *t1 = cp_build_qualified_type (void_type_node,
                                     cp_type_quals (*t1));
@@ -8473,11 +8472,11 @@ casts_away_constness_r (tree *t1, tree *t2, tsubst
   quals1 = cp_type_quals (*t1);
   quals2 = cp_type_quals (*t2);
 
-  if (TYPE_PTRMEM_P (*t1))
+  if (TYPE_PTRDATAMEM_P (*t1))
     *t1 = TYPE_PTRMEM_POINTED_TO_TYPE (*t1);
   else
     *t1 = TREE_TYPE (*t1);
-  if (TYPE_PTRMEM_P (*t2))
+  if (TYPE_PTRDATAMEM_P (*t2))
     *t2 = TYPE_PTRMEM_POINTED_TO_TYPE (*t2);
   else
     *t2 = TREE_TYPE (*t2);
@@ -8514,7 +8513,7 @@ casts_away_constness (tree t1, tree t2, tsubst_fla
                                   complain);
     }
 
-  if (TYPE_PTRMEM_P (t1) && TYPE_PTRMEM_P (t2))
+  if (TYPE_PTRDATAMEM_P (t1) && TYPE_PTRDATAMEM_P (t2))
     /* [expr.const.cast]
 
        Casting from an rvalue of type "pointer to data member of X
Index: cp/init.c
===================================================================
--- cp/init.c   (revision 187396)
+++ cp/init.c   (working copy)
@@ -178,7 +178,7 @@ build_zero_init_1 (tree type, tree nelts, bool sta
        items with static storage duration that are not otherwise
        initialized are initialized to zero.  */
     ;
-  else if (TYPE_PTR_P (type) || TYPE_PTR_TO_MEMBER_P (type))
+  else if (TYPE_PTR_OR_PTRMEM_P (type))
     init = convert (type, nullptr_node);
   else if (SCALAR_TYPE_P (type))
     init = convert (type, integer_zero_node);
Index: cp/class.c
===================================================================
--- cp/class.c  (revision 187396)
+++ cp/class.c  (working copy)
@@ -3220,7 +3220,7 @@ check_field_decls (tree t, tree *access_decls,
         for pointers to functions or pointers to members.  */
       if (TYPE_PTR_P (type)
          && !TYPE_PTRFN_P (type)
-         && !TYPE_PTR_TO_MEMBER_P (type))
+         && !TYPE_PTRMEM_P (type))
        has_pointers = true;
 
       if (CLASS_TYPE_P (type))
Index: cp/decl.c
===================================================================
--- cp/decl.c   (revision 187396)
+++ cp/decl.c   (working copy)
@@ -10619,7 +10619,7 @@ check_default_argument (tree decl, tree arg)
 
   if (warn_zero_as_null_pointer_constant
       && c_inhibit_evaluation_warnings == 0
-      && (TYPE_PTR_P (decl_type) || TYPE_PTR_TO_MEMBER_P (decl_type))
+      && TYPE_PTR_OR_PTRMEM_P (decl_type)
       && null_ptr_cst_p (arg)
       && !NULLPTR_TYPE_P (TREE_TYPE (arg)))
     {
Index: cp/rtti.c
===================================================================
--- cp/rtti.c   (revision 187396)
+++ cp/rtti.c   (working copy)
@@ -816,7 +816,7 @@ static bool
 target_incomplete_p (tree type)
 {
   while (true)
-    if (TYPE_PTRMEM_P (type))
+    if (TYPE_PTRDATAMEM_P (type))
       {
        if (!COMPLETE_TYPE_P (TYPE_PTRMEM_CLASS_TYPE (type)))
          return true;
Index: cp/tree.c
===================================================================
--- cp/tree.c   (revision 187396)
+++ cp/tree.c   (working copy)
@@ -2773,7 +2773,7 @@ zero_init_p (const_tree t)
     return 1;
 
   /* NULL pointers to data members are initialized with -1.  */
-  if (TYPE_PTRMEM_P (t))
+  if (TYPE_PTRDATAMEM_P (t))
     return 0;
 
   /* Classes that contain types that can't be zero-initialized, cannot
Index: cp/cxx-pretty-print.c
===================================================================
--- cp/cxx-pretty-print.c       (revision 187396)
+++ cp/cxx-pretty-print.c       (working copy)
@@ -1345,8 +1345,7 @@ pp_cxx_ptr_operator (cxx_pretty_printer *pp, tree
     {
     case REFERENCE_TYPE:
     case POINTER_TYPE:
-      if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE
-         || TYPE_PTR_TO_MEMBER_P (TREE_TYPE (t)))
+      if (TYPE_PTR_OR_PTRMEM_P (TREE_TYPE (t)))
        pp_cxx_ptr_operator (pp, TREE_TYPE (t));
       pp_c_attributes_display (pp_c_base (pp),
                               TYPE_ATTRIBUTES (TREE_TYPE (t)));
@@ -1368,7 +1367,7 @@ pp_cxx_ptr_operator (cxx_pretty_printer *pp, tree
          break;
        }
     case OFFSET_TYPE:
-      if (TYPE_PTR_TO_MEMBER_P (t))
+      if (TYPE_PTRMEM_P (t))
        {
          if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE)
            pp_cxx_left_paren (pp);
@@ -1641,7 +1640,7 @@ pp_cxx_function_definition (cxx_pretty_printer *pp
 static void
 pp_cxx_abstract_declarator (cxx_pretty_printer *pp, tree t)
 {
-  if (TYPE_PTRMEM_P (t) || TYPE_PTRMEMFUNC_P (t))
+  if (TYPE_PTRMEM_P (t))
     pp_cxx_right_paren (pp);
   else if (POINTER_TYPE_P (t))
     {
Index: cp/typeck2.c
===================================================================
--- cp/typeck2.c        (revision 187396)
+++ cp/typeck2.c        (working copy)
@@ -1573,7 +1573,7 @@ build_m_component_ref (tree datum, tree component,
   component = mark_rvalue_use (component);
 
   ptrmem_type = TREE_TYPE (component);
-  if (!TYPE_PTR_TO_MEMBER_P (ptrmem_type))
+  if (!TYPE_PTRMEM_P (ptrmem_type))
     {
       if (complain & tf_error)
        error ("%qE cannot be used as a member pointer, since it is of "
@@ -1615,7 +1615,7 @@ build_m_component_ref (tree datum, tree component,
        return error_mark_node;
     }
 
-  if (TYPE_PTRMEM_P (ptrmem_type))
+  if (TYPE_PTRDATAMEM_P (ptrmem_type))
     {
       bool is_lval = real_lvalue_p (datum);
       tree ptype;
Index: cp/pt.c
===================================================================
--- cp/pt.c     (revision 187396)
+++ cp/pt.c     (working copy)
@@ -5720,8 +5720,7 @@ convert_nontype_argument (tree type, tree expr, ts
 
   /* 14.3.2/5: The null pointer{,-to-member} conversion is applied
      to a non-type argument of "nullptr".  */
-  if (expr == nullptr_node
-      && (TYPE_PTR_P (type) || TYPE_PTR_TO_MEMBER_P (type)))
+  if (expr == nullptr_node && TYPE_PTR_OR_PTRMEM_P (type))
     expr = convert (type, expr);
 
   /* In C++11, integral or enumeration non-type template arguments can be
@@ -5737,8 +5736,7 @@ convert_nontype_argument (tree type, tree expr, ts
           CONSTRUCTOR.  */;
       else if (INTEGRAL_OR_ENUMERATION_TYPE_P (type))
        expr = maybe_constant_value (expr);
-      else if (TYPE_PTR_P (type)
-              || TYPE_PTR_TO_MEMBER_P (type))
+      else if (TYPE_PTR_OR_PTRMEM_P (type))
        {
          tree folded = maybe_constant_value (expr);
          if (TYPE_PTR_P (type) ? integer_zerop (folded)
@@ -6073,7 +6071,7 @@ convert_nontype_argument (tree type, tree expr, ts
 
      For a non-type template-parameter of type pointer to data member,
      qualification conversions (_conv.qual_) are applied.  */
-  else if (TYPE_PTRMEM_P (type))
+  else if (TYPE_PTRDATAMEM_P (type))
     {
       /* [temp.arg.nontype] bullet 1 says the pointer to member
          expression must be a pointer-to-member constant.  */
@@ -19167,7 +19165,7 @@ invalid_nontype_parm_type_p (tree type, tsubst_fla
     return 0;
   else if (POINTER_TYPE_P (type))
     return 0;
-  else if (TYPE_PTR_TO_MEMBER_P (type))
+  else if (TYPE_PTRMEM_P (type))
     return 0;
   else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM)
     return 0;
@@ -19216,7 +19214,7 @@ dependent_type_p_r (tree type)
        dependent.  */
   type = TYPE_MAIN_VARIANT (type);
   /* -- a compound type constructed from any dependent type.  */
-  if (TYPE_PTR_TO_MEMBER_P (type))
+  if (TYPE_PTRMEM_P (type))
     return (dependent_type_p (TYPE_PTRMEM_CLASS_TYPE (type))
            || dependent_type_p (TYPE_PTRMEM_POINTED_TO_TYPE
                                           (type)));
Index: cp/call.c
===================================================================
--- cp/call.c   (revision 187396)
+++ cp/call.c   (working copy)
@@ -578,7 +578,7 @@ null_member_pointer_value_p (tree t)
   else if (TYPE_PTRMEMFUNC_P (type))
     return (TREE_CODE (t) == CONSTRUCTOR
            && integer_zerop (CONSTRUCTOR_ELT (t, 0)->value));
-  else if (TYPE_PTRMEM_P (type))
+  else if (TYPE_PTRDATAMEM_P (type))
     return integer_all_onesp (t);
   else
     return false;
@@ -1162,7 +1162,7 @@ standard_conversion (tree to, tree from, tree expr
      A null pointer constant can be converted to a pointer type; ... A
      null pointer constant of integral type can be converted to an
      rvalue of type std::nullptr_t. */
-  if ((tcode == POINTER_TYPE || TYPE_PTR_TO_MEMBER_P (to)
+  if ((tcode == POINTER_TYPE || TYPE_PTRMEM_P (to)
        || NULLPTR_TYPE_P (to))
       && expr && null_ptr_cst_p (expr))
     conv = build_conv (ck_std, to, conv);
@@ -1182,7 +1182,7 @@ standard_conversion (tree to, tree from, tree expr
       conv->bad_p = true;
     }
   else if ((tcode == POINTER_TYPE && fcode == POINTER_TYPE)
-          || (TYPE_PTRMEM_P (to) && TYPE_PTRMEM_P (from)))
+          || (TYPE_PTRDATAMEM_P (to) && TYPE_PTRDATAMEM_P (from)))
     {
       tree to_pointee;
       tree from_pointee;
@@ -1192,7 +1192,7 @@ standard_conversion (tree to, tree from, tree expr
                                                        TREE_TYPE (to)))
        ;
       else if (VOID_TYPE_P (TREE_TYPE (to))
-              && !TYPE_PTRMEM_P (from)
+              && !TYPE_PTRDATAMEM_P (from)
               && TREE_CODE (TREE_TYPE (from)) != FUNCTION_TYPE)
        {
          tree nfrom = TREE_TYPE (from);
@@ -1201,7 +1201,7 @@ standard_conversion (tree to, tree from, tree expr
                                      cp_type_quals (nfrom)));
          conv = build_conv (ck_ptr, from, conv);
        }
-      else if (TYPE_PTRMEM_P (from))
+      else if (TYPE_PTRDATAMEM_P (from))
        {
          tree fbase = TYPE_PTRMEM_CLASS_TYPE (from);
          tree tbase = TYPE_PTRMEM_CLASS_TYPE (to);
@@ -1307,12 +1307,12 @@ standard_conversion (tree to, tree from, tree expr
       if (ARITHMETIC_TYPE_P (from)
          || UNSCOPED_ENUM_P (from)
          || fcode == POINTER_TYPE
-         || TYPE_PTR_TO_MEMBER_P (from)
+         || TYPE_PTRMEM_P (from)
          || NULLPTR_TYPE_P (from))
        {
          conv = build_conv (ck_std, to, conv);
          if (fcode == POINTER_TYPE
-             || TYPE_PTRMEM_P (from)
+             || TYPE_PTRDATAMEM_P (from)
              || (TYPE_PTRMEMFUNC_P (from)
                  && conv->rank < cr_pbool)
              || NULLPTR_TYPE_P (from))
@@ -2334,7 +2334,7 @@ add_builtin_candidate (struct z_candidate **candid
 
     case MEMBER_REF:
       if (TREE_CODE (type1) == POINTER_TYPE
-         && TYPE_PTR_TO_MEMBER_P (type2))
+         && TYPE_PTRMEM_P (type2))
        {
          tree c1 = TREE_TYPE (type1);
          tree c2 = TYPE_PTRMEM_CLASS_TYPE (type2);
@@ -2406,14 +2406,14 @@ add_builtin_candidate (struct z_candidate **candid
     case EQ_EXPR:
     case NE_EXPR:
       if ((TYPE_PTRMEMFUNC_P (type1) && TYPE_PTRMEMFUNC_P (type2))
-         || (TYPE_PTRMEM_P (type1) && TYPE_PTRMEM_P (type2)))
+         || (TYPE_PTRDATAMEM_P (type1) && TYPE_PTRDATAMEM_P (type2)))
        break;
-      if (TYPE_PTR_TO_MEMBER_P (type1) && null_ptr_cst_p (args[1]))
+      if (TYPE_PTRMEM_P (type1) && null_ptr_cst_p (args[1]))
        {
          type2 = type1;
          break;
        }
-      if (TYPE_PTR_TO_MEMBER_P (type2) && null_ptr_cst_p (args[0]))
+      if (TYPE_PTRMEM_P (type2) && null_ptr_cst_p (args[0]))
        {
          type1 = type2;
          break;
@@ -2552,7 +2552,7 @@ add_builtin_candidate (struct z_candidate **candid
            break;
          if ((TYPE_PTRMEMFUNC_P (type1) && TYPE_PTRMEMFUNC_P (type2))
              || (TYPE_PTR_P (type1) && TYPE_PTR_P (type2))
-             || (TYPE_PTRMEM_P (type1) && TYPE_PTRMEM_P (type2))
+             || (TYPE_PTRDATAMEM_P (type1) && TYPE_PTRDATAMEM_P (type2))
              || ((TYPE_PTRMEMFUNC_P (type1)
                   || TREE_CODE (type1) == POINTER_TYPE)
                  && null_ptr_cst_p (args[1])))
@@ -2589,8 +2589,7 @@ add_builtin_candidate (struct z_candidate **candid
        break;
 
       /* Otherwise, the types should be pointers.  */
-      if (!(TYPE_PTR_P (type1) || TYPE_PTR_TO_MEMBER_P (type1))
-         || !(TYPE_PTR_P (type2) || TYPE_PTR_TO_MEMBER_P (type2)))
+      if (!TYPE_PTR_OR_PTRMEM_P (type1) || !TYPE_PTR_OR_PTRMEM_P (type2))
        return;
 
       /* We don't check that the two types are the same; the logic
@@ -2615,12 +2614,12 @@ add_builtin_candidate (struct z_candidate **candid
       && TREE_CODE (type1) == TREE_CODE (type2)
       && (TREE_CODE (type1) == REFERENCE_TYPE
          || (TYPE_PTR_P (type1) && TYPE_PTR_P (type2))
-         || (TYPE_PTRMEM_P (type1) && TYPE_PTRMEM_P (type2))
+         || (TYPE_PTRDATAMEM_P (type1) && TYPE_PTRDATAMEM_P (type2))
          || TYPE_PTRMEMFUNC_P (type1)
          || MAYBE_CLASS_TYPE_P (type1)
          || TREE_CODE (type1) == ENUMERAL_TYPE))
     {
-      if (TYPE_PTR_P (type1) || TYPE_PTR_TO_MEMBER_P (type1))
+      if (TYPE_PTR_OR_PTRMEM_P (type1))
        {
          tree cptype = composite_pointer_type (type1, type2,
                                                error_mark_node,
@@ -4731,11 +4730,11 @@ build_conditional_expr_1 (tree arg1, tree arg2, tr
        cv-qualification of either the second or the third operand.
        The result is of the common type.  */
   else if ((null_ptr_cst_p (arg2)
-           && (TYPE_PTR_P (arg3_type) || TYPE_PTR_TO_MEMBER_P (arg3_type)))
+           && TYPE_PTR_OR_PTRMEM_P (arg3_type))
           || (null_ptr_cst_p (arg3)
-              && (TYPE_PTR_P (arg2_type) || TYPE_PTR_TO_MEMBER_P (arg2_type)))
+              && TYPE_PTR_OR_PTRMEM_P (arg2_type))
           || (TYPE_PTR_P (arg2_type) && TYPE_PTR_P (arg3_type))
-          || (TYPE_PTRMEM_P (arg2_type) && TYPE_PTRMEM_P (arg3_type))
+          || (TYPE_PTRDATAMEM_P (arg2_type) && TYPE_PTRDATAMEM_P (arg3_type))
           || (TYPE_PTRMEMFUNC_P (arg2_type) && TYPE_PTRMEMFUNC_P (arg3_type)))
     {
       result_type = composite_pointer_type (arg2_type, arg3_type, arg2,
@@ -7855,8 +7854,8 @@ compare_ics (conversion *ics1, conversion *ics2)
      for pointers A*, except opposite: if B is derived from A then
      A::* converts to B::*, not vice versa.  For that reason, we
      switch the from_ and to_ variables here.  */
-  else if ((TYPE_PTRMEM_P (from_type1) && TYPE_PTRMEM_P (from_type2)
-           && TYPE_PTRMEM_P (to_type1) && TYPE_PTRMEM_P (to_type2))
+  else if ((TYPE_PTRDATAMEM_P (from_type1) && TYPE_PTRDATAMEM_P (from_type2)
+           && TYPE_PTRDATAMEM_P (to_type1) && TYPE_PTRDATAMEM_P (to_type2))
           || (TYPE_PTRMEMFUNC_P (from_type1)
               && TYPE_PTRMEMFUNC_P (from_type2)
               && TYPE_PTRMEMFUNC_P (to_type1)
Index: cp/cp-objcp-common.c
===================================================================
--- cp/cp-objcp-common.c        (revision 187396)
+++ cp/cp-objcp-common.c        (working copy)
@@ -1,5 +1,5 @@
 /* Some code common to C++ and ObjC++ front ends.
-   Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011
+   Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
    Contributed by Ziemowit Laski  <zla...@apple.com>
 
@@ -118,7 +118,7 @@ cp_var_mod_type_p (tree type, tree fn)
 {
   /* If TYPE is a pointer-to-member, it is variably modified if either
      the class or the member are variably modified.  */
-  if (TYPE_PTR_TO_MEMBER_P (type))
+  if (TYPE_PTRMEM_P (type))
     return (variably_modified_type_p (TYPE_PTRMEM_CLASS_TYPE (type), fn)
            || variably_modified_type_p (TYPE_PTRMEM_POINTED_TO_TYPE (type),
                                         fn));
Index: cp/cvt.c
===================================================================
--- cp/cvt.c    (revision 187396)
+++ cp/cvt.c    (working copy)
@@ -175,7 +175,7 @@ cp_convert_to_pointer (tree type, tree expr)
 
       return build_nop (type, expr);
     }
-  else if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype))
+  else if ((TYPE_PTRDATAMEM_P (type) && TYPE_PTRDATAMEM_P (intype))
           || (TYPE_PTRMEMFUNC_P (type) && TYPE_PTRMEMFUNC_P (intype)))
     return convert_ptrmem (type, expr, /*allow_inverse_p=*/false,
                           /*c_cast_p=*/false, tf_warning_or_error);
@@ -210,7 +210,7 @@ cp_convert_to_pointer (tree type, tree expr)
        return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), expr, 0,
                                 /*c_cast_p=*/false, tf_warning_or_error);
 
-      if (TYPE_PTRMEM_P (type))
+      if (TYPE_PTRDATAMEM_P (type))
        {
          /* A NULL pointer-to-member is represented by -1, not by
             zero.  */
@@ -221,7 +221,7 @@ cp_convert_to_pointer (tree type, tree expr)
 
       return expr;
     }
-  else if (TYPE_PTR_TO_MEMBER_P (type) && INTEGRAL_CODE_P (form))
+  else if (TYPE_PTRMEM_P (type) && INTEGRAL_CODE_P (form))
     {
       error_at (loc, "invalid conversion from %qT to %qT", intype, type);
       return error_mark_node;
@@ -767,7 +767,7 @@ ocp_convert (tree type, tree expr, int convtype, i
     }
   if (NULLPTR_TYPE_P (type) && e && null_ptr_cst_p (e))
     return nullptr_node;
-  if (POINTER_TYPE_P (type) || TYPE_PTR_TO_MEMBER_P (type))
+  if (POINTER_TYPE_P (type) || TYPE_PTRMEM_P (type))
     return fold_if_not_in_template (cp_convert_to_pointer (type, e));
   if (code == VECTOR_TYPE)
     {
@@ -1722,8 +1722,7 @@ perform_qualification_conversions (tree type, tree
   else if (TYPE_PTR_P (type) && TYPE_PTR_P (expr_type)
           && comp_ptr_ttypes (TREE_TYPE (type), TREE_TYPE (expr_type)))
     return build_nop (type, expr);
-  else if (TYPE_PTR_TO_MEMBER_P (type)
-          && TYPE_PTR_TO_MEMBER_P (expr_type)
+  else if (TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (expr_type)
           && same_type_p (TYPE_PTRMEM_CLASS_TYPE (type),
                           TYPE_PTRMEM_CLASS_TYPE (expr_type))
           && comp_ptr_ttypes (TYPE_PTRMEM_POINTED_TO_TYPE (type),
Index: cp/mangle.c
===================================================================
--- cp/mangle.c (revision 187396)
+++ cp/mangle.c (working copy)
@@ -1845,7 +1845,7 @@ write_type (tree type)
       if (TREE_CODE (type) == RECORD_TYPE && TYPE_TRANSPARENT_AGGR (type))
        type = TREE_TYPE (first_field (type));
 
-      if (TYPE_PTRMEM_P (type))
+      if (TYPE_PTRDATAMEM_P (type))
        write_pointer_to_member_type (type);
       else
         {
Index: cp/cp-tree.h
===================================================================
--- cp/cp-tree.h        (revision 187396)
+++ cp/cp-tree.h        (working copy)
@@ -3191,7 +3191,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_a
    
    Keep these checks in ascending code order.  */
 #define SCALAR_TYPE_P(TYPE)                    \
-  (TYPE_PTRMEM_P (TYPE)                                \
+  (TYPE_PTRDATAMEM_P (TYPE)                    \
    || TREE_CODE (TYPE) == ENUMERAL_TYPE                \
    || ARITHMETIC_TYPE_P (TYPE)                 \
    || TYPE_PTR_P (TYPE)                                \
@@ -3376,7 +3376,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_a
   (TYPE_HAS_COPY_ASSIGN (NODE) && ! TYPE_HAS_COMPLEX_COPY_ASSIGN (NODE))
 
 /* Returns true if NODE is a pointer-to-data-member.  */
-#define TYPE_PTRMEM_P(NODE)                    \
+#define TYPE_PTRDATAMEM_P(NODE)                        \
   (TREE_CODE (NODE) == OFFSET_TYPE)
 /* Returns true if NODE is a pointer.  */
 #define TYPE_PTR_P(NODE)                       \
@@ -3434,9 +3434,13 @@ more_aggr_init_expr_args_p (const aggr_init_expr_a
   (LANG_TYPE_CLASS_CHECK (NODE)->ptrmemfunc_flag)
 
 /* Returns true if NODE is a pointer-to-member.  */
-#define TYPE_PTR_TO_MEMBER_P(NODE) \
-  (TYPE_PTRMEM_P (NODE) || TYPE_PTRMEMFUNC_P (NODE))
+#define TYPE_PTRMEM_P(NODE) \
+  (TYPE_PTRDATAMEM_P (NODE) || TYPE_PTRMEMFUNC_P (NODE))
 
+/* Returns true if NODE is a pointer or a pointer-to-member.  */
+#define TYPE_PTR_OR_PTRMEM_P(NODE) \
+  (TYPE_PTR_P (NODE) || TYPE_PTRMEM_P (NODE))
+
 /* Indicates when overload resolution may resolve to a pointer to
    member function. [expr.unary.op]/3 */
 #define PTRMEM_OK_P(NODE) \
@@ -3473,13 +3477,13 @@ more_aggr_init_expr_args_p (const aggr_init_expr_a
    TYPE_PTRMEM_POINTED_TO_TYPE; there, the first parameter will have
    type `const X*'.  */
 #define TYPE_PTRMEM_CLASS_TYPE(NODE)                   \
-  (TYPE_PTRMEM_P (NODE)                                        \
+  (TYPE_PTRDATAMEM_P (NODE)                                    \
    ? TYPE_OFFSET_BASETYPE (NODE)               \
    : TYPE_PTRMEMFUNC_OBJECT_TYPE (NODE))
 
 /* For a pointer-to-member type of the form `T X::*', this is `T'.  */
 #define TYPE_PTRMEM_POINTED_TO_TYPE(NODE)              \
-   (TYPE_PTRMEM_P (NODE)                               \
+   (TYPE_PTRDATAMEM_P (NODE)                           \
     ? TREE_TYPE (NODE)                                 \
     : TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (NODE)))
 
Index: cp/name-lookup.c
===================================================================
--- cp/name-lookup.c    (revision 187396)
+++ cp/name-lookup.c    (working copy)
@@ -5309,7 +5309,7 @@ arg_assoc_type (struct arg_lookup *k, tree type)
   if (!type)
     return false;
 
-  if (TYPE_PTRMEM_P (type))
+  if (TYPE_PTRDATAMEM_P (type))
     {
       /* Pointer to member: associate class type and value type.  */
       if (arg_assoc_type (k, TYPE_PTRMEM_CLASS_TYPE (type)))

Reply via email to