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 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



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