This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A new ia32 backend


>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!)

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]