[c++, ICE, patch] Patch to add an error check in cp_build_unary_op

Jakub Jelinek jakub@redhat.com
Fri Jan 9 00:24:00 GMT 2009


On Thu, Jan 08, 2009 at 03:11:17PM -0800, Steve Ellcey wrote:
> 2009-01-08  Steve Ellcey  <sje@cup.hp.com>
> 
> 	* typeck.c (cp_build_unary_op): Check for ERROR_MARK.
> 
> 
> Index: typeck.c
> ===================================================================
> --- typeck.c	(revision 143178)
> +++ typeck.c	(working copy)
> @@ -4192,6 +4192,9 @@ cp_build_unary_op (enum tree_code code, 
>    if (arg == error_mark_node)
>      return error_mark_node;
>  
> +  if (TREE_CODE (TREE_TYPE (arg)) == ERROR_MARK)
> +    return error_mark_node;

The above 2 checks together should be
  if (error_operand_p (arg))
    return error_mark_node;

	Jakub



More information about the Gcc-patches mailing list