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,856114749978634c X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Protected Types and Address Clauses Date: 1996/02/21 Message-ID: #1/1 X-Deja-AN: 140403427 references: <4fqe6h$t0e@theopolis.orl.mmc.com> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-02-21T00:00:00+00:00 List-Id: In article 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...