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]

Re: [PATCH] Fix C++/29002, ICE with invalid (unknown size) array of ptr-to-member


Andrew Pinski wrote:

cp/ChangeLog:
	* init.c (build_zero_init): If we have an error mark node for
	the array size, return.

testsuite/ChangeLog:
	* g++.dg/init/array22.C: New test.
	* g++.dg/init/array23.C: New test.


+      /* If we have an error_mark here, we should just return NULL as we don't
+	 know the size of the array yet.  */
+      if (max_index == error_mark_node)
+	return NULL_TREE;

I think it would be better to return error_mark_node. Please test that. But, if that doesn't work, your patch is OK.


:REVIEWMAIL: OK

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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