2010/8/27  <jeremie.salvu...@free.fr>:

> We think that the enum type_kind discriminates fields union in struct type. 
> So for TYPE_PARAM_STRUCT we believe that
> the param_struct field of union u inside struct type is used. If this is 
> true, the test s->u.s.line.file != NULL is meaningless when s->kind == 
> TYPE_PARAM_STRUCT, it should be s->u.param_struct.line.file != NULL instead 
> in our opinion.
>
>
> Or can a type have a kind TYPE_PARAM_STRUCT and only have s->u.s valid? It 
> might be related to the code in new_structure near line  638 of gengtype.c 
> which sets ls->kind = TYPE_LANG_STRUCT.
>
> Perhaps TYPE_PARAM_STRUCT has two different roles. If that is indeed the 
> case, we have to distinguish them when serializing gengtype's state.

I don't have time to investigate this right now to come up with an
answer, but did you try producing gengtype debugging dump and looking
there for structs that have these combinations of properties?
Especially since -

> However, the existing code appears to work but we don't understand why.

Cheers,
-- 
Laurynas

Reply via email to