comp.lang.ada
 help / color / mirror / Atom feed
* aliased and parameters
@ 2006-07-31 18:05 REH
  2006-07-31 18:37 ` Jeffrey R. Carter
  0 siblings, 1 reply; 9+ messages in thread
From: REH @ 2006-07-31 18:05 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-08-01  2:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-31 18:05 aliased and parameters REH
2006-07-31 18:37 ` 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

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