FreeBSD/contrib/gcc/cp/call.c
/* ARG is a default argument expression being passed to a parameter of
   the indicated TYPE, which is a parameter to FN.  Do any required
   conversions.  Return the converted value.  */
ARG is a default argument expression being passed to a parameter of
the indicated TYPE, which is a parameter to FN.  Do any required
conversions.  Return the converted value.
ARG is a default argument expression being passed to a parameter of the indicated TYPE which is a parameter to FN . Do any required conversions . Return the converted value .
tree
convert_default_arg (tree type, tree arg, tree fn, int parmnum)
{
  if (TREE_CODE (arg) == DEFAULT_ARG)
    {
      error ("the default argument for parameter %d of %qD has "
	     "not yet been parsed",
	     parmnum, fn);
      return error_mark_node;
    }
  if (fn && DECL_TEMPLATE_INFO (fn))
    arg = tsubst_default_argument (fn, type, arg);
  arg = break_out_target_exprs (arg);
  if (TREE_CODE (arg) == CONSTRUCTOR)
    {
      arg = digest_init (type, arg);
      arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL,
					"default argument", fn, parmnum);
    }
  else
    {
      if (!CONSTANT_CLASS_P (arg))
	arg = unshare_expr (arg);
      arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL,
					"default argument", fn, parmnum);
      arg = convert_for_arg_passing (type, arg);
    }
  return arg;
}
tree convert_default_arg ( tree type , tree arg , tree fn , int parmnum ) { if ( TREE_CODE ( arg ) == DEFAULT_ARG ) { error ( " " " " , parmnum , fn ) ; return error_mark_node ; } if ( fn && DECL_TEMPLATE_INFO ( fn ) ) arg = tsubst_default_argument ( fn , type , arg ) ; arg = break_out_target_exprs ( arg ) ; if ( TREE_CODE ( arg ) == CONSTRUCTOR ) { arg = digest_init ( type , arg ) ; arg = convert_for_initialization ( 0 , type , arg , LOOKUP_NORMAL , " " , fn , parmnum ) ; } else { if ( ! CONSTANT_CLASS_P ( arg ) ) arg = unshare_expr ( arg ) ; arg = convert_for_initialization ( 0 , type , arg , LOOKUP_NORMAL , " " , fn , parmnum ) ; arg = convert_for_arg_passing ( type , arg ) ; } return arg ; }
ARG is a default argument expression being passed to a parameter of
the indicated TYPE, which is a parameter to FN.
ARG is a default argument expression being passed to a parameter of the indicated TYPE which is a parameter to FN .
/* If the ARG is an unparsed default argument expression, the
     conversion cannot be performed.  */ /* We must make a copy of ARG, in case subsequent processing
	 alters any part of it.  For example, during gimplification a
	 cast of the form (T) &X::f (where "f" is a member function)
	 will lead to replacing the PTRMEM_CST for &X::f with a
	 VAR_DECL.  We can avoid the copy for constants, since they
	 are never modified in place.  */