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-Thread: 103376,a9026b81108642ee X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Tue, 19 Sep 2006 19:42:52 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <382nx7mt637x$.6hjqgb4zxzss.dlg@40tude.net> Subject: Re: Address of an object Date: Tue, 19 Sep 2006 19:43:13 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: <79-dnfeXOsoRE43YnZ2dnUVZ_qydnZ2d@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-sMVJBciNxcvG0HZzqSBWelpw/J9xeOx3DjASlCO/d/2vqbeMb5R3/R21UU5TCudi1Zj/Ux+jPQs1qeh!Esy2N29vKlaM0DOkhLRG10Xil14J2ZWIqpD6r5xwexCoiHravWGASuehFxzLM1dP89GgsX+0aP+0!0kZunFavFKMwVw== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:6678 Date: 2006-09-19T19:43:13-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:n03kqae9v6ah$.hjxa120hu8oq$.dlg@40tude.net... ... > type P is access String; > for P'Storage_Pool use My_Pool; > > procedure Allocate (Pool : My_Pool; Addr : out Storage_Address; ...) is > begin > ... > Addr := A; > end Allocate; > > P := new String'("abc"); > > Then compare A with P.all'Address. They will differ. A = P.all'Address - 8, > I guess. [ It is not yet another bug of GNAT, it is a proper behavior. ARM > explicitly requires this.] For what it's worth, Janus/Ada does this right (currently -- I suppose someday we might change it to match the RM, but it is unlikely -- we'd have to ban address clauses of any object with discontiguous parts, which is silly). I argued against this change to 'Address in Ada 95, but I seem to have been a minority of 1 -- so it's nice to see someone else who cares. Randy.