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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac5c3bc59168d76 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Subprogram Renaming Date: 1996/04/11 Message-ID: #1/1 X-Deja-AN: 146975398 references: <316BC3D6.14E7@csehp3.mdc.com> <4kjkg6$4m2@krusty.irvine.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-04-11T00:00:00+00:00 List-Id: In article <4kjkg6$4m2@krusty.irvine.com>, Adam Beneschan wrote: > package q is > procedure j; > end q; > > package body q is > procedure k; > procedure j renames k; > end q; > >Are j'address and k'address equal? Is there anything in the RM that >says one way or the other whether they must be equal? No. The RM does not require them to be equal, nor does it require them to be unequal. >How about j'access and k'access? No, no requirement. In fact, it's worse than that -- the RM does not even require that P'Access = P'Access, for any procedure P. See 4.5.2(13-13.a) and 3.10.2(39). >I can't think of a legitimate reason to compare the two in actual >code, in either case. I'm just curious if the RM says anything about >it, and if this would prevent the compiler from generating code for >"j" that calls "k". The compiler can generate code for j that calls k. It can also generate code for j that just *jumps* to the start of k (so the return instruction in k returns directly to the caller of j). Or, it can generate no code for j, and make calls to j and k call to the same address. - Bob