{
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),
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
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