This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: structures & param_structures in gengtype


2010/9/6 Basile Starynkevitch <basile@starynkevitch.net>:
> On Mon, 6 Sep 2010 06:36:48 +0300
> Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote:
>
>> 2010/9/2 Basile Starynkevitch <basile@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]