FreeBSD/contrib/gcc/cp/decl.c
/* Create and return a pointer to data member type.  */
Create and return a pointer to data member type.
Create and return a pointer to data member type .
tree
build_ptrmem_type (tree class_type, tree member_type)
{
  if (TREE_CODE (member_type) == METHOD_TYPE)
    {
      tree arg_types;
      arg_types = TYPE_ARG_TYPES (member_type);
      class_type = (cp_build_qualified_type
		    (class_type,
		     cp_type_quals (TREE_TYPE (TREE_VALUE (arg_types)))));
      member_type
	= build_method_type_directly (class_type,
				      TREE_TYPE (member_type),
				      TREE_CHAIN (arg_types));
      return build_ptrmemfunc_type (build_pointer_type (member_type));
    }
  else
    {
      gcc_assert (TREE_CODE (member_type) != FUNCTION_TYPE);
      return build_offset_type (class_type, member_type);
    }
}
tree build_ptrmem_type ( tree class_type , tree member_type ) { if ( TREE_CODE ( member_type ) == METHOD_TYPE ) { tree arg_types ; arg_types = TYPE_ARG_TYPES ( member_type ) ; class_type = ( cp_build_qualified_type ( class_type , cp_type_quals ( TREE_TYPE ( TREE_VALUE ( arg_types ) ) ) ) ) ; member_type = build_method_type_directly ( class_type , TREE_TYPE ( member_type ) , TREE_CHAIN ( arg_types ) ) ; return build_ptrmemfunc_type ( build_pointer_type ( member_type ) ) ; } else { gcc_assert ( TREE_CODE ( member_type ) != FUNCTION_TYPE ) ; return build_offset_type ( class_type , member_type ) ; } }
Create and return a pointer to data member type.
Create and return a pointer to data member type .