This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using C++ in GCC is OK
Laurynas Biveinis <laurynas.biveinis@gmail.com> writes:
> 2010/6/2 Ian Lance Taylor <iant@google.com>:
>> As you say, gengtype includes specific support for VEC. ÂUsing
>> std::vector instead will require some work in gengtype, but not too
>> much. ÂCurrently gengtype generates code like this for a VEC:
>>
>> Â Â Â Âsize_t l0 = (size_t)(((*x).base).num);
>> Â Â Â Âfor (i0 = 0; i0 != l0; i0++) {
>> Â Â Â Â Âif ((*x).base.vec[i0].jump_functions != NULL) {
>>
>> It should be entirely feasible to make it generate std::vector
>> accessor functions instead.
>
> Ian, do you have an idea on how to avoid _M_impl dependency in
> gengtype or what else to do about it?
>
> Because we can trivially make gengtype mark the vector itself and mark
> whatever was put into vector, but not _M_impl.
I don't think I understand the question. _M_impl is a field of the
vector itself. It's not allocated separately.
Ian