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: new build_function_type_list()


On Fri, Jun 28, 2002 at 01:39:04PM -0700, Aldy Hernandez wrote:
> +   if (tree_list == 0)
> +     {
> +       /* This should be enough, but you never know.  So let's realloc
> + 	 as we go.  */
> +       tl_size = 20;
> +       tree_list = (tree *) xmalloc (sizeof (tree) * tl_size);

You should be able to build the list in reverse as you examine
the arguments.  Use nreverse at the end to put them back in 
the right order.

Otherwise ok.


r~


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