comp.lang.ada
 help / color / mirror / Atom feed
From: "REH" <spamjunk@stny.rr.com>
Subject: aliased and parameters
Date: 31 Jul 2006 11:05:16 -0700
Date: 2006-07-31T11:05:16-07:00	[thread overview]
Message-ID: <1154369116.867649.278950@m73g2000cwd.googlegroups.com> (raw)

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




             reply	other threads:[~2006-07-31 18:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-31 18:05 REH [this message]
2006-07-31 18:37 ` aliased and parameters Jeffrey R. Carter
2006-07-31 19:02   ` REH
     [not found]     ` <1154373046.777655.292010@m79g2000cwm.googlegroups.com>
2006-07-31 19:26       ` REH
2006-07-31 19:59         ` REH
2006-07-31 21:52     ` Björn Persson
2006-08-01  0:35       ` REH
2006-08-01  1:31     ` Jeffrey R. Carter
2006-08-01  2:28       ` REH
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox