>>>>> "Diego" == Diego Novillo <dnovi...@google.com> writes:

Diego> +struct GTY(()) vec_prefix
Diego> +{
Diego> +  unsigned num;
Diego> +  unsigned alloc;
Diego> +};
Diego> +
Diego> +/* Vector type, user visible.  */
Diego> +template<typename T>
Diego> +struct GTY(()) vec_t
Diego> +{
Diego> +  vec_prefix prefix;
Diego> +  T GTY((length ("%h.prefix.num"))) vec[1];
Diego> +};

I'm curious why you didn't use inheritance here.

    template<typename T>
    struct GTY(()) vec_t : public vec_prefix
    {
    ...
    };

Tom

Reply via email to