FreeBSD/contrib/gcc/cp/cvt.c
/* Like cp_convert, except permit conversions to take place which
   are not normally allowed due to access restrictions
   (such as conversion from sub-type to private super-type).  */
Like cp_convert, except permit conversions to take place which
are not normally allowed due to access restrictions
(such as conversion from sub-type to private super-type).
Like cp_convert except permit conversions to take place which are not normally allowed due to access restrictions ( such as conversion from sub - type to private super - type ) .
tree
convert_force (tree type, tree expr, int convtype)
{
  tree e = expr;
  enum tree_code code = TREE_CODE (type);
  if (code == REFERENCE_TYPE)
    return (fold_if_not_in_template
	    (convert_to_reference (type, e, CONV_C_CAST, LOOKUP_COMPLAIN,
				   NULL_TREE)));
  if (code == POINTER_TYPE)
    return fold_if_not_in_template (convert_to_pointer_force (type, e));
  if (((TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE && TREE_CODE (e) == ADDR_EXPR
	&& TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE
	&& TREE_CODE (TREE_TYPE (TREE_TYPE (e))) == METHOD_TYPE)
       || integer_zerop (e)
       || TYPE_PTRMEMFUNC_P (TREE_TYPE (e)))
      && TYPE_PTRMEMFUNC_P (type))
    return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), e, 1,
			     1);
  return ocp_convert (type, e, CONV_C_CAST|convtype, LOOKUP_NORMAL);
}
tree convert_force ( tree type , tree expr , int convtype ) { tree e = expr ; enum tree_code code = TREE_CODE ( type ) ; if ( code == REFERENCE_TYPE ) return ( fold_if_not_in_template ( convert_to_reference ( type , e , CONV_C_CAST , LOOKUP_COMPLAIN , NULL_TREE ) ) ) ; if ( code == POINTER_TYPE ) return fold_if_not_in_template ( convert_to_pointer_force ( type , e ) ) ; if ( ( ( TREE_CODE ( TREE_TYPE ( e ) ) == POINTER_TYPE && TREE_CODE ( e ) == ADDR_EXPR && TREE_CODE ( TREE_TYPE ( e ) ) == POINTER_TYPE && TREE_CODE ( TREE_TYPE ( TREE_TYPE ( e ) ) ) == METHOD_TYPE ) || integer_zerop ( e ) || TYPE_PTRMEMFUNC_P ( TREE_TYPE ( e ) ) ) && TYPE_PTRMEMFUNC_P ( type ) ) return build_ptrmemfunc ( TYPE_PTRMEMFUNC_FN_TYPE ( type ) , e , 1 , 1 ) ; return ocp_convert ( type , e , CONV_C_CAST | convtype , LOOKUP_NORMAL ) ; }
Like cp_convert, except permit conversions to take place which
are not normally allowed due to access restrictions
(such as conversion from sub-type to private super-type).
Like cp_convert except permit conversions to take place which are not normally allowed due to access restrictions ( such as conversion from sub - type to private super - type ) .
/* From typeck.c convert_for_assignment */ /* compatible pointer to member functions.  */ /*c_cast_p=*/