That's REALLY weird, endian issue or is that just undefined behavior
in the C spec?
On May 13, 2005, at 2:24 PM, Paul Koning wrote:
>>>> "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.
paul