2014-01-31 Jason Merrill <jason@redhat.com>
+ PR c++/59646
+ * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
+ [ck_list]: Check for error_mark_node.
+ (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
+
PR c++/57043
* pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
during partial ordering.
if (ctor == error_mark_node)
return NULL;
+ flags |= LOOKUP_NO_NARROWING;
+
for (; field; field = next_initializable_field (DECL_CHAIN (field)))
{
tree ftype = TREE_TYPE (field);
c->type = type;
c->rank = cr_exact;
c->user_conv_p = true;
+ c->check_narrowing = true;
c->u.next = NULL;
return c;
}
to avoid the error about taking the address of a temporary. */
array = cp_build_addr_expr (array, complain);
array = cp_convert (build_pointer_type (elttype), array, complain);
+ if (array == error_mark_node)
+ return error_mark_node;
/* Build up the initializer_list object. */
totype = complete_type (totype);
return fold_if_not_in_template (expr);
}
expr = reshape_init (totype, expr, complain);
- return get_target_expr_sfinae (digest_init (totype, expr, complain),
+ expr = get_target_expr_sfinae (digest_init (totype, expr, complain),
complain);
+ if (expr != error_mark_node)
+ TARGET_EXPR_LIST_INIT_P (expr) = true;
+ return expr;
default:
break;