This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/30021: ICE on invalid parameter for main
- From: Mark Mitchell <mark at codesourcery dot com>
- To: reichelt at igpm dot rwth-aachen dot de
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Nov 2006 23:58:57 -0800
- Subject: Re: [patch] Fix PR c++/30021: ICE on invalid parameter for main
- References: <33230.87.78.90.15.1164836762.squirrel@www.igpm.rwth-aachen.de>
reichelt@igpm.rwth-aachen.de wrote:
> 2006-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
>
> PR c++/30021
> * c-common.c (check_main_parameter_types): Check for error_mark_node.
>
> =======================================================================
> --- gcc/gcc/c-common.c 2006-11-10 19:22:19 +0100
> +++ gcc/gcc/c-common.c 2006-11-25 17:15:26 +0100
> @@ -1061,7 +1061,7 @@ check_main_parameter_types (tree decl)
> {
> tree type = args ? TREE_VALUE (args) : 0;
>
> - if (type == void_type_node)
> + if (type == void_type_node || type == error_mark_node )
> break;
>
> ++argct;
:REVIEWMAIL: OK
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713