OSDN Git Service

PR c++/48535
[pf3gnuchains/gcc-fork.git] / gcc / cp / decl.c
index 55ae173..a541402 100644 (file)
@@ -5397,7 +5397,8 @@ check_initializer (tree decl, tree init, int flags, tree *cleanup)
                 init appropriately so we can pass it into store_init_value
                 for the error.  */
              if (init && BRACE_ENCLOSED_INITIALIZER_P (init))
-               init = finish_compound_literal (type, init);
+               init = finish_compound_literal (type, init,
+                                               tf_warning_or_error);
              else if (CLASS_TYPE_P (type)
                       && (!init || TREE_CODE (init) == TREE_LIST))
                {