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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc7fc1b95198137d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-26 16:39:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Ada Address = C pointer ? References: <3BD9BAC9.C355858E@Raytheon.com> X-Newsreader: Tom's custom newsreader Message-ID: <%umC7.74984$gT6.38373265@news1.rdc1.sfba.home.com> Date: Fri, 26 Oct 2001 23:39:39 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 1004139579 24.7.82.199 (Fri, 26 Oct 2001 16:39:39 PDT) NNTP-Posting-Date: Fri, 26 Oct 2001 16:39:39 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:15287 Date: 2001-10-26T23:39:39+00:00 List-Id: > > 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.