This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/29727: ICE on invalid initializer for template member
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, simon-l dot martin at laposte dot net
- Date: Sun, 05 Oct 2008 18:33:35 +0200
- Subject: Re: [PATCH] Fix PR c++/29727: ICE on invalid initializer for template member
- References: <48E86BBB.4090105@laposte.net>
> - gcc_assert (TREE_CODE (ce->index) == IDENTIFIER_NODE);
> + gcc_assert (TREE_CODE (ce->index) == IDENTIFIER_NODE
> + || (ce->index == error_mark_node));
> error ("name %qD used in a GNU-style designated "
> "initializer for an array", ce->index);
Hi Simon, this should be
if (ce->index != error_mark_node)
{
gcc_assert (TREE_CODE (ce->index) == IDENTIFIER_NODE);
error ("...");
}
return false;
otherwise you get a bogus error when ce->index is passed as a %qD.
Thanks!
Paolo