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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: volatile vs aliased Date: 5 Oct 2005 08:22:02 -0700 Organization: http://groups.google.com Message-ID: <1128525722.605730.281980@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: 192.91.173.36 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1128525727 30696 127.0.0.1 (5 Oct 2005 15:22:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Oct 2005 15:22:07 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=192.91.173.36; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news1.google.com comp.lang.ada:5410 Date: 2005-10-05T08:22:02-07:00 List-Id: I'm converting some code written for Gnat to compile with Apex. The software has bindings to C functions (OS calls). Some of these take System.Address as parameters. Apex complains about the variables used in these calls (via 'Address) because they not volatile or aliased (or imported, exported, etc.). My question is: which should I use? Is there any difference whether a variable is volatile or aliased? I am assuming the compiler is concerned about the variable possibly being changed in the call (which, of course, is true). Is there a way to satisfy the compiler without stopping optimizations of the variable after the call, or do I need to use a second variable to do this?