2010/9/6 Basile Starynkevitch <bas...@starynkevitch.net>: > On Mon, 6 Sep 2010 06:36:48 +0300 > Laurynas Biveinis <laurynas.bivei...@gmail.com> wrote: > >> 2010/9/2 Basile Starynkevitch <bas...@starynkevitch.net>: >> > Hello Laurynas, Diego & all the list. >> > >> > A precise question about gengtype (the current trunk one) >> > >> > I have the impression that every member of the 'param_structs' variable >> > in gengtype.c (viewed as a linked list of types linked thru their next >> > field) is also a member of the 'structures' variable in gengtype.c >> > >> > Could you confirm that impression? >> >> That's my recollection too. >> > > Thanks for the prompt reply. Do you have a more precise understanding of how > does that happen? I was not fully able to understand that. What routines are > adding to both lists?
Based on the reading of the source (I cannot run gengtype here): first the structs are created and put to the 'structures' list. This should be done by find_structure or similar. Then, iff GTY param option is encountered, a new struct type variable is created with kind = TYPE_PARAM_STRUCT and stru = already existing struct and that is put to 'param_structs'. Look at find_param_struct and its callers. -- Laurynas