comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Ada Address = C pointer ?
Date: Fri, 26 Oct 2001 23:39:39 GMT
Date: 2001-10-26T23:39:39+00:00	[thread overview]
Message-ID: <%umC7.74984$gT6.38373265@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: 3BD9BAC9.C355858E@Raytheon.com

> >   Ada                   C
> >   -----------------------
> >   Address          void *
> >   Address          char *
> >   Null_Address       NULL
> >
>
> In general - compiler specific. Having said that, I'm not aware of any
> implementations where that kind of relationship is not true.
  ARM 13.7(37) gives the implementation advice that "Address should be
of a private type."  So it most assuredly is not guaranteed to be anything
at all.  In Ada compilers allowing segment+offset addressing modes
on Intel CPUs, for instance, System.Address will be 48 bits wide, whereas
a C pointer is probably 32 bits with segment implied.  Use access types,
not System.Address.

> > If they are of the language, where on the ARM it says so?
>
> Actually, I suggest a review of Annex B, section 3 (or B.3). For example,
> at the end of B.3, the Implementation Advice describes the interface
> correspondence that SHOULD (not must) be implemented. I believe GNAT
> follows the implementation advice in this area. I would expect most other
> vendors to do the same.
  B.3(67 .. 71) refer to Ada access types, not to System.Address, and
to parameter passing, where of course the compiler may well do some
implicit conversions.



  reply	other threads:[~2001-10-26 23:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-26 18:53 Ada Address = C pointer ? M. A. Alves
2001-10-26 18:09 ` Lutz Donnerhacke
2001-10-26 21:06   ` Florian Weimer
2001-10-26 19:34 ` Mark Johnson
2001-10-26 23:39   ` tmoran [this message]
2001-10-29 13:07     ` M. A. Alves
2001-10-29 20:19       ` Matthew Heaney
2001-10-29 23:15         ` tmoran
2001-10-30 10:30           ` M. A. Alves
2001-10-30 19:53             ` tmoran
2001-10-31 13:01               ` M. A. Alves
2001-10-31 14:44                 ` Marin David Condic
2001-10-30  9:58         ` M. A. Alves
2001-10-30 12:02           ` Lutz Donnerhacke
2001-10-30 12:53             ` M. A. Alves
2001-10-30 12:56               ` Lutz Donnerhacke
2001-10-30 14:26                 ` M. A. Alves
2001-10-30 14:19               ` Matthew Heaney
2001-10-30 14:41                 ` M. A. Alves
2001-10-30 17:10           ` Mark Johnson
2001-10-30 18:01             ` M. A. Alves
2001-10-30 20:23               ` tmoran
2001-10-31 13:13                 ` M. A. Alves
2001-10-30 19:53           ` tmoran
2001-10-29 23:15       ` tmoran
replies disabled

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