Robert Samelson <> writes:
> unsigned x = 0;
> if(x-- < 4)
> printf("foo\n");
> else
> printf("bar\n");
>
> GCC for Data General Aviion 5000 (an 88000 machine) will convert this
> into:
>
> unsigned x = 0;
> if(--x < 3) ....
>
> in the assembly.
>
> This seems broken if x == ~0.
It's broken if and only if the program produces incorrect output. C
code specifies behavior, not machine code.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"