TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stephen Leake <[log in to unmask]>
Reply To:
Stephen Leake <[log in to unmask]>
Date:
Mon, 20 May 2002 16:40:04 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
"C. Daniel Cooper" <[log in to unmask]> writes:

> > <someone else wrote:>
> >
> > > If you are using GNAT compiler then you may consider the Code_Address
> > attribute instead of Access (see Implementation Defined Attributes in
> > GNAT Reference Manual).
>
> Since I don't have access to the Reference Manual: does 'Code_Address
> meet the two-fold developer expectation, namely: provide the desired
> comparison guarantee, as well as invocation of the subprogram thus
> designated? If so, could it be standardized? At the very least, it
> is an existence proof that the language limitation -could- be removed.

Here's the relevant bit of the manual:

     The `'Code_Address' attribute, which can only be applied to
     subprogram entities, always returns the address of the start of the
     generated code of the specified subprogram, which may or may not be
     the same value as is returned by the corresponding `'Address'
     attribute.

Earlier, it says 'Address can be used to call the subprogram. GNAT
doesn't do shared generics, so they don't have the concerns Randy
does. I guess in Janus Ada, 'Code_Address could be defined to be
useful for subprogram comparison. Better would be a new attribute
'Subprogam_ID.

--
-- Stephe

ATOM RSS1 RSS2