From: fjh@cs.mu.oz.au (Fergus Henderson)
Subject: Re: Bug story
Date: 1998/07/25
Date: 1998-07-25T00:00:00+00:00 [thread overview]
Message-ID: <6pcati$8l7$1@mulga.cs.mu.OZ.AU> (raw)
In-Reply-To: 35B60AC4.D703E836@hso.link.com
"Samuel T. Harris" <sam_harris@hso.link.com> writes:
>Dave Sparks wrote:
>>
>> Let me try to summarise the argument to date: it was asserted that
>> a code fragment like { A + 1; } (where the value of the expression
>> is discarded) can be optimised out because the code has no effect;
And indeed this is true, unless `A' was declared `volatile'.
(I presume by the syntax you are talking about C and/or C++.)
>A similar problem involves programming EGA cards.
And again, the solution is similar -- declare the video memory `volatile'.
>Personally,
>this was a common problem for me in the 80's as Ada compilers
>on PC's got better and better.
The solution in Ada is basically the same as in C/C++, with slightly
different syntax: `pragma Volatile' rather than `volatile'.
Well, that's true in Ada 95, at least. I don't know off-hand
whether `pragma Volatile' was present in Ada 83. Perhaps someone
from comp.lang.ada can tell us.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
next parent reply other threads:[~1998-07-25 0:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <35AE4621.2EBC7F6A@eiffel.com>
[not found] ` <7hAr1.3249$9E2.2188373@news.teleport.com>
[not found] ` <35AF70B9.61C5BF88@oma.com>
[not found] ` <N.19980718.jjru@sisyphus.demon.co.uk>
[not found] ` <35B32BDC.5C2C@dmu.ac.uk>
[not found] ` <N.19980720.ulio@sisyphus.demon.co.uk>
[not found] ` <35B47EAD.3AA9@dmu.ac.uk>
[not found] ` <N.19980722.gwka@sisyphus.demon.co.uk>
[not found] ` <35B60AC4.D703E836@hso.link.com>
1998-07-25 0:00 ` Fergus Henderson [this message]
1998-07-29 0:00 ` Bug story Robert I. Eachus
[not found] ` <6p83vj$657$1@news.intellistor.com>
[not found] ` <35B79E7D.6068DCDF@eiffel.com>
[not found] ` <6pg7fg$qhi$1@news.interlog.com>
[not found] ` <901533851.20058.0.nnrp-04.9e980ba3@news.demon.co.uk>
[not found] ` <35be2a94.57352308@netnews.msn.com>
1998-07-28 0:00 ` Why C++ is successful Rakesh Malhotra
1998-07-29 0:00 ` Dave Martin
1998-07-29 0:00 ` Pat Rogers
1998-07-29 0:00 ` Juan Carlos Gil Montoro
1998-07-29 0:00 ` Pat Rogers
1998-07-29 0:00 ` Jay Martin
1998-07-30 0:00 ` dennison
1998-07-30 0:00 ` Ell
1998-07-29 0:00 ` Pat Rogers
1998-07-30 0:00 ` Ell
1998-07-30 0:00 ` Ell
1998-07-29 0:00 ` Larry Elmore
1998-07-30 0:00 ` Jeffrey C. Dege
1998-08-01 0:00 ` Robert Dewar
1998-07-30 0:00 ` Ell
1998-07-29 0:00 ` Brian Rogoff
1998-07-29 0:00 ` Charles Hixson
1998-07-29 0:00 ` falis
1998-07-30 0:00 ` Robert I. Eachus
1998-07-31 0:00 ` Charles Hixson
1998-08-01 0:00 ` Jay Martin
1998-08-02 0:00 ` Robert Dewar
1998-08-01 0:00 ` Jay Martin
1998-08-02 0:00 ` Matthew Heaney
1998-08-02 0:00 ` Jay Martin
1998-08-02 0:00 ` Matthew Heaney
1998-08-02 0:00 ` Matthew Heaney
1998-08-02 0:00 ` Lars Farm
1998-08-02 0:00 ` Matthew Heaney
1998-08-02 0:00 ` Lars Farm
1998-08-10 0:00 ` Robert I. Eachus
1998-07-29 0:00 ` John McCabe
1998-07-29 0:00 ` Jean-Pierre Rosen
1998-07-29 0:00 ` Rakesh Malhotra
1998-07-29 0:00 ` John McCabe
1998-07-29 0:00 ` nabbasi
1998-08-08 0:00 ` Michael Young
1998-07-29 0:00 ` Tom Moran
1998-07-29 0:00 ` Ell
1998-07-29 0:00 ` Tom Moran
1998-07-29 0:00 ` Ell
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox