This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mixing VEC-tors of string & GTY?
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: basile at starynkevitch dot net (Basile STARYNKEVITCH)
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 4 Jan 2007 05:39:23 -0500 (EST)
- Subject: Re: mixing VEC-tors of string & GTY?
First sorry about the first email.
> As a simple example, if I add (inside trunk rev.101317) at the end of
> gcc/stringpool.c just before the last #include "gt-stringpool.h"
>
> typedef char* basilestring_t;
> DEF_VEC_P (basilestring_t);
> DEF_VEC_ALLOC_P (basilestring_t,heap);
> static VEC(basilestring_t,heap) *basilestring_vector;
>
> Then I gen a gengtype error:
> make[2]: Entering directory `/usr/src/Lang/_BasileGgccObj/gcc'
> build/gengtype
> /usr/src/Lang/basile-ggcc/gcc/stringpool.c:263: unidentified type `basilestring_t'
Why do you want a VEC of a character pointer in the first place?
I don't think this is supported at all.
> Notice that:
>
> I do not add any additional occurrence of GTY in a already GTY-ed file.
>
> my added code is quite similar to the following code from gcc/genextract.c
> (which is not gengtype-d)
>
> typedef char *locstr;
> /*later*/
> DEF_VEC_P(locstr);
> DEF_VEC_ALLOC_P(locstr,heap);
>
> Any clues?
More than just not being gengtype-d, genextract.c is a file that gets built
by the build compiler for a build program and not part of libbackend.
Yes fix gengtype to ignore non heap gc cases.
-- Pinski