J.15.14 Elaboration Control Pragmas
This subclause defines pragmas that specify aspects
that help control the elaboration order of
library_items.
Syntax
The following
pragmas
are defined with the given forms:
pragma Preelaborate[(
library_unit_name)];
pragma Pure[(
library_unit_name)];
pragma Elaborate_Body[(
library_unit_name)];
Pragmas
Preelaborate, Pure, and Elaborate_Body are library unit pragmas.
Static Semantics
A
pragma
Preelaborate specifies that a library unit is preelaborated, namely that
the Preelaborate aspect (see
10.2.1) of
the library unit is True.
A
pragma
Pure specifies that a library unit is declared pure, namely that the
Pure aspect (see
10.2.1) of the library
unit is True.
A
pragma
Elaborate_Body specifies that a library unit requires a completion, namely
that the Elaborate_Body aspect (see
10.2.1)
of the library unit is True.
Legality Rules
A
pragma
Preelaborable_Initialization specifies that the Preelaborable_Initialization
aspect (see
10.2.1) for a composite type
is True. This pragma shall appear in the visible part of a package or
generic package.
If the pragma appears in the first declaration list
of a
package_specification,
then the
direct_name
shall denote the first subtype of a composite type, and the type shall
be declared immediately within the same package as the pragma. The composite
type shall be one for which the Preelaborable_Initialization aspect can
be directly specified as True. In addition to the places where Legality
Rules normally apply (see
12.3), these rules
also apply in the private part of an instance of a generic unit.
NOTE Pragmas Elaborate and Elaborate_All,
which do not have associated aspects, are found in
10.2.1.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe