Appendix B. Handling of Configuration Pragmas

In Ada 95, configuration pragmas include those pragmas described as being configuration pragmas in the Ada 95 Reference Manual, as well as implementation dependent pragmas that are configuration pragmas. See the individual descriptions of pragmas in the XGC Ada Reference Manual for details on these additional XGC Ada-specific configuration pragmas. Most notably, the pragma Source_File_Reference, which allows specifying non-default names for source files, is a configuration pragma.

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.

B.1. The gnat.adc File

In the case of XGC Ada, 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, and if this file is present, then it is expected to contain one or more configuration pragmas that will be applied to the current compilation.

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, usually more convenient in practice, by direct editing of the gnat.adc file, which is a standard format source file.