A new ia32 backend
craig@jcb-sc.com
craig@jcb-sc.com
Wed Jun 16 06:54:00 GMT 1999
>>Richard Henderson wrote in < 19990615224736.A29894@cygnus.com >:
>>
>>>...
>>> while (a--) { /* nothing dependant on a */ }
>>> becomes
>>> if (a) do { ... } while (--a);
>>>...
>>
>>Is it really equivalent? Even if `(a == 0)' just before
>>the two lines?
>
>No, good point, there needs to be an `else --a;' added to the
>`if' clause. (Presumably the actual code in the compiler is
>correct, but it's always good to check, as well as make sure
>these email'ed "doclets" are correct as well!)
Sigh. Forget the `else', what is needed is a simple `--a;' after
the entire `if'.
tq vm, (burley)
More information about the Gcc
mailing list