]> gcc.gnu.org Git - gcc.git/commitdiff
call.c (convert_like_real): Don't check narrowing if the element is also an initializ...
authorJason Merrill <jason@redhat.com>
Wed, 27 Oct 2010 15:48:01 +0000 (11:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 27 Oct 2010 15:48:01 +0000 (11:48 -0400)
* call.c (convert_like_real): Don't check narrowing if the element
is also an initializer-list.

From-SVN: r166005

gcc/cp/ChangeLog
gcc/cp/call.c

index 3a7e754b062ce87cd7030c6703aec81629dfcb9c..7646dcacc9dfe0a153142baccf4043a79cb03b20 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-27  Jason Merrill  <jason@redhat.com>
+
+       * call.c (convert_like_real): Don't check narrowing if the element
+       is also an initializer-list.
+
 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * parser.c (cp_parser_objc_at_property_declaration): Recognize
index 4b36ab0fade55af3c17c48231a2f46595b1ef327..183171832572e8ead43b1677a95c0a6a45fb8502 100644 (file)
@@ -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.  */
This page took 0.076094 seconds and 5 git commands to generate.