fix for enable-checking ICEs in C front end

Zack Weinberg zack@wolery.cumb.org
Sat May 6 13:02:00 GMT 2000


pushdecl isn't checking for error_mark_node in enough places.  This is
consistent with other uses of COMPLETE_TYPE_P, but I would still like
a review: should error_mark_node be counted as an incomplete type in
this context?  and should the check be moved into COMPLETE_TYPE_P?

zw

	* c-decl.c (pushdecl): Don't call COMPLETE_TYPE_P on
	error_mark_node.

===================================================================
Index: c-decl.c
--- c-decl.c	2000/05/05 18:16:49	1.107
+++ c-decl.c	2000/05/06 20:00:37
@@ -2416,7 +2416,7 @@ pushdecl (x)
 	}
 
       /* Keep count of variables in this level with incomplete type.  */
-      if (!COMPLETE_TYPE_P (TREE_TYPE (x)))
+      if (TREE_TYPE (x) == error_mark_node || !COMPLETE_TYPE_P (TREE_TYPE (x)))
 	++b->n_incomplete;
     }
 


More information about the Gcc-patches mailing list