comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Handling Addressing Errors
Date: 1999/03/18
Date: 1999-03-18T00:00:00+00:00	[thread overview]
Message-ID: <36F17DAC.E80F01DD@averstar.com> (raw)
In-Reply-To: 1999Mar18.005620.19189@nosc.mil

Charles H. Sampson wrote:
> 
> ... 
>      By my reading, even pragma Volatile doesn't help, because C.6(10)
> only says that all reads are performed directly to memory.  It doesn't
> say that the read must be performed even if it is known that the value
> is not used.  I think it's well beyond the LRM to say that a read of a
> volatile object might have some effect in addition to obtaining its
> value and, therefore, all reads must be performed whether the value is
> needed or not.

Your reading does not conform to the intent of pragma "Volatile."
It is intended to be useful for "active" memory locations, where
a "read" may have a side effect of some sort.  It is also intended
for memory locations where some unknown mechanism is changing the
value.

This is made explicit in RM95 C.6(20) and 1.1.3(13), which indicates
that the "external effect" of a program includes *each*
read and update of a volatile or atomic object.
It is illegal to optimize away an external effect (RM95 1.1.3(15)).

>                                 Charlie

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  parent reply	other threads:[~1999-03-18  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 Handling Addressing Errors Charles H. Sampson
1999-03-04  0:00 ` robert_dewar
1999-03-18  0:00   ` Charles H. Sampson
1999-03-18  0:00     ` Nick Roberts
1999-03-21  0:00       ` robert_dewar
1999-03-18  0:00     ` Tucker Taft [this message]
1999-03-19  0:00       ` Mikko Levanto
1999-03-19  0:00         ` Nick Roberts
1999-03-20  0:00         ` Tucker Taft
1999-04-02  0:00       ` Charles H. Sampson
1999-03-19  0:00     ` robert_dewar
1999-03-04  0:00 ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox