diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3a7e754b062..7646dcacc9d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-27 Jason Merrill + + * call.c (convert_like_real): Don't check narrowing if the element + is also an initializer-list. + 2010-10-27 Nicola Pero * parser.c (cp_parser_objc_at_property_declaration): Recognize diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4b36ab0fade..18317183257 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -5115,7 +5115,8 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum, 1, false, false, complain); if (sub == error_mark_node) return sub; - check_narrowing (TREE_TYPE (sub), val); + if (!BRACE_ENCLOSED_INITIALIZER_P (val)) + check_narrowing (TREE_TYPE (sub), val); CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (new_ctor), NULL_TREE, sub); } /* Build up the array. */