[LTO]: patch committed to properly handle VAR_DECLs and FIELD_DECLs
Chris Lattner
clattner@apple.com
Wed Aug 29 16:23:00 GMT 2007
On Aug 28, 2007, at 7:25 PM, Mark Mitchell wrote:
> Kenneth Zadeck wrote:
>
>>> 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.
>
> You're right; in C you can't do this with just local variables.
> I'm not
> sure if you can in Ada, though. But, yeah, maybe it's a case we
> can not
> worry about just yet.
With globals you still have fun games like this, even in C:
extern void *i;
void *j = &i;
void *i = &j;
-Chris
More information about the Gcc-patches
mailing list