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++/30021: ICE on invalid parameter for main


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


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