OSDN Git Service

PR c++/25811
[pf3gnuchains/gcc-fork.git] / gcc / cp / init.c
index 5f0f665..c1f1cbf 100644 (file)
@@ -506,7 +506,6 @@ perform_member_init (tree member, tree init)
     {
       if (init == NULL_TREE)
        {
-         tree core_type;
          /* member traversal: note it leaves init NULL */
          if (TREE_CODE (type) == REFERENCE_TYPE)
            permerror (DECL_SOURCE_LOCATION (current_function_decl),
@@ -516,13 +515,6 @@ perform_member_init (tree member, tree init)
            permerror (DECL_SOURCE_LOCATION (current_function_decl),
                       "uninitialized member %qD with %<const%> type %qT",
                       member, type);
-
-         core_type = strip_array_types (type);
-         if (CLASS_TYPE_P (core_type)
-             && (CLASSTYPE_READONLY_FIELDS_NEED_INIT (core_type)
-                 || CLASSTYPE_REF_FIELDS_NEED_INIT (core_type)))
-           diagnose_uninitialized_cst_or_ref_member (core_type,
-                                                     /*using_new=*/false);
        }
       else if (TREE_CODE (init) == TREE_LIST)
        /* There was an explicit member initialization.  Do some work
@@ -1666,14 +1658,7 @@ constant_value_1 (tree decl, bool integral_p)
          init = DECL_INITIAL (decl);
        }
       if (init == error_mark_node)
-       {
-         if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl))
-           /* Treat the error as a constant to avoid cascading errors on
-              excessively recursive template instantiation (c++/9335).  */
-           return init;
-         else
-           return decl;
-       }
+       return decl;
       /* Initializers in templates are generally expanded during
         instantiation, so before that for const int i(2)
         INIT is a TREE_LIST with the actual initializer as