Ada Reference Manual (Ada 2022) — Legal Information

# J.15.8 Shared Variable Pragmas

#### Syntax

1/5
The following pragmas are defined with the given forms:
2/3
pragma Atomic (local_name);
3/3
pragma Volatile (local_name);
4/3
pragma Independent (component_local_name);
5/3
pragma Atomic_Components (array_local_name);
6/3
pragma Volatile_Components (array_local_name);
7/3
pragma Independent_Components (local_name);

#### Name Resolution Rules

8/3
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
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
The local_name of each of these pragmas shall denote a declaration that may have the similarly named aspect specified.

Ada 2005 and 2012 Editions sponsored in part by Ada-Europe