From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: How to Emulate C++ Macro with Static Local Variable?
Date: Thu, 25 Sep 2003 23:40:56 GMT
Date: 2003-09-25T23:40:56+00:00 [thread overview]
Message-ID: <3F737D03.6010809@attbi.com> (raw)
In-Reply-To: vn6bu8nfb08iff@corp.supernews.com
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.
next prev parent reply other threads:[~2003-09-25 23:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-24 22:06 How to Emulate C++ Macro with Static Local Variable? taashlo
2003-09-24 23:44 ` Robert I. Eachus
2003-09-25 3:27 ` Hyman Rosen
2003-09-25 4:53 ` tmoran
2003-09-25 15:57 ` Robert I. Eachus
2003-09-25 19:09 ` tmoran
2003-09-29 14:57 ` taashlo
2003-09-29 18:12 ` Jeffrey Carter
2003-09-29 18:51 ` taashlo
2003-09-30 1:32 ` Jeffrey Carter
2003-09-30 1:54 ` tmoran
2003-09-30 13:02 ` taashlo
2003-09-30 20:25 ` Jeffrey Carter
2003-09-30 2:45 ` Robert I. Eachus
2003-09-30 3:24 ` tmoran
2003-09-25 13:43 ` Stephen Leake
2003-09-25 12:59 ` Tad Ashlock
2003-09-25 16:11 ` Robert I. Eachus
2003-09-25 18:13 ` Randy Brukardt
2003-09-25 23:40 ` Robert I. Eachus [this message]
2003-09-25 11:54 ` Gautier
2003-09-25 16:14 ` Robert I. Eachus
2003-09-25 18:06 ` Tad Ashlock
2003-09-28 8:42 ` Gautier Write-only
2003-09-28 20:06 ` Jeffrey Carter
2003-09-29 2:13 ` Gautier Write-only
2003-09-25 13:41 ` Stephen Leake
2003-09-25 17:23 ` Tad Ashlock
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox