🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2771

Re: ++i++ in Plain English

#2771
From: Blair P. Houghton
Date: Sat, 20 Apr 1991 01:34
23 lines
1565 bytes
In article <FGTAV-9@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes:
>In article <3845@inews.intel.com> bhoughto@hopi.intel.com (Blair P. Houghton) writes:
>> Yes, you're right, most of it is moot, but remember that
>> the entire operation is permitted to be "discarded" if
>
>	... and if i isn't volatile ...

Nope.  A volatile declaration implies only that a side
effect occurs whenever the variable is named (accessed)
whether you're reading or writing it (i.e., whether it's in
an rvalue or lvalue context).  If the compiler's smart
enough to understand that the "side effect is not needed"
(q.v., somewhere in ANSI X3.159-1989; you can use the rest
of the book to define what "needed" means) and the value is
not used, then the evaluation can be elided.

It'd have to be a pretty dang smart compiler, though...

				--Blair
				  "If you can detect no difference,
				   then there is no difference."
				   - Houghton's Indeterminacy Corollary
				     to Heisenberg's Uncertainty Principle
Technical Details
Message-ID: <3924@inews.intel.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!milton!ogicse!intelhf!ichips!iwarp.intel.com!inews!pima!bhoughto
References: <5ywa15w164w@cellar.UUCP> <3845@inews.intel.com> <FGTAV-9@xds13.ferranti.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!milton!ogicse!intelhf!ichips!iwarp.intel.com!inews!pima!bhoughto
From: bhoughto@pima.intel.com (Blair P. Houghton)
Newsgroups: comp.std.c
Subject: Re: ++i++ in Plain English
Message-ID: <3924@inews.intel.com>
Date: 20 Apr 91 01:34:15 GMT
Article-I.D.: inews.3924
References: <5ywa15w164w@cellar.UUCP> <3845@inews.intel.com> <FGTAV-9@xds13.ferranti.com>
Sender: news@inews.intel.com
Organization: Intel Corp, Chandler, AZ
Lines: 23