re PR c++/44969 ([C++0x] <type_traits> std::is_constructible broken for fundamental...
[gcc.git] / gcc / cp / decl.c
index ddc262b22b66b7789c09d3ce2111dcc95844b02f..3aaa20c0ed3823d778cdbcfead1f7b33b2031744 100644 (file)
@@ -4462,7 +4462,8 @@ grok_reference_init (tree decl, tree type, tree init, tree *cleanup)
     }
 
   if (TREE_CODE (init) == TREE_LIST)
-    init = build_x_compound_expr_from_list (init, ELK_INIT);
+    init = build_x_compound_expr_from_list (init, ELK_INIT,
+                                           tf_warning_or_error);
 
   if (TREE_CODE (TREE_TYPE (type)) != ARRAY_TYPE
       && TREE_CODE (TREE_TYPE (init)) == ARRAY_TYPE)
@@ -5683,7 +5684,8 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
          return;
        }
       if (TREE_CODE (init) == TREE_LIST)
-       init = build_x_compound_expr_from_list (init, ELK_INIT);
+       init = build_x_compound_expr_from_list (init, ELK_INIT,
+                                               tf_warning_or_error);
       if (describable_type (init))
        {
          type = TREE_TYPE (decl) = do_auto_deduction (type, init, auto_node);