error_mark_node.
* print-tree.c (print_node): The transparent_union_flag means
different things for unions and arrays. Do not inspect it
with TYPE_TRANSPARENT_UNION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34449
138bc75d-0d04-0410-961f-
82ee72b054a4
+2000-06-07 Zack Weinberg <zack@wolery.cumb.org>
+
+ * c-decl.c (pushdecl): Do not call COMPLETE_TYPE_P on
+ error_mark_node.
+ * print-tree.c (print_node): The transparent_union_flag means
+ different things for unions and arrays. Do not inspect it
+ with TYPE_TRANSPARENT_UNION.
+
2000-06-06 Jakub Jelinek <jakub@redhat.com>
* cpplib.c (do_ifdef, do_ifndef): Don't segfault if parse_ifdef
b->shadowed = tree_cons (name, oldlocal, b->shadowed);
}
- /* Keep count of variables in this level with incomplete type. */
- if (!COMPLETE_TYPE_P (TREE_TYPE (x)))
+ /* Keep count of variables in this level with incomplete type.
+ If the input is erroneous, we can have error_mark in the type
+ slot (e.g. "f(void a, ...)") - that doesn't count as an
+ incomplete type. */
+ if (TREE_TYPE (x) != error_mark_node
+ && !COMPLETE_TYPE_P (TREE_TYPE (x)))
++b->n_incomplete;
}
fputs (" string-flag", file);
if (TYPE_NEEDS_CONSTRUCTING (node))
fputs (" needs-constructing", file);
- if (TYPE_TRANSPARENT_UNION (node))
- fputs (" transparent-union", file);
+ /* The transparent-union flag is used for different things in
+ different nodes. */
+ if (TYPE_CHECK (node)->type.transparent_union_flag)
+ {
+ if (TREE_CODE (node) == UNION_TYPE)
+ fputs (" transparent-union", file);
+ else if (TREE_CODE (node) == ARRAY_TYPE)
+ fputs (" nonaliased-component", file);
+ else
+ fputs (" tu-flag", file);
+ }
if (TYPE_PACKED (node))
fputs (" packed", file);