FreeBSD/contrib/gcc/cp/cvt.c
/* Attempt to perform qualification conversions on EXPR to convert it
   to TYPE.  Return the resulting expression, or error_mark_node if
   the conversion was impossible.  */
Attempt to perform qualification conversions on EXPR to convert it
to TYPE.  Return the resulting expression, or error_mark_node if
the conversion was impossible.
Attempt to perform qualification conversions on EXPR to convert it to TYPE . Return the resulting expression or error_mark_node if the conversion was impossible .
tree
perform_qualification_conversions (tree type, tree expr)
{
  tree expr_type;
  expr_type = TREE_TYPE (expr);
  if (same_type_p (type, expr_type))
    return expr;
  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)
	   && same_type_p (TYPE_PTRMEM_CLASS_TYPE (type),
			   TYPE_PTRMEM_CLASS_TYPE (expr_type))
	   && comp_ptr_ttypes (TYPE_PTRMEM_POINTED_TO_TYPE (type),
			       TYPE_PTRMEM_POINTED_TO_TYPE (expr_type)))
    return build_nop (type, expr);
  else
    return error_mark_node;
}
tree perform_qualification_conversions ( tree type , tree expr ) { tree expr_type ; expr_type = TREE_TYPE ( expr ) ; if ( same_type_p ( type , expr_type ) ) return expr ; 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 ) && same_type_p ( TYPE_PTRMEM_CLASS_TYPE ( type ) , TYPE_PTRMEM_CLASS_TYPE ( expr_type ) ) && comp_ptr_ttypes ( TYPE_PTRMEM_POINTED_TO_TYPE ( type ) , TYPE_PTRMEM_POINTED_TO_TYPE ( expr_type ) ) ) return build_nop ( type , expr ) ; else return error_mark_node ; }
Attempt to perform qualification conversions on EXPR to convert it
to TYPE.
Attempt to perform qualification conversions on EXPR to convert it to TYPE .