Next: Pragma Extensions_Allowed, Previous: Pragma Export_Valued_Procedure, Up: Implementation Defined Pragmas
pragma Extend_System ([Name =>] IDENTIFIER);
This pragma is used to provide backwards compatibility with other
implementations that extend the facilities of package System
. In
GNAT, System
contains only the definitions that are present in
the Ada RM. However, other implementations, notably the DEC Ada 83
implementation, provide many extensions to package System
.
For each such implementation accommodated by this pragma, GNAT provides a
package Aux_
xxx, e.g. Aux_DEC
for the DEC Ada 83
implementation, which provides the required additional definitions. You
can use this package in two ways. You can with
it in the normal
way and access entities either by selection or using a use
clause. In this case no special processing is required.
However, if existing code contains references such as
System.
xxx where xxx is an entity in the extended
definitions provided in package System
, you may use this pragma
to extend visibility in System
in a non-standard way that
provides greater compatibility with the existing code. Pragma
Extend_System
is a configuration pragma whose single argument is
the name of the package containing the extended definition
(e.g. Aux_DEC
for the DEC Ada case). A unit compiled under
control of this pragma will be processed using special visibility
processing that looks in package System.Aux_
xxx where
Aux_
xxx is the pragma argument for any entity referenced in
package System
, but not found in package System
.
You can use this pragma either to access a predefined System
extension supplied with the compiler, for example Aux_DEC
or
you can construct your own extension unit following the above
definition. Note that such a package is a child of System
and thus is considered part of the implementation.
To compile it you will have to use the -gnatg switch,
or the /GNAT_INTERNAL qualifier on OpenVMS,
for compiling System units, as explained in the
GNAT User's Guide.