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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: aliased and parameters Date: 31 Jul 2006 11:05:16 -0700 Organization: http://groups.google.com Message-ID: <1154369116.867649.278950@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: 192.91.173.42 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1154369122 14796 127.0.0.1 (31 Jul 2006 18:05:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 31 Jul 2006 18:05:22 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m73g2000cwd.googlegroups.com; posting-host=192.91.173.42; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news2.google.com comp.lang.ada:6033 Date: 2006-07-31T11:05:16-07:00 List-Id: Is there a way to indicate to the compiler that a parameter should be aliased? Our software has a client/server library build on sockets. This library has API that take parameters of a particular type (i.e., defined headers) and call socket API internally to send/receive the data. For example: procedure Receive(Hdr : out Header_Type) is begin ... recv(socket, Hdr'Address, header_size); ... end; 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? Thanks, REH