diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-06-07 22:43:44 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-06-07 22:43:44 +0000 |
commit | 5667abce2904b9b040ffb51d79da04545503bf6c (patch) | |
tree | 68e575e9aa68b36833e0f78077ec30ecbf15773b /gcc/c-decl.c | |
parent | 5af7e2c2e1949e500d44d78d25f98cd3cfdf3e3c (diff) | |
download | gcc-5667abce2904b9b040ffb51d79da04545503bf6c.zip gcc-5667abce2904b9b040ffb51d79da04545503bf6c.tar.gz gcc-5667abce2904b9b040ffb51d79da04545503bf6c.tar.bz2 |
c-decl.c (pushdecl): Do not call COMPLETE_TYPE_P on error_mark_node.
* 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.
From-SVN: r34449
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index ba1b3c6..5ee40ba 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2422,8 +2422,12 @@ pushdecl (x) 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; } |