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,196864e6c216ca4f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-25 16:40:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3F737D03.6010809@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to Emulate C++ Macro with Static Local Variable? References: <3F722C53.9020808@attbi.com> <5917f4d0.0309250459.59940bc9@posting.google.com> <3F7313BD.2050602@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc53 1064533256 24.34.139.183 (Thu, 25 Sep 2003 23:40:56 GMT) NNTP-Posting-Date: Thu, 25 Sep 2003 23:40:56 GMT Organization: Comcast Online Date: Thu, 25 Sep 2003 23:40:56 GMT Xref: archiver1.google.com comp.lang.ada:42944 Date: 2003-09-25T23:40:56+00:00 List-Id: Randy Brukardt wrote: > That's the idea behind AI-282. As I recall, we decided we didn't like the > original proposal, but Bob and Tuck had a better idea. (Which we're still > waiting for.) I rechecked, and what we are talking about here is not provided in AI-282. I probably want to think about it some more, but it would be a tremendous debugging aid without much cost. This particular attribute would be the address from which the current instance of the enclosing procedure is called: Some_Program'Call_Address. Thinking about it, might as well make it the return address. That is what is on the stack and is always very easy to get. (I would advocate that the attribute should only be usable within the direct scope of the the named procedure. (In other words, we don't want to favor implementations with static links. Or maybe both static link and display implementations can do it fairly easily.) The real use for this is where a subroutine has to do "extra" checking when it is called from user code instead of OS code. It also makes writing some OS utilities marginally easier. -- Robert I. Eachus Ryan gunned down the last of his third white wine and told himself it would all be over in a few minutes. One thing he'd learned from Operation Beatrix: This field work wasn't for him. --from Red Rabbit by Tom Clancy.