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: Tucker Taft Subject: Re: Handling Addressing Errors Date: 1999/03/18 Message-ID: <36F17DAC.E80F01DD@averstar.com>#1/1 X-Deja-AN: 456268997 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <1999Mar3.212443.1898@nosc.mil> <7bm0v3$933$1@nnrp1.dejanews.com> <1999Mar18.005620.19189@nosc.mil> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-18T00:00:00+00:00 List-Id: 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