return error_mark_node;
}
+
+ if (TREE_CODE (type) == ARRAY_TYPE
+ && TREE_CODE (init) != CONSTRUCTOR)
+ {
+ error ("array must be initialized with a brace-enclosed"
+ " initializer");
+ return error_mark_node;
+ }
+
return convert_for_initialization (NULL_TREE, type, init,
LOOKUP_NORMAL | LOOKUP_ONLYCONVERTING,
"initialization", NULL_TREE, 0);
if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (type)))
{
/* If this type needs constructors run for default-initialization,
- we can't rely on the backend to do it for us, so build up
+ we can't rely on the back end to do it for us, so build up
TARGET_EXPRs. If the type in question is a class, just build
one up; if it's an array, recurse. */
if (IS_AGGR_TYPE (TREE_TYPE (type)))
else if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (field)))
{
/* If this type needs constructors run for
- default-initialization, we can't rely on the backend to do it
+ default-initialization, we can't rely on the back end to do it
for us, so build up TARGET_EXPRs. If the type in question is
a class, just build one up; if it's an array, recurse. */
if (IS_AGGR_TYPE (TREE_TYPE (field)))