From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8d2c0ed82daf4da X-Google-Attributes: gid103376,public From: claveman@cod.nosc.mil (Charles H. Sampson) Subject: Re: Handling Addressing Errors Date: 1999/04/02 Message-ID: <1999Apr2.155408.15601@nosc.mil>#1/1 X-Deja-AN: 462070062 Sender: news@nosc.mil References: <1999Mar3.212443.1898@nosc.mil> <7bm0v3$933$1@nnrp1.dejanews.com> <1999Mar18.005620.19189@nosc.mil> <36F17DAC.E80F01DD@averstar.com> Organization: Computer Sciences Corporation Newsgroups: comp.lang.ada Date: 1999-04-02T00:00:00+00:00 List-Id: In article <36F17DAC.E80F01DD@averstar.com>, Tucker Taft 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".