FreeBSD/contrib/gcc/cp/tree.c
/* Build a TARGET_EXPR using INIT to initialize a new temporary of the
   indicated TYPE.  */
Build a TARGET_EXPR using INIT to initialize a new temporary of the
indicated TYPE.
Build a TARGET_EXPR using INIT to initialize a new temporary of the indicated TYPE .
tree
build_target_expr_with_type (tree init, tree type)
{
  gcc_assert (!VOID_TYPE_P (type));
  if (TREE_CODE (init) == TARGET_EXPR)
    return init;
  else if (CLASS_TYPE_P (type) && !TYPE_HAS_TRIVIAL_INIT_REF (type)
	   && TREE_CODE (init) != COND_EXPR
	   && TREE_CODE (init) != CONSTRUCTOR
	   && TREE_CODE (init) != VA_ARG_EXPR)
    return force_rvalue (init);
  return force_target_expr (type, init);
}
tree build_target_expr_with_type ( tree init , tree type ) { gcc_assert ( ! VOID_TYPE_P ( type ) ) ; if ( TREE_CODE ( init ) == TARGET_EXPR ) return init ; else if ( CLASS_TYPE_P ( type ) && ! TYPE_HAS_TRIVIAL_INIT_REF ( type ) && TREE_CODE ( init ) != COND_EXPR && TREE_CODE ( init ) != CONSTRUCTOR && TREE_CODE ( init ) != VA_ARG_EXPR ) return force_rvalue ( init ) ; return force_target_expr ( type , init ) ; }
Build a TARGET_EXPR using INIT to initialize a new temporary of the
indicated TYPE.
Build a TARGET_EXPR using INIT to initialize a new temporary of the indicated TYPE .
/* We need to build up a copy constructor call.  COND_EXPR is a special
       case because we already have copies on the arms and we don't want
       another one here.  A CONSTRUCTOR is aggregate initialization, which
       is handled separately.  A VA_ARG_EXPR is magic creation of an
       aggregate; there's no additional work to be done.  */