[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In Ada 95, configuration pragmas include those pragmas described as
such in the Ada 95 Reference Manual, as well as
implementation-dependent pragmas that are configuration pragmas. See the
individual descriptions of pragmas in the GNAT Reference Manual for
details on these additional GNAT-specific configuration pragmas. Most
notably, the pragma Source_File_Name
, which allows
specifying non-default names for source files, is a configuration
pragma. The following is a complete list of configuration pragmas
recognized by GNAT
:
Ada_83 Ada_95 Ada_05 C_Pass_By_Copy Component_Alignment Detect_Blocking Discard_Names Elaboration_Checks Eliminate Extend_System External_Name_Casing Float_Representation Initialize_Scalars License Locking_Policy Long_Float Normalize_Scalars Polling Profile Profile_Warnings Propagate_Exceptions Queuing_Policy Ravenscar Restricted_Run_Time Restrictions Restrictions_Warnings Reviewable Source_File_Name Style_Checks Suppress Task_Dispatching_Policy Universal_Data Unsuppress Use_VADS_Size Warnings Validity_Checks |
9.1 Handling of Configuration Pragmas 9.2 The Configuration Pragmas Files
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Configuration pragmas may either appear at the start of a compilation unit, in which case they apply only to that unit, or they may apply to all compilations performed in a given compilation environment.
GNAT also provides the gnatchop
utility to provide an automatic
way to handle configuration pragmas following the semantics for
compilations (that is, files with multiple units), described in the RM.
See 8.2 Operating gnatchop in Compilation Mode for details.
However, for most purposes, it will be more convenient to edit the
`gnat.adc' file that contains configuration pragmas directly,
as described in the following section.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In GNAT a compilation environment is defined by the current directory at the time that a compile command is given. This current directory is searched for a file whose name is `gnat.adc'. If this file is present, it is expected to contain one or more configuration pragmas that will be applied to the current compilation. However, if the switch `-gnatA' is used, `gnat.adc' is not considered.
Configuration pragmas may be entered into the `gnat.adc' file
either by running gnatchop
on a source file that consists only of
configuration pragmas, or more conveniently by
direct editing of the `gnat.adc' file, which is a standard format
source file.
In addition to `gnat.adc', one additional file containing configuration pragmas may be applied to the current compilation using the switch `-gnatec'path. path must designate an existing file that contains only configuration pragmas. These configuration pragmas are in addition to those found in `gnat.adc' (provided `gnat.adc' is present and switch `-gnatA' is not used).
It is allowed to specify several switches `-gnatec', however only the last one on the command line will be taken into account.
If you are using project file, a separate mechanism is provided using project attributes, see 11.15.1.2 Specifying Configuration Pragmas for more details.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |