++i++ in Plain English

Sean Eric Fagan sef at kithrup.COM
Fri Apr 26 03:43:10 AEST 1991


In article <B_WAUIB at xds13.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
>I'd hate to have to write a device driver with that compiler, mate.
>A compiler that sharp can cut you.

That's the exact reason 'volatile' exists.  You, as the programmer, know
whether or not some memory location needs to be accessed, or whether a
spin-loop (gag) needs to be there.

I *like* my compiler to, at times, spend lots of cycles doing loop unrolling
and elimination.  It can be very useful at times.  But, then, you do need
some way of saying "can't touch this," which is what volatile provides, no?

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef at kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.



More information about the Comp.std.c mailing list