This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,c++] use VECs in name-lookup.c:is_associated_namespace
Nathan Froyd wrote:
> - vec_member can't take VEC(tree,heap) *. So we have to inline it or
> write vec_heap_member or somesuch. (We could make vec_member take
> VEC(tree,base) * or whatever the syntax is, but exposing VEC_BASE
> etc. outside of vec.h seems ugly.)
Hmm. It seems to me that vec_member really should be able to deal with
any kind of VEC. IIUC, the layout of the vector part of a VEC is
independent of the memory allocation scheme, so there's no reason that
vec_member really needs to depend on a particular allocation scheme. If
that means exposing VEC(tree,base), so be it.
> - We potentially get to reuse vectors via make_tree_vector.
But, that's a good argument. Let's go with your original approach.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713