Re: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer?
- From: "Randy Brukardt" <randy@xxxxxxxxxxxxxx>
- Date: Mon, 3 Apr 2006 20:23:25 -0500
"Doobs" <doobs@xxxxxxxxx> wrote in message
news:LIednWDbPNgXGbPZRVnysQ@xxxxxxxxxxxx
I was under the impression that code of the following form :
X : <Some Type>;
Y : <Some Type>;
for Y'Address use X'Address;
would result in an overlay in the resulting code.
It does, semantically.
... Although this appearsis
semantially identical to an overlay as far as the progam is concerned it
NOT identical as far as an external observer is concerned. I have a bit
packed record which I wanted to return as an array of longwords to pretty
dumb test equipment. ...
I fail to understand why it would matter. If you have "dumb test equipment",
it clearly knows nothing about Ada. So you are just looking at bare dumps of
information; in that case, why not just use X and forget that Y exists?
Treat Y as an artifact of the program, not a "real* entity. If the equiment
is smart enough to know about Ada type information (or be told about Ada
type information), then it must be smart enough to handle the indirection
here and there should be no problem.
In any case, your requirement is far out of the norm. Your best bet is to
contact the vendor (AdaCore) in this case and get their advice. Yes, that
means paying for support; but this is the kind of requirement that falls
under custom support anyway. (Surely that would be our answer if you asked
us how to make our compiler do this.) Expecting unusual requirements to be
handled for free on important projects is just plain silly.
Randy.
.
- Follow-Ups:
- References:
- Prev by Date: Re: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer?
- Next by Date: Re: Advice on low level file handling.
- Previous by thread: Re: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer?
- Next by thread: Re: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer?
- Index(es):