+2018-04-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/85285 - ICE with flexible array after substitution.
+ * pt.c (instantiate_class_template_1): Check for flexible array in
+ union.
+
2018-04-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85227
cxx_incomplete_type_error (r, rtype);
TREE_TYPE (r) = error_mark_node;
}
+ else if (TREE_CODE (rtype) == ARRAY_TYPE
+ && TYPE_DOMAIN (rtype) == NULL_TREE
+ && (TREE_CODE (type) == UNION_TYPE
+ || TREE_CODE (type) == QUAL_UNION_TYPE))
+ {
+ error ("flexible array member %qD in union", r);
+ TREE_TYPE (r) = error_mark_node;
+ }
}
/* If it is a TYPE_DECL for a class-scoped ENUMERAL_TYPE,