Ilya Zakharevich on Tue, 25 Feb 2003 18:06:40 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gp: variables


On Tue, Feb 25, 2003 at 11:44:27PM +0100, Karim BELABAS wrote:
> How is a C compiler supposed to react to
> 
>   long x = 0;
>   long f() { return x = 1; }
>   main() { printf("%ld %ld\n", x, f()); }

C compiler is supposed to compile this.  ;-) The resulting code should
not segfault.

> ? I fail to see the difference. [ except that the above programs will not
> suffer a SEGV, which GP could ]

This is the only part to discuss.

There is no reason for this discussion to be automatically fruitful,
but with so complicated and painful subject any progress is good...

Yours,
Ilya