Shared Variables and Protected Types and Pointers
Is your capability/feature request related to a problem?
In 2019, we modified protected types to allow pointers to protected types and composites of protected types.
My intent of the modification is to allow shared variables to be of:
- a protected types or access type to a protected type
- a composite whose subelements are protected types or an access type to a protected type
Hence, if NamePType is a protected type, then my intent is that the following is legal:
type NamePtrType is access NamePType ;
type NameArrayType is array (integer range <>) of NamePtrType ;
type NameArrayPtrType is access NameArrayType ;
shared variable NameArrayPtr : NameArrayPtrType ;
LRM Text says in 6.4.2.4 says:
The variable declaration that includes the reserved word shared is a shared variable declaration. A shared variable declaration declares a shared variable. Shared variables are a subclass of the variable class of objects. The base type of the subtype indication of a shared variable declaration shall be a protected type or a composite type with a subelement of a protected type.
I am concerned that the last sentence needs to be re-written to be:
The base type of the subtype indication of a shared variable declaration shall either be or designate a protected type, or be or designate a composite type whose subelement type either is or designates a protected type.