This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cp/class.c: build_class_init_list
- To: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Subject: Re: cp/class.c: build_class_init_list
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Sat, 03 Apr 1999 07:59:52 -0500
- cc: egcs at egcs dot cygnus dot com
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