🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1285

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

#1285
From: Blair P. Houghton
Date: Fri, 25 May 1990 17:54
35 lines
1666 bytes
In article <12986@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes:
>In article <5897@buengc.BU.EDU> bph@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."
Technical Details
Message-ID: <5907@buengc.BU.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!buengc!bph
References: <5879@buengc.BU.EDU> <12971@smoke.BRL.MIL> <5897@buengc.BU.EDU> <12986@smoke.BRL.MIL>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!buengc!bph
From: bph@buengc.BU.EDU (Blair P. Houghton)
Newsgroups: comp.std.c
Subject: Re: for(;;) vs. while(1) is a draw
Message-ID: <5907@buengc.BU.EDU>
Date: 25 May 90 17:54:29 GMT
References: <5879@buengc.BU.EDU> <12971@smoke.BRL.MIL> <5897@buengc.BU.EDU> <12986@smoke.BRL.MIL>
Reply-To: bph@buengc.bu.edu (Blair P. Houghton)
Followup-To: comp.std.c
Organization: Boston Univ. Col. of Eng.
Lines: 35