For loop bugs? Was Re: What does Z["ack"] = 5 mean?
Knudsen
knudsen at ihlpl.ATT.COM
Sat Oct 15 06:17:48 AEST 1988
In article <6945 at cdis-1.uucp>, tanner at 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."
More information about the Comp.lang.c
mailing list