'goto" gone from computer languages or is it!
Dwight K. Elvey
dwight.elvey at amd.com
Fri May 13 13:40:28 CDT 2005
>From: "Paul Koning" <pkoning at equallogic.com>
>
>>>>>> "Bryan" == Bryan Pope <bpope at wordstock.com> writes:
>
> Bryan> And thusly Mike Loewen spake:
> >> On Fri, 13 May 2005, Bryan Pope wrote:
> >>
> >> >> So, to tie this in with the Zen Koan threads, what is the
> >> result of
> >> >>
> >> >> int i = 0; >> printf("%d %d %d\n",i++,i++,i++);
> >> >>
> >> >
> >> > IIRC it should output:
> >> >
> >> > 2 1 0
> >>
> >> Not on my system:
> >>
> >> 0 1 2
> >>
>
> Bryan> I checked after I sent the message and my system output "2 1
> Bryan> 0"... I am using Watcom C 10.6 under QNX 4.25.
>
>I think the answer is that it should display 3 numbers, each in the
>range 0 to 2.
>
>GCC produces 2 1 0 on x86 and 0 1 2 on MIPS.
Hi
I can't help but put another plug in here. This is
why I like languages like Forth and LISP that specify
explicit execution order and don't leave it to some compiler
writer to arbitrarily choose.
It looks like spc's test is part of a compliance test.
Dwight
More information about the cctalk
mailing list