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,386bb25b61f8f5b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s71.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: aliased and parameters References: <1154369116.867649.278950@m73g2000cwd.googlegroups.com> In-Reply-To: <1154369116.867649.278950@m73g2000cwd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.176 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s71 1154371020 12.201.97.176 (Mon, 31 Jul 2006 18:37:00 GMT) NNTP-Posting-Date: Mon, 31 Jul 2006 18:37:00 GMT Date: Mon, 31 Jul 2006 18:37:00 GMT Xref: g2news2.google.com comp.lang.ada:6034 Date: 2006-07-31T18:37:00+00:00 List-Id: REH wrote: > ... > recv(socket, Hdr'Address, header_size); > > The problem is that some Ada95 compiler are so aggressive with > optimization that they may not "see" then Hdr is changed by recv. At > the very less the compiler complains (rightfully so) that Hdr is alised > but not marked as such. But how do enforce that if I cannot define the > parameter as aliased? Should I use an access type instead and convert > it to System.Address, or is there a cleaner way? You should not be using 'Address at all. I don't know the definition of Recv, so I can't say what would be better. If it's an interface to C, you might want an array or a C-compatible access value. Of course, that assumes you can change the library in question. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail 20