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]
Other format: [Raw text]

[PATCH] PR10602


Hi,

Just a boring tree check failure when comparing a function
prototype with its declaration and one of the arguments
has the "type" error_mark_node.

Bootstrapped on i686-pc-linux-gnu, and verified that the ICE
disappears; running the test suite now.  OK if it passes?

Gr.
Steven


2003-07-04  Steven Bosscher  <steven@gcc.gnu.org>

	PR c/10602
	* c-typeck.c (type_lists_compatible_p): Do not compare
	arguments if one of them is an error_mark_node.

Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.241
diff -c -3 -p -r1.241 c-typeck.c
*** c-typeck.c	30 Jun 2003 19:36:20 -0000	1.241
--- c-typeck.c	3 Jul 2003 23:33:57 -0000
*************** type_lists_compatible_p (tree args1, tre
*** 701,706 ****
--- 701,710 ----
  	  if (c_type_promotes_to (TREE_VALUE (args1)) != TREE_VALUE (args1))
  	    return 0;
  	}
+       /* If one of the arguments is an error marker, ignore this arg.  */
+       else if (TREE_CODE (TREE_VALUE (args1)) == ERROR_MARK
+ 	       || TREE_CODE (TREE_VALUE (args2)) == ERROR_MARK)
+ 	;
        else if (! (newval = comptypes (TYPE_MAIN_VARIANT (TREE_VALUE (args1)),
  				      TYPE_MAIN_VARIANT (TREE_VALUE (args2)))))
  	{


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