This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/20499: ICE on duplicate class definition
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Mar 2005 15:59:12 +0100 (CET)
- Subject: Re: [patch] Fix PR c++/20499: ICE on duplicate class definition
On 20 Mar, Mark Mitchell wrote:
> Volker Reichelt wrote:
>
>> Bootstrapped and regtested.
>> Ok for 4.0 branch and mainline?
>
> Yes.
Committed.
>> A question remains, though: What about the other code paths where c_p_c_h
>> returns an error_mark_node? Will they cause ICEs, too? Or are they safe
>> (or just never taken)?
>
> Note that this function is permitted by its documentation to return
> error_mark_node -- just not for this case. So, callers should be able
> to deal with that. I'm not sure what the situation in practice is, though.
The function cp_parser_class_specifier is the only caller of
cp_parser_class_head and it didn't deal particularly well with the
error_mark_node (hence the ICE). Hopefully slightly different code paths
are taken in the remaining cases.
Regards,
Volker