🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1282

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

#1282
From: Stephen Clamage
Date: Fri, 25 May 1990 16:21
15 lines
1227 bytes
In article <Z4O3P:2@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes:
>... [this would mean that]
>the compiler can legally generate any code it likes for anything, so long
>as the semantics match the abstract machine. The compiler is permitted
>to generate any code it likes ...

Yup.  That's exactly what the ANSI standard says.  The standard makes
heavy use of the "as-if" rule for this reason.  It doesn't tell the
compiler implementor how to do the job, only what the result must be.
As in your hyperbolic example, a conforming compiler could send mail
to Dennis Ritchie (or to Bob Hope, for that matter) to get a value for
an expression whose semantics are undefined.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Technical Details
Message-ID: <215@taumet.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!taumet!steve
References: <5876@buengc.BU.EDU> <12955@smoke.BRL.MIL> <5879@buengc.BU.EDU> <Z4O3P:2@xds13.ferranti.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!taumet!steve
From: steve@taumet.COM (Stephen Clamage)
Newsgroups: comp.std.c
Subject: Re: for(;;) vs. while(1) is a draw
Message-ID: <215@taumet.COM>
Date: 25 May 90 16:21:59 GMT
References: <5876@buengc.BU.EDU> <12955@smoke.BRL.MIL> <5879@buengc.BU.EDU> <Z4O3P:2@xds13.ferranti.com>
Reply-To: steve@taumet.UUCP (Stephen Clamage)
Organization: Taumetric Corporation, San Diego
Lines: 15