comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Protected Types and Address Clauses
Date: 1996/02/21
Date: 1996-02-21T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96Feb21135050@spectre.mitre.org> (raw)
In-Reply-To: EACHUS.96Feb19154710@spectre.mitre.org

In article <Dn44po.8ys@thomsoft.com> kst@thomsoft.com (Keith Thompson) writes:

  > Yes, the 'Address attribute is defined for HW_Control; in fact you can
  > refer to HW_Control'Address from within the body of Discretes.Write.
  > That doesn't mean an address *clause* for HW_Control is legal.
  > RM95-13.3(12) says that

  >     Address may be specified for stand-alone objects and for program
  >     units via an attribute_definition_clause.

  > Since HW_Control is not a stand-alone object, an address clause for it
  > is not legal, any more than an address clause is legal for a label or
  > an array element.

    Ah, but an address clause for Discretes should be legal, and in
fact it probably makes the most sense to put such an address clause
inside the protected object declaration.  (You could also put the same
declaration inside a protected type declaration, since at that
location the type name denotes the instance, but having more than one
object of that type at a time should always be erroneous.)

    However, locating the protected object may not be sufficient,
especially since there may be implementation specific data as part of
the object.  Does this mean you have to wrap the protected object in a
record and use a record representation clause?  Ugly, and still no
guarentee.  Best would be for implementations to either specify the
size of the implementation specific header, or to allocate the
implementation specific parts of a protected object after user
specified components.
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1996-02-21  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4fqe6h$t0e@theopolis.orl.mmc.com>
1996-02-19  0:00 ` Protected Types and Address Clauses Robert I. Eachus
1996-02-20  0:00   ` Norman H. Cohen
1996-02-21  0:00     ` Robert Dewar
1996-02-22  0:00       ` Keith Thompson
1996-02-22  0:00         ` Mark A Biggar
1996-02-23  0:00           ` Robert A Duff
1996-02-21  0:00     ` Keith Thompson
1996-02-21  0:00   ` Robert I. Eachus [this message]
     [not found] <DMrJAC.788@thomsoft.com>
1996-02-21  0:00 ` Bob Gilbert
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox