[comp.lang.c] For loop bugs? Was Re: What does Z["ack"] = 5 mean?

knudsen@ihlpl.ATT.COM (Knudsen) (10/15/88)

In article <6945@cdis-1.uucp>, tanner@cdis-1.uucp (Dr. T. Andrews) writes:
> It is also possible that compiler writers will get the "for" loop
> handling wrong.  It is unwise to depend on "for" loops in portable
> code.  Use a "while" loop instead.

Could you elaborate more on what kind of errors are most likely
in compiling for loops?  In testing?  Incrementing?

I for one can't see converting all for's to while's in a piece
of code.  Believe me, I've worked for years with a buggy compiler
and I haven't seen it hose up a for loop yet, other than its usual
problems with testing expr != 0.
-- 
Mike Knudsen  Bell Labs(AT&T)   att!ihlpl!knudsen
"Lawyers are like handguns and nuclear bombs.  Nobody likes them,
but the other guy's got one, so I better get one too."