This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix C++/29002, ICE with invalid (unknown size) array of ptr-to-member
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 14 Sep 2006 19:51:55 -0700
- Subject: Re: [PATCH] Fix C++/29002, ICE with invalid (unknown size) array of ptr-to-member
- References: <email@example.com>
Andrew Pinski wrote:
* init.c (build_zero_init): If we have an error mark node for
the array size, return.
* 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.
(650) 331-3385 x713