This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fix for enable-checking ICEs in C front end


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;
     }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]