This is the mail archive of the gcc@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]

Re: cp/class.c: build_class_init_list


On Sat, 3 Apr 1999 09:35:50 +0200, "Martin v. Loewis" wrote:
>> build_class_init_list has a `blist' variable which, as far as I can
>> tell, is never assigned to; yet it is used repeatedly.  I bet this is
>> a glitch from the change to use splay trees.  I have no idea how to
>> fix it.  Ideas?
>
>My guess is that the whole blist block can go, and that the loop
>collapses to
>
>  for (i = n_baseclasses-1; i >= 0; i--)
>    {
>      tree base_binfo = TREE_VEC_ELT (binfos, i);
>
>      /* Don't initialize virtual baseclasses this way.  */
>      if (TREE_VIA_VIRTUAL (base_binfo))
>	continue;
>
>      /* ...and the last shall come first...  */
>      base_init_list = maybe_fixup_vptrs (type, base_binfo, base_init_list);
>      base_init_list = tree_cons (NULL_TREE, base_binfo, base_init_list);
>    }
>
>I haven't tested this, though.

I'll give it a whirl.

zw


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