for(;;) vs. while(1) is a draw

Blair P. Houghton bph at buengc.BU.EDU
Sat May 26 03:54:29 AEST 1990


In article <12986 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>In article <5897 at buengc.BU.EDU> bph at buengc.bu.edu (Blair P. Houghton) writes:
>>1 certainly is "logical", as long as it's a nonzero
>>constant expression in C.
>
>"true" is logical.  "1" has to be explained as a special quirk of C.

As is done long before you get around to presenting `while'
and `for'.

>>You're implying that X3J11 could well have
>>left that sentence entirely out of the standard.
>
>No, I'm not; it was necessary to give meaning to the empty
>conditional clause in the "for" construct.  This says nothing
>about code generation, though.

At least you got that right.

>Note that the standard
>does not address issues of optimization, just requirements for
>conformance.

I never said it did.  I was the one who posted the sentence
where it explicitly abrogates that scope.

>I hope nobody has been
>misled by your misreading of the standard.

How altruistic of you.  Maybe we can get back to braces.

				--Blair
				  "Any compiler that optimizes
				   without my permission can
				   just stay in the box."



More information about the Comp.std.c mailing list