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

Blair P. Houghton bph at buengc.BU.EDU
Fri Jun 1 01:50:37 AEST 1990


In article <:0T3AHF at xds13.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
>In article <5916 at buengc.BU.EDU> bph at buengc.bu.edu (Blair P. Houghton) writes:
>> In article <0:P3-A6 at ggpc2.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
>> >you said the standard requires the compiler generate identical code
>> >for !while(1)! and !for(;;)!.
>
>> I said that a compiler that
>> the implementor claimed to be matching the standard's model
>> of a hypothetical machine would, in fact, generate
>> identical code for !while(1)!  and !for(;;)!.
>
>I'm sorry, but I can't see any significant difference between these two
>statements.

Oh, good.  A paying customer.  This is exactly the sort
of non-comprehension that makes lawyers blithely rich while
being their usual, stupid selves.

Okay; comprehension by parts:

The first statement, "the standard requires the compiler,"
would mean that the compiler would have no choice.  This
is patently false, but can be true for much of the standard
when you assume the existence of an implied condition that
can be stated "if the compiler claims X3.159 conformance";
even so, it does not apply to the portion of the standard
under contention.

The second statement, "a compiler that the implementor
claimed," involves claims by one side in an implied
contract.  These claims then must be supported by the
performance of the product; otherwise, a litigable and/or
criminal situation will ensue.

The difference is that the first statement is false, and the
second statement indicates that the implementor has constrained
his own product, and thus can not be false unless elsewhere
contravened by the implementor's own claims (i.e., don't forget
to read the fine print on the fine print).

>Perhaps you should try turning on your English language optimiser?

What, and deprive you of a heapin' helpin' of my wonderful legalese?

				--Blair
				  "Will that be cash, certified check,
				   or do you just want to run up a tab?"



More information about the Comp.std.c mailing list