for(;;) loop errors (was Re: What does Z["ack"] = 5 mean?)
David Goodenough
dg at lakart.UUCP
Sat Oct 15 08:17:42 AEST 1988
>From article <6945 at cdis-1.uucp>, by tanner at cdis-1.uucp (Dr. T. Andrews):
> In article <4700019 at m.cs.uiuc.edu>, kenny at m.cs.uiuc.edu writes:
> ) ...implementors, notably Encore, have been lax about implementing
> ) integer[pointer] and integer +- pointer. It is unwise to depend on
> ) either form's working in portable code; ...
>
> 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.
> --
> ...!bikini.cis.ufl.edu!ki4pv!cdis-1!tanner ...!bpa!cdin-1!cdis-1!tanner
> or... {allegra killer gatech!uflorida decvax!ucf-cs}!ki4pv!cdis-1!tanner
I agree with Dr. Andrews in part: we use the Greenhills C compiler here,
and it fries it's mind on:
char a;
int i = 2;
a = i["Hello World"];
However I would have thought that any compiler that can't do for loops properly
is gonna die real fast. I personally do not use the a = i["..."]; form
ever, so that is not too much of a problem, but if I have to ditch for loops
I'll go out and buy another compiler.
--
dg at lakart.UUCP - David Goodenough +---+
| +-+-+
....... !harvard!xait!lakart!dg +-+-+ |
AKA: dg%lakart.uucp at harvard.harvard.edu +---+
More information about the Comp.lang.c
mailing list