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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c6acbb9f2027b8c9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: volatile vs aliased Date: Thu, 06 Oct 2005 10:05:38 +0200 Organization: Cablecom Newsserver Message-ID: <1421562.dbAHjS9XJS@linux1.krischik.com> References: <1128525722.605730.281980@g43g2000cwa.googlegroups.com> <87mzlnomca.fsf@ludovic-brenta.org> NNTP-Posting-Host: 80-218-113-178.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1128586515 2989 80.218.113.178 (6 Oct 2005 08:15:15 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Thu, 6 Oct 2005 08:15:15 +0000 (UTC) User-Agent: KNode/0.9.2 Xref: g2news1.google.com comp.lang.ada:5435 Date: 2005-10-06T10:05:38+02:00 List-Id: Ludovic Brenta wrote: > pragma Volatile (Variable) says the compiler must not optimise away > any reads or writes to that variable, and that it may not add extra > reads or writes beyond those you explicitly request in your program > text. You want to use that for hardware registers, where a "read" > operation may have a side effect such as changing the device's state. Interesting! So with pragma Volatile (X) the following two statements are not the same: Y := X * X; Y := X ** 2; Good to know! Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com