comp.lang.ada
 help / color / mirror / Atom feed
From: claveman@cod.nosc.mil (Charles H. Sampson)
Subject: Re: Handling Addressing Errors
Date: 1999/04/02
Date: 1999-04-02T00:00:00+00:00	[thread overview]
Message-ID: <1999Apr2.155408.15601@nosc.mil> (raw)
In-Reply-To: 36F17DAC.E80F01DD@averstar.com

In article <36F17DAC.E80F01DD@averstar.com>,
Tucker Taft  <stt@averstar.com> wrote:
>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.  ...
>
>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)).
>

     Thanks yet again, Tucker.  Those are the kinds of words I was look-
ing for.  That I didn't find them as I "researched" the issue is attrib-
utable to several errors, some of them mine, some not.

     Summarizing this and other responses as they apply to my original 
question, pragma Volatile forces the read of the board, as I had in-
tended.  The address clause alone doesn't, unless you accept the claim 
that all "decent" compilers treat the appearance of an address clause 
for an object as implying that the object is volatile.

				Charlie

P. S.  I know I'm late in following up on this nearly dead thread, but 
my official, government furnished, news reader has been unbelievably 
flaky recently.  Tucker's response, along with six others, only arrived 
yesterday.
--
******

     For an email response, my user name is "sampson" and my host
is "spawar.navy.mil".




  parent reply	other threads:[~1999-04-02  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     ` Tucker Taft
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 [this message]
1999-03-18  0:00     ` Nick Roberts
1999-03-21  0:00       ` robert_dewar
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