Annotated Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

J.15.8 Shared Variable Pragmas

Syntax

1/3
{AI05-0229-1} The form for pragmas Atomic, Volatile, Independent, Atomic_Components, and Volatile_Components, and Independent_Components is as follows: 
2/3
  pragma Atomic (local_name);
3/3
  pragma Volatile (local_name);
4/3
{AI05-0009-1}   pragma Independent (component_local_name);
5/3
  pragma Atomic_Components (array_local_name);
6/3
  pragma Volatile_Components (array_local_name);
7/3
{AI05-0009-1}   pragma Independent_Components (local_name);
7.a/3
Discussion: {AI05-0009-1} {AI05-0229-1} Pragmas Independent and Independent_Components are born obsolescent; they are defined to provide consistency with the existing shared variable pragmas. As with all obsolescent features, these pragmas are not optional; all Ada implementations need to implement them. Also note that these pragmas were defined as a Correction; as such, they are expected to be implemented as part of Ada 2005 implementations (and they would not be obsolescent there). 

Name Resolution Rules

8/3
{AI05-0009-1} {AI05-0229-1} The local_name in an Atomic or Volatile pragma shall resolve to denote either an object_declaration, a noninherited component_declaration, or a full_type_declaration. The component_local_name in an Independent pragma shall resolve to denote a noninherited component_declaration. The array_local_name in an Atomic_Components or Volatile_Components pragma shall resolve to denote the declaration of an array type or an array object of an anonymous type. The local_name in an Independent_Components pragma shall resolve to denote the declaration of an array or record type or an array object of an anonymous type. 

Static Semantics

9/3
{AI05-0229-1} These pragmas are representation pragmas (see 13.1). Each of these pragmas specifies that the similarly named aspect (see C.6) of the type, object, or component denoted by its argument is True.

Legality Rules

10/3
{AI05-0229-1} The local_name of each of these pragmas shall denote a declaration that may have the similarly named aspect specified.

Wording Changes from Ada 2005

10.a/3
{AI05-0229-1} {AI05-0299-1} This subclause is new. These pragmas were moved here from C.6; various aspects live there now. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe