This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO]: patch committed to properly handle VAR_DECLs and FIELD_DECLs
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, William Maddox <maddox at google dot com>, Jim Blandy <jimb at codesourcery dot com>, "Park, Seongbae" <seongbae dot park at gmail dot com>, "Hubicha, Jan" <jh at suse dot cz>
- Date: Tue, 28 Aug 2007 22:02:44 -0400
- Subject: Re: [LTO]: patch committed to properly handle VAR_DECLs and FIELD_DECLs
- References: <46D4389E.7010301@naturalbridge.com> <46D4A22D.10608@codesourcery.com>
Mark Mitchell wrote:
> Kenneth Zadeck wrote:
>
>> 1) A new section had to be added so that the VAR_DECLs could be read in
>> randomly. This is necessary because the tree for a VAR_DECL may contain
>> other VAR_DECLs so it is important to be able to reconstruct this bottom
>> up.
>>
>
> I assume that you mean things like this:
>
> int i;
> int j = i;
>
> where, here, the DECL_INITIAL for "j" references "i"?
>
> There is a way to get mutual recursion between variables; you can do this:
>
> extern int i;
> int j = i;
> int i = j;
>
> Will your code handle this?
>
> Thanks,
>
>
Mark even though we talked about this on the phone, i do not get this.
i will not see the var decl for i because it is not a local var.
i do not think that you can do this with just local vars.
kenny