1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1996-2004 Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 -- This package contains, for each of the command of the GNAT driver, one
28 -- constant array; each component of this array is a string that defines,
29 -- in coded form as explained below, the conversion of a VMS qualifier of the
30 -- command to the corresponding switch of the GNAT tool corresponding to the
33 -- This package is used by the GNAT driver to invokes the GNAT tools with the
34 -- switches corresponding to the VMS qualifier and by the Project Manager to
35 -- convert VMS qualifiers in project files to their corresponding switch
38 -- This package is also an input to the tool that generates the VMS GNAT
39 -- help information automatically.
41 -- NOTE: the format of this package must follow the following rules, so that
42 -- the VMS GNAT help tool works properly:
44 -- - Each command zone (where the eventual qualifiers are declared must
45 -- begin with a boxed comment of the form:
47 -- ---------------------------------
48 -- -- Switches for GNAT <COMMAND> --
49 -- ---------------------------------
51 -- where <COMMAND> is the name of a GNAT command in capital letters, for
52 -- example BIND, COMPILE, XREF, ...
54 -- - each qualifier declaration must be followed either by
55 -- - a comment starting with "-- NODOC", to indicate that there is
56 -- no documentation for this qualifier, or
57 -- - a contiguous sequence of comments that constitute the
58 -- documentation of the qualifier.
60 -- - each command zone ends with the declaration of the contant array
61 -- for the command, of the form:
63 -- <Command>__Switches : aliased constant Switches :=
71 -- The syntax of a qualifier delaration is as follows:
73 -- SWITCH_STRING ::= "/ command-qualifier-name TRANSLATION"
77 -- | DIRECTORIES_TRANSLATION
79 -- | NO_SPACE_FILE_TRANSL
80 -- | NUMERIC_TRANSLATION
81 -- | STRING_TRANSLATION
82 -- | OPTIONS_TRANSLATION
83 -- | COMMANDS_TRANSLATION
84 -- | ALPHANUMPLUS_TRANSLATION
85 -- | OTHER_TRANSLATION
87 -- DIRECT_TRANSLATION ::= space UNIX_SWITCHES
88 -- DIRECTORIES_TRANSLATION ::= =* UNIX_SWITCH *
89 -- DIRECTORY_TRANSLATION ::= =% UNIX_SWITCH %
90 -- FILE_TRANSLATION ::= =@ UNIX_SWITCH @
91 -- NO_SPACE_FILE_TRANSL ::= =< UNIX_SWITCH >
92 -- NUMERIC_TRANSLATION ::= =# UNIX_SWITCH # | # number #
93 -- STRING_TRANSLATION ::= =" UNIX_SWITCH "
94 -- OPTIONS_TRANSLATION ::= =OPTION {space OPTION}
95 -- COMMANDS_TRANSLATION ::= =? ARGS space command-name
96 -- ALPHANUMPLUS_TRANSLATION ::= =| UNIX_SWITCH |
98 -- UNIX_SWITCHES ::= UNIX_SWITCH {, UNIX_SWITCH}
100 -- UNIX_SWITCH ::= unix-switch-string | !unix-switch-string | `string'
102 -- OPTION ::= option-name space UNIX_SWITCHES
104 -- ARGS ::= -cargs | -bargs | -largs
106 -- Here command-qual is the name of the switch recognized by the GNATCmd.
107 -- This is always given in upper case in the templates, although in the
108 -- actual commands, either upper or lower case is allowed.
110 -- The unix-switch-string always starts with a minus, and has no commas
111 -- or spaces in it. Case is significant in the unix switch string. If a
112 -- unix switch string is preceded by the not sign (!) it means that the
113 -- effect of the corresponding command qualifer is to remove any previous
114 -- occurrence of the given switch in the command line.
116 -- The DIRECTORIES_TRANSLATION format is used where a list of directories
117 -- is given. This possible corresponding formats recognized by GNATCmd are
118 -- as shown by the following example for the case of PATH
121 -- PATH=(direc,direc,direc,direc)
123 -- When more than one directory is present for the DIRECTORIES case, then
124 -- multiple instances of the corresponding unix switch are generated,
125 -- with the file name being substituted for the occurrence of *.
127 -- The FILE_TRANSLATION format is similar except that only a single
128 -- file is allowed, not a list of files, and only one unix switch is
129 -- generated as a result.
131 -- the NO_SPACE_FILE_TRANSL is similar to FILE_TRANSLATION, except that
132 -- no space is inserted between the switch and the file name.
134 -- The NUMERIC_TRANSLATION format is similar to the FILE_TRANSLATION case
135 -- except that the parameter is a decimal integer in the range 0 to 999.
137 -- For the OPTIONS_TRANSLATION case, GNATCmd similarly permits one or
138 -- more options to appear (although only in some cases does the use of
139 -- multiple options make logical sense). For example, taking the
140 -- case of ERRORS for GCC, the following are all allowed:
143 -- /ERRORS=(FULL,VERBOSE)
144 -- /ERRORS=(BRIEF IMMEDIATE)
146 -- If no option is provided (e.g. just /ERRORS is written), then the
147 -- first option in the list is the default option. For /ERRORS this
148 -- is NORMAL, so /ERRORS with no option is equivalent to /ERRORS=NORMAL.
150 -- The COMMANDS_TRANSLATION case is only used for gnatmake, to correspond
151 -- to the use of -cargs, -bargs and -largs (the ARGS string as indicated
152 -- is one of these three possibilities). The name given by COMMAND is the
153 -- corresponding command name to be used to interprete the switches to be
154 -- passed on. Switches of this type set modes, e.g. /COMPILER_QUALIFIERS
155 -- sets the mode so that all subsequent switches, up to another switch
156 -- with COMMANDS_TRANSLATION apply to the corresponding commands issued
157 -- by the make utility. For example
159 -- /COMPILER_QUALIFIERS /LIST /BINDER_QUALIFIERS /MAIN
160 -- /COMPILER_QUALIFIERS /NOLIST /COMPILE_CHECKS=SYNTAX
162 -- Clearly these switches must come at the end of the list of switches
163 -- since all subsequent switches apply to an issued command.
165 -- For the DIRECT_TRANSLATION case, an implicit additional qualifier
166 -- declaration is created by prepending NO to the name of the qualifer,
167 -- and then inverting the sense of the UNIX_SWITCHES string. For example,
168 -- given the qualifier definition:
172 -- An implicit qualifier definition is created:
176 -- In the case where, a ! is already present, inverting the sense of the
177 -- switch means removing it.
180 -- A synonym to shorten the table
182 type String_Ptr is access constant String;
183 -- String pointer type used throughout
185 type Switches is array (Natural range <>) of String_Ptr;
186 -- Type used for array of swtiches
188 type Switches_Ptr is access constant Switches;
190 ----------------------------
191 -- Switches for GNAT BIND --
192 ----------------------------
194 S_Bind_Bind : aliased constant S := "/BIND_FILE=" &
199 -- /BIND_FILE[=bind-file-option]
201 -- Specifies the language of the binder generated file.
203 -- ADA (D) Binder file is Ada.
205 -- C Binder file is 'C'.
207 S_Bind_Build : aliased constant S := "/BUILD_LIBRARY=|" &
209 -- /BUILD_LIBRARY=xxx
211 -- Binds the units for library building. In this case the adainit and
212 -- adafinal procedures are rename to xxxinit and xxxfinal. Implies
215 S_Bind_Current : aliased constant S := "/CURRENT_DIRECTORY " &
217 -- /CURRENT_DIRECTORY (D)
218 -- /NOCURRENT_DIRECTORY
220 -- Look for source, library or object files in the default directory.
222 S_Bind_Debug : aliased constant S := "/DEBUG=" &
237 -- /DEBUG[=debug-level]
240 -- Specify level of debugging information generated for the elaboration
241 -- routine. See corresponding qualifier for GNAT COMPILE.
243 S_Bind_DebugX : aliased constant S := "/NODEBUG " &
245 -- NODOC (see /DEBUG)
247 S_Bind_Elab : aliased constant S := "/ELABORATION_DEPENDENCIES " &
249 -- /ELABORATION_DEPENDENCIES
250 -- /NOELABORATION_DEPENDENCIES (D)
252 -- Output complete list of elaboration-order dependencies, showing the
253 -- reason for each dependency. This output can be rather extensive but may
254 -- be useful in diagnosing problems with elaboration order. The output is
255 -- written to SYS$OUTPUT.
257 S_Bind_Error : aliased constant S := "/ERROR_LIMIT=#" &
261 -- Limit number of detected errors to nnn (1-999999).
263 S_Bind_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
265 -- /EXTERNAL_REFERENCE="name=val"
267 -- Specifies an external reference to the project manager. Useful only if
268 -- /PROJECT_FILE is used.
271 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
273 S_Bind_Force : aliased constant S := "/FORCE_ELAB_FLAGS " &
275 -- /NOFORCE_ELAB_FLAGS (D)
278 -- Force checking of elaboration Flags
280 S_Bind_Help : aliased constant S := "/HELP " &
284 -- Output usage information.
286 S_Bind_Init : aliased constant S := "/INITIALIZE_SCALARS=" &
293 -- /INITIALIZE_SCALARS[=scalar-option]
295 -- Indicate how uninitialized scalar values for which a pragma
296 -- Initialize_Scalars applies should be initialized.
297 -- scalar-option may be one of the following:
299 -- INVALID (D) Initialize with an invalid value.
300 -- LOW Initialize with the lowest valid value of the subtype.
301 -- HIGH Initialize with the highest valid value of the subtype.
303 S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
305 -- /LIBRARY_SEARCH=(direc[,...])
307 -- When looking for library and object files look also in directories
310 S_Bind_Linker : aliased constant S := "/LINKER_OPTION_LIST " &
312 -- /NOLINKER_OPTION_LIST (D)
313 -- /LINKER_OPTION_LIST
315 -- Output linker options to SYS$OUTPUT. Includes library search
316 -- paths, contents of pragmas Ident and Linker_Options, and
317 -- libraries added by GNAT BIND.
319 S_Bind_Main : aliased constant S := "/MAIN " &
323 -- The main program is in Ada.
327 -- The main program is not in Ada.
329 S_Bind_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
336 -- /MESSAGES_PROJECT_FILE[=messages-option]
338 -- Specifies the "verbosity" of the parsing of project files.
339 -- messages-option may be one of the following:
341 -- DEFAULT (D) No messages are output if there is no error or warning.
343 -- MEDIUM A small number of messages are output.
345 -- HIGH A great number of messages are output, most of them not
346 -- being useful for the user.
348 S_Bind_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
352 -- Do not look for sources the in the system default directory.
354 S_Bind_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
358 -- Do not look for library files in the system default directory.
360 S_Bind_No_Time : aliased constant S := "/NO_TIME_STAMP_CHECK " &
362 -- NODOC (see /TIME_STAMP_CHECK)
364 S_Bind_Object : aliased constant S := "/OBJECT_LIST " &
366 -- /NOOBJECT_LIST (D)
369 -- Output full names of all the object files that must be linker to
370 -- provide the Ada component of the program. The output is written to
373 S_Bind_Order : aliased constant S := "/ORDER_OF_ELABORATION " &
375 -- /NOORDER_OF_ELABORATION (D)
376 -- /ORDER_OF_ELABORATION
378 -- Output chosen elaboration order. The output is written to SYS$OUTPUT.
380 S_Bind_Output : aliased constant S := "/OUTPUT=@" &
384 -- File name to use for the program containing the elaboration code.
386 S_Bind_OutputX : aliased constant S := "/NOOUTPUT " &
390 -- Check only. Do not generate the binder output file.
392 -- In this mode the binder performs all error checks but does not generate
395 S_Bind_Pess : aliased constant S := "/PESSIMISTIC_ELABORATION " &
397 -- /PESSIMISTIC_ELABORATION
399 -- Causes the binder to choose a "pessimistic" elaboration order, i.e. one
400 -- which is most likely to cause elaboration order problems. This can be
401 -- useful in testing portable code to make sure that there are no missing
402 -- elaborate pragmas.
404 S_Bind_Project : aliased constant S := "/PROJECT_FILE=<" &
406 -- /PROJECT_FILE=filename
408 -- Specifies the main project file to be used. The project files rooted
409 -- at the main project file will be parsed before the invocation of the
410 -- binder. The source and object directories to be searched will be
411 -- communicated to the binder through logical names ADA_PRJ_INCLUDE_FILE
412 -- and ADA_PRJ_OBJECTS_FILE.
414 S_Bind_Read : aliased constant S := "/READ_SOURCES=" &
421 -- /READ_SOURCES[=(keyword[,...])]
424 -- The following keyword are accepted:
426 -- ALL (D) Require source files to be present. In this mode, the
427 -- binder insists on being able to locate all source files
428 -- that are referenced and checks their consistency. In
429 -- normal mode, if a source file cannot be located it is
430 -- simply ignored. If you specify the ALL keyword, a
431 -- missing source file is an error.
433 -- NONE Exclude source files. In this mode, the binder only
434 -- checks that ALI files are consistent with one another.
435 -- source files are not accessed. The binder runs faster
436 -- in this mode, and there is still a guarantee that the
437 -- resulting program is self-consistent.
439 -- If a source file has been edited since it was last
440 -- compiled and you specify the NONE keyword, the binder
441 -- will not detect that the object file is out of date
442 -- with the source file.
444 -- This is the same as specifying /NOREAD_SOURCES.
446 -- AVAILABLE Check that object files are consistent with one
447 -- another and are consistent with any source files that
450 S_Bind_ReadX : aliased constant S := "/NOREAD_SOURCES " &
452 -- NODOC (see /READ_SOURCES)
454 S_Bind_Rename : aliased constant S := "/RENAME_MAIN=<" &
458 -- Renames the generated main program from main to xxx.
459 -- This is useful in the case of some cross-building environments, where
460 -- the actual main program is separate from the one generated
463 S_Bind_Report : aliased constant S := "/REPORT_ERRORS=" &
470 -- /REPORT_ERRORS[=(keyword[,...])]
476 -- With the DEFAULT keyword (which is not the default when the binder is
477 -- run from GNAT BIND) or the /NOREPORT_ERRORS qualifier, brief error
478 -- messages are generated to SYS$ERROR. If the VERBOSE keyword is
479 -- present, a header is written to SYS$OUTPUT and any error messages are
480 -- directed to SYS$OUTPUT All that is written to SYS$ERROR is a brief
483 -- If the BRIEF keyword is specified, the binder will generate brief error
484 -- messages to SYS$ERROR even if verbose mode is specified. This is
485 -- relevant only when used together with the VERBOSE keyword or /VERBOSE
488 S_Bind_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
490 -- NODOC (see /REPORT_ERRORS)
492 S_Bind_Restr : aliased constant S := "/RESTRICTION_LIST " &
494 -- /NORESTRICTION_LIST (D)
497 -- Generate list of pragma Rerstrictions that could be applied to the
498 -- current unit. This is useful for code audit purposes, and also may be
499 -- used to improve code generation in some cases.
501 S_Bind_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
503 -- /RUNTIME_SYSTEM=xxx
505 -- Binds against an alternate runtime system named xxx or RTS-xxx.
507 S_Bind_Search : aliased constant S := "/SEARCH=*" &
509 -- /SEARCH=(directory[,...])
511 -- When looking for source or object files also look in directories
514 -- This is the same as specifying both /LIBRARY_SEARCH and /SOURCE_SEARCH
517 S_Bind_Shared : aliased constant S := "/SHARED " &
522 -- Link against a shared GNAT run time when available.
524 S_Bind_Slice : aliased constant S := "/TIME_SLICE=#" &
528 -- Set the time slice value to nnn milliseconds. A value of zero means no
529 -- time slicing and also indicates to the tasking run time to match as
530 -- close as possible to the annex D requirements of the RM.
532 S_Bind_Source : aliased constant S := "/SOURCE_SEARCH=*" &
534 -- /SOURCE_SEARCH=(directory[,...])
536 -- When looking for source files also look in directories specified.
538 S_Bind_Static : aliased constant S := "/STATIC " &
543 -- Link against a static GNAT run time.
545 S_Bind_Store : aliased constant S := "/STORE_TRACEBACKS " &
547 -- /STORE_TRACEBACKS (D)
548 -- /NOSTORE_TRACEBACKS
550 -- Store tracebacks in exception occurrences.
551 -- This is the default on VMS, with the zero-cost exception mechanism.
552 -- This qualifier has no impact, except when using the setjmp/longjmp
553 -- exception mechanism, with the GNAT COMPILE qualifier /LONGJMP_SETJMP.
555 S_Bind_Time : aliased constant S := "/TIME_STAMP_CHECK " &
557 -- /TIME_STAMP_CHECK (D)
559 -- Time stamp errors will be treated as errors.
561 -- /NOTIME_STAMP_CHECK
563 -- Ignore time stamp errors. Any time stamp error messages are treated as
564 -- warning messages. This switch essentially disconnects the normal
565 -- consistency checking, and the resulting program may have undefined
566 -- semantics if inconsistent units are present.
568 -- This means that /NOTIME_STAMP_CHECK should be used only in unusual
569 -- situations, with extreme care.
571 S_Bind_Verbose : aliased constant S := "/VERBOSE " &
576 -- Equivalent to /REPORT_ERRORS=VERBOSE.
578 S_Bind_Warn : aliased constant S := "/WARNINGS=" &
585 -- /WARNINGS[=(keyword[,...])]
588 -- The following keywords are supported:
590 -- NORMAL (D) Print warning messages and treat them as warning.
591 -- SUPPRESS Suppress all warning messages (same as /NOWARNINGS).
592 -- ERROR Treat any warning messages as fatal errors
594 S_Bind_WarnX : aliased constant S := "/NOWARNINGS " &
596 -- NODOC (see /WARNINGS)
598 S_Bind_Zero : aliased constant S := "/ZERO_MAIN " &
603 -- Normally the binder checks that the unit name given on the command line
604 -- corresponds to a suitable main subprogram. When /ZERO_MAIN is used,
605 -- a list of ALI files can be given, and the execution of the program
606 -- consists of elaboration of these units in an appropriate order.
608 Bind_Switches : aliased constant Switches :=
609 (S_Bind_Bind 'Access,
610 S_Bind_Build 'Access,
611 S_Bind_Current 'Access,
612 S_Bind_Debug 'Access,
613 S_Bind_DebugX 'Access,
615 S_Bind_Error 'Access,
617 S_Bind_Force 'Access,
620 S_Bind_Library 'Access,
621 S_Bind_Linker 'Access,
624 S_Bind_Nostinc 'Access,
625 S_Bind_Nostlib 'Access,
626 S_Bind_No_Time 'Access,
627 S_Bind_Object 'Access,
628 S_Bind_Order 'Access,
629 S_Bind_Output 'Access,
630 S_Bind_OutputX 'Access,
632 S_Bind_Project 'Access,
634 S_Bind_ReadX 'Access,
635 S_Bind_Rename 'Access,
636 S_Bind_Report 'Access,
637 S_Bind_ReportX 'Access,
638 S_Bind_Restr 'Access,
640 S_Bind_Search 'Access,
641 S_Bind_Shared 'Access,
642 S_Bind_Slice 'Access,
643 S_Bind_Source 'Access,
644 S_Bind_Static 'Access,
645 S_Bind_Store 'Access,
647 S_Bind_Verbose 'Access,
649 S_Bind_WarnX 'Access,
650 S_Bind_Zero 'Access);
652 ----------------------------
653 -- Switches for GNAT CHOP --
654 ----------------------------
656 S_Chop_Comp : aliased constant S := "/COMPILATION " &
658 -- /NOCOMPILATION (D)
661 -- Compilation mode, handle configuration pragmas strictly according to
664 S_Chop_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
666 -- /FILE_NAME_MAX_LENGTH[=nnn]
668 -- Limit generated file names to NNN (default of 8) characters. This is
669 -- useful if the resulting set of files is required to be interoperable
670 -- with systems like MS-DOS which limit the length of file names.
672 S_Chop_Help : aliased constant S := "/HELP " &
677 -- Print usage information.
679 S_Chop_Over : aliased constant S := "/OVERWRITE " &
684 -- Overwrite existing file names. Normally GNAT CHOP regards it as a
685 -- fatal error situation if there is already a file with the same name as
686 -- a file it would otherwise output. The /OVERWRITE qualifier bypasses
687 -- this check, and any such existing files will be silently overwritten.
689 S_Chop_Pres : aliased constant S := "/PRESERVE " &
694 -- Causes the file modification time stamp of the input file to be
695 -- preserved and used for the time stamp of the output file(s). This may
696 -- be useful for preserving coherency of time stamps in an enviroment
697 -- where gnatchop is used as part of a standard build process.
699 S_Chop_Quiet : aliased constant S := "/QUIET " &
704 -- Work quietly, only output warnings and errors.
706 S_Chop_Ref : aliased constant S := "/REFERENCE " &
711 -- Generate "Source_Reference" pragmas. Use this qualifier if the output
712 -- files are regarded as temporary and development is to be done in terms
713 -- of the original unchopped file. The /REFERENCE qualifier causes
714 -- "Source_Reference" pragmas to be inserted into each of the generated
715 -- files to refers back to the original file name and line number. The
716 -- result is that all error messages refer back to the original unchopped
719 -- In addition, the debugging information placed into the object file
720 -- (when the /DEBUG qualifier of GNAT COMPILE or GNAT MAKE is specified)
721 -- also refers back to this original file so that tools like profilers
722 -- and debuggers will give information in terms of the original unchopped
725 S_Chop_Verb : aliased constant S := "/VERBOSE " &
730 -- The version number and copyright notice are output, as well as exact
731 -- copies of the gnat1 commands spawned to obtain the chop control
734 Chop_Switches : aliased constant Switches :=
735 (S_Chop_Comp 'Access,
740 S_Chop_Quiet 'Access,
742 S_Chop_Verb 'Access);
744 -----------------------------
745 -- Switches for GNAT CLEAN --
746 -----------------------------
748 S_Clean_Compil : aliased constant S := "/COMPILER_FILES_ONLY " &
750 -- /NOCOMPILER_FILES_ONLY (D)
751 -- /COMPILER_FILES_ONLY
753 -- Only attempt to delete the files produced by the compiler, not those
754 -- produced by the binder or the linker. The files that are not to be
755 -- deleted are library files, interface copy files, binder generated files
756 -- and executable files.
758 S_Clean_Current : aliased constant S := "/CURRENT_DIRECTORY " &
760 -- /CURRENT_DIRECTORY (D)
762 -- Look for ALI or object files in the directory where GNAT CLEAN was
765 -- /NOCURRENT_DIRECTORY
767 -- Do not look for ALI or object files in the directory where GNAT CLEAN
770 S_Clean_Delete : aliased constant S := "/DELETE " &
774 -- Delete the files that are not read-only.
778 -- Informative-only mode. Do not delete any files. Output the list of the
779 -- files that would have been deleted if this switch was not specified.
781 S_Clean_Dirobj : aliased constant S := "/DIRECTORY_OBJECTS=@" &
783 -- /DIRECTORY_OBJECTS=<file>
785 -- Find the object files and .ALI files in <file>.
786 -- This qualifier is not compatible with /PROJECT_FILE.
788 S_Clean_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
790 -- /EXTERNAL_REFERENCE="name=val"
792 -- Specifies an external reference to the project manager. Useful only if
793 -- /PROJECT_FILE is used.
796 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
798 S_Clean_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
800 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
801 -- /FULL_PATH_IN_BRIEF_MESSAGES
803 -- When using project files, if some errors or warnings are detected
804 -- during parsing and verbose mode is not in effect (no use of qualifier
805 -- /VERBOSE), then error lines start with the full path name of the
806 -- project file, rather than its simple file name.
808 S_Clean_Help : aliased constant S := "/HELP " &
813 -- Output a message explaining the usage of gnatclean.
815 S_Clean_Index : aliased constant S := "/SOURCE_INDEX=#" &
819 -- Specifies the index of the units in the source file
820 -- By default, source files are mono-unit and there is no index
822 S_Clean_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
829 -- /MESSAGES_PROJECT_FILE[=messages-option]
831 -- Specifies the "verbosity" of the parsing of project files.
832 -- messages-option may be one of the following:
834 -- DEFAULT (D) No messages are output if there is no error or warning.
836 -- MEDIUM A small number of messages are output.
838 -- HIGH A great number of messages are output, most of them not
839 -- being useful for the user.
841 S_Clean_Object : aliased constant S := "/OBJECT_SEARCH=*" &
843 -- /OBJECT_SEARCH=(directory,...)
845 -- When searching for library and object files, look in the specified
846 -- directories. The order in which library files are searched is the same
849 S_Clean_Project : aliased constant S := "/PROJECT_FILE=<" &
851 -- /PROJECT_FILE=filename
853 -- Specifies the main project file to be used. The project files rooted
854 -- at the main project file will be parsed before the invocation of the
855 -- compiler. The source and object directories to be searched will be
856 -- communicated to gnatclean through logical names ADA_PRJ_INCLUDE_FILE
857 -- and ADA_PRJ_OBJECTS_FILE.
859 S_Clean_Quiet : aliased constant S := "/QUIET " &
864 -- Quiet output. If there are no error, do not ouuput anything, except in
865 -- verbose mode (qualifier /VERBOSE) or in informative-only mode
866 -- (qualifier /NODELETE).
868 S_Clean_Recurs : aliased constant S := "/RECURSIVE " &
873 -- When a project file is specified (using switch -P), clean all imported
874 -- and extended project files, recursively. If this qualifier is not
875 -- specified, only the files related to the main project file are to be
876 -- deleted. This qualifier has no effect if no project file is specified.
878 S_Clean_Search : aliased constant S := "/SEARCH=*" &
880 -- /SEARCH=(directory,...)
882 -- Equivalent to /OBJECT_SEARCH=(directory,...).
884 S_Clean_Verbose : aliased constant S := "/VERBOSE " &
891 Clean_Switches : aliased constant Switches :=
892 (S_Clean_Compil 'Access,
893 S_Clean_Current'Access,
894 S_Clean_Delete 'Access,
895 S_Clean_Dirobj 'Access,
897 S_Clean_Full 'Access,
898 S_Clean_Help 'Access,
899 S_Clean_Index 'Access,
900 S_Clean_Mess 'Access,
901 S_Clean_Object 'Access,
902 S_Clean_Project'Access,
903 S_Clean_Quiet 'Access,
904 S_Clean_Recurs 'Access,
905 S_Clean_Search 'Access,
906 S_Clean_Verbose'Access);
908 -------------------------------
909 -- Switches for GNAT COMPILE --
910 -------------------------------
912 S_GCC_Ada_83 : aliased constant S := "/83 " &
917 -- Although GNAT is primarily an Ada 95 compiler, it accepts this
918 -- qualifier to specify that an Ada 83 mode program is being compiled. If
919 -- you specify this qualifier, GNAT rejects Ada 95 extensions and applies
920 -- Ada 83 semantics. It is not possible to guarantee this qualifier does
921 -- a perfect job; for example, some subtle tests of pathological cases,
922 -- such as are found in ACVC tests that have been removed from the ACVC
923 -- suite for Ada 95, may not compile correctly. However for practical
924 -- purposes, using this qualifier should ensure that programs that
925 -- compile correctly under the /83 qualifier can be ported reasonably
926 -- easily to an Ada 83 compiler. This is the main use of this qualifier.
928 -- With few exceptions (most notably the need to use "<>" on
929 -- unconstrained generic formal parameters), it is not necessary to use
930 -- this qualifier switch when compiling Ada 83 programs, because, with
931 -- rare and obscure exceptions, Ada 95 is upwardly compatible with Ada
932 -- 83. This means that a correct Ada 83 program is usually also a correct
935 S_GCC_Ada_95 : aliased constant S := "/95 " &
945 S_GCC_Asm : aliased constant S := "/ASM " &
950 -- Use to cause the assembler source file to be generated, using S as the
951 -- filetype, instead of the object file. This may be useful if you need
952 -- to examine the generated assembly code.
954 S_GCC_Checks : aliased constant S := "/CHECKS=" &
956 "-gnato,!-gnatE,!-gnatp " &
970 -- /CHECKS[=(keyword[,...])]
972 -- If you compile with the default options, GNAT will insert many runtime
973 -- checks into the compiled code, including code that performs range
974 -- checking against constraints, but not arithmetic overflow checking for
975 -- integer operations (including division by zero) or checks for access
976 -- before elaboration on subprogram calls. All other runtime checks, as
977 -- required by the Ada 95 Reference Manual, are generated by default.
979 -- You may specify one or more of the following keywords to the /CHECKS
980 -- qualifier to modify this behavior:
982 -- DEFAULT The behavior described above. This is the default
983 -- if the /CHECKS qualifier is not present on the
984 -- command line. Same as /NOCHECKS.
986 -- OVERFLOW Enables overflow checking for integer operations and
987 -- checks for access before elaboration on subprogram
988 -- calls. This causes GNAT to generate slower and larger
989 -- executable programs by adding code to check for both
990 -- overflow and division by zero (resulting in raising
991 -- "Constraint_Error" as required by Ada semantics).
992 -- Similarly, GNAT does not generate elaboration check
993 -- by default, and you must specify this keyword to
996 -- Note that this keyword does not affect the code
997 -- generated for any floating-point operations; it
998 -- applies only to integer operations. For floating-point,
999 -- GNAT has the "Machine_Overflows" attribute set to
1000 -- "False" and the normal mode of operation is to generate
1001 -- IEEE NaN and infinite values on overflow or invalid
1002 -- operations (such as dividing 0.0 by 0.0).
1004 -- ELABORATION Enables dynamic checks for access-before-elaboration
1005 -- on subprogram calls and generic instantiations.
1007 -- ASSERTIONS The pragmas "Assert" and "Debug" normally have no
1008 -- effect and are ignored. This keyword causes "Assert"
1009 -- and "Debug" pragmas to be activated.
1011 -- SUPPRESS_ALL Suppress all runtime checks as though you have "pragma
1012 -- Suppress (all_checks)" in your source. Use this switch
1013 -- to improve the performance of the code at the expense
1014 -- of safety in the presence of invalid data or program
1017 -- DEFAULT Suppress the effect of any option OVERFLOW or
1020 -- FULL (D) Similar to OVERFLOW, but suppress the effect of any
1021 -- option ELABORATION or SUPPRESS_ALL.
1023 -- These keywords only control the default setting of the checks. You
1024 -- may modify them using either "Suppress" (to remove checks) or
1025 -- "Unsuppress" (to add back suppressed checks) pragmas in your program
1028 S_GCC_ChecksX : aliased constant S := "/NOCHECKS " &
1029 "-gnatp,!-gnato,!-gnatE";
1030 -- NODOC (see /CHECKS)
1032 S_GCC_Compres : aliased constant S := "/COMPRESS_NAMES " &
1034 -- /NOCOMPRESS_NAMES (D)
1037 -- Compress debug information and external symbol name table entries.
1038 -- In the generated debugging information, and also in the case of long
1039 -- external names, the compiler uses a compression mechanism if the name
1040 -- is very long. This compression method uses a checksum, and avoids
1041 -- trouble on some operating systems which have difficulty with very long
1044 S_GCC_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
1046 -- /CONFIGURATION_PRAGMAS_FILE=file
1048 -- Specify a configuration pragmas file that need to be taken into account
1050 S_GCC_Current : aliased constant S := "/CURRENT_DIRECTORY " &
1052 -- /CURRENT_DIRECTORY (D)
1053 -- /NOCURRENT_DIRECTORY
1055 -- Look for source files in the default directory.
1057 S_GCC_Data : aliased constant S := "/DATA_PREPROCESSING=<" &
1059 -- /DATA_PREPROCESSING=file_name
1061 -- This qualifier indicates to the compiler the file name (without
1062 -- directory information) of the preprocessor data file to use.
1063 -- The preprocessor data file should be found in the source directories.
1065 -- A preprocessing data file is a text file with significant lines
1066 -- indicating how should be preprocessed either a specific source or all
1067 -- sources not mentioned in other lines. A significant line is a non
1068 -- empty, non comment line. Comments are similar to Ada comments.
1070 -- Each significant line starts with either a literal string or the
1071 -- character '*'. A literal string is the file name (without directory
1072 -- information) of the source to preprocess. A character '*' indicates the
1073 -- preprocessing for all the sources that are not specified explicitly on
1074 -- other lines. It is an error to have two lines with the same file name
1075 -- or two lines starting with the character '*'.
1077 -- After the file name or the character '*', another optional literal
1078 -- string indicating the file name of the definition file to be used for
1079 -- preprocessing. (see 15.3 Form of Definitions File. The definition files
1080 -- are found by the compiler in one of the source directories. In some
1081 -- cases, when compiling a source in a directory other than the current
1082 -- directory, if the definition file is in the current directory, it may
1083 -- be necessary to add the current directory as a source directory through
1084 -- qualifier "/SEARCH=[]", otherwise the compiler would not find the
1087 -- Then, optionally, switches similar to those of gnatprep may be found.
1088 -- Those switches are:
1090 -- -b Causes both preprocessor lines and the lines deleted by
1091 -- preprocessing to be replaced by blank lines, preserving
1092 -- the line number. This switch is always implied;
1093 -- however, if specified after `-c' it cancels the effect
1096 -- -c Causes both preprocessor lines and the lines deleted by
1097 -- preprocessing to be retained as comments marked with
1098 -- the special string "--! ".
1100 -- -Dsymbol=value Define or redefine a symbol, associated with value.
1101 -- A symbol is an Ada identifier, or an Ada reserved word,
1102 -- with the exception of "if", "else", "elsif", "end",
1103 -- "and", "or" and "then". value is either a literal
1104 -- string, an Ada identifier or any Ada reserved word.
1105 -- A symbol declared with this switch replaces a symbol
1106 -- with the same name defined in a definition file.
1108 -- -s Causes a sorted list of symbol names and values to be
1109 -- listed on the standard output file.
1111 -- -u Causes undefined symbols to be treated as having the
1112 -- value FALSE in the context of a preprocessor test.
1113 -- In the absence of this option, an undefined symbol
1114 -- in a #if or #elsif test will be treated as an error.
1116 -- Examples of valid lines in a preprocessor data file:
1118 -- "toto.adb" "prep.def" -u
1119 -- -- preprocess "toto.adb", using definition file "prep.def",
1120 -- -- undefined symbol are False.
1122 -- * -c -DVERSION=V101
1123 -- -- preprocess all other sources without a definition file;
1124 -- -- suppressed lined are commented; symbol VERSION has the value
1127 -- "titi.adb" "prep2.def" -s
1128 -- -- preprocess "titi.adb", using definition file "prep2.def";
1129 -- -- list all symbols with their values.
1131 S_GCC_Debug : aliased constant S := "/DEBUG=" &
1144 -- /DEBUG[=debug-level]
1147 -- Specifies how much debugging information is to be included in
1148 -- the resulting object fie.
1150 -- 'debug-level' is one of the following:
1152 -- SYMBOLS (D) Include both debugger symbol records and traceback
1153 -- in the object file.
1155 -- ALL Include debugger symbol records, traceback plus
1156 -- extra debug information in the object file.
1158 -- NONE Excludes both debugger symbol records and traceback
1159 -- from the object file. Same as /NODEBUG.
1161 -- TRACEBACK Includes only traceback records in the object
1162 -- file. This is the default when /DEBUG is not used.
1164 S_GCC_DebugX : aliased constant S := "/NODEBUG " &
1166 -- NODOC (see /Debug)
1168 S_GCC_Dist : aliased constant S := "/DISTRIBUTION_STUBS=" &
1173 -- /NODISTRIBUTION_STUBS (D)
1174 -- /DISTRIBUTION_STUBS[=dist-opt]
1176 -- 'dist-opt' is either RECEIVER (the default) or SENDER and indicates
1177 -- that stubs for use in distributed programs (see the Distributed
1178 -- Systems Annex of the Ada RM) should be generated.
1180 S_GCC_DistX : aliased constant S := "/NODISTRIBUTION_STUBS " &
1181 "!-gnatzr,!-gnatzc";
1182 -- NODOC (see /DISTRIBUTION_STUBS)
1184 S_GCC_Error : aliased constant S := "/ERROR_LIMIT=#" &
1186 -- /NOERROR_LIMIT (D)
1189 -- NNN is a decimal integer in the range of 1 to 999999 and limits the
1190 -- number of error messages to be generated to that number. Once that
1191 -- number has been reached, the compilation is abandoned.
1192 -- Specifying 999999 is equivalent to /NOERROR_LIMIT.
1194 S_GCC_ErrorX : aliased constant S := "/NOERROR_LIMIT " &
1196 -- NODOC (see /ERROR_LIMIT)
1198 S_GCC_Expand : aliased constant S := "/EXPAND_SOURCE " &
1200 -- /NOEXPAND_SOURCE (D)
1203 -- Produces a listing of the expanded code in Ada source form. For
1204 -- example, all tasking constructs are reduced to appropriate run-time
1207 S_GCC_Extend : aliased constant S := "/EXTENSIONS_ALLOWED " &
1209 -- /NOEXTENSIONS_ALLOWED (D)
1210 -- /EXTENSIONS_ALLOWED
1212 -- GNAT specific language extensions allowed.
1214 S_GCC_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
1216 -- /EXTERNAL_REFERENCE="name=val"
1218 -- Specifies an external reference to the project manager. Useful only if
1219 -- /PROJECT_FILE is used.
1222 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
1224 S_GCC_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
1226 -- /FILE_NAME_MAX_LENGTH=nnn
1228 -- Activates file name "krunching". NNN, a decimal integer in the range
1229 -- 1-999, indicates the maximum allowable length of a file name (not
1230 -- including the ADS or ADB filetype. The default is not to enable file
1233 S_GCC_Force : aliased constant S := "/FORCE_ALI " &
1238 -- In normal operation mode, the .ALI file is not generated if any
1239 -- illegalities are detected in the program. The use of this qualifier
1240 -- forces generation of the .ALI file. This file is marked as being
1241 -- in error, so it cannot be used for binding purposes, but it does
1242 -- contain reasonably complete cross-reference information, and thus may
1243 -- be useful for use by tools (e.g. semantic browing tools or integrated
1244 -- development environments) that are driven from the .ALI file.
1246 S_GCC_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
1248 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
1249 -- /FULL_PATH_IN_BRIEF_MESSAGES
1251 -- When using project files, if some errors or warnings are detected
1252 -- during parsing and verbose mode is not in effect (no use of qualifier
1253 -- /VERBOSE), then error lines start with the full path name of the
1254 -- project file, rather than its simple file name.
1256 S_GCC_Help : aliased constant S := "/HELP " &
1261 -- Output usage information.
1263 S_GCC_Ident : aliased constant S := "/IDENTIFIER_CHARACTER_SET=" &
1286 -- /NOIDENTIFIER_CHARACTER_SET (D)
1287 -- /IDENTIFIER_CHARACTER_SET=char-set
1289 -- Normally GNAT recognizes the Latin-1 character set in source program
1290 -- identifiers, as described in the reference manual. This qualifier
1291 -- causes GNAT to recognize alternate character sets in identifiers.
1292 -- 'char-set' is one of the following strings indicating the character
1295 -- DEFAULT (D) Equivalent to 1, below. Also equivalent to
1296 -- /NOIDENTIFIER_CHARACTER_SET.
1298 -- 1 The basic character set is Latin-1. This character
1299 -- set is defined by ISO standard 8859, part 1. The lower
1300 -- half (character codes 16#00# ... 16#7F#) is identical
1301 -- to standard ASCII coding, but the upper half is used
1302 -- to represent additional characters. This includes
1303 -- extended letters used by European languages, such as
1304 -- the umlaut used in German.
1306 -- You may use any of these extended characters freely
1307 -- in character or string literals. In addition, the
1308 -- extended characters that represent letters can be
1309 -- used in identifiers.
1311 -- 2 Latin-2 letters allowed in identifiers, with uppercase
1312 -- and lowercase equivalence.
1314 -- 3 Latin-3 letters allowed in identifiers, with uppercase
1315 -- and lower case equivalence.
1317 -- 4 Latin-4 letters allowed in identifiers, with uppercase
1318 -- and lower case equivalence.
1320 -- PC IBM PC code page 437. This code page is the normal
1321 -- default for PCs in the U.S. It corresponds to the
1322 -- original IBM PC character set. This set has some, but
1323 -- not all, of the extended Latin-1 letters, but these
1324 -- letters do not have the same encoding as Latin-1. In
1325 -- this mode, these letters are allowed in identifiers
1326 -- with uppercase and lowercase equivalence.
1328 -- PC850 This code page (850) is a modification of 437 extended
1329 -- to include all the Latin-1 letters, but still not with
1330 -- the usual Latin-1 encoding. In this mode, all these
1331 -- letters are allowed in identifiers with uppercase and
1332 -- lower case equivalence.
1334 -- FULL_UPPER Any character in the range 80-FF allowed in
1335 -- identifiers, and all are considered distinct. In
1336 -- other words, there are no uppercase and lower case
1337 -- equivalences in this range.
1339 -- NO_UPPER No upper-half characters in the range 80-FF are
1340 -- allowed in identifiers. This gives Ada 95
1341 -- compatibility for identifier names.
1343 -- WIDE GNAT allows wide character codes to appear in
1344 -- character and string literals, and also optionally
1345 -- in identifiers. See the /WIDE_CHARACTER_ENCODING
1346 -- qualifier for information on encoding formats.
1348 S_GCC_IdentX : aliased constant S := "/NOIDENTIFIER_CHARACTER_SET " &
1350 -- NODOC (see /IDENTIFIER_CHARACTER_SET)
1352 S_GCC_Immed : aliased constant S := "/IMMEDIATE_ERRORS " &
1354 -- /NOIMMEDIATE_ERRORS (D)
1355 -- /IMMEDIATE_ERRORS
1357 -- Causes errors to be displayed as soon as they are encountered, rather
1358 -- than after compilation is terminated. If GNAT terminates prematurely
1359 -- or goes into an infinite loop, the last error message displayed may
1360 -- help to pinpoint the culprit.
1362 S_GCC_Inline : aliased constant S := "/INLINE=" &
1370 -- /INLINE[=keyword]
1372 -- Selects the level of inlining for your program. In the absence of this
1373 -- qualifier, GNAT does not attempt inlining across units and does not
1374 -- need to access the bodies of subprograms for which "pragma Inline" is
1375 -- specified if they are not in the current unit.
1377 -- The supported keywords are as follows:
1379 -- PRAGMA (D) Recognize and process "Inline" pragmas. However,
1380 -- for the inlining to actually occur, optimization
1381 -- must be enabled. This enables inlining across unit
1382 -- boundaries, that is, inlining a call in one unit of
1383 -- a subprogram declared in a with'ed unit. The compiler
1384 -- will access these bodies, creating an extra source
1385 -- dependency for the resulting object file, and where
1386 -- possible, the call will be inlined.
1388 -- This qualifier also turns on full optimization and
1389 -- requests GNAT to try to attempt automatic inlining
1390 -- of small subprograms within a unit.
1392 -- Specifying /OPTIMIZE=NONE will disable the main effect
1393 -- of this qualifier, but you may specify other
1394 -- optimization options, to get either lower
1395 -- (/OPTIMIZE=SOME) or higher (/OPTIMIZE=UNROLL_LOOPS)
1396 -- levels of optimization.
1398 -- FULL Front end inlining. The front end inlining activated
1399 -- by this switch is generally more extensive, and quite
1400 -- often more effective than the standard PRAGMA inlining
1401 -- mode. It will also generate additional dependencies.
1403 -- SUPPRESS Suppresses all inlining, even if other optimization
1404 -- or inlining switches are set.
1406 S_GCC_InlineX : aliased constant S := "/NOINLINE " &
1408 -- NODOC (see /INLINE)
1410 S_GCC_Jumps : aliased constant S := "/LONGJMP_SETJMP " &
1412 -- /NOLONGJMP_SETJMP (D)
1415 -- Causes the longjmp/setjmp approach to be used for exception handling.
1417 -- The default mechanism for OpenVMS is zero cost exceptions. This
1418 -- qualifier can be used to modify this default, but it must be used for
1419 -- all units in the partition, including all run-time library units.
1420 -- One way to achieve this is to use the /ALL_FILES and /FORCE_COMPILE
1422 -- This option is rarely used. One case in which it may be advantageous is
1423 -- in an application where exception raising is common and the overall
1424 -- performance of the application is improved by favoring exception
1427 S_GCC_Length : aliased constant S := "/MAX_LINE_LENGTH=#" &
1429 -- /MAX_LINE_LENGTH=nnn
1431 -- Set maximum line length.
1432 -- The length of lines must not exceed the given value nnn.
1434 S_GCC_List : aliased constant S := "/LIST " &
1439 -- Cause a full listing of the file to be generated.
1441 S_GCC_Mapping : aliased constant S := "/MAPPING_FILE=<" &
1443 -- /MAPPING_FILE=file_name
1445 -- Use mapping file file_name
1447 -- A mapping file is a way to communicate to the compiler two mappings:
1448 -- from unit names to file names (without any directory information) and
1449 -- from file names to path names (with full directory information).
1450 -- These mappings are used by the compiler to short-circuit the path
1453 -- The use of mapping files is not required for correct operation of the
1454 -- compiler, but mapping files can improve efficiency, particularly when
1455 -- sources are read over a slow network connection. In normal operation,
1456 -- you need not be concerned with the format or use of mapping files,
1457 -- and /MAPPING_FILE is not a qualifier that you would use explicitly.
1458 -- It is intended only for use by automatic tools such as GNAT MAKE
1459 -- running under the project file facility. The description here of the
1460 -- format of mapping files is provided for completeness and for possible
1461 -- use by other tools.
1463 -- A mapping file is a sequence of sets of three lines. In each set, the
1464 -- first line is the unit name, in lower case, with "%s" appended for
1465 -- specifications and "%b" appended for bodies; the second line is the
1466 -- file name; and the third line is the path name.
1472 -- /gnat/project1/sources/main.2_ada
1474 -- When qualifier ?MAPPING_FILE is specified, the compiler will create in
1475 -- memory the two mappings from the specified file. If there is any
1476 -- problem (non existent file, truncated file or duplicate entries),
1477 -- no mapping will be created.
1479 -- Several /MAPPING_FILE qualifiers may be specified; however, only the
1480 -- last one on the command line will be taken into account.
1482 -- When using a project file, GNAT MAKE creates a temporary mapping file
1483 -- and communicates it to the compiler using this switch.
1485 S_GCC_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
1492 -- /MESSAGES_PROJECT_FILE[=messages-option]
1494 -- Specifies the "verbosity" of the parsing of project files.
1495 -- messages-option may be one of the following:
1497 -- DEFAULT (D) No messages are output if there is no error or warning.
1499 -- MEDIUM A small number of messages are output.
1501 -- HIGH A great number of messages are output, most of them not
1502 -- being useful for the user.
1504 S_GCC_Noadc : aliased constant S := "/NO_GNAT_ADC " &
1508 -- Cause the compiler to ignore any configuration pragmas file GNAT.ADC
1509 -- in the default directory. Implied by qualifier /PROJECT_FILE.
1510 -- Often used in conjunction with qualifier /CONFIGURATION_PRAGMAS_FILE.
1512 S_GCC_Noload : aliased constant S := "/NOLOAD " &
1516 -- Cause the compiler to operate in semantic check mode with full
1517 -- checking for all illegalities specified in the reference manual, but
1518 -- without generation of any source code (no object or ALI file
1521 -- Since dependent files must be accessed, you must follow the GNAT
1522 -- semantic restrictions on file structuring to operate in this mode:
1524 -- o The needed source files must be accessible.
1525 -- o Each file must contain only one compilation unit.
1526 -- o The file name and unit name must match.
1528 -- The output consists of error messages as appropriate. No object file
1529 -- or ALI file is generated. The checking corresponds exactly to the
1530 -- notion of legality in the Ada reference manual.
1532 -- Any unit can be compiled in semantics-checking-only mode, including
1533 -- units that would not normally be compiled (generic library units,
1534 -- subunits, and specifications where a separate body is present).
1536 S_GCC_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
1540 -- Do not look in the default directory for source files of the runtime.
1542 S_GCC_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
1546 -- Do not look for library files in the system default directory.
1548 S_GCC_Opt : aliased constant S := "/OPTIMIZE=" &
1550 "-O2,!-O0,!-O1,!-O3 " &
1552 "-O0,!-O1,!-O2,!-O3 " &
1554 "-O1,!-O0,!-O2,!-O3 " &
1556 "-O1,!-O0,!-O2,!-O3 " &
1559 "NO_STRICT_ALIASING " &
1560 "-fno-strict-aliasing " &
1562 "-O3,!-O0,!-O1,!-O2";
1564 -- /OPTIMIZE[=(keyword[,...])]
1566 -- Selects the level of optimization for your program. The supported
1567 -- keywords are as follows:
1569 -- ALL (D) Perform most optimizations, including those that
1570 -- may be expensive.
1572 -- NONE Do not do any optimizations. Same as /NOOPTIMIZE.
1574 -- SOME Perform some optimizations, but omit ones that
1575 -- are costly in compilation time.
1577 -- DEVELOPMENT Same as SOME.
1579 -- INLINING Full optimization, and also attempt automatic inlining
1580 -- of small subprograms within a unit
1582 -- UNROLL_LOOPS Try to unroll loops. This keyword may be specified
1583 -- with any keyword above other than NONE. Loop
1584 -- unrolling usually, but not always, improves the
1585 -- performance of programs.
1587 -- NO_STRICT_ALIASING
1588 -- Suppress aliasing analysis. When optimization is
1589 -- enabled (ALL or SOME above), the compiler assumes
1590 -- that pointers do in fact point to legitimate values
1591 -- of the pointer type (allocated from the proper pool).
1592 -- If this assumption is violated, e.g. by the use of
1593 -- unchecked conversion, then it may be necessary to
1594 -- suppress this assumption using this keyword (which
1595 -- may be specified only in conjunction with any
1596 -- keyword above, other than NONE).
1598 S_GCC_OptX : aliased constant S := "/NOOPTIMIZE " &
1599 "-O0,!-O1,!-O2,!-O3";
1600 -- NODOC (see /OPTIMIZE)
1602 S_GCC_Polling : aliased constant S := "/POLLING " &
1607 -- Enable polling. See the description of pragma Polling in the GNAT
1608 -- Reference Manual for full details.
1610 S_GCC_Project : aliased constant S := "/PROJECT_FILE=<" &
1612 -- /PROJECT_FILE=filename
1614 -- Specifies the main project file to be used. The project files rooted
1615 -- at the main project file will be parsed before the invocation of the
1616 -- compiler. The source and object directories to be searched will be
1617 -- communicated to the compiler through logical names
1618 -- ADA_PRJ_INCLUDE_FILE and ADA_PRJ_OBJECTS_FILE.
1620 S_GCC_Psta : aliased constant S := "/PRINT_STANDARD " &
1624 -- cause the compiler to output a representation of package Standard
1625 -- in a form very close to standard Ada. It is not quite possible to
1626 -- do this and remain entirely Standard (since new numeric base types
1627 -- cannot be created in standard Ada), but the output is easily
1628 -- readable to any Ada programmer, and is useful to determine the
1629 -- characteristics of target dependent types in package Standard.
1631 S_GCC_Report : aliased constant S := "/REPORT_ERRORS=" &
1642 -- /NOREPORT_ERRORS (D)
1643 -- /REPORT_ERRORS[=(keyword[,...])]
1645 -- Change the way errors are reported. The following keywords are
1648 -- VERBOSE (D) Verbose mode. Full error output with source lines
1651 -- BRIEF Generate the brief format error messages to
1652 -- SYS$OUTPUT as well as the verbose format message or
1655 -- FULL Normally, the compiler suppresses error messages that
1656 -- are likely to be redundant. This keyword causes all
1657 -- error messages to be generated. One particular effect
1658 -- is for the case of references to undefined variables.
1659 -- If a given variable is referenced several times, the
1660 -- normal format of messages produces one error. With
1661 -- FULL, each undefined reference produces a separate
1664 -- IMMEDIATE Normally, the compiler saves up error messages and
1665 -- generates them at the end of compilation in proper
1666 -- sequence. This keyword causes error messages to be
1667 -- generated as soon as they are detected. The use of
1668 -- IMMEDIATE usually causes error messages to be
1669 -- generated out of sequence. Use it when the compiler
1670 -- blows up due to an internal error. In this case, the
1671 -- error messages may be lost. Sometimes blowups are
1672 -- the result of mishandled error messages, so you may
1673 -- want to run with this keyword to determine whether
1674 -- any error messages were generated.
1676 -- DEFAULT Turn off VERBOSE and BRIEF. Same as /NOREPORT_ERRORS.
1678 S_GCC_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
1680 -- NODOC (see /REPORT_ERRORS)
1682 S_GCC_Repinfo : aliased constant S := "/REPRESENTATION_INFO=" &
1699 -- /NOREPRESENTATION_INFO (D)
1700 -- /REPRESENTATION_INFO[=(keyword[,...])]
1702 -- This qualifier controls output from the compiler of a listing showing
1703 -- representation information for declared types and objects.
1705 -- ARRAYS (D) Size and alignment information is listed for
1706 -- declared array and record types.
1708 -- ARRAYS_FILE Similar to ARRAYS, but the output is to a file
1709 -- with the name 'file_rep' where 'file' is the name
1710 -- of the corresponding source file.
1712 -- NONE no information is output (equivalent to omitting
1713 -- the /REPRESENTATION_INFO qualifiers).
1715 -- OBJECTS Size and alignment information is listed for all
1716 -- declared types and objects.
1718 -- OBJECTS_FILE Similar to OBJECTS, but the output is to a file
1719 -- with the name 'file_rep' where 'file' is the name
1720 -- of the corresponding source file.
1722 -- SYMBOLIC Symbolic expression information for values that
1723 -- are computed at run time for variant records.
1725 -- SYMBOLIC_FILE Similar to SYMBOLIC, but the output is to a file
1726 -- with the name 'file_rep' where 'file' is the name
1727 -- of the corresponding source file.
1729 -- DEFAULT Equivalent to ARRAYS.
1731 S_GCC_RepinfX : aliased constant S := "/NOREPRESENTATION_INFO " &
1733 -- NODOC (see /REPRESENTATION_INFO)
1735 S_GCC_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
1737 -- /RUNTIME_SYSTEM=xxx
1739 -- Build against an alternate runtime system named xxx or RTS-xxx.
1741 S_GCC_Search : aliased constant S := "/SEARCH=*" &
1743 -- /SEARCH=(directory[,...])
1745 -- When looking for source files also look in directories specified.
1747 S_GCC_Style : aliased constant S := "/STYLE_CHECKS=" &
1792 "STANDARD_CASING " &
1794 "ORDERED_SUBPROGRAMS " &
1797 "!-gnatg,!-gnaty* " &
1806 -- /NOSTYLE_CHECKS (D)
1807 -- /STYLE_CHECKS[=(keyword,[...])]
1809 -- Normally, GNAT permits any code layout consistent with the reference
1810 -- manual requirements. This qualifier imposes style checking on the
1811 -- input source code. The following keywords are supported:
1813 -- ALL_BUILTIN (D) Equivalent to the following list of options:
1814 -- 3, ATTRIBUTE, BLANKS, COMMENTS, END, VTABS,
1815 -- HTABS, IF_THEN, KEYWORD, LAYOUT, LINE_LENGTH,
1816 -- PRAGMA, REFERENCES, SPECS, TOKEN.
1818 -- 1 .. 9 Specify indentation level from 1 to 9.
1819 -- The general style of required indentation is as
1820 -- specified by the examples in the Ada Reference
1821 -- Manual. Full line comments must be aligned with
1822 -- the -- starting on a column that is a multiple
1823 -- of the alignment level.
1825 -- ATTRIBUTE Check attribute casing.
1826 -- Attribute names, including the case of keywords
1827 -- such as digits used as attributes names,
1828 -- must be written in mixed case, that is,
1829 -- the initial letter and any letter following an
1830 -- underscore must be uppercase.
1831 -- All other letters must be lowercase.
1833 -- BLANKS Blanks not allowed at statement end.
1834 -- Trailing blanks are not allowed at the end of
1835 -- statements. The purpose of this rule, together
1836 -- with option HTABS (no horizontal tabs), is to
1837 -- enforce a canonical format for the use of
1838 -- blanks to separate source tokens.
1840 -- COMMENTS Check comments.
1841 -- Comments must meet the following set of rules:
1843 -- * The "--" that starts the column must either
1844 -- start in column one, or else at least one
1845 -- blank must precede this sequence.
1847 -- * Comments that follow other tokens on a line
1848 -- must have at least one blank following the
1849 -- "--" at the start of the comment.
1851 -- * Full line comments must have two blanks
1852 -- following the "--" that starts the comment,
1853 -- with the following exceptions.
1855 -- * A line consisting only of the "--"
1856 -- characters, possibly preceded by blanks is
1859 -- * A comment starting with "--x" where x is
1860 -- a special character is permitted. This
1861 -- allows proper processing of the output
1862 -- generated by specialized tools including
1863 -- gnatprep (where --! is used) and the SPARK
1864 -- annnotation language (where --# is used).
1865 -- For the purposes of this rule, a special
1866 -- character is defined as being in one of the
1867 -- ASCII ranges 16#21#..16#2F# or
1870 -- * A line consisting entirely of minus signs,
1871 -- possibly preceded by blanks, is permitted.
1872 -- This allows the construction of box
1873 -- comments where lines of minus signs are
1874 -- used to form the top and bottom of the box.
1876 -- * If a comment starts and ends with "--" is
1877 -- permitted as long as at least one blank
1878 -- follows the initial "--". Together with
1879 -- the preceding rule, this allows the
1880 -- construction of box comments, as shown in
1881 -- the following example:
1884 -- ---------------------------
1885 -- -- This is a box comment --
1886 -- -- with two text lines. --
1887 -- ---------------------------
1889 -- END Check end/exit labels.
1890 -- Optional labels on end statements ending
1891 -- subprograms and on exit statements exiting
1892 -- named loops, are required to be present.
1894 -- GNAT Enforces a set of style conventions that
1895 -- correspond to the style used in the GNAT
1896 -- source code. All compiler units are always
1897 -- compile with this keyword specified.
1899 -- You can find the full documentation for the
1900 -- style conventions imposed by this keyword
1901 -- in the body of the package "Style" in the
1902 -- compiler sources.
1904 -- You should not normally use this keyword.
1905 -- However, you MUST use it for compiling any
1906 -- language-defined unit, or for adding children
1907 -- to any language-defined unit other than
1910 -- HTABS No horizontal tabs.
1911 -- Horizontal tab characters are not permitted in
1912 -- the source text. Together with the BLANKS
1913 -- (no blanks at end of line) option, this
1914 -- enforces a canonical form for the use of blanks
1915 -- to separate source tokens.
1917 -- IF_THEN Check if-then layout.
1918 -- The keyword then must appear either on the
1919 -- same line as the corresponding if, or on a line
1920 -- on its own, lined up under the if with at least
1921 -- one non-blank line in between containing all or
1922 -- part of the condition to be tested.
1924 -- KEYWORD Check keyword casing.
1925 -- All keywords must be in lower case (with the
1926 -- exception of keywords such as digits used as
1927 -- attribute names to which this check does not
1930 -- LAYOUT Check layout.
1931 -- Layout of statement and declaration constructs
1932 -- must follow the recommendations in the Ada
1933 -- Reference Manual, as indicated by the form of
1934 -- the syntax rules. For example an else keyword
1935 -- must be lined up with the corresponding if
1938 -- There are two respects in which the style rule
1939 -- enforced by this check option are more liberal
1940 -- than those in the Ada Reference Manual.
1941 -- First in the case of record declarations,
1942 -- it is permissible to put the record keyword on
1943 -- the same line as the type keyword, and then
1944 -- the end in end record must line up under type.
1945 -- For example, either of the following two
1946 -- layouts is acceptable:
1959 -- Second, in the case of a block statement,
1960 -- a permitted alternative is to put the block
1961 -- label on the same line as the declare or begin
1962 -- keyword, and then line the end keyword up under
1963 -- the block label. For example both the following
1969 -- A : Integer := 3;
1976 -- A : Integer := 3;
1981 -- The same alternative format is allowed for
1982 -- loops. For example, both of the following are
1987 -- Clear : while J < 10 loop
1992 -- while J < 10 loop
1998 -- LINE_LENGTH Check maximum line length.
1999 -- The length of source lines must not exceed 79
2000 -- characters, including any trailing blanks
2001 -- The value of 79 allows convenient display on
2002 -- an 80 character wide device or window, allowing
2003 -- for possible special treatment of 80 character
2006 -- NONE Clear any previously set style checks.
2008 -- ORDERED_SUBPROGRAMS Check order of subprogram bodies.
2009 -- All subprogram bodies in a given scope (e.g.
2010 -- a package body) must be in alphabetical order.
2011 -- The ordering rule uses normal Ada rules for
2012 -- comparing strings, ignoring casing of letters,
2013 -- except that if there is a trailing numeric
2014 -- suffix, then the value of this suffix is used
2015 -- in the ordering (e.g. Junk2 comes before
2018 -- NONE The default behavior. Same as /NOSTYLE_CHECKS.
2020 -- PRAGMA Check pragma casing.
2021 -- Pragma names must be written in mixed case,
2022 -- that is, the initial letter and any letter
2023 -- following an underscore must be uppercase.
2024 -- All other letters must be lowercase.
2026 -- REFERENCES Check references.
2027 -- All identifier references must be cased in the
2028 -- same way as the corresponding declaration.
2029 -- No specific casing style is imposed on
2030 -- identifiers. The only requirement is for
2031 -- consistency of references with declarations.
2033 -- RM_COLUMN_LAYOUT Enforce the layout conventions suggested by
2034 -- the examples and syntax rules of the Ada
2035 -- Language Reference Manual. For example, an
2036 -- "else" must line up with an "if" and code in
2037 -- the "then" and "else" parts must be indented.
2038 -- The compiler considers violations of the
2039 -- layout rules a syntax error if you specify
2042 -- SPECS Check separate specs.
2043 -- Separate declarations ("specs") are required
2044 -- for subprograms (a body is not allowed to serve
2045 -- as its own declaration). The only exception is
2046 -- that parameterless library level procedures are
2047 -- not required to have a separate declaration.
2048 -- This exception covers the most frequent form of
2049 -- main program procedures.
2051 -- STANDARD_CASING Check casing of entities in Standard.
2052 -- Any identifier from Standard must be cased to
2053 -- match the presentation in the Ada Reference
2054 -- Manual (for example, Integer and ASCII.NUL).
2056 -- TOKEN Check token spacing.
2057 -- The following token spacing rules are enforced:
2059 -- * The keywords abs and not must be followed
2062 -- * The token => must be surrounded by spaces.
2064 -- * The token <> must be preceded by a space or
2065 -- a left parenthesis.
2067 -- * Binary operators other than ** must be
2068 -- surrounded by spaces. There is no
2069 -- restriction on the layout of the ** binary
2072 -- * Colon must be surrounded by spaces.
2074 -- * Colon-equal (assignment) must be surrounded
2077 -- * Comma must be the first non-blank character
2078 -- on the line, or be immediately preceded by
2079 -- a non-blank character, and must be followed
2082 -- * If the token preceding a left paren ends
2083 -- with a letter or digit, then a space must
2084 -- separate the two tokens.
2086 -- * A right parenthesis must either be the
2087 -- first non-blank character on a line, or it
2088 -- must be preceded by a non-blank character.
2090 -- * A semicolon must not be preceded by
2091 -- a space, and must not be followed by
2092 -- a non-blank character.
2094 -- * A unary plus or minus may not be followed
2097 -- * A vertical bar must be surrounded by
2100 -- In the above rules, appearing in column one is
2101 -- always permitted, that is, counts as meeting
2102 -- either a requirement for a required preceding
2103 -- space, or as meeting a requirement for no
2106 -- Appearing at the end of a line is also always
2107 -- permitted, that is, counts as meeting either
2108 -- a requirement for a following space,
2109 -- or as meeting a requirement for no following
2112 -- VTABS No form feeds or vertical tabs.
2113 -- Form feeds or vertical tab characters are not
2114 -- permitted in the source text.
2116 S_GCC_StyleX : aliased constant S := "/NOSTYLE_CHECKS " &
2118 -- NODOC (see /STYLE_CHECKS)
2120 S_GCC_Symbol : aliased constant S := "/SYMBOL_PREPROCESSING=" & '"' &
2122 -- /SYMBOL_PREPROCESSING="symbol=value"
2124 -- Define or redefine a preprocessing symbol, associated with value.
2125 -- If "=value" is not specified, then the value of the symbol is True.
2126 -- A symbol is an identifier, following normal Ada (case-insensitive)
2127 -- rules for its syntax, and value is any sequence (including an empty
2128 -- sequence) of characters from the set (letters, digits, period,
2129 -- underline). Ada reserved words may be used as symbols, with the
2130 -- exceptions of "if", "else", "elsif", "end", "and", "or" and "then".
2132 -- A symbol declared with this qualifier on the command line replaces
2133 -- a symbol with the same name either in a definition file or specified
2134 -- with a switch -D in the preprocessor data file.
2136 -- This qualifier is similar to qualifier /ASSOCIATE of
2137 -- GNAT PREPROCESSING.
2139 S_GCC_Syntax : aliased constant S := "/SYNTAX_ONLY " &
2141 -- /NOSYNTAX_ONLY (D)
2144 -- Run GNAT in syntax checking only mode. You can check a series of
2145 -- files in a single command, and can use wild cards to specify such a
2148 -- You may use other qualifiers in conjunction with this qualifier. In
2149 -- particular, /LIST and /REPORT_ERRORS=VERBOSE are useful to control the
2150 -- format of any generated error messages.
2152 -- The output is simply the error messages, if any. No object file or ALI
2153 -- file is generated by a syntax-only compilation. Also, no units other
2154 -- than the one specified are accessed. For example, if a unit "X" with's
2155 -- a unit "Y", compiling unit "X" in syntax check only mode does not
2156 -- access the source file containing unit "Y".
2158 -- Normally, GNAT allows only a single unit in a source file. However,
2159 -- this restriction does not apply in syntax-check-only mode, and it is
2160 -- possible to check a file containing multiple compilation units
2161 -- concatenated together. This is primarily used by the GNAT CHOP
2164 S_GCC_Table : aliased constant S := "/TABLE_MULTIPLIER=#" &
2166 -- /TABLE_MULTIPLIER=nnn
2168 -- All compiler tables start at nnn times usual starting size.
2170 S_GCC_Trace : aliased constant S := "/TRACE_UNITS " &
2175 -- This switch that does for the frontend what /VERBOSE does for the
2176 -- backend. The system prints the name of each unit, either a compilation
2177 -- unit or nested unit, as it is being analyzed.
2179 S_GCC_Tree : aliased constant S := "/TREE_OUTPUT " &
2184 -- Cause GNAT to write the internal tree for a unit to a file (with the
2185 -- filetype ATB for a body or ATS for a spec). This is not normally
2186 -- required, but is used by separate analysis tools. Typically these
2187 -- tools do the necessary compilations automatically, so you should never
2188 -- have to specify this switch in normal operation.
2190 S_GCC_Trys : aliased constant S := "/TRY_SEMANTICS " &
2195 -- In normal operation mode the compiler first parses the program and
2196 -- determines if there are any syntax errors. If there are, appropriate
2197 -- error messages are generated and compilation is immediately
2198 -- terminated. This qualifier tells GNAT to continue with semantic
2199 -- analysis even if syntax errors have been found. This may enable the
2200 -- detection of more errors in a single run. On the other hand, the
2201 -- semantic analyzer is more likely to encounter some internal fatal
2202 -- error when given a syntactically invalid tree.
2204 S_GCC_Units : aliased constant S := "/UNITS_LIST " &
2206 -- /NOUNITS_LIST (D)
2209 -- Print a list of units required by this compilation on SYS$OUTPUT. The
2210 -- listing includes all units on which the unit being compiled depends
2211 -- either directly or indirectly.
2213 S_GCC_Unique : aliased constant S := "/UNIQUE_ERROR_TAG " &
2215 -- /NOUNIQUE_ERROR_TAG (D)
2216 -- /UNIQUE_ERROR_TAG
2218 -- Tag compiler error messages with the string "error: ".
2220 S_GCC_Upcase : aliased constant S := "/UPPERCASE_EXTERNALS " &
2222 -- /NOUPPERCASE_EXTERNALS (D)
2223 -- /UPPERCASE_EXTERNALS
2225 -- Fold default and explicit external names in pragmas Import and Export
2226 -- to uppercase for compatibility with the default behavior of DEC C.
2228 S_GCC_Valid : aliased constant S := "/VALIDITY_CHECKING=" &
2273 -- /VALIDITY_CHECKING[=(keyword,[...])]
2275 -- Control level of validity checking.
2277 -- DEFAULT (D) In this mode checks are made to prevent
2278 -- erroneous behavior in accordance with the RM.
2279 -- Notably extra checks may be needed for case
2280 -- statements and subscripted array assignments.
2282 -- NONE No special checks for invalid values are
2283 -- performed. This means that references to
2284 -- uninitialized variables can cause erroneous
2285 -- behavior from constructs like case statements
2286 -- and subscripted array assignments. In this
2287 -- mode, invalid values can lead to erroneous
2290 -- FULL Every assignment is checked for validity, so
2291 -- that it is impossible to assign invalid values.
2292 -- The RM specifically allows such assignments,
2293 -- but in this mode, invalid values can never be
2294 -- assigned, and an attempt to perform such an
2295 -- assignment immediately raises Constraint_Error.
2296 -- This behavior is allowed (but not required) by
2297 -- the RM. This mode is intended as a debugging aid,
2298 -- and may be useful in helping to track down
2299 -- uninitialized variables. It may be useful to
2300 -- use this in conjunction with the Normalize_Scalars
2301 -- pragma which attempts to initialize with invalid
2302 -- values where possible.
2304 S_GCC_Verbose : aliased constant S := "/VERBOSE " &
2309 -- Show commands generated by the GCC driver. Normally used only for
2310 -- debugging purposes or if you need to be sure what version of the
2311 -- compiler you are executing.
2313 S_GCC_Warn : aliased constant S := "/WARNINGS=" &
2315 "!-gnatws,!-gnatwe " &
2326 "CONSTANT_VARIABLES " &
2328 "NOCONSTANT_VARIABLES " &
2330 "IMPLICIT_DEREFERENCE " &
2332 "NO_IMPLICIT_DEREFERENCE " &
2346 "NOIMPLEMENTATION " &
2348 "INEFFECTIVE_INLINE " &
2350 "NOINEFFECTIVE_INLINE " &
2354 "NOMODIFIED_UNREF " &
2377 "-Wuninitialized " &
2378 "UNREFERENCED_FORMALS " &
2380 "NOUNREFERENCED_FORMALS " &
2382 "UNRECOGNIZED_PRAGMAS " &
2384 "NOUNRECOGNIZED_PRAGMAS " &
2390 "VARIABLES_UNINITIALIZED " &
2392 "NOVARIABLES_UNINITIALIZED " &
2394 "IMPORT_EXPORT_PRAGMAS " &
2396 "NOIMPORT_EXPORT_PRAGMAS " &
2398 "UNCHECKED_CONVERSIONS " &
2400 "NOUNCHECKED_CONVERSIONS " &
2404 -- Suppress the output of all warning messages from the GNAT front end.
2405 -- Note that it does not suppress warnings from the gcc back end.
2407 -- /WARNINGS[=(keyword[,...])]
2409 -- In addition to error messages, corresponding to illegalities as
2410 -- defined in the reference manual, the compiler detects two kinds of
2411 -- warning situations. First, the compiler considers some constructs
2412 -- suspicious and generates a warning message to alert you to a possible
2413 -- error. Second, if the compiler detects a situation that is sure to
2414 -- raise an exception at runtime, it generates a warning message.
2416 -- You may specify the following keywords to change this behavior:
2418 -- DEFAULT (D) The default behavior above.
2420 -- ALL Activate all optional warnings.
2421 -- Activates most optional warning messages,
2422 -- see remaining list in this section for
2423 -- details on optional warning messages that
2424 -- can be individually controlled.
2425 -- The warnings that are not turned on by
2426 -- this option are BIASED_ROUNDING,
2427 -- IMPLICIT_DEREFERENCE, HIDING and
2428 -- ELABORATION. All other optional Ada
2429 -- warnings are turned on.
2431 -- NOALL Suppress all optional errors.
2432 -- Suppresses all optional warning messages
2433 -- that can be activated by option ALL.
2435 -- ALL_GCC Request additional messages from the GCC
2436 -- backend. Most of these are not relevant
2439 -- CONDITIONALS Activate warnings for conditional
2440 -- Expressions used in tests that are known
2441 -- to be True or False at compile time. The
2442 -- default is that such warnings are not
2445 -- NOCONDITIONALS Suppress warnings for conditional
2446 -- expressions used in tests that are known
2447 -- to be True or False at compile time.
2449 -- IMPLICIT_DEREFERENCE Activate warnings on implicit dereferencing.
2450 -- The use of a prefix of an access type in an
2451 -- indexed component, slice, or selected component
2452 -- without an explicit .all will generate
2453 -- a warning. With this warning enabled, access
2454 -- checks occur only at points where an explicit
2455 -- .all appears in the source code (assuming no
2456 -- warnings are generated as a result of this
2457 -- option). The default is that such warnings are
2458 -- not generated. Note that /WARNINGS=ALL does not
2459 -- affect the setting of this warning option.
2461 -- NOIMPLICIT_DEREFERENCE Suppress warnings on implicit dereferencing.
2462 -- in indexed components, slices, and selected
2465 -- ELABORATION Activate warnings on missing pragma
2466 -- Elaborate_All statements. The default is
2467 -- that such warnings are not generated.
2469 -- NOELABORATION Suppress warnings on missing pragma
2470 -- Elaborate_All statements.
2472 -- ERRORS Warning messages are to be treated as errors.
2473 -- The warning string still appears, but the
2474 -- warning messages are counted as errors, and
2475 -- prevent the generation of an object file.
2477 -- HIDING Activate warnings on hiding declarations.
2478 -- A declaration is considered hiding if it is
2479 -- for a non-overloadable entity, and it declares
2480 -- an entity with the same name as some other
2481 -- entity that is directly or use-visible. The
2482 -- default is that such warnings are not
2485 -- NOHIDING Suppress warnings on hiding declarations.
2487 -- IMPLEMENTATION Activate warnings for a with of an internal
2488 -- GNAT implementation unit, defined as any unit
2489 -- from the Ada, Interfaces, GNAT, DEC or
2490 -- System hierarchies that is not documented in
2491 -- either the Ada Reference Manual or the GNAT
2492 -- Programmer's Reference Manual. Such units are
2493 -- intended only for internal implementation
2494 -- purposes and should not be with'ed by user
2495 -- programs. The default is that such warnings
2498 -- NOIMPLEMENTATION Disables warnings for a with of an internal
2499 -- GNAT implementation unit.
2501 -- INEFFECTIVE_INLINE Activate warnings on ineffective pragma Inlines
2502 -- Activates warnings for failure of front end
2503 -- inlining (activated by /INLINE=FULL) to inline
2504 -- a particular call. There are many reasons for
2505 -- not being able to inline a call, including most
2506 -- commonly that the call is too complex to
2507 -- inline. This warning can also be turned on
2508 -- using /INLINE=FULL.
2510 -- NOINEFFECTIVE_INLINE Suppress warnings on ineffective pragma Inlines
2511 -- Suppresses warnings on ineffective pragma
2512 -- Inlines. If the inlining mechanism cannot
2513 -- inline a call, it will simply ignore the
2514 -- request silently.
2516 -- MODIFIED_UNREF Activates warnings for variables that are
2517 -- assigned (using an initialization value or with
2518 -- one or more assignment statements) but whose
2519 -- value is never read. The warning is suppressed
2520 -- for volatile variables and also for variables
2521 -- that are renamings of other variables or for
2522 -- which an address clause is given. This warning
2523 -- can also be turned on using /WARNINGS/OPTIONAL.
2525 -- NOMODIFIED_UNREF Disables warnings for variables that are
2526 -- assigned or initialized, but never read.
2528 -- NORMAL Sets normal warning mode, in which enabled
2529 -- warnings are issued and treated as warnings
2530 -- rather than errors. This is the default mode.
2531 -- It can be used to cancel the effect of an
2532 -- explicit /WARNINGS=SUPPRESS or
2533 -- /WARNINGS=ERRORS. It also cancels the effect
2534 -- of the implicit /WARNINGS=ERRORS that is
2535 -- activated by the use of /STYLE=GNAT.
2537 -- OBSOLESCENT Activates warnings for calls to subprograms
2538 -- marked with pragma Obsolescent and for use of
2539 -- features in Annex J of the Ada Reference
2540 -- Manual. In the case of Annex J, not all
2541 -- features are flagged. In particular use of the
2542 -- renamed packages (like Text_IO), use of package
2543 -- ASCII and use of the attribute 'Constrained are
2544 -- not flagged, since these are very common and
2545 -- would generate many annoying positive warnings.
2546 -- The default is that such warnings are not
2549 -- NOOBSOLESCENT Disables warnings on use of obsolescent
2552 -- OPTIONAL Activate all optional warning messages.
2553 -- See other options under this qualifier
2554 -- for details on optional warning messages
2555 -- that can be individually controlled. The
2556 -- one exception is that /WARNINGS=OPTIONAL
2557 -- doesn't activate warnings for hiding
2558 -- variables (/WARNINGS=HIDING), so if this
2559 -- warning is required it must be explicitly
2562 -- NOOPTIONAL Suppress all optional warning messages.
2563 -- See other options under this qualifier
2564 -- for details on optional warning messages
2565 -- that can be individually controlled.
2567 -- OVERLAYS Activate warnings for possibly unintended
2568 -- initialization effects of defining address
2569 -- clauses that cause one variable to overlap
2570 -- another. The default is that such warnings
2573 -- NOOVERLAYS Suppress warnings on possibly unintended
2574 -- initialization effects of defining address
2575 -- clauses that cause one variable to overlap
2578 -- REDUNDANT Activate warnings for redundant constructs.
2579 -- In particular assignments of a variable to
2580 -- itself, and a type conversion that converts
2581 -- an object to its own type. The default
2582 -- is that such warnings are not generated.
2584 -- NOREDUNDANT Suppress warnings for redundant constructs.
2586 -- SUPPRESS Completely suppresse the output of all warning
2587 -- messages. Same as /NOWARNINGS.
2589 -- UNCHECKED_CONVERSIONS Activates warnings on unchecked conversions.
2590 -- Causes warnings to be generated for
2591 -- unchecked conversions when the two types are
2592 -- known at compile time to have different sizes.
2593 -- The default is that such warnings are
2596 -- NOUNCHECKED_CONVERSIONS Suppress warnings for unchecked conversions.
2598 -- UNINITIALIZED Generate warnings for uninitialized variables.
2599 -- This is a GCC option, not an Ada option.
2600 -- You must also specify the /OPTIMIZE qualifier
2601 -- with a value other than NONE (in other words,
2602 -- this keyword works only if optimization is
2605 -- UNREFERENCED_FORMALS Activate warnings on unreferenced formals.
2606 -- Causes a warning to be generated if a formal
2607 -- parameter is not referenced in the body of
2608 -- the subprogram. This warning can also be turned
2609 -- on using option ALL or UNUSED.
2611 -- NOUNREFERENCED_FORMALS Suppress warnings on unreferenced formals.
2612 -- Suppresses warnings for unreferenced formal
2613 -- parameters. Note that the combination UNUSED
2614 -- followed by NOUNREFERENCED_FORMALS has the
2615 -- effect of warning on unreferenced entities
2616 -- other than subprogram formals.
2618 -- UNUSED Activates warnings to be generated for entities
2619 -- that are defined but not referenced, and for
2620 -- units that are with'ed and not referenced. In
2621 -- the case of packages, a warning is also
2622 -- generated if no entities in the package are
2623 -- referenced. This means that if the package
2624 -- is referenced but the only references are in
2625 -- use clauses or renames declarations, a warning
2626 -- is still generated. A warning is also generated
2627 -- for a generic package that is with'ed but never
2628 -- instantiated. In the case where a package or
2629 -- subprogram body is compiled, and there is a
2630 -- with on the corresponding spec that is only
2631 -- referenced in the body, a warning is also
2632 -- generated, noting that the with can be moved
2633 -- to the body. The default is that such warnings
2634 -- are not generated.
2636 -- NOUNUSED Suppress warnings for unused entities and
2639 -- VARIABLES_UNINITIALIZED Activates warnings on unassigned variables.
2640 -- Causes warnings to be generated when a variable
2641 -- is accessed which may not be properly
2643 -- The default is that such warnings are
2646 -- NOVARIABLES_UNINITIALIZED Suppress warnings for uninitialized
2649 S_GCC_WarnX : aliased constant S := "/NOWARNINGS " &
2651 -- NODOC (see /WARNINGS)
2653 S_GCC_No_Back : aliased constant S := "/NO_BACK_END_WARNINGS " &
2655 -- /NO_BACK_END_WARNINGS
2657 -- Inhibit all warning messages of the GCC back-end.
2659 S_GCC_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" &
2674 -- /NOWIDE_CHARACTER_ENCODING (D)
2675 -- /WIDE_CHARACTER_ENCODING[=encode-type]
2677 -- Specifies the mechanism used to encode wide characters. 'encode-type'
2678 -- is one of the following:
2680 -- BRACKETS (D) A wide character is encoded as ["xxxx"] where XXXX
2681 -- are four hexadecimal digits representing the coding
2682 -- ('Pos value) of the character in type
2683 -- Wide_Character. The hexadecimal digits may use upper
2684 -- or lower case letters.
2686 -- This notation can also be used for upper half
2687 -- Character values using the format ["xx"] where XX is
2688 -- two hexadecimal digits representing the coding ('Pos
2689 -- value) of the character in type Character (or
2690 -- Wide_Character). The hexadecimal digits may use upper
2693 -- NONE No wide characters are allowed. Same
2694 -- as /NOWIDE_CHARCTER_ENCODING.
2696 -- HEX In this encoding, a wide character is represented by
2697 -- the following five character sequence: ESC a b c d
2698 -- Where 'a', 'b', 'c', and 'd' are the four hexadecimal
2699 -- characters (using uppercase letters) of the wide
2700 -- character code. For example, ESC A345 is used to
2701 -- represent the wide character with code 16#A345#. This
2702 -- scheme is compatible with use of the full
2703 -- Wide_Character set.
2705 -- UPPER The wide character with encoding 16#abcd# where the
2706 -- upper bit is on (in other words, "a" is in the range
2707 -- 8-F) is represented as two bytes, 16#ab# and 16#cd#.
2708 -- The second byte may never be a format control
2709 -- character, but is not required to be in the upper
2710 -- half. This method can be also used for shift-JIS or
2711 -- EUC, where the internal coding matches the external
2714 -- SHIFT_JIS A wide character is represented by a two-character
2715 -- sequence, 16#ab# and 16#cd#, with the restrictions
2716 -- described for upper-half encoding as described above.
2717 -- The internal character code is the corresponding JIS
2718 -- character according to the standard algorithm for
2719 -- Shift-JIS conversion. Only characters defined in the
2720 -- JIS code set table can be used with this encoding
2723 -- UTF8 A wide character is represented using
2724 -- UCS Transformation Format 8 (UTF-8) as defined in Annex
2725 -- R of ISO 10646-1/Am.2. Depending on the character
2726 -- value, the representation is a one, two, or three byte
2729 -- 16#0000#-16#007f#: 2#0xxxxxxx#
2730 -- 16#0080#-16#07ff#: 2#110xxxxx# 2#10xxxxxx#
2731 -- 16#0800#-16#ffff#: 2#1110xxxx# 2#10xxxxxx# 2#10xxxxxx#
2733 -- where the xxx bits correspond to the left-padded bits
2734 -- of the the 16-bit character value. Note that all lower
2735 -- half ASCII characters are represented as ASCII bytes
2736 -- and all upper half characters and other wide characters
2737 -- are represented as sequences of upper-half (The full
2738 -- UTF-8 scheme allows for encoding 31-bit characters as
2739 -- 6-byte sequences, but in this implementation, all UTF-8
2740 -- sequences of four or more bytes length will be treated
2743 -- EUC A wide character is represented by a two-character
2744 -- sequence 16#ab# and 16#cd#, with both characters being
2745 -- in the upper half. The internal character code is the
2746 -- corresponding JIS character according to the EUC
2747 -- encoding algorithm. Only characters defined in the JIS
2748 -- code set table can be used with this encoding method.
2750 S_GCC_WideX : aliased constant S := "/NOWIDE_CHARACTER_ENCODING " &
2752 -- NODOC (see /WIDE_CHARACTER_ENCODING)
2754 S_GCC_Xdebug : aliased constant S := "/XDEBUG " &
2759 -- Output expanded source files for source level debugging.
2760 -- The expanded source (see /EXPAND_SOURCE) is written to files
2761 -- with names formed by appending "_DG" to the input file name,
2762 -- The debugging information generated by the /DEBUG qualifier will then
2763 -- refer to the generated file. This allows source level debugging using
2764 -- the generated code which is sometimes useful for complex code, for
2765 -- example to find out exactly which part of a complex construction
2766 -- raised an exception.
2768 S_GCC_Xref : aliased constant S := "/XREF=" &
2775 -- Normally the compiler generates full cross-referencing information in
2776 -- the .ALI file. This information is used by a number of tools,
2777 -- including GNAT FIND and GNAT XREF.
2779 -- GENERATE (D) Generate cross-referencing information.
2781 -- SUPPRESS Suppress cross-referencing information.
2782 -- This saves some space and may slightly
2783 -- speed up compilation, but means that some
2784 -- tools cannot be used.
2786 S_GCC_Zero : aliased constant S := "/ZERO_COST_EXCEPTIONS " &
2788 -- /ZERO_COST_EXCEPTIONS
2789 -- /NOZERO_COST_EXCEPTIONS
2791 -- As zero-cost exceptions is the default on VMS, this qualifier has
2792 -- no effect, except that it cancels the effect of a previous
2793 -- /LONGJMP_SETJUMP qualifier.
2795 GCC_Switches : aliased constant Switches :=
2796 (S_GCC_Ada_83 'Access,
2797 S_GCC_Ada_95 'Access,
2799 S_GCC_Checks 'Access,
2800 S_GCC_ChecksX 'Access,
2801 S_GCC_Compres 'Access,
2802 S_GCC_Config 'Access,
2803 S_GCC_Current 'Access,
2804 S_GCC_Debug 'Access,
2805 S_GCC_DebugX 'Access,
2808 S_GCC_DistX 'Access,
2809 S_GCC_Error 'Access,
2810 S_GCC_ErrorX 'Access,
2811 S_GCC_Expand 'Access,
2812 S_GCC_Extend 'Access,
2815 S_GCC_Force 'Access,
2818 S_GCC_Ident 'Access,
2819 S_GCC_IdentX 'Access,
2820 S_GCC_Immed 'Access,
2821 S_GCC_Inline 'Access,
2822 S_GCC_InlineX 'Access,
2823 S_GCC_Jumps 'Access,
2824 S_GCC_Length 'Access,
2826 S_GCC_Mapping 'Access,
2828 S_GCC_Noadc 'Access,
2829 S_GCC_Noload 'Access,
2830 S_GCC_Nostinc 'Access,
2831 S_GCC_Nostlib 'Access,
2834 S_GCC_Polling 'Access,
2835 S_GCC_Project 'Access,
2837 S_GCC_Report 'Access,
2838 S_GCC_ReportX 'Access,
2839 S_GCC_Repinfo 'Access,
2840 S_GCC_RepinfX 'Access,
2842 S_GCC_Search 'Access,
2843 S_GCC_Style 'Access,
2844 S_GCC_StyleX 'Access,
2845 S_GCC_Symbol 'Access,
2846 S_GCC_Syntax 'Access,
2847 S_GCC_Table 'Access,
2848 S_GCC_Trace 'Access,
2851 S_GCC_Units 'Access,
2852 S_GCC_Unique 'Access,
2853 S_GCC_Upcase 'Access,
2854 S_GCC_Valid 'Access,
2855 S_GCC_Verbose 'Access,
2857 S_GCC_WarnX 'Access,
2859 S_GCC_WideX 'Access,
2860 S_GCC_No_Back 'Access,
2861 S_GCC_Xdebug 'Access,
2863 S_GCC_Zero 'Access);
2865 ----------------------------
2866 -- Switches for GNAT ELIM --
2867 ----------------------------
2869 S_Elim_All : aliased constant S := "/ALL " &
2874 -- Also look for subprograms from the GNAT run time that can be
2875 -- eliminated. Note that when 'gnat.adc' is produced using this switch,
2876 -- the entire program must be recompiled with qualifier /ALL_FILES of
2879 S_Elim_Bind : aliased constant S := "/BIND_FILE=<" &
2881 -- /BIND_FILE=file_name
2883 -- Specifies file_name as the bind file to process. If this qualifier is
2884 -- not used, the name of the bind file is computed from the full expanded
2885 -- Ada name of a main subprogram.
2887 S_Elim_Comp : aliased constant S := "/COMPILER=@" &
2889 -- /COMPILER=path_name
2891 -- Instructs GNAT ELIM to use a specific gcc compiler instead of one
2892 -- available on the path.
2894 S_Elim_Config : aliased constant S := "/CONFIGURATION_PRAGMAS=<" &
2896 -- /CONFIGURATION_PRAGMAS=path_name
2898 -- Specifies a file that contains configuration pragmas.
2899 -- The file must be specified with absolute path.
2901 S_Elim_Current : aliased constant S := "/CURRENT_DIRECTORY " &
2903 -- /CURRENT_DIRECTORY (D)
2904 -- /NOCURRENT_DIRECTORY
2906 -- Look for source files in the default directory.
2908 S_Elim_GNATMAKE : aliased constant S := "/GNATMAKE=@" &
2910 -- /GNATMAKE=path_name
2912 -- Instructs GNAT MAKE to use a specific gnatmake instead of one available
2915 S_Elim_Quiet : aliased constant S := "/QUIET " &
2920 -- Quiet mode: by default GNAT ELIM outputs to the standard error stream
2921 -- the number of program units left to be processed. This option turns
2924 S_Elim_Search : aliased constant S := "/SEARCH=*" &
2926 -- /SEARCH=(directory, ...)
2928 -- When looking for source files also look in the specified directories.
2930 S_Elim_Verb : aliased constant S := "/VERBOSE " &
2935 -- Verbose mode: GNAT ELIM version information is output as Ada comments
2936 -- to the standard output stream. Also, in addition to the number of
2937 -- program units left, GNAT ELIM will output the name of the current unit
2940 Elim_Switches : aliased constant Switches :=
2941 (S_Elim_All 'Access,
2942 S_Elim_Bind 'Access,
2943 S_Elim_Comp 'Access,
2944 S_Elim_Config 'Access,
2945 S_Elim_Current 'Access,
2946 S_Elim_GNATMAKE'Access,
2947 S_Elim_Quiet 'Access,
2948 S_Elim_Search 'Access,
2949 S_Elim_Verb 'Access);
2951 ----------------------------
2952 -- Switches for GNAT FIND --
2953 ----------------------------
2955 S_Find_All : aliased constant S := "/ALL_FILES " &
2960 -- If this switch is present, FIND and XREF will parse the read-only
2961 -- files found in the library search path. Otherwise, these files will
2962 -- be ignored. This option can be used to protect Gnat sources or your
2963 -- own libraries from being parsed, thus making FIND and XREF much
2964 -- faster, and their output much smaller.
2966 S_Find_Deriv : aliased constant S := "/DERIVED_TYPE_INFORMATION " &
2968 -- /NODERIVED_TYPE_INFORMATION (D)
2969 -- /DERIVED_TYPE_INFORMATION
2971 -- Output the parent type reference for each matching derived types.
2973 S_Find_Expr : aliased constant S := "/EXPRESSIONS " &
2975 -- /NOEXPRESSIONS (D)
2978 -- By default, FIND accepts the simple regular expression set for pattern.
2979 -- If this switch is set, then the pattern will be considered as a full
2980 -- Unix-style regular expression.
2982 S_Find_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
2984 -- /EXTERNAL_REFERENCE="name=val"
2986 -- Specifies an external reference to the project manager. Useful only if
2987 -- /PROJECT_FILE is used.
2990 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
2992 S_Find_Full : aliased constant S := "/FULL_PATHNAME " &
2994 -- /NOFULL_PATHNAME (D)
2997 -- If this switch is set, the output file names will be preceded by their
2998 -- directory (if the file was found in the search path). If this switch
2999 -- is not set, the directory will not be printed.
3001 S_Find_Ignore : aliased constant S := "/IGNORE_LOCALS " &
3003 -- /NOIGNORE_LOCALS (D)
3006 -- If this switch is set, information is output only for library-level
3007 -- entities, ignoring local entities. The use of this switch may
3008 -- accelerate FIND and XREF.
3010 S_Find_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3017 -- /MESSAGES_PROJECT_FILE[=messages-option]
3019 -- Specifies the "verbosity" of the parsing of project files.
3020 -- messages-option may be one of the following:
3022 -- DEFAULT (D) No messages are output if there is no error or warning.
3024 -- MEDIUM A small number of messages are output.
3026 -- HIGH A great number of messages are output, most of them not
3027 -- being useful for the user.
3029 S_Find_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
3033 -- Do not look for sources in the system default directory.
3035 S_Find_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
3039 -- Do not look for library files in the system default directory.
3041 S_Find_Object : aliased constant S := "/OBJECT_SEARCH=*" &
3043 -- /OBJECT_SEARCH=(directory,...)
3045 -- When searching for library and object files, look in the specified
3046 -- directories. The order in which library files are searched is the same
3049 S_Find_Print : aliased constant S := "/PRINT_LINES " &
3051 -- /NOPRINT_LINES (D)
3054 -- Output the content of the Ada source file lines were the entity was
3057 S_Find_Project : aliased constant S := "/PROJECT=@" &
3061 -- Specify a project file to use. By default, FIND and XREF will try to
3062 -- locate a project file in the current directory.
3064 -- If a project file is either specified or found by the tools, then the
3065 -- content of the source directory and object directory lines are added
3066 -- as if they had been specified respectively by /SOURCE_SEARCH and
3069 -- This qualifier is not compatible with /PROJECT_FILE
3071 S_Find_Prj : aliased constant S := "/PROJECT_FILE=<" &
3073 -- /PROJECT_FILE=filename
3075 -- Specifies the main project file to be used. The project files rooted
3076 -- at the main project file will be parsed before looking for sources.
3077 -- The source and object directories to be searched will be communicated
3078 -- to gnatfind through logical names ADA_PRJ_INCLUDE_FILE and
3079 -- ADA_PRJ_OBJECTS_FILE.
3081 S_Find_Ref : aliased constant S := "/REFERENCES " &
3083 -- /NOREFERENCES (D)
3086 -- By default, FIND will output only the information about the
3087 -- declaration, body or type completion of the entities. If this switch
3088 -- is set, the FIND will locate every reference to the entities in the
3089 -- files specified on the command line (or in every file in the search
3090 -- path if no file is given on the command line).
3092 S_Find_Search : aliased constant S := "/SEARCH=*" &
3094 -- /SEARCH=(directory,...)
3097 -- /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
3099 S_Find_Source : aliased constant S := "/SOURCE_SEARCH=*" &
3101 -- /SOURCE_SEARCH=(directory,...)
3103 -- When looking for source files also look in the specified directories.
3104 -- The order in which source file search is undertaken is the same as for
3107 S_Find_Types : aliased constant S := "/TYPE_HIERARCHY " &
3109 -- /NOTYPE_HIERARCHY (D)
3112 -- Output the type hierarchy for the specified type. It acts like the
3113 -- /DERIVED_TYPE_INFORMATION qualifier, but recursively from parent type
3114 -- to parent type. When this qualifier is specified it is not possible to
3115 -- specify more than one file.
3117 Find_Switches : aliased constant Switches :=
3118 (S_Find_All 'Access,
3119 S_Find_Deriv 'Access,
3120 S_Find_Expr 'Access,
3122 S_Find_Full 'Access,
3123 S_Find_Ignore 'Access,
3124 S_Find_Mess 'Access,
3125 S_Find_Nostinc 'Access,
3126 S_Find_Nostlib 'Access,
3127 S_Find_Object 'Access,
3128 S_Find_Print 'Access,
3129 S_Find_Project 'Access,
3132 S_Find_Search 'Access,
3133 S_Find_Source 'Access,
3134 S_Find_Types 'Access);
3136 ------------------------------
3137 -- Switches for GNAT KRUNCH --
3138 ------------------------------
3140 S_Krunch_Count : aliased constant S := "/COUNT=#" &
3145 -- Limit file names to nnn characters (where nnn is a decimal
3146 -- integer). The maximum file name length is 39, but if you want to
3147 -- generate a set of files that would be usable if ported to a system
3148 -- with some different maximum file length, then a different value can
3151 Krunch_Switches : aliased constant Switches :=
3152 (1 .. 1 => S_Krunch_Count 'Access);
3154 -------------------------------
3155 -- Switches for GNAT LIBRARY --
3156 -------------------------------
3158 S_Lbr_Config : aliased constant S := "/CONFIG=@" &
3162 -- File containing configuration pragmas.
3164 S_Lbr_Create : aliased constant S := "/CREATE=%" &
3166 -- /CREATE=directory
3168 -- Directory to create and build alternate library in.
3170 S_Lbr_Delete : aliased constant S := "/DELETE=%" &
3172 -- /DELETE=directory
3174 -- Directory containing alternate library to be deleted.
3176 S_Lbr_Set : aliased constant S := "/SET=%" &
3180 -- Directory containing alternate library to be made the current library.
3182 Lbr_Switches : aliased constant Switches :=
3183 (S_Lbr_Config 'Access,
3184 S_Lbr_Create 'Access,
3185 S_Lbr_Delete 'Access,
3188 ----------------------------
3189 -- Switches for GNAT LINK --
3190 ----------------------------
3192 S_Link_Bind : aliased constant S := "/BIND_FILE=" &
3197 -- /BIND_FILE=[bind-file-option]
3199 -- Specifies the language of the binder generated file.
3201 -- ADA (D) Binder file is Ada.
3203 -- C Binder file is 'C'.
3205 S_Link_Debug : aliased constant S := "/DEBUG=" &
3215 -- /DEBUG[=debug-option]
3217 -- Specifies the amount of debugging information included. 'debug-option'
3218 -- is one of the following:
3220 -- ALL (D) Include full debugging information.
3222 -- NONE Provide no debugging information. Same as /NODEBUG.
3224 -- TRACEBACK Provide sufficient debug information for a traceback.
3226 -- NOTRACEBACK Same as NONE.
3228 S_Link_Nodebug : aliased constant S := "/NODEBUG " &
3230 -- NODOC (see /DEBUG)
3232 S_Link_Execut : aliased constant S := "/EXECUTABLE=@" &
3234 -- /EXECUTABLE=exec-name
3236 -- 'exec-name' specifies an alternative name for the generated executable
3237 -- program. If this qualifier switch is omitted, the executable is called
3238 -- the name of the main unit. So "$ GNAT LINK TRY.ALI" creates an
3239 -- executable called TRY.EXE.
3241 S_Link_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3243 -- /EXTERNAL_REFERENCE="name=val"
3245 -- Specifies an external reference to the project manager. Useful only if
3246 -- /PROJECT_FILE is used.
3249 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3251 S_Link_Forlink : aliased constant S := "/FOR_LINKER=" & '"' &
3252 "--for-linker=" & '"';
3253 -- /FOR_LINKER=<string>
3255 -- Transmit the option <string> to the underlying linker.
3257 S_Link_Force : aliased constant S := "/FORCE_OBJECT_FILE_LIST " &
3259 -- /NOFORCE_OBJECT_FILE_LIST (D)
3260 -- /FORCE_OBJECT_FILE_LIST
3262 -- Forces the generation of a file that contains commands for the linker.
3263 -- This is useful in some cases to deal with special situations where the
3264 -- command line length is exceeded.
3266 S_Link_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
3267 "--for-linker=IDENT=" &
3269 -- /IDENTIFICATION="<string>"
3271 -- "<string>" specifies the string to be stored in the image file ident-
3272 -- ification field in the image header. It overrides any pragma Ident
3273 -- specified string.
3275 S_Link_Libdir : aliased constant S := "/LIBDIR=*" &
3277 -- /LIBDIR=(directory, ...)
3279 -- Look for libraries in the specified directories.
3281 S_Link_Library : aliased constant S := "/LIBRARY=|" &
3285 -- Link with library named "xyz".
3287 S_Link_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3294 -- /MESSAGES_PROJECT_FILE[=messages-option]
3296 -- Specifies the "verbosity" of the parsing of project files.
3297 -- messages-option may be one of the following:
3299 -- DEFAULT (D) No messages are output if there is no error or warning.
3301 -- MEDIUM A small number of messages are output.
3303 -- HIGH A great number of messages are output, most of them not
3304 -- being useful for the user.
3306 S_Link_Nocomp : aliased constant S := "/NOCOMPILE " &
3310 -- Do not compile the file generated by the binder.
3311 -- This may be used when a link is rerun with different options,
3312 -- but there is no need to recompile the binder generated file.
3314 S_Link_Noinhib : aliased constant S := "/NOINHIBIT-EXEC " &
3315 "--for-linker=--noinhibit-exec";
3318 -- Delete executable if there are errors or warnings.
3320 S_Link_Nofiles : aliased constant S := "/NOSTART_FILES " &
3324 -- Link in default image initialization and startup functions.
3326 S_Link_Project : aliased constant S := "/PROJECT_FILE=<" &
3328 -- /PROJECT_FILE=filename
3330 -- Specifies the main project file to be used. The project files rooted
3331 -- at the main project file will be parsed before the invocation of the
3333 -- The source and object directories to be searched will be communicated
3334 -- to the linker through logical names ADA_PRJ_INCLUDE_FILE and
3335 -- ADA_PRJ_OBJECTS_FILE.
3337 S_Link_Return : aliased constant S := "/RETURN_CODES=" &
3339 "!-mvms-return-codes " &
3341 "-mvms-return-codes";
3342 -- /RETURN_CODES=POSIX (D)
3343 -- /RETURN_CODES=VMS
3345 -- Specifies the style of codes returned by
3346 -- Ada.Command_Line.Set_Exit_Status.
3348 -- POSIX (D) Return Posix compatible exit codes.
3350 -- VMS Return VMS compatible exit codes. The value returned
3351 -- is identically equal to the Set_Exit_Status parameter.
3353 S_Link_Static : aliased constant S := "/STATIC " &
3354 "--for-linker=-static";
3358 -- Indicate to the linker that the link is static.
3360 S_Link_Verb : aliased constant S := "/VERBOSE " &
3365 -- Causes additional information to be output, including a full list of
3366 -- the included object files. This switch option is most useful when you
3367 -- want to see what set of object files are being used in the link step.
3369 S_Link_ZZZZZ : aliased constant S := "/<other> " &
3373 -- Any other switch that will be transmited to the underlying linker.
3375 Link_Switches : aliased constant Switches :=
3376 (S_Link_Bind 'Access,
3377 S_Link_Debug 'Access,
3378 S_Link_Nodebug 'Access,
3379 S_Link_Execut 'Access,
3381 S_Link_Forlink 'Access,
3382 S_Link_Force 'Access,
3383 S_Link_Ident 'Access,
3384 S_Link_Libdir 'Access,
3385 S_Link_Library 'Access,
3386 S_Link_Mess 'Access,
3387 S_Link_Nocomp 'Access,
3388 S_Link_Nofiles 'Access,
3389 S_Link_Noinhib 'Access,
3390 S_Link_Project 'Access,
3391 S_Link_Return 'Access,
3392 S_Link_Static 'Access,
3393 S_Link_Verb 'Access,
3394 S_Link_ZZZZZ 'Access);
3396 ----------------------------
3397 -- Switches for GNAT LIST --
3398 ----------------------------
3400 S_List_All : aliased constant S := "/ALL_UNITS " &
3405 -- Consider all units, including those of the predefined Ada library.
3406 -- Especially useful with /DEPENDENCIES.
3408 S_List_Current : aliased constant S := "/CURRENT_DIRECTORY " &
3410 -- /CURRENT_DIRECTORY (D)
3411 -- /NOCURRENT_DIRECTORY
3413 -- Look for source, library or object files in the default directory.
3415 S_List_Depend : aliased constant S := "/DEPENDENCIES " &
3417 -- /NODEPENDENCIES (D)
3420 S_List_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3422 -- /EXTERNAL_REFERENCE="name=val"
3424 -- Specifies an external reference to the project manager. Useful only if
3425 -- /PROJECT_FILE is used.
3428 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3430 S_List_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3437 -- /MESSAGES_PROJECT_FILE[=messages-option]
3439 -- Specifies the "verbosity" of the parsing of project files.
3440 -- messages-option may be one of the following:
3442 -- DEFAULT (D) No messages are output if there is no error or warning.
3444 -- MEDIUM A small number of messages are output.
3446 -- HIGH A great number of messages are output, most of them not
3447 -- being useful for the user.
3449 S_List_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
3453 -- Do not look for sources of the run time in the standard directory.
3455 S_List_Object : aliased constant S := "/OBJECT_SEARCH=*" &
3457 -- /OBJECT_SEARCH=(directory,...)
3459 -- When looking for library and object files look also in the specified
3462 S_List_Output : aliased constant S := "/OUTPUT=" &
3475 -- /OUTPUT=(option,option,...)
3477 -- SOURCES (D) Only output information about source files.
3479 -- DEPEND List sources from which specified units depend on.
3481 -- OBJECTS Only output information about object files.
3483 -- UNITS Only output information about compilation units.
3485 -- OPTIONS Output the list of options.
3487 -- VERBOSE Output the complete source and object paths.
3488 -- Do not use the default column layout but instead
3489 -- use long format giving as much as information
3490 -- possible on each requested units, including
3491 -- special characteristics.
3493 S_List_Project : aliased constant S := "/PROJECT_FILE=<" &
3495 -- /PROJECT_FILE=filename
3497 -- Specifies the main project file to be used. The project files rooted
3498 -- at the main project file will be parsed before doing any listing.
3499 -- The source and object directories to be searched will be communicated
3500 -- to gnatlist through logical names ADA_PRJ_INCLUDE_FILE and
3501 -- ADA_PRJ_OBJECTS_FILE.
3503 S_List_Search : aliased constant S := "/SEARCH=*" &
3505 -- /SEARCH=(directory,...)
3507 -- Search the specified directories for both source and object files.
3509 S_List_Source : aliased constant S := "/SOURCE_SEARCH=*" &
3511 -- /SOURCE_SEARCH=(directory,...)
3513 -- When looking for source files also look in the specified directories.
3515 List_Switches : aliased constant Switches :=
3516 (S_List_All 'Access,
3517 S_List_Current 'Access,
3518 S_List_Depend 'Access,
3520 S_List_Mess 'Access,
3521 S_List_Nostinc 'Access,
3522 S_List_Object 'Access,
3523 S_List_Output 'Access,
3524 S_List_Project 'Access,
3525 S_List_Search 'Access,
3526 S_List_Source 'Access);
3528 ----------------------------
3529 -- Switches for GNAT MAKE --
3530 ----------------------------
3532 S_Make_Actions : aliased constant S := "/ACTIONS=" &
3539 -- /ACTIONS=(keyword[,...])
3541 -- GNAT MAKE default behavior is to check if the sources are up to date,
3542 -- compile those sources that are not up to date, bind the main source,
3543 -- then link the executable.
3545 -- With the /ACTIONS qualifier, GNAT MAKE may be restricted to one or
3546 -- two of these three steps:
3553 -- You may specify one or more of the following keywords to the /ACTIONS
3556 -- BIND Bind only. Can be combined with /ACTIONS=COMPILE
3557 -- to do compilation and binding, but no linking.
3558 -- Can be combined with /ACTIONS=LINK to do binding and
3559 -- linking. When not combined with /ACTIONS=COMPILE,
3560 -- all the units in the closure of the main program must
3561 -- have been previously compiled and must be up to date.
3563 -- COMPILE Compile only. Do not perform binding, except when
3564 -- /ACTIONS=BIND is also specified. Do not perform
3565 -- linking, except if both /ACTIONS=BIND and /ACTIONS=LINK
3566 -- are also specified.
3568 -- LINK Link only. Can be combined with /ACTIONS=BIND to do
3569 -- binding and linking. Linking will not be performed
3570 -- if combined with /ACTIONS=COMPILE but not with
3571 -- /ACTIONS=BIND\. When not combined with /ACTIONS=BIND
3572 -- all the units in the closure of the main program must
3573 -- have been previously compiled and must be up to date,
3574 -- and the main program need to have been bound.
3576 S_Make_All : aliased constant S := "/ALL_FILES " &
3581 -- Consider all files in the make process, even the GNAT internal system
3582 -- files (for example, the predefined Ada library files). By default,
3583 -- GNAT MAKE does not check these files (however, if there is an
3584 -- installation problem, it will be caught when GNAT MAKE binds your
3585 -- program). You may have to specify this qualifier if you are working on
3586 -- GNAT itself. The vast majority of GNAT MAKE users never need to
3587 -- specify this switch. All GNAT internal files with will be compiled
3588 -- with /STYLE_CHECK=GNAT.
3590 S_Make_Allproj : aliased constant S := "/ALL_PROJECTS " &
3592 -- /NOALL_PROJECTS (D)
3596 -- When used without project files, it is equivalent to /UNIQUE.
3597 -- When used with a project file wit no main (neither on the command
3598 -- line nor in the attribute Main) check every source of every project,
3599 -- recompile all sources that are not up to date and rebuild libraries
3602 S_Make_Bind : aliased constant S := "/BINDER_QUALIFIERS=?" &
3604 -- /BINDER_QUALIFIERS
3606 -- Any qualifiers specified after this qualifier other than
3607 -- /COMPILER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
3608 -- passed to any GNAT BIND commands generated by GNAT MAKE.
3610 S_Make_Bindprj : aliased constant S := "/BND_LNK_FULL_PROJECT " &
3612 -- /BND_LNK_FULL_PROJECT
3614 -- Bind and link all sources of a project, without any consideration
3615 -- to attribute Main, if there is one. This qualifier need to be
3616 -- used in conjunction with the /PROJECT_FILE= qualifier and cannot
3617 -- be used with a main subprogram on the command line or for
3618 -- a library project file. As the binder is invoked with the option
3619 -- meaning "No Ada main subprogram", the user must ensure that the
3620 -- proper options are specified to the linker. This qualifier is
3621 -- normally used when the main subprogram is in a foreign language
3624 S_Make_Comp : aliased constant S := "/COMPILER_QUALIFIERS=?" &
3626 -- /COMPILER_QUALIFIERS
3628 -- Any qualifiers specified after this qualifier other than
3629 -- /BINDER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
3630 -- passed to any GNAT COMPILE commands generated by GNAT MAKE.
3632 S_Make_Cond : aliased constant S := "/CONDITIONAL_SOURCE_SEARCH=*" &
3634 -- /CONDITIONAL_SOURCE_SEARCH=dir
3636 -- Equivalent to "/SOURCE_SEARCH=dir /SKIP_MISSING=dir".
3638 S_Make_Cont : aliased constant S := "/CONTINUE_ON_ERROR " &
3640 -- /NOCONTINUE_ON_ERROR (D)
3641 -- /CONTINUE_ON_ERROR
3643 -- Keep going. Continue as much as possible after a compilation error.
3644 -- To ease the programmer's task in case of compilation errors, the list
3645 -- of sources for which the compile fails is given when GNAT MAKE
3648 S_Make_Current : aliased constant S := "/CURRENT_DIRECTORY " &
3650 -- /CURRENT_DIRECTORY (D)
3651 -- /NOCURRENT_DIRECTORY
3653 -- Look for source, library or object files in the default directory.
3655 S_Make_Dep : aliased constant S := "/DEPENDENCIES_LIST " &
3657 -- /NODEPENDENCIES_LIST (D)
3658 -- /DEPENDENCIES_LIST
3660 -- Check if all objects are up to date. If they are, output the object
3661 -- dependences to SYS$OUTPUT in a form that can be directly exploited in
3662 -- a Unix-style Makefile. By default, each source file is prefixed with
3663 -- its (relative or absolute) directory name. This name is whatever you
3664 -- specified in the various /SOURCE_SEARCH and /SEARCH qualifiers. If
3665 -- you also speficy the /QUIET qualifier, only the source file names,
3666 -- without relative paths, are output. If you just specify the
3667 -- /DEPENDENCY_LIST qualifier, dependencies of the GNAT internal system
3668 -- files are omitted. This is typically what you want. If you also
3669 -- specify the /ALL_FILES qualifier, dependencies of the GNAT internal
3670 -- files are also listed. Note that dependencies of the objects in
3671 -- external Ada libraries (see the /SKIP_MISSING qualifier) are never
3674 S_Make_Dirobj : aliased constant S := "/DIRECTORY_OBJECTS=@" &
3676 -- /DIRECTORY_OBJECTS=<file>
3678 -- Put all object files and .ALI files in <file>.
3679 -- This qualifier is not compatible with /PROJECT_FILE.
3681 S_Make_Doobj : aliased constant S := "/DO_OBJECT_CHECK " &
3683 -- /NODO_OBJECT_CHECK (D)
3686 -- Don't compile, bind, or link. Output a single command that will
3687 -- recompile an out of date unit, if any. Repeated use of this option,
3688 -- followed by carrying out the indicated compilation, will eventually
3689 -- result in recompiling all required units.
3691 -- If any ALI is missing during the process, GNAT MAKE halts and
3692 -- displays an error message.
3694 S_Make_Execut : aliased constant S := "/EXECUTABLE=@" &
3696 -- /EXECUTABLE=exec-name
3698 -- The name of the final executable program will be 'exec_name'. If this
3699 -- qualifier is omitted the default name for the executable will be the
3700 -- name of the input file with an EXE filetype. You may prefix
3701 -- 'exec_name' with a relative or absolute directory path.
3703 S_Make_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3705 -- /EXTERNAL_REFERENCE="name=val"
3707 -- Specifies an external reference to the project manager. Useful only if
3708 -- /PROJECT_FILE is used.
3711 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3713 S_Make_Force : aliased constant S := "/FORCE_COMPILE " &
3715 -- /NOFORCE_COMPILE (D)
3718 -- Force recompilations. Recompile all sources, even though some object
3719 -- files may be up to date, but don't recompile predefined or GNAT
3720 -- internal files unless the /ALL_FILES qualfier is also specified.
3722 S_Make_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
3724 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
3725 -- /FULL_PATH_IN_BRIEF_MESSAGES
3727 -- When using project files, if some errors or warnings are detected
3728 -- during parsing and verbose mode is not in effect (no use of qualifier
3729 -- /VERBOSE), then error lines start with the full path name of the
3730 -- project file, rather than its simple file name.
3732 S_Make_Inplace : aliased constant S := "/IN_PLACE " &
3737 -- In normal mode, GNAT MAKE compiles all object files and ALI files
3738 -- into the current directory. If the /IN_PLACE switch is used,
3739 -- then instead object files and ALI files that already exist are over-
3740 -- written in place. This means that once a large project is organized
3741 -- into separate directories in the desired manner, then GNAT MAKE will
3742 -- automatically maintain and update this organization. If no ALI files
3743 -- are found on the Ada object path, the new object and ALI files are
3744 -- created in the directory containing the source being compiled.
3746 S_Make_Index : aliased constant S := "/SOURCE_INDEX=#" &
3748 -- /SOURCE_INDEX=nnn
3750 -- Specifies the index of the units in the source file
3751 -- By default, source files are mono-unit and there is no index
3752 -- When /SOURCE_INDEX=nnn is specified, only one main may be specified
3753 -- on the command line.
3755 S_Make_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
3757 -- /LIBRARY_SEARCH=(directory[,...])
3759 -- Add the specified directories to the list of directories in which the
3760 -- linker will search for libraries.
3762 S_Make_Link : aliased constant S := "/LINKER_QUALIFIERS=?" &
3764 -- /LINKER_QUALIFIERS
3766 -- Any qualifiers specified after this qualifier other than
3767 -- /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /MAKE_QUALIFIERS will be
3768 -- passed to any GNAT LINK commands generated by GNAT LINK.
3770 S_Make_Make : aliased constant S := "/MAKE_QUALIFIERS=?" &
3774 -- Any qualifiers specified after this qualifier other than
3775 -- /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /LINKER_QUALIFIERS
3776 -- are for the benefit of GNAT MAKE itself.
3778 S_Make_Mapping : aliased constant S := "/MAPPING " &
3783 -- Use a mapping file. A mapping file is a way to communicate to the
3784 -- compiler two mappings: from unit names to file names (without any
3785 -- directory information) and from file names to path names (with full
3786 -- directory information). These mappings are used by the compiler to
3787 -- short-circuit the path search. When GNAT MAKE is invoked with this
3788 -- qualifier, it will create a mapping file, initially populated by the
3789 -- project manager, if /PROJECT_File= is used, otherwise initially empty.
3790 -- Each invocation of the compiler will add the newly accessed sources to
3791 -- the mapping file. This will improve the source search during the next
3792 -- invocations of the compiler
3794 S_Make_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3801 -- /MESSAGES_PROJECT_FILE[=messages-option]
3803 -- Specifies the "verbosity" of the parsing of project files.
3804 -- messages-option may be one of the following:
3806 -- DEFAULT (D) No messages are output if there is no error or warning.
3808 -- MEDIUM A small number of messages are output.
3810 -- HIGH A great number of messages are output, most of them not
3811 -- being useful for the user.
3813 S_Make_Minimal : aliased constant S := "/MINIMAL_RECOMPILATION " &
3815 -- /NOMINIMAL_RECOMPILATION (D)
3816 -- /MINIMAL_RECOMPILATION
3818 -- Specifies that the minimum necessary amount of recompilation
3819 -- be performed. In this mode GNAT MAKE ignores time stamp differences
3820 -- when the only modifications to a source file consist in
3821 -- adding/removing comments, empty lines, spaces or tabs.
3823 S_Make_Nolink : aliased constant S := "/NOLINK " &
3827 -- Compile only. Do not perform binding and linking. If the root unit is
3828 -- not a main unit, this is the default. Otherwise GNAT MAKE will
3829 -- attempt binding and linking unless all objects are up to date and the
3830 -- executable is more recent than the objects.
3831 -- This is equivalent to /ACTIONS=COMPILE
3833 S_Make_Nomain : aliased constant S := "/NOMAIN " &
3837 -- No main subprogram. Bind and link the program even if the unit name
3838 -- given on the command line is a package name. The resulting executable
3839 -- will execute the elaboration routines of the package and its closure,
3840 -- then the finalization routines.
3842 S_Make_Nonpro : aliased constant S := "/NON_PROJECT_UNIT_COMPILATION " &
3844 -- /NON_PROJECT_UNIT_COMPILATION
3846 -- Normally, when using project files, a unit that is not part of any
3847 -- project file, cannot be compile. These units may be compile, when
3848 -- needed, if this qualifier is specified.
3850 S_Make_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
3854 -- Do not look for sources the in the system default directory.
3856 S_Make_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
3860 -- Do not look for library files in the system default directory.
3862 S_Make_Object : aliased constant S := "/OBJECT_SEARCH=*" &
3864 -- /OBJECT_SEARCH=(directory[,...])
3866 -- When looking for library and object files look also in the specified
3869 S_Make_Proc : aliased constant S := "/PROCESSES=#" &
3874 -- Use NNN processes to carry out the (re)complations. If you have a
3875 -- multiprocessor machine, compilations will occur in parallel. In the
3876 -- event of compilation errors, messages from various compilations might
3877 -- get interspersed (but GNAT MAKE will give you the full ordered list of
3878 -- failing compiles at the end). This can at times be annoying. To get a
3879 -- clean list of error messages don't use this qualifier.
3881 S_Make_Nojobs : aliased constant S := "/NOPROCESSES " &
3883 -- NODOC (see /PROCESS)
3885 S_Make_Project : aliased constant S := "/PROJECT_FILE=<" &
3887 -- /PROJECT_FILE=filename
3889 -- Specifies the main project file to be used. The project files rooted
3890 -- at the main project file will be parsed before any other processing to
3891 -- set the building environment.
3893 S_Make_Quiet : aliased constant S := "/QUIET " &
3898 -- When this qualifiers is specified, the commands carried out by GNAT
3899 -- MAKE are not displayed.
3901 S_Make_Reason : aliased constant S := "/REASONS " &
3906 -- Displays the reason for all recompilations GNAT MAKE decides are
3909 S_Make_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
3911 -- /RUNTIME_SYSTEM=xxx
3913 -- Build against an alternate runtime system named xxx or RTS-xxx.
3915 S_Make_Search : aliased constant S := "/SEARCH=*" &
3917 -- /SEARCH=(directory[,...])
3919 -- Search the specified directories for both source and object files.
3921 S_Make_Skip : aliased constant S := "/SKIP_MISSING=*" &
3923 -- /SKIP_MISSING=(directory[,...])
3925 -- Skip missing library sources if ALI in 'directory'.
3927 S_Make_Source : aliased constant S := "/SOURCE_SEARCH=*" &
3929 -- /SOURCE_SEARCH=(directory[,...])
3931 -- When looking for source files also look in the specified directories.
3933 S_Make_Switch : aliased constant S := "/SWITCH_CHECK " &
3935 -- /NOSWITCH_CHECK (D)
3938 -- Recompile if compiler switches have changed since last compilation.
3939 -- All compiler switches but -I and -o are taken into account in the
3940 -- following way: orders between different "first letter" switches are
3941 -- ignored, but orders between same switches are taken into account.
3942 -- For example, -O -O2 is different than -O2 -O, but -g -O is equivalent
3945 S_Make_Unique : aliased constant S := "/UNIQUE " &
3950 -- Recompile at most the main file. It implies /ACTIONS=COMPILE.
3951 -- Combined with /FORCE_COMPILE, it is equivalent to calling the compiler
3954 S_Make_Use_Map : aliased constant S := "/USE_MAPPING_File=@" &
3956 -- /USE_MAPPING_FILE=file_name
3958 -- Use a specific mapping file. The file 'file_name', specified as a path
3959 -- name (absolute or relative) by this qualifier, should already exist,
3960 -- otherwise the qualifier is ineffective. The specified mapping file
3961 -- will be communicated to the compiler. This switch is not compatible
3962 -- with a project file (/PROJECT_FILE=) or with multiple compiling
3963 -- processes (/PROCESSES=nnn, when nnn is greater than 1).
3965 S_Make_Verbose : aliased constant S := "/VERBOSE " &
3970 -- Displays the reason for all recompilations GNAT MAKE decides are
3973 Make_Switches : aliased constant Switches :=
3974 (S_Make_Actions 'Access,
3976 S_Make_Allproj 'Access,
3977 S_Make_Bind 'Access,
3978 S_Make_Comp 'Access,
3979 S_Make_Cond 'Access,
3980 S_Make_Cont 'Access,
3981 S_Make_Current 'Access,
3983 S_Make_Dirobj 'Access,
3984 S_Make_Doobj 'Access,
3985 S_Make_Execut 'Access,
3987 S_Make_Force 'Access,
3988 S_Make_Full 'Access,
3989 S_Make_Inplace 'Access,
3990 S_Make_Index 'Access,
3991 S_Make_Library 'Access,
3992 S_Make_Link 'Access,
3993 S_Make_Make 'Access,
3994 S_Make_Mapping 'Access,
3995 S_Make_Mess 'Access,
3996 S_Make_Minimal 'Access,
3997 S_Make_Nolink 'Access,
3998 S_Make_Nomain 'Access,
3999 S_Make_Nonpro 'Access,
4000 S_Make_Nostinc 'Access,
4001 S_Make_Nostlib 'Access,
4002 S_Make_Object 'Access,
4003 S_Make_Proc 'Access,
4004 S_Make_Nojobs 'Access,
4005 S_Make_Project 'Access,
4006 S_Make_Quiet 'Access,
4007 S_Make_Reason 'Access,
4009 S_Make_Search 'Access,
4010 S_Make_Skip 'Access,
4011 S_Make_Source 'Access,
4012 S_Make_Switch 'Access,
4013 S_Make_Unique 'Access,
4014 S_Make_Use_Map 'Access,
4015 S_Make_Verbose 'Access);
4017 ----------------------------
4018 -- Switches for GNAT NAME --
4019 ----------------------------
4021 S_Name_Conf : aliased constant S := "/CONFIG_FILE=<" &
4023 -- /CONFIG_FILE=path_name
4025 -- Create a configuration pragmas file 'path_name' (instead of the default
4026 -- 'gnat.adc'). 'path_name' may include directory information. 'path_name'
4027 -- must be writable. There may be only one qualifier /CONFIG_FILE.
4028 -- This qualifier is not compatible with qualifier /PROJECT_FILE.
4030 S_Name_Dirs : aliased constant S := "/SOURCE_DIRS=*" &
4032 -- /SOURCE_DIRS=(directory, ...)
4034 -- Look for source files in the specified directories. When this qualifier
4035 -- is specified, the current working directory will not be searched for
4036 -- source files, unless it is explicitly specified with a qualifier
4037 -- /SOURCE_DIRS or /DIRS_FILE. Several qualifiers /SOURCE_DIRS may be
4038 -- specified. If a directory is specified as a relative path, it is
4039 -- relative to the directory of the configuration pragmas file specified
4040 -- with qualifier /CONFIG_FILE, or to the directory of the project file
4041 -- specified with qualifier /PROJECT_FILE or, if neither qualifier
4042 -- /CONFIG_FILE nor qualifier /PROJECT_FILE are specified, it is relative
4043 -- to the current working directory. The directories specified with
4044 -- qualifiers /SOURCE_DIRS must exist and be readable.
4046 S_Name_Dfile : aliased constant S := "/DIRS_FILE=<" &
4048 -- /DIRS_FILE=file_name
4050 -- Look for source files in all directories listed in text file
4051 -- 'file_name'. 'file_name' must be an existing, readable text file.
4052 -- Each non empty line in the specified file must be a directory.
4053 -- Specifying qualifier /DIRS_FILE is equivalent to specifying as many
4054 -- qualifiers /SOURCE_DIRS as there are non empty lines in the specified
4057 S_Name_Frng : aliased constant S := "/FOREIGN_PATTERN=" & '"' &
4059 -- /FOREIGN_PATTERN=<string>
4061 -- Specify a foreign pattern.
4062 -- Using this qualifier, it is possible to add sources of languages other
4063 -- than Ada to the list of sources of a project file. It is only useful
4064 -- if a qualifier /PROJECT_FILE is used. For example,
4066 -- GNAT NAME /PROJECT_FILE=PRJ /FOREIGN_PATTERN="*.C" "*.ADA"
4068 -- will look for Ada units in all files with the '.ADA' extension, and
4069 -- will add to the list of file for project PRJ.GPR the C files with
4072 S_Name_Help : aliased constant S := "/HELP " &
4077 -- Output usage information to the standard output stream.
4079 S_Name_Proj : aliased constant S := "/PROJECT_FILE=<" &
4081 -- /PROJECT_FILE=file_name
4083 -- Create or update a project file. 'file_name' may include directory
4084 -- information. The specified file must be writable. There may be only
4085 -- one qualifier /PROJECT_FILE. When a qualifier /PROJECT_DILE is
4086 -- specified, no qualifier /CONFIG_FILE may be specified.
4088 S_Name_Verbose : aliased constant S := "/VERBOSE " &
4093 -- Verbose mode. Output detailed explanation of behavior to the standard
4094 -- output stream. This includes name of the file written, the name of the
4095 -- directories to search and, for each file in those directories whose
4096 -- name matches at least one of the Naming Patterns, an indication of
4097 -- whether the file contains a unit, and if so the name of the unit.
4099 S_Name_Excl : aliased constant S := "/EXCLUDED_PATTERN=" & '"' &
4101 -- /EXCLUDED_PATTERN=<string>
4103 -- Specify an excluded pattern.
4104 -- Using this qualifier, it is possible to exclude some files that would
4105 -- match the Naming patterns. For example,
4107 -- GNAT NAME /EXCLUDED_PATTERN="*_NT.ADA" "*.ADA"
4109 -- will look for Ada units in all files with the '.ADA' extension, except
4110 -- those whose names end with '_NT.ADA'.
4112 Name_Switches : aliased constant Switches :=
4113 (S_Name_Conf 'Access,
4114 S_Name_Dirs 'Access,
4115 S_Name_Dfile 'Access,
4116 S_Name_Frng 'Access,
4117 S_Name_Help 'Access,
4118 S_Name_Proj 'Access,
4119 S_Name_Verbose 'Access,
4120 S_Name_Excl 'Access);
4122 ----------------------------------
4123 -- Switches for GNAT PREPROCESS --
4124 ----------------------------------
4126 S_Prep_Assoc : aliased constant S := "/ASSOCIATE=" & '"' &
4128 -- /ASSOCIATE="name=val"
4130 -- Defines a new symbol, associated with value. If no value is given
4131 -- on the command line, then symbol is considered to be True.
4132 -- This qualifier can be used in place of a definition file.
4134 S_Prep_Blank : aliased constant S := "/BLANK_LINES " &
4136 -- /NOBLANK_LINES (D)
4139 -- Causes both preprocessor lines and the lines deleted by preprocessing
4140 -- to be replaced by blank lines in the output source file, thus
4141 -- preserving line numbers in the output file.
4143 S_Prep_Com : aliased constant S := "/COMMENTS " &
4148 -- /COMMENTS causes both preprocessor lines and the lines deleted
4149 -- by preprocessing to be retained in the output source as comments marked
4150 -- with the special string "--! ". This option will result in line numbers
4151 -- being preserved in the output file.
4153 -- /NOCOMMENTS causes both preprocessor lines and the lines deleted by
4154 -- preprocessing to be replaced by blank lines in the output source file,
4155 -- thus preserving line numbers in the output file.
4157 S_Prep_Ref : aliased constant S := "/REFERENCE " &
4162 -- Causes a "Source_Reference" pragma to be generated that references the
4163 -- original input file, so that error messages will use the file name of
4164 -- this original file. Also implies /BLANK_LINES if /COMMENTS is not
4167 S_Prep_Remove : aliased constant S := "/REMOVE " &
4172 -- Preprocessor lines and deleted lines are completely removed from the
4175 S_Prep_Symbols : aliased constant S := "/SYMBOLS " &
4180 -- Causes a sorted list of symbol names and values to be listed on
4183 S_Prep_Undef : aliased constant S := "/UNDEFINED " &
4188 Prep_Switches : aliased constant Switches :=
4189 (S_Prep_Assoc 'Access,
4190 S_Prep_Blank 'Access,
4193 S_Prep_Remove 'Access,
4194 S_Prep_Symbols 'Access,
4195 S_Prep_Undef 'Access);
4197 ------------------------------
4198 -- Switches for GNAT PRETTY --
4199 ------------------------------
4201 S_Pretty_Align : aliased constant S := "/ALIGN=" &
4214 -- /ALIGN[=align-option, align-option, ...]
4216 -- Set alignments. By default, all alignments (colons in declarations,
4217 -- initialisations in declarations, assignments and arrow delimiters) are
4220 -- align-option may be one of the following:
4222 -- OFF (D) Set all alignments to OFF
4223 -- COLONS Set alignments of colons in declarations to ON
4224 -- DECLARATIONS Set alignments of initialisations in declarations to ON
4225 -- STATEMENTS Set alignments of assignments statements to ON
4226 -- ARROWS Set alignments of arrow delimiters to ON.
4228 -- Specifying one of the ON options without first specifying the OFF
4229 -- option has no effect, because by default all alignments are set to ON.
4231 S_Pretty_Attrib : aliased constant S := "/ATTRIBUTE_CASING=" &
4238 -- /ATTRIBUTE_CASING[=casing-option]
4240 -- Set the case of the attributes. By default the attributes are in mixed
4242 -- casing-option may be one of the following:
4248 S_Pretty_Comments : aliased constant S := "/COMMENTS_LAYOUT=" &
4253 "STANDARD_INDENT " &
4259 -- /COMMENTS_LAYOUT[=layout-option, layout-option, ...]
4261 -- Set the comment layout. By default, comments use the GNAT style
4262 -- comment line indentation.
4264 -- layout-option is be one of the following:
4266 -- UNTOUCHEDÂ Â Â Â Â Â Â Â Â Â All the comments remain unchanged
4267 -- DEFAULT (D) GNAT style comment line indentation
4268 -- STANDARD_INDENT Standard comment line indentation
4269 -- GNAT_BEGINNING GNAT style comment beginning
4270 -- REFORMAT Reformat comment blocks
4272 -- All combinations of layout options are allowed, except for DEFAULT
4273 -- and STANDARD_INDENT which are mutually exclusive, and also if
4274 -- UNTOUCHED is specified, this must be the only option.
4276 -- The difference between "GNAT style comment line indentation" and
4277 -- "standard comment line indentation" is the following: for standard
4278 -- comment indentation, any comment line is indented as if it were
4279 -- a declaration or statement at the same place.
4280 -- For GNAT style comment indentation, comment lines which are
4281 -- immediately followed by if or case statement alternative, record
4282 -- variant or 'begin' keyword are indented as the keyword that follows
4285 -- Standard indentation:
4294 -- GNAT style indentation:
4303 -- Option "GNAT style comment beginning" means that for each comment
4304 -- which is not considered as non-formattable separator (that is, the
4305 -- comment line contains only dashes, or a comment line ends with two
4306 -- dashes), there will be at least two spaces between starting "--" and
4307 -- the first non-blank character of the comment.
4309 S_Pretty_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
4311 -- /CONFIGURATION_PRAGMAS_FILE=file
4313 -- Specify a configuration pragmas file that need to be passed to the
4316 S_Pretty_Constr : aliased constant S := "/CONSTRUCT_LAYOUT=" &
4323 -- /CONSTRUCT_LAYOUT[=construct-option]
4325 -- Set construct layout. Default is GNAT style layout.
4326 -- construct-option may be one of the following:
4332 -- The difference between GNAT style and Compact layout on one hand
4333 -- and Uncompact layout on the other hand can be illustrated by the
4334 -- following examples:
4336 -- GNAT style and Uncompact layout
4339 -- type q is record type q is
4340 -- a : integer; record
4341 -- b : integer; a : integer;
4342 -- end record; b : integer;
4346 -- Block : declare Block :
4347 -- A : Integer := 3; declare
4348 -- begin A : Integer := 3;
4349 -- Proc (A, A); begin
4350 -- end Block; Proc (A, A);
4353 -- Clear : for J in 1 .. 10 loop Clear :
4354 -- A (J) := 0; for J in 1 .. 10 loop
4355 -- end loop Clear; A (J) := 0;
4359 -- A further difference between GNAT style layout and compact layout is
4360 -- that in GNAT style layout compound statements, return statements and
4361 -- bodies are always separated by empty lines.
4363 S_Pretty_Comind : aliased constant S := "/CONTINUATION_INDENT=#" &
4365 -- /CONTINUATION_INDENT=nnn
4367 -- Indentation level for continuation lines, nnn from 1 .. 9.
4368 -- The default value is one less then the (normal) indentation level,
4369 -- unless the indentation is set to 1: in that case the default value for
4370 -- continuation line indentation is also 1.
4372 S_Pretty_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4374 -- /EXTERNAL_REFERENCE="name=val"
4376 -- Specifies an external reference to the project manager. Useful only if
4377 -- /PROJECT_FILE is used.
4380 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4382 S_Pretty_Current : aliased constant S := "/CURRENT_DIRECTORY " &
4384 -- /CURRENT_DIRECTORY (D)
4386 -- Look for source files in the current working directory.
4388 -- /NOCURRENT_DIRECTORY
4389 -- Do not look for source files in the current working directory.
4391 S_Pretty_Dico : aliased constant S := "/DICTIONARY=*" &
4393 -- /DICTIONARY=(file_name, ...)
4395 -- Use each specified file as a dictionary file that defines the casing
4396 -- for a set of specified names, thereby overriding the effect on these
4397 -- names by any explicit or implicit /NAME_CASING qualifier.
4399 -- GNAT PRETTY implicitly uses a default dictionary file to define the
4400 -- casing for the Ada predefined names and the names declared in the GNAT
4403 -- The structure of a dictionary file, and details on the conventions
4404 -- used in the default dictionary file, are defined in the GNAT User's
4407 S_Pretty_Forced : aliased constant S := "/FORCED_OUTPUT=@" &
4409 -- /FORCED_OUTPUT=file
4411 -- Write the output into the specified file, overriding any possibly
4414 S_Pretty_Formfeed : aliased constant S := "/FORM_FEED_AFTER_PRAGMA_PAGE " &
4416 -- /FORM_FEED_AFTER_PRAGMA_PAGE
4418 -- When there is a pragma Page in the source, insert a Form Feed
4419 -- character immediately after the semicolon that follows the pragma
4422 S_Pretty_Indent : aliased constant S := "/INDENTATION_LEVEL=#" &
4424 -- /INDENTATION_LEVEL=nnn
4426 -- Specify the number of spaces to add for each indentation level.
4427 -- nnn must be between 1 and 9. The default is 3.
4429 S_Pretty_Keyword : aliased constant S := "/KEYWORD_CASING=" &
4434 -- /KEYWORD_CASING[=keyword-option]
4436 -- Specify the case of Ada keywords. The default is keywords in lower
4438 -- keyword-option may be one of the following:
4443 S_Pretty_Maxlen : aliased constant S := "/LINE_LENGTH_MAX=#" &
4445 -- /LINE_LENGTH_MAX=nnn
4447 -- Set the maximum line length, nnn from 32 ..256. The default is 79.
4449 S_Pretty_Maxind : aliased constant S := "/MAX_INDENT=#" &
4453 -- Do not use an additional indentation level for case alternatives
4454 -- and variants if their number is nnn or more. The default is 10.
4455 -- If nnn is zero, an additional indentation level is used for any number
4456 -- of case alternatives and variants.
4458 S_Pretty_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4465 -- /MESSAGES_PROJECT_FILE[=messages-option]
4467 -- Specifies the "verbosity" of the parsing of project files.
4468 -- messages-option may be one of the following:
4470 -- DEFAULT (D) No messages are output if there is no error or warning.
4472 -- MEDIUM A small number of messages are output.
4474 -- HIGH A great number of messages are output, most of them not
4475 -- being useful for the user.
4477 S_Pretty_Names : aliased constant S := "/NAME_CASING=" &
4486 -- /NAME_CASING[=name-option]
4488 -- Specify the casing of names.
4489 -- 'name-option' may be one of:
4491 -- AS_DECLARED (D) Name casing for defining occurrences are as they
4492 -- appear in the source file.
4494 -- LOWER_CASE Names are in lower case.
4496 -- UPPER_CASE Names are in upper case.
4498 -- MIXED_CASE Names are in mixed case.
4500 S_Pretty_No_Backup : aliased constant S := "/NO_BACKUP " &
4502 -- /REPLACE_NO_BACKUP
4504 -- Replace the argument source with the pretty-printed source without
4505 -- creating any backup copy of the argument source.
4507 S_Pretty_No_Labels : aliased constant S := "/NO_MISSED_LABELS " &
4509 -- /NO_MISSED_LABELS
4511 -- Do not insert missing end/exit labels. The end label is the name of
4512 -- a construct that may optionally appear at the end of the construct.
4513 -- This includes the names of packages and subprograms.
4514 -- Similarly, the exit label is the name of a loop that may appear as the
4515 -- argument of an exit statement within the loop. By default, GNAT PRETTY
4516 -- inserts these end/exit labels when they are absent in the original
4517 -- source. This qualifier /NO_MISSED_LABELS suppresses this insertion,
4518 -- so that the formatted source reflects the original.
4520 S_Pretty_Notabs : aliased constant S := "/NOTABS " &
4524 -- Replace all tabulations in comments with spaces.
4526 S_Pretty_Output : aliased constant S := "/OUTPUT=@" &
4530 -- Write the output to the specified file. If the file already exists,
4531 -- an error is reported.
4533 S_Pretty_Override : aliased constant S := "/OVERRIDING_REPLACE " &
4535 -- /NOOVERRIDING_REPLACE (D)
4536 -- /OVERRIDING_REPLACE
4538 -- Replace the argument source with the pretty-printed source and copy the
4539 -- argument source into filename.NPP, overriding any existing file if
4542 S_Pretty_Pragma : aliased constant S := "/PRAGMA_CASING=" &
4549 -- /PRAGMA_CASING[=pragma-option]
4551 -- Set the case of pragma identifiers. The default is Mixed case.
4552 -- pragma-option may be one of the following:
4558 S_Pretty_Project : aliased constant S := "/PROJECT_FILE=<" &
4560 -- /PROJECT_FILE=filename
4562 -- Specifies the main project file to be used. The project files rooted
4563 -- at the main project file will be parsed before any other processing to
4564 -- set the building environment.
4566 S_Pretty_Replace : aliased constant S := "/REPLACE " &
4571 -- Replace the argument source with the pretty-printed source and copy the
4572 -- argument source into filename.NPP. If filename.NPP already exists,
4573 -- report an error and exit.
4575 S_Pretty_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
4577 -- /RUNTIME_SYSTEM=xxx
4579 -- Compile against an alternate runtime system named xxx or RTS-xxx.
4581 S_Pretty_Search : aliased constant S := "/SEARCH=*" &
4583 -- /SEARCH=(directory[,...])
4585 -- When looking for source files also look in directories specified.
4587 S_Pretty_Specific : aliased constant S := "/SPECIFIC_CASING " &
4591 -- Do not use the default dictionary file; instead, use the casing
4592 -- defined by a qualifier /NAME_CASING and/or any explicit dictionary
4593 -- file specified by a qualifier /DICTIONARY.
4595 S_Pretty_Standard : aliased constant S := "/STANDARD_OUTPUT " &
4597 -- /NOSTANDARD_OUTPUT (D)
4600 -- Redirect the output to the standard output.
4602 S_Pretty_Verbose : aliased constant S := "/VERBOSE " &
4607 -- Verbose mode; GNAT PRETTY generates version information and then a
4608 -- trace of the actions it takes to produce or obtain the ASIS tree.
4610 S_Pretty_Warnings : aliased constant S := "/WARNINGS " &
4615 -- Issue a warning to the standard error stream if it is not possible
4616 -- to provide the required layout in the result source.
4617 -- By default such warnings are not activated.
4619 Pretty_Switches : aliased constant Switches :=
4620 (S_Pretty_Align 'Access,
4621 S_Pretty_Attrib 'Access,
4622 S_Pretty_Comments 'Access,
4623 S_Pretty_Config 'Access,
4624 S_Pretty_Constr 'Access,
4625 S_Pretty_Comind 'Access,
4626 S_Pretty_Ext 'Access,
4627 S_Pretty_Current 'Access,
4628 S_Pretty_Dico 'Access,
4629 S_Pretty_Forced 'Access,
4630 S_Pretty_Formfeed 'Access,
4631 S_Pretty_Indent 'Access,
4632 S_Pretty_Keyword 'Access,
4633 S_Pretty_Maxlen 'Access,
4634 S_Pretty_Maxind 'Access,
4635 S_Pretty_Mess 'Access,
4636 S_Pretty_Names 'Access,
4637 S_Pretty_No_Backup 'Access,
4638 S_Pretty_No_Labels 'Access,
4639 S_Pretty_Notabs 'Access,
4640 S_Pretty_Output 'Access,
4641 S_Pretty_Override 'Access,
4642 S_Pretty_Pragma 'Access,
4643 S_Pretty_Replace 'Access,
4644 S_Pretty_Project 'Access,
4645 S_Pretty_RTS 'Access,
4646 S_Pretty_Search 'Access,
4647 S_Pretty_Specific 'Access,
4648 S_Pretty_Standard 'Access,
4649 S_Pretty_Verbose 'Access,
4650 S_Pretty_Warnings 'Access);
4652 ------------------------------
4653 -- Switches for GNAT SHARED --
4654 ------------------------------
4656 S_Shared_Debug : aliased constant S := "/DEBUG=" &
4665 -- /DEBUG[=debug-option]
4668 -- Specifies the amount of debugging information included. 'debug-option'
4669 -- is one of the following:
4671 -- ALL (D) Include full debugging information.
4673 -- NONE Provide no debugging information. Same as /NODEBUG.
4675 -- TRACEBACK Provide sufficient debug information for a traceback.
4677 -- NOTRACEBACK Same as NONE.
4679 S_Shared_Image : aliased constant S := "/IMAGE=@" &
4681 -- /IMAGE=image-name
4683 -- 'image-name' specifies the name for the generated shared library.
4685 S_Shared_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
4686 "--for-linker=IDENT=" &
4688 -- /IDENTIFICATION="<string>"
4690 -- "<string>" specifies the string to be stored in the image file ident-
4691 -- ification field in the image header. It overrides any pragma Ident
4692 -- specified string.
4694 S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES " &
4698 -- Link in default image initialization and startup functions.
4700 S_Shared_Noinhib : aliased constant S := "/NOINHIBIT-IMAGE " &
4701 "--for-linker=--noinhibit-exec";
4704 -- Delete image if there are errors or warnings.
4706 S_Shared_Verb : aliased constant S := "/VERBOSE " &
4711 -- Causes additional information to be output, including a full list of
4712 -- the included object files. This switch option is most useful when you
4713 -- want to see what set of object files are being used in the link step.
4715 S_Shared_ZZZZZ : aliased constant S := "/<other> " &
4719 -- Any other switch transmitted to the underlying linker.
4721 Shared_Switches : aliased constant Switches :=
4722 (S_Shared_Debug 'Access,
4723 S_Shared_Image 'Access,
4724 S_Shared_Ident 'Access,
4725 S_Shared_Nofiles 'Access,
4726 S_Shared_Noinhib 'Access,
4727 S_Shared_Verb 'Access,
4728 S_Shared_ZZZZZ 'Access);
4730 ----------------------------
4731 -- Switches for GNAT STUB --
4732 ----------------------------
4734 S_Stub_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
4736 -- /CONFIGURATION_PRAGMAS_FILE=filespec
4738 -- Specifies a configuration pragmas file that must be taken into account
4741 S_Stub_Current : aliased constant S := "/CURRENT_DIRECTORY " &
4743 -- /CURRENT_DIRECTORY (D)
4744 -- /NOCURRENT_DIRECTORY
4746 -- Look for source, library or object files in the default directory.
4748 S_Stub_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4750 -- /EXTERNAL_REFERENCE="name=val"
4752 -- Specifies an external reference to the project manager. Useful only if
4753 -- /PROJECT_FILE is used.
4756 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4758 S_Stub_Full : aliased constant S := "/FULL " &
4763 -- If the destination directory already contains a file with the name of
4764 -- the body file for the argument file spec, replace it with the generated
4765 -- body stub. If /FULL is not used and there is already a body file, this
4766 -- existing body file is not replaced.
4768 S_Stub_Header : aliased constant S := "/HEADER=" &
4773 -- /HEADER[=header-option]
4775 -- Specifies the form of the comment header above the generated body stub.
4776 -- If no /HEADER qualifier is specified, there is no comment header.
4777 -- header-option is one of the following:
4780 -- GENERAL (D) Put a sample comment header into the body stub.
4782 -- SPEC Put the comment header (i.e., all the comments
4783 -- preceding the compilation unit) from the source of the
4784 -- library unit declaration into the body stub.
4786 S_Stub_Indent : aliased constant S := "/INDENTATION=#" &
4790 -- (nnn is a non-negative integer). Set the indentation level in the
4791 -- generated body stub to nnn. nnn=0 means "no indentation".
4792 -- Default insdentation is 3.
4794 S_Stub_Keep : aliased constant S := "/KEEP " &
4799 -- Do not delete the tree file (i.e., the snapshot of the compiler
4800 -- internal structures used by gnatstub) after creating the body stub.
4802 S_Stub_Length : aliased constant S := "/LINE_LENGTH=#" &
4806 -- (n is a non-negative integer). Set the maximum line length in the body
4807 -- stub to nnn. Default is 78.
4809 S_Stub_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4816 -- /MESSAGES_PROJECT_FILE[=messages-option]
4818 -- Specifies the "verbosity" of the parsing of project files.
4819 -- messages-option may be one of the following:
4821 -- DEFAULT (D) No messages are output if there is no error or warning.
4823 -- MEDIUM A small number of messages are output.
4825 -- HIGH A great number of messages are output, most of them not
4826 -- being useful for the user.
4828 S_Stub_Output : aliased constant S := "/OUTPUT=@" &
4832 -- Body file name. This should be set if the argument file name does not
4833 -- follow the GNAT file naming conventions. If this switch is omitted,
4834 -- the default name for the body will be obtained from the argument file
4835 -- name according to the GNAT file naming conventions.
4837 S_Stub_Project : aliased constant S := "/PROJECT_FILE=<" &
4839 -- /PROJECT_FILE=filename
4841 -- Specifies the main project file to be used. The project files rooted
4842 -- at the main project file will be parsed before any other processing.
4843 -- The source and object directories to be searched will be communicated
4844 -- to gnatstub through logical names ADA_PRJ_INCLUDE_FILE and
4845 -- ADA_PRJ_OBJECTS_FILE.
4847 S_Stub_Quiet : aliased constant S := "/QUIET " &
4852 -- Quiet mode: do not generate a confirmation when a body is successfully
4853 -- created, and do not generate a message when a body is not required for
4854 -- an argument unit.
4856 S_Stub_Search : aliased constant S := "/SEARCH=*" &
4858 -- /SEARCH=(directory[,...])
4860 -- When looking for source files also look in directories specified.
4862 S_Stub_Tree : aliased constant S := "/TREE_FILE=" &
4869 -- /TREE_FILE[=treefile-option]
4871 -- Specify what to do with the tree file.
4872 -- treefile-option is one of the following:
4874 -- OVERWRITE (D) Overwrite the existing tree file. If the current
4875 -- directory already contains the file which, according
4876 -- to the GNAT file naming rules should be considered
4877 -- as a tree file for the argument source file,
4878 -- gnatstub will refuse to create the tree file needed
4879 -- to create a sample body unless this option is chosen.
4881 -- SAVE Do not remove the tree file (i.e., the snapshot
4882 -- of the compiler internal structures used by gnatstub)
4883 -- after creating the body stub.
4885 -- REUSE Reuse the tree file (if it exists) instead of
4887 -- Instead of creating the tree file for the library
4888 -- unit declaration, gnatstub tries to find it in the
4889 -- current directory and use it for creating a body.
4890 -- If the tree file is not found, no body is created.
4891 -- This option also implies `SAVE', whether or not the
4892 -- latter is set explicitly.
4894 S_Stub_Verbose : aliased constant S := "/VERBOSE " &
4899 -- Verbose mode: generate version information.
4901 Stub_Switches : aliased constant Switches :=
4902 (S_Stub_Config 'Access,
4903 S_Stub_Current 'Access,
4905 S_Stub_Full 'Access,
4906 S_Stub_Header 'Access,
4907 S_Stub_Indent 'Access,
4908 S_Stub_Keep 'Access,
4909 S_Stub_Length 'Access,
4910 S_Stub_Mess 'Access,
4911 S_Stub_Output 'Access,
4912 S_Stub_Project 'Access,
4913 S_Stub_Quiet 'Access,
4914 S_Stub_Search 'Access,
4915 S_Stub_Tree 'Access,
4916 S_Stub_Verbose 'Access);
4918 ----------------------------
4919 -- Switches for GNAT XREF --
4920 ----------------------------
4922 S_Xref_All : aliased constant S := "/ALL_FILES " &
4927 -- If this switch is present, FIND and XREF will parse the read-only
4928 -- files found in the library search path. Otherwise, these files will
4929 -- be ignored. This option can be used to protect Gnat sources or your
4930 -- own libraries from being parsed, thus making FIND and XREF much
4931 -- faster, and their output much smaller.
4933 S_Xref_Deriv : aliased constant S := "/DERIVED_TYPES " &
4935 -- /NODERIVED_TYPES (D)
4938 -- Output the parent type reference for each matching derived types.
4940 S_Xref_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4942 -- /EXTERNAL_REFERENCE="name=val"
4944 -- Specifies an external reference to the project manager. Useful only if
4945 -- /PROJECT_FILE is used.
4948 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4950 S_Xref_Full : aliased constant S := "/FULL_PATHNAME " &
4952 -- /NOFULL_PATHNAME (D)
4955 -- If this switch is set, the output file names will be preceded by their
4956 -- directory (if the file was found in the search path). If this switch
4957 -- is not set, the directory will not be printed.
4959 S_Xref_Global : aliased constant S := "/IGNORE_LOCALS " &
4961 -- /NOIGNORE_LOCALS (D)
4964 -- If this switch is set, information is output only for library-level
4965 -- entities, ignoring local entities. The use of this switch may
4966 -- accelerate FIND and XREF.
4968 S_Xref_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4975 -- /MESSAGES_PROJECT_FILE[=messages-option]
4977 -- Specifies the "verbosity" of the parsing of project files.
4978 -- messages-option may be one of the following:
4980 -- DEFAULT (D) No messages are output if there is no error or warning.
4982 -- MEDIUM A small number of messages are output.
4984 -- HIGH A great number of messages are output, most of them not
4985 -- being useful for the user.
4987 S_Xref_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
4991 -- Do not look for sources in the system default directory.
4993 S_Xref_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
4997 -- Do not look for library files in the system default directory.
4999 S_Xref_Object : aliased constant S := "/OBJECT_SEARCH=*" &
5001 -- /OBJECT_SEARCH=(directory,...)
5003 -- When searching for library and object files, look in the specified
5004 -- directories. The order in which library files are searched is the same
5007 S_Xref_Project : aliased constant S := "/PROJECT=@" &
5011 -- Specify a project file to use. By default, FIND and XREF will try to
5012 -- locate a project file in the current directory.
5014 -- If a project file is either specified or found by the tools, then the
5015 -- content of the source directory and object directory lines are added
5016 -- as if they had been specified respectively by /SOURCE_SEARCH and
5019 S_Xref_Prj : aliased constant S := "/PROJECT_FILE=<" &
5021 -- /PROJECT_FILE=filename
5023 -- Specifies the main project file to be used. The project files rooted
5024 -- at the main project file will be parsed before doing any processing.
5025 -- The source and object directories to be searched will be communicated
5026 -- to gnatxref through logical names ADA_PRJ_INCLUDE_FILE and
5027 -- ADA_PRJ_OBJECTS_FILE.
5029 S_Xref_Search : aliased constant S := "/SEARCH=*" &
5031 -- /SEARCH=(directory,...)
5034 -- /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
5036 S_Xref_Source : aliased constant S := "/SOURCE_SEARCH=*" &
5038 -- /SOURCE_SEARCH=(directory,...)
5040 -- When looking for source files also look in the specified directories.
5041 -- The order in which source file search is undertaken is the same as for
5044 S_Xref_Output : aliased constant S := "/UNUSED " &
5046 -- /SOURCE_SEARCH=(directory,...)
5048 -- When looking for source files also look in the specified directories.
5049 -- The order in which source file search is undertaken is the same as for
5052 S_Xref_Tags : aliased constant S := "/TAGS " &
5057 -- Print a 'tags' file for vi.
5059 Xref_Switches : aliased constant Switches :=
5060 (S_Xref_All 'Access,
5061 S_Xref_Deriv 'Access,
5063 S_Xref_Full 'Access,
5064 S_Xref_Global 'Access,
5065 S_Xref_Mess 'Access,
5066 S_Xref_Nostinc 'Access,
5067 S_Xref_Nostlib 'Access,
5068 S_Xref_Object 'Access,
5069 S_Xref_Project 'Access,
5071 S_Xref_Search 'Access,
5072 S_Xref_Source 'Access,
5073 S_Xref_Output 'Access,
5074 S_Xref_Tags 'Access);