| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Configuration pragmas include those pragmas described as
such in the Ada Reference Manual, as well as
implementation-dependent pragmas that are configuration pragmas.
See section `Implementation Defined Pragmas' in 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 Ada_2005 Assertion_Policy C_Pass_By_Copy Check_Name Check_Policy Compile_Time_Error Compile_Time_Warning Compiler_Unit Component_Alignment Debug_Policy Detect_Blocking Discard_Names Elaboration_Checks Eliminate Extend_System External_Name_Casing Fast_Math Favor_Top_Level Float_Representation Implicit_Packing Initialize_Scalars Interrupt_State License Locking_Policy Long_Float No_Run_Time No_Strict_Aliasing Normalize_Scalars Optimize_Alignment Persistent_BSS Polling Priority_Specific_Dispatching Profile Profile_Warnings Propagate_Exceptions Queuing_Policy Ravenscar Restricted_Run_Time Restrictions Restrictions_Warnings Reviewable Source_File_Name Source_File_Name_Project Style_Checks Suppress Suppress_Exception_Locations Task_Dispatching_Policy Universal_Data Unsuppress Use_VADS_Size Validity_Checks Warnings Wide_Character_Encoding |
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', additional files 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', all of which 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] | [ ? ] |