1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1996-2013, 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 3, 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 COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 -- This package contains, for each of the command of the GNAT driver, one
27 -- constant array; each component of this array is a string that defines,
28 -- in coded form as explained below, the conversion of a VMS qualifier of the
29 -- command to the corresponding switch of the GNAT tool corresponding to the
32 -- This package is used by the GNAT driver to invokes the GNAT tools with the
33 -- switches corresponding to the VMS qualifier and by the Project Manager to
34 -- convert VMS qualifiers in project files to their corresponding switch
37 -- This package is also an input to the tool that generates the VMS GNAT
38 -- help information automatically.
40 -- NOTE: the format of this package must follow the following rules, so that
41 -- the VMS GNAT help tool works properly:
43 -- - Each command zone (where the eventual qualifiers are declared) must
44 -- begin with a boxed comment of the form:
46 -- ---------------------------------
47 -- -- Switches for GNAT <COMMAND> --
48 -- ---------------------------------
50 -- where <COMMAND> is the name of a GNAT command in capital letters, for
51 -- example BIND, COMPILE, XREF, ...
53 -- - each qualifier declaration must be followed either by
54 -- - a comment starting with "-- NODOC", to indicate that there is
55 -- no documentation for this qualifier, or
56 -- - a contiguous sequence of comments that constitute the
57 -- documentation of the qualifier.
59 -- - each command zone ends with the declaration of the constant array
60 -- for the command, of the form:
62 -- <Command>__Switches : aliased constant Switches :=
70 -- The syntax of a qualifier declaration is as follows:
72 -- SWITCH_STRING ::= "/ command-qualifier-name TRANSLATION"
76 -- | DIRECTORIES_TRANSLATION
78 -- | NO_SPACE_FILE_TRANSL
79 -- | NUMERIC_TRANSLATION
80 -- | STRING_TRANSLATION
81 -- | OPTIONS_TRANSLATION
82 -- | COMMANDS_TRANSLATION
83 -- | ALPHANUMPLUS_TRANSLATION
84 -- | OTHER_TRANSLATION
86 -- DIRECT_TRANSLATION ::= space UNIX_SWITCHES
87 -- DIRECTORIES_TRANSLATION ::= =* UNIX_SWITCH *
88 -- DIRECTORY_TRANSLATION ::= =% UNIX_SWITCH %
89 -- FILE_TRANSLATION ::= =@ UNIX_SWITCH @
90 -- NO_SPACE_FILE_TRANSL ::= =< UNIX_SWITCH >
91 -- NUMERIC_TRANSLATION ::= =# UNIX_SWITCH # | # number #
92 -- STRING_TRANSLATION ::= =" UNIX_SWITCH "
93 -- OPTIONS_TRANSLATION ::= =OPTION {space OPTION}
94 -- COMMANDS_TRANSLATION ::= =? ARGS space command-name
95 -- ALPHANUMPLUS_TRANSLATION ::= =| UNIX_SWITCH |
97 -- UNIX_SWITCHES ::= UNIX_SWITCH {, UNIX_SWITCH}
99 -- UNIX_SWITCH ::= unix-switch-string | !unix-switch-string | `string'
101 -- OPTION ::= option-name space UNIX_SWITCHES
103 -- ARGS ::= -cargs | -bargs | -largs
105 -- Here command-qual is the name of the switch recognized by the GNATCmd.
106 -- This is always given in upper case in the templates, although in the
107 -- actual commands, either upper or lower case is allowed.
109 -- The unix-switch-string always starts with a minus, and has no commas
110 -- or spaces in it. Case is significant in the unix switch string. If a
111 -- unix switch string is preceded by the not sign (!) it means that the
112 -- effect of the corresponding command qualifier is to remove any previous
113 -- occurrence of the given switch in the command line.
115 -- The DIRECTORIES_TRANSLATION format is used where a list of directories
116 -- is given. This possible corresponding formats recognized by GNATCmd are
117 -- as shown by the following example for the case of PATH
120 -- PATH=(direc,direc,direc,direc)
122 -- When more than one directory is present for the DIRECTORIES case, then
123 -- multiple instances of the corresponding unix switch are generated,
124 -- with the file name being substituted for the occurrence of *.
126 -- The FILE_TRANSLATION format is similar except that only a single
127 -- file is allowed, not a list of files, and only one unix switch is
128 -- generated as a result.
130 -- the NO_SPACE_FILE_TRANSL is similar to FILE_TRANSLATION, except that
131 -- no space is inserted between the switch and the file name.
133 -- The NUMERIC_TRANSLATION format is similar to the FILE_TRANSLATION case
134 -- except that the parameter is a decimal integer in the range 0 to 999999.
136 -- For the OPTIONS_TRANSLATION case, GNATCmd similarly permits one or
137 -- more options to appear (although only in some cases does the use of
138 -- multiple options make logical sense). For example, taking the
139 -- case of ERRORS for GCC, the following are all allowed:
142 -- /ERRORS=(FULL,VERBOSE)
143 -- /ERRORS=(BRIEF IMMEDIATE)
145 -- If no option is provided (e.g. just /ERRORS is written), then the
146 -- first option in the list is the default option. For /ERRORS this
147 -- is NORMAL, so /ERRORS with no option is equivalent to /ERRORS=NORMAL.
149 -- The COMMANDS_TRANSLATION case is only used for gnatmake, to correspond
150 -- to the use of -cargs, -bargs and -largs (the ARGS string as indicated
151 -- is one of these three possibilities). The name given by COMMAND is the
152 -- corresponding command name to be used to interpret the switches to be
153 -- passed on. Switches of this type set modes, e.g. /COMPILER_QUALIFIERS
154 -- sets the mode so that all subsequent switches, up to another switch
155 -- with COMMANDS_TRANSLATION apply to the corresponding commands issued
156 -- by the make utility. For example
158 -- /COMPILER_QUALIFIERS /LIST /BINDER_QUALIFIERS /MAIN
159 -- /COMPILER_QUALIFIERS /NOLIST /COMPILE_CHECKS=SYNTAX
161 -- Clearly these switches must come at the end of the list of switches
162 -- since all subsequent switches apply to an issued command.
164 -- For the DIRECT_TRANSLATION case, an implicit additional qualifier
165 -- declaration is created by prepending NO to the name of the qualifier,
166 -- and then inverting the sense of the UNIX_SWITCHES string. For example,
167 -- given the qualifier definition:
171 -- An implicit qualifier definition is created:
175 -- In the case where, a ! is already present, inverting the sense of the
176 -- switch means removing it.
179 -- A synonym to shorten the table
181 type String_Ptr is access constant String;
182 -- String pointer type used throughout
184 type Switches is array (Natural range <>) of String_Ptr;
185 -- Type used for array of switches
187 type Switches_Ptr is access constant Switches;
189 ----------------------------
190 -- Switches for GNAT BIND --
191 ----------------------------
193 S_Bind_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
195 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
197 -- Add directories to the project search path.
199 S_Bind_ALI : aliased constant S := "/ALI_LIST " &
204 -- Output full names of all the ALI files in the partition. The output is
205 -- written to SYS$OUTPUT.
207 S_Bind_Bind : aliased constant S := "/BIND_FILE=" &
212 -- /BIND_FILE[=bind-file-option]
214 -- Specifies the language of the binder generated file.
216 -- ADA (D) Binder file is Ada.
218 -- C Binder file is 'C'.
220 S_Bind_Build : aliased constant S := "/BUILD_LIBRARY=|" &
222 -- /BUILD_LIBRARY=xxx
224 -- Binds the units for library building. In this case the adainit and
225 -- adafinal procedures are rename to xxxinit and xxxfinal. Implies
228 S_Bind_Current : aliased constant S := "/CURRENT_DIRECTORY " &
230 -- /CURRENT_DIRECTORY (D)
231 -- /NOCURRENT_DIRECTORY
233 -- Look for source, library or object files in the default directory.
235 S_Bind_Debug : aliased constant S := "/DEBUG=" &
250 -- /DEBUG[=debug-level]
253 -- Specify level of debugging information generated for the elaboration
254 -- routine. See corresponding qualifier for GNAT COMPILE.
256 S_Bind_DebugX : aliased constant S := "/NODEBUG " &
258 -- NODOC (see /DEBUG)
260 S_Bind_Elab : aliased constant S := "/ELABORATION_DEPENDENCIES " &
262 -- /ELABORATION_DEPENDENCIES
263 -- /NOELABORATION_DEPENDENCIES (D)
265 -- Output complete list of elaboration-order dependencies, showing the
266 -- reason for each dependency. This output can be rather extensive but may
267 -- be useful in diagnosing problems with elaboration order. The output is
268 -- written to SYS$OUTPUT.
270 S_Bind_Error : aliased constant S := "/ERROR_LIMIT=#" &
274 -- Limit number of detected errors to nnn (1-999999).
276 S_Bind_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
278 -- /EXTERNAL_REFERENCE="name=val"
280 -- Specifies an external reference to the project manager. Useful only if
281 -- /PROJECT_FILE is used.
284 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
286 S_Bind_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
288 -- /NOFOLLOW_LINKS_FOR_FILES (D)
289 -- /FOLLOW_LINKS_FOR_FILES
291 -- Follow links when parsing project files
293 S_Bind_Force : aliased constant S := "/FORCE_ELAB_FLAGS " &
295 -- /NOFORCE_ELAB_FLAGS (D)
298 -- Force checking of elaboration Flags
300 S_Bind_Help : aliased constant S := "/HELP " &
304 -- Output usage information.
306 S_Bind_Init : aliased constant S := "/INITIALIZE_SCALARS=" &
313 -- /INITIALIZE_SCALARS[=scalar-option]
315 -- Indicate how uninitialized scalar values for which a pragma
316 -- Initialize_Scalars applies should be initialized.
317 -- scalar-option may be one of the following:
319 -- INVALID (D) Initialize with an invalid value.
320 -- LOW Initialize with the lowest valid value of the subtype.
321 -- HIGH Initialize with the highest valid value of the subtype.
323 S_Bind_Leap : aliased constant S := "/ENABLE_LEAP_SECONDS " &
325 -- /ENABLE_LEAP_SECONDS
326 -- /NOENABLE_LEAP_SECONDS (D)
328 -- Enable leap seconds support in Ada.Calendar and its children.
330 S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
332 -- /LIBRARY_SEARCH=(direc[,...])
334 -- When looking for library and object files look also in directories
337 S_Bind_Linker : aliased constant S := "/LINKER_OPTION_LIST " &
339 -- /NOLINKER_OPTION_LIST (D)
340 -- /LINKER_OPTION_LIST
342 -- Output linker options to SYS$OUTPUT. Includes library search
343 -- paths, contents of pragmas Ident and Linker_Options, and
344 -- libraries added by GNAT BIND.
346 S_Bind_Main : aliased constant S := "/MAIN " &
350 -- The main program is in Ada.
354 -- The main program is not in Ada.
356 S_Bind_Alloc32 : aliased constant S := "/32_MALLOC " &
360 -- Use 32-bit allocations for `__gnat_malloc' (and thus for
363 S_Bind_Alloc64 : aliased constant S := "/64_MALLOC " &
367 -- Use 64-bit allocations for `__gnat_malloc' (and thus for
370 S_Bind_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
377 -- /MESSAGES_PROJECT_FILE[=messages-option]
379 -- Specifies the "verbosity" of the parsing of project files.
380 -- messages-option may be one of the following:
382 -- DEFAULT (D) No messages are output if there is no error or warning.
384 -- MEDIUM A small number of messages are output.
386 -- HIGH A great number of messages are output, most of them not
387 -- being useful for the user.
389 S_Bind_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
393 -- Do not look for sources the in the system default directory.
395 S_Bind_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
399 -- Do not look for library files in the system default directory.
401 S_Bind_No_Time : aliased constant S := "/NO_TIME_STAMP_CHECK " &
403 -- NODOC (see /TIME_STAMP_CHECK)
405 S_Bind_Object : aliased constant S := "/OBJECT_LIST " &
407 -- /NOOBJECT_LIST (D)
410 -- Output full names of all the object files that must be linked to
411 -- provide the Ada component of the program. The output is written to
414 S_Bind_Order : aliased constant S := "/ORDER_OF_ELABORATION " &
416 -- /NOORDER_OF_ELABORATION (D)
417 -- /ORDER_OF_ELABORATION
419 -- Output chosen elaboration order. The output is written to SYS$OUTPUT.
421 S_Bind_Output : aliased constant S := "/OUTPUT=@" &
425 -- File name to use for the program containing the elaboration code.
427 S_Bind_OutputX : aliased constant S := "/NOOUTPUT " &
431 -- Check only. Do not generate the binder output file.
433 -- In this mode the binder performs all error checks but does not generate
436 S_Bind_Pess : aliased constant S := "/PESSIMISTIC_ELABORATION " &
438 -- /PESSIMISTIC_ELABORATION
440 -- Causes the binder to choose a "pessimistic" elaboration order, i.e. one
441 -- which is most likely to cause elaboration order problems. This can be
442 -- useful in testing portable code to make sure that there are no missing
443 -- elaborate pragmas.
445 S_Bind_Project : aliased constant S := "/PROJECT_FILE=<" &
447 -- /PROJECT_FILE=filename
449 -- Specifies the main project file to be used. The project files rooted
450 -- at the main project file will be parsed before the invocation of the
451 -- binder. The source and object directories to be searched will be
452 -- communicated to the binder through logical names ADA_PRJ_INCLUDE_FILE
453 -- and ADA_PRJ_OBJECTS_FILE.
455 S_Bind_Read : aliased constant S := "/READ_SOURCES=" &
462 -- /READ_SOURCES[=(keyword[,...])]
465 -- The following keyword are accepted:
467 -- ALL (D) Require source files to be present. In this mode, the
468 -- binder insists on being able to locate all source files
469 -- that are referenced and checks their consistency. In
470 -- normal mode, if a source file cannot be located it is
471 -- simply ignored. If you specify the ALL keyword, a
472 -- missing source file is an error.
474 -- NONE Exclude source files. In this mode, the binder only
475 -- checks that ALI files are consistent with one another.
476 -- source files are not accessed. The binder runs faster
477 -- in this mode, and there is still a guarantee that the
478 -- resulting program is self-consistent.
480 -- If a source file has been edited since it was last
481 -- compiled and you specify the NONE keyword, the binder
482 -- will not detect that the object file is out of date
483 -- with the source file.
485 -- This is the same as specifying /NOREAD_SOURCES.
487 -- AVAILABLE Check that object files are consistent with one
488 -- another and are consistent with any source files that
491 S_Bind_ReadX : aliased constant S := "/NOREAD_SOURCES " &
493 -- NODOC (see /READ_SOURCES)
495 S_Bind_Rename : aliased constant S := "/RENAME_MAIN=<" &
499 -- Renames the generated main program from main to xxx.
500 -- This is useful in the case of some cross-building environments, where
501 -- the actual main program is separate from the one generated
504 S_Bind_Report : aliased constant S := "/REPORT_ERRORS=" &
511 -- /REPORT_ERRORS[=(keyword[,...])]
517 -- With the DEFAULT keyword (which is not the default when the binder is
518 -- run from GNAT BIND) or the /NOREPORT_ERRORS qualifier, brief error
519 -- messages are generated to SYS$ERROR. If the VERBOSE keyword is
520 -- present, a header is written to SYS$OUTPUT and any error messages are
521 -- directed to SYS$OUTPUT All that is written to SYS$ERROR is a brief
524 -- If the BRIEF keyword is specified, the binder will generate brief error
525 -- messages to SYS$ERROR even if verbose mode is specified. This is
526 -- relevant only when used together with the VERBOSE keyword or /VERBOSE
529 S_Bind_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
531 -- NODOC (see /REPORT_ERRORS)
533 S_Bind_Restr : aliased constant S := "/RESTRICTION_LIST " &
535 -- /NORESTRICTION_LIST (D)
538 -- Generate list of pragma Restrictions that could be applied to the
539 -- current unit. This is useful for code audit purposes, and also may be
540 -- used to improve code generation in some cases.
542 S_Bind_Return : aliased constant S := "/RETURN_CODES=" &
547 -- /RETURN_CODES=POSIX (D)
550 -- Specifies the style of default exit code returned. Must be used in
551 -- conjunction with and match the Link qualifier with same name.
553 -- POSIX (D) Return Posix success (0) by default.
555 -- VMS Return VMS success (1) by default.
557 S_Bind_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
559 -- /RUNTIME_SYSTEM=xxx
561 -- Binds against an alternate runtime system named xxx or RTS-xxx.
563 S_Bind_Search : aliased constant S := "/SEARCH=*" &
565 -- /SEARCH=(directory[,...])
567 -- When looking for source or object files also look in directories
570 -- This is the same as specifying both /LIBRARY_SEARCH and /SOURCE_SEARCH
573 S_Bind_Shared : aliased constant S := "/SHARED " &
578 -- Link against a shared GNAT run time when available.
580 S_Bind_Slice : aliased constant S := "/TIME_SLICE=#" &
584 -- Set the time slice value to nnn milliseconds. A value of zero means no
585 -- time slicing and also indicates to the tasking run time to match as
586 -- close as possible to the annex D requirements of the RM.
588 S_Bind_Source : aliased constant S := "/SOURCE_SEARCH=*" &
590 -- /SOURCE_SEARCH=(directory[,...])
592 -- When looking for source files also look in directories specified.
594 S_Bind_Static : aliased constant S := "/STATIC " &
599 -- Link against a static GNAT run time.
601 S_Bind_Store : aliased constant S := "/STORE_TRACEBACKS " &
603 -- /STORE_TRACEBACKS (D)
604 -- /NOSTORE_TRACEBACKS
606 -- Store tracebacks in exception occurrences.
607 -- This is the default on VMS, with the zero-cost exception mechanism.
608 -- This qualifier has no impact, except when using the setjmp/longjmp
609 -- exception mechanism, with the GNAT COMPILE qualifier /LONGJMP_SETJMP.
611 S_Bind_Subdirs : aliased constant S := "/SUBDIRS=<" &
615 -- The actual directories (object, exec, library, ...) are subdirectories
616 -- of the directory specified in the project file. If the subdirectory
617 -- does not exist, it is created automatically.
619 S_Bind_Time : aliased constant S := "/TIME_STAMP_CHECK " &
621 -- /TIME_STAMP_CHECK (D)
623 -- Time stamp errors will be treated as errors.
625 -- /NOTIME_STAMP_CHECK
627 -- Ignore time stamp errors. Any time stamp error messages are treated as
628 -- warning messages. This switch essentially disconnects the normal
629 -- consistency checking, and the resulting program may have undefined
630 -- semantics if inconsistent units are present.
632 -- This means that /NOTIME_STAMP_CHECK should be used only in unusual
633 -- situations, with extreme care.
635 S_Bind_Verbose : aliased constant S := "/VERBOSE " &
640 -- Equivalent to /REPORT_ERRORS=VERBOSE.
642 S_Bind_Warn : aliased constant S := "/WARNINGS=" &
649 -- /WARNINGS[=(keyword[,...])]
652 -- The following keywords are supported:
654 -- NORMAL (D) Print warning messages and treat them as warning.
655 -- SUPPRESS Suppress all warning messages (same as /NOWARNINGS).
656 -- ERROR Treat any warning messages as fatal errors
658 S_Bind_WarnX : aliased constant S := "/NOWARNINGS " &
660 -- NODOC (see /WARNINGS)
662 S_Bind_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" &
675 -- /NOWIDE_CHARACTER_ENCODING (D)
676 -- /WIDE_CHARACTER_ENCODING[=encode-type]
678 -- Specifies the mechanism used to encode wide characters, overriding
679 -- the default as set by the /WIDE_CHARACTER_ENCODING option for the
680 -- compilation of the main program.
682 S_Bind_Zero : aliased constant S := "/ZERO_MAIN " &
687 -- Normally the binder checks that the unit name given on the command line
688 -- corresponds to a suitable main subprogram. When /ZERO_MAIN is used,
689 -- a list of ALI files can be given, and the execution of the program
690 -- consists of elaboration of these units in an appropriate order.
692 Bind_Switches : aliased constant Switches :=
696 S_Bind_Build 'Access,
697 S_Bind_Current 'Access,
698 S_Bind_Debug 'Access,
699 S_Bind_DebugX 'Access,
701 S_Bind_Error 'Access,
703 S_Bind_Follow 'Access,
704 S_Bind_Force 'Access,
708 S_Bind_Library 'Access,
709 S_Bind_Linker 'Access,
711 S_Bind_Alloc32 'Access,
712 S_Bind_Alloc64 'Access,
714 S_Bind_Nostinc 'Access,
715 S_Bind_Nostlib 'Access,
716 S_Bind_No_Time 'Access,
717 S_Bind_Object 'Access,
718 S_Bind_Order 'Access,
719 S_Bind_Output 'Access,
720 S_Bind_OutputX 'Access,
722 S_Bind_Project 'Access,
724 S_Bind_ReadX 'Access,
725 S_Bind_Rename 'Access,
726 S_Bind_Report 'Access,
727 S_Bind_ReportX 'Access,
728 S_Bind_Restr 'Access,
729 S_Bind_Return 'Access,
731 S_Bind_Search 'Access,
732 S_Bind_Shared 'Access,
733 S_Bind_Slice 'Access,
734 S_Bind_Source 'Access,
735 S_Bind_Static 'Access,
736 S_Bind_Store 'Access,
737 S_Bind_Subdirs 'Access,
739 S_Bind_Verbose 'Access,
741 S_Bind_WarnX 'Access,
743 S_Bind_Zero 'Access);
745 -----------------------------
746 -- Switches for GNAT CHECK --
747 -----------------------------
749 S_Check_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
751 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
753 -- Add directories to the project search path.
755 S_Check_All : aliased constant S := "/ALL " &
760 -- Also check the components of the GNAT run time and process the needed
761 -- components of the GNAT RTL when building and analyzing the global
762 -- structure for checking the global rules.
764 S_Check_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
766 -- /EXTERNAL_REFERENCE="name=val"
768 -- Specifies an external reference to the project manager. Useful only if
769 -- /PROJECT_FILE is used.
772 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
774 S_Check_Files : aliased constant S := "/FILES=@" &
778 -- Take as arguments the files that are listed in the specified
781 S_Check_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
783 -- /NOFOLLOW_LINKS_FOR_FILES (D)
784 -- /FOLLOW_LINKS_FOR_FILES
786 -- Follow links when parsing project files
788 S_Check_Help : aliased constant S := "/HELP " &
793 -- Print information about currently implemented checks.
795 S_Check_Locs : aliased constant S := "/LOCS " &
800 -- Use full source locations references in the report file.
802 S_Diagnosis : aliased constant S := "/DIAGNOSTIC_LIMIT=#" &
804 -- /DIAGNOSTIC_LIMIT=500 (D)
805 -- /DIAGNOSTIC_LIMIT=nnn
807 -- NNN is a decimal integer in the range of 1 to 1000 and limits the
808 -- number of diagnostic messages to be generated into Stdout to that
809 -- number. Once that number has been reached, gnatcheck stops
810 -- to print out diagnoses into Stderr. If NNN is equal to 0, this means
811 -- that there is no limit on the number of diagnoses in Stdout.
813 S_Check_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
820 -- /MESSAGES_PROJECT_FILE[=messages-option]
822 -- Specifies the "verbosity" of the parsing of project files.
823 -- messages-option may be one of the following:
825 -- DEFAULT (D) No messages are output if there is no error or warning.
827 -- MEDIUM A small number of messages are output.
829 -- HIGH A great number of messages are output, most of them not
830 -- being useful for the user.
832 S_Check_Project : aliased constant S := "/PROJECT_FILE=<" &
834 -- /PROJECT_FILE=filename
836 -- Specifies the main project file to be used. The project files rooted
837 -- at the main project file will be parsed before the invocation of the
838 -- gnatcheck. The source directories to be searched will be communicated
839 -- to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE.
841 S_Check_Quiet : aliased constant S := "/QUIET " &
846 -- Work quietly, only output warnings and errors.
848 S_Check_Time : aliased constant S := "/TIME " &
853 -- Print out execution time
855 S_Check_Log : aliased constant S := "/LOG " &
860 -- Duplicate all the output sent to Stderr into a log file.
862 S_Check_Short : aliased constant S := "/SHORT " &
867 -- Generate a short form of the report file.
869 S_Check_Include : aliased constant S := "/INCLUDE_FILE=@" &
872 -- /INCLUDE_FILE=filename
874 -- Add the content of the specified text file to the generated report
877 S_Check_Subdirs : aliased constant S := "/SUBDIRS=<" &
881 -- The actual directories (object, exec, library, ...) are subdirectories
882 -- of the directory specified in the project file. If the subdirectory
883 -- does not exist, it is created automatically.
885 S_Check_Template : aliased constant S := "/TEMPLATE=@" &
887 -- /TEMPLATE=filename
889 -- Generate the rule template into the specified file.
891 S_Check_Verb : aliased constant S := "/VERBOSE " &
896 -- The version number and copyright notice are output, as well as exact
897 -- copies of the gnat1 commands spawned to obtain the chop control
900 S_Check_Out : aliased constant S := "/OUTPUT=@" &
904 -- Specify the name of the output file.
906 Check_Switches : aliased constant Switches :=
907 (S_Check_Add 'Access,
911 S_Check_Files 'Access,
912 S_Check_Follow 'Access,
913 S_Check_Help 'Access,
914 S_Check_Locs 'Access,
915 S_Check_Mess 'Access,
916 S_Check_Project 'Access,
917 S_Check_Quiet 'Access,
918 S_Check_Time 'Access,
920 S_Check_Short 'Access,
921 S_Check_Include 'Access,
922 S_Check_Subdirs 'Access,
923 S_Check_Template'Access,
924 S_Check_Verb 'Access,
925 S_Check_Out 'Access);
927 ----------------------------
928 -- Switches for GNAT CHOP --
929 ----------------------------
931 S_Chop_Comp : aliased constant S := "/COMPILATION " &
933 -- /NOCOMPILATION (D)
936 -- Compilation mode, handle configuration pragmas strictly according to
939 S_Chop_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
941 -- /FILE_NAME_MAX_LENGTH[=nnn]
943 -- Limit generated file names to NNN (default of 8) characters. This is
944 -- useful if the resulting set of files is required to be interoperable
945 -- with systems like MS-DOS which limit the length of file names.
947 S_Chop_Help : aliased constant S := "/HELP " &
952 -- Print usage information.
954 S_Chop_Over : aliased constant S := "/OVERWRITE " &
959 -- Overwrite existing file names. Normally GNAT CHOP regards it as a
960 -- fatal error situation if there is already a file with the same name as
961 -- a file it would otherwise output. The /OVERWRITE qualifier bypasses
962 -- this check, and any such existing files will be silently overwritten.
964 S_Chop_Pres : aliased constant S := "/PRESERVE " &
969 -- Causes the file modification time stamp of the input file to be
970 -- preserved and used for the time stamp of the output file(s). This may
971 -- be useful for preserving coherency of time stamps in an environment
972 -- where gnatchop is used as part of a standard build process.
974 S_Chop_Quiet : aliased constant S := "/QUIET " &
979 -- Work quietly, only output warnings and errors.
981 S_Chop_Ref : aliased constant S := "/REFERENCE " &
986 -- Generate "Source_Reference" pragmas. Use this qualifier if the output
987 -- files are regarded as temporary and development is to be done in terms
988 -- of the original unchopped file. The /REFERENCE qualifier causes
989 -- "Source_Reference" pragmas to be inserted into each of the generated
990 -- files to refers back to the original file name and line number. The
991 -- result is that all error messages refer back to the original unchopped
994 -- In addition, the debugging information placed into the object file
995 -- (when the /DEBUG qualifier of GNAT COMPILE or GNAT MAKE is specified)
996 -- also refers back to this original file so that tools like profilers
997 -- and debuggers will give information in terms of the original unchopped
1000 S_Chop_Verb : aliased constant S := "/VERBOSE " &
1005 -- The version number and copyright notice are output, as well as exact
1006 -- copies of the gnat1 commands spawned to obtain the chop control
1009 Chop_Switches : aliased constant Switches :=
1010 (S_Chop_Comp 'Access,
1011 S_Chop_File 'Access,
1012 S_Chop_Help 'Access,
1013 S_Chop_Over 'Access,
1014 S_Chop_Pres 'Access,
1015 S_Chop_Quiet 'Access,
1017 S_Chop_Verb 'Access);
1019 -----------------------------
1020 -- Switches for GNAT CLEAN --
1021 -----------------------------
1023 S_Clean_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
1025 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
1027 -- Add directories to the project search path.
1029 S_Clean_Compil : aliased constant S := "/COMPILER_FILES_ONLY " &
1031 -- /NOCOMPILER_FILES_ONLY (D)
1032 -- /COMPILER_FILES_ONLY
1034 -- Only attempt to delete the files produced by the compiler, not those
1035 -- produced by the binder or the linker. The files that are not to be
1036 -- deleted are library files, interface copy files, binder generated files
1037 -- and executable files.
1039 S_Clean_Current : aliased constant S := "/CURRENT_DIRECTORY " &
1041 -- /CURRENT_DIRECTORY (D)
1043 -- Look for ALI or object files in the directory where GNAT CLEAN was
1046 -- /NOCURRENT_DIRECTORY
1048 -- Do not look for ALI or object files in the directory where GNAT CLEAN
1051 S_Clean_Delete : aliased constant S := "/DELETE " &
1055 -- Delete the files that are not read-only.
1059 -- Informative-only mode. Do not delete any files. Output the list of the
1060 -- files that would have been deleted if this switch was not specified.
1062 S_Clean_Dirobj : aliased constant S := "/DIRECTORY_OBJECTS=@" &
1064 -- /DIRECTORY_OBJECTS=<file>
1066 -- Find the object files and .ALI files in <file>.
1067 -- This qualifier is not compatible with /PROJECT_FILE.
1069 S_Clean_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
1071 -- /EXTERNAL_REFERENCE="name=val"
1073 -- Specifies an external reference to the project manager. Useful only if
1074 -- /PROJECT_FILE is used.
1077 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
1079 S_Clean_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
1081 -- /NOFOLLOW_LINKS_FOR_FILES (D)
1082 -- /FOLLOW_LINKS_FOR_FILES
1084 -- Follow links when parsing project files
1086 S_Clean_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
1088 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
1089 -- /FULL_PATH_IN_BRIEF_MESSAGES
1091 -- When using project files, if some errors or warnings are detected
1092 -- during parsing and verbose mode is not in effect (no use of qualifier
1093 -- /VERBOSE), then error lines start with the full path name of the
1094 -- project file, rather than its simple file name.
1096 S_Clean_Help : aliased constant S := "/HELP " &
1101 -- Output a message explaining the usage of gnatclean.
1103 S_Clean_Index : aliased constant S := "/SOURCE_INDEX=#" &
1105 -- /SOURCE_INDEX=nnn
1107 -- Specifies the index of the units in the source file
1108 -- By default, source files are mono-unit and there is no index
1110 S_Clean_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
1117 -- /MESSAGES_PROJECT_FILE[=messages-option]
1119 -- Specifies the "verbosity" of the parsing of project files.
1120 -- messages-option may be one of the following:
1122 -- DEFAULT (D) No messages are output if there is no error or warning.
1124 -- MEDIUM A small number of messages are output.
1126 -- HIGH A great number of messages are output, most of them not
1127 -- being useful for the user.
1129 S_Clean_Object : aliased constant S := "/OBJECT_SEARCH=*" &
1131 -- /OBJECT_SEARCH=(directory,...)
1133 -- When searching for library and object files, look in the specified
1134 -- directories. The order in which library files are searched is the same
1137 S_Clean_Project : aliased constant S := "/PROJECT_FILE=<" &
1139 -- /PROJECT_FILE=filename
1141 -- Specifies the main project file to be used. The project files rooted
1142 -- at the main project file will be parsed before the invocation of the
1143 -- compiler. The source and object directories to be searched will be
1144 -- communicated to gnatclean through logical names ADA_PRJ_INCLUDE_FILE
1145 -- and ADA_PRJ_OBJECTS_FILE.
1147 S_Clean_Quiet : aliased constant S := "/QUIET " &
1152 -- Quiet output. If there are no error, do not output anything, except in
1153 -- verbose mode (qualifier /VERBOSE) or in informative-only mode
1154 -- (qualifier /NODELETE).
1156 S_Clean_Recurs : aliased constant S := "/RECURSIVE " &
1161 -- When a project file is specified (using switch -P), clean all imported
1162 -- and extended project files, recursively. If this qualifier is not
1163 -- specified, only the files related to the main project file are to be
1164 -- deleted. This qualifier has no effect if no project file is specified.
1166 S_Clean_Search : aliased constant S := "/SEARCH=*" &
1168 -- /SEARCH=(directory,...)
1170 -- Equivalent to /OBJECT_SEARCH=(directory,...).
1172 S_Clean_Subdirs : aliased constant S := "/SUBDIRS=<" &
1176 -- The actual directories (object, exec, library, ...) are subdirectories
1177 -- of the directory specified in the project file. If the subdirectory
1178 -- does not exist, it is created automatically.
1180 S_Clean_USL : aliased constant S := "/UNCHECKED_SHARED_LIB_IMPORTS " &
1181 "--unchecked-shared-lib-imports";
1182 -- /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
1183 -- /UNCHECKED_SHARED_LIB_IMPORTS
1185 -- Allow shared library projects to import static library projects
1187 S_Clean_Verbose : aliased constant S := "/VERBOSE " &
1194 Clean_Switches : aliased constant Switches :=
1195 (S_Clean_Add 'Access,
1196 S_Clean_Compil 'Access,
1197 S_Clean_Current'Access,
1198 S_Clean_Delete 'Access,
1199 S_Clean_Dirobj 'Access,
1200 S_Clean_Ext 'Access,
1201 S_Clean_Follow 'Access,
1202 S_Clean_Full 'Access,
1203 S_Clean_Help 'Access,
1204 S_Clean_Index 'Access,
1205 S_Clean_Mess 'Access,
1206 S_Clean_Object 'Access,
1207 S_Clean_Project'Access,
1208 S_Clean_Quiet 'Access,
1209 S_Clean_Recurs 'Access,
1210 S_Clean_Search 'Access,
1211 S_Clean_Subdirs'Access,
1212 S_Clean_Verbose'Access,
1213 S_Clean_USL 'Access);
1215 -------------------------------
1216 -- Switches for GNAT COMPILE --
1217 -------------------------------
1219 S_GCC_Ada_83 : aliased constant S := "/83 " &
1224 -- Although GNAT is primarily an Ada 95 compiler, it accepts this
1225 -- qualifier to specify that an Ada 83 mode program is being compiled. If
1226 -- you specify this qualifier, GNAT rejects Ada 95 extensions and applies
1227 -- Ada 83 semantics. It is not possible to guarantee this qualifier does
1228 -- a perfect job; for example, some subtle tests of pathological cases,
1229 -- such as are found in ACVC tests that have been removed from the ACVC
1230 -- suite for Ada 95, may not compile correctly. However for practical
1231 -- purposes, using this qualifier should ensure that programs that
1232 -- compile correctly under the /83 qualifier can be ported reasonably
1233 -- easily to an Ada 83 compiler. This is the main use of this qualifier.
1235 -- With few exceptions (most notably the need to use "<>" on
1236 -- unconstrained generic formal parameters), it is not necessary to use
1237 -- this qualifier switch when compiling Ada 83 programs, because, with
1238 -- rare and obscure exceptions, Ada 95 is upwardly compatible with Ada
1239 -- 83. This means that a correct Ada 83 program is usually also a correct
1242 S_GCC_Ada_95 : aliased constant S := "/95 " &
1246 -- Allows GNAT to recognize the full range of Ada 95 constructs.
1247 -- This is the normal default for GNAT Pro.
1249 S_GCC_Ada_05 : aliased constant S := "/05 " &
1253 -- Allows GNAT to recognize the full range of Ada 2005 constructs.
1255 S_GCC_Ada_2005 : aliased constant S := "/2005 " &
1259 -- Allows GNAT to recognize the full range of Ada 2005 constructs.
1260 -- Equivalent to /05 (/2005 is the preferred usage).
1262 S_GCC_Ada_12 : aliased constant S := "/12 " &
1266 -- Allows GNAT to recognize all implemented proposed Ada 2012
1267 -- extensions. See features file for list of implemented features.
1269 S_GCC_Ada_2012 : aliased constant S := "/2012 " &
1273 -- Allows GNAT to recognize all implemented proposed Ada 2012
1274 -- extensions. See features file for list of implemented features.
1275 -- Equivalent to /12 (/2012 is the preferred usage).
1277 S_GCC_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
1279 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
1281 -- Add directories to the project search path.
1283 S_GCC_AlCheck : aliased constant S := "/ALIASING_CHECK " &
1285 -- /NOALIASING_CHECK (D)
1288 -- Check that there are no aliased parameters in subprogram calls.
1290 S_GCC_Asm : aliased constant S := "/ASM " &
1295 -- Use to cause the assembler source file to be generated, using S as the
1296 -- filetype, instead of the object file. This may be useful if you need
1297 -- to examine the generated assembly code.
1299 S_GCC_AValid : aliased constant S := "/ASSUME_VALID " &
1301 -- /NO_ASSUME_VALID (D)
1304 -- Use to tell the compiler to assume that all objects have valid values
1305 -- except those occurring as prefixes to 'Valid attributes. In the default
1306 -- mode, the compiler assumes that values may be invalid unless it can
1307 -- be sure that they are valid, and code is generated to allow for this
1308 -- possibility. The use of /ASSUME_VALID will improve the code.
1310 S_GCC_CategW : aliased constant S := "/CATEGORIZATION_WARNINGS " &
1312 -- /NO_CATEGORIZATION_WARNINGS (D)
1313 -- /CATEGORIZATION_WARNINGS
1315 -- Use to tell the compiler to disable categorization dependency errors.
1316 -- Ada requires that units that WITH one another have compatible
1317 -- categories, for example a Pure unit cannot WITH a Preelaborate unit.
1318 -- If this switch is used, these errors become warnings (which can be
1319 -- ignored, or suppressed in the usual manner). This can be useful in
1320 -- some specialized circumstances such as the temporary use of special
1323 S_GCC_Checks : aliased constant S := "/CHECKS=" &
1325 "-gnato,!-gnatE,!-gnatp " &
1333 "!-gnato,!-gnatp " &
1341 -- /CHECKS[=(keyword[,...])]
1343 -- If you compile with the default options, GNAT will insert many runtime
1344 -- checks into the compiled code, including code that performs range
1345 -- checking against constraints, but not arithmetic overflow checking for
1346 -- integer operations (including division by zero) or checks for access
1347 -- before elaboration on subprogram calls. All other runtime checks, as
1348 -- required by the Ada 95 Reference Manual, are generated by default.
1350 -- You may specify one or more of the following keywords to the /CHECKS
1351 -- qualifier to modify this behavior:
1353 -- DEFAULT The behavior described above. This is the default
1354 -- if the /CHECKS qualifier is not present on the
1355 -- command line. Same as /NOCHECKS.
1357 -- OVERFLOW Enables overflow checking in CHECKED mode for integer
1358 -- operations and checks for access before elaboration
1359 -- on subprogram calls. This causes GNAT to generate
1360 -- slower and larger executable programs by adding code
1361 -- to check for both overflow and division by zero
1362 -- (resulting in raising "Constraint_Error" as required
1363 -- by Ada semantics).
1364 -- Similarly, GNAT does not generate elaboration check
1365 -- by default, and you must specify this keyword to
1368 -- Note that this keyword does not affect the code
1369 -- generated for any floating-point operations; it
1370 -- applies only to integer operations. For the case of
1371 -- floating-point, GNAT has the "Machine_Overflows"
1372 -- attribute set to "False" and the normal mode of
1373 -- operation is to generate IEEE NaN and infinite values
1374 -- on overflow or invalid operations (such as dividing
1377 -- ELABORATION Enables dynamic checks for access-before-elaboration
1378 -- on subprogram calls and generic instantiations.
1380 -- ASSERTIONS The pragmas "Assert" and "Debug" normally have no
1381 -- effect and are ignored. This keyword causes "Assert"
1382 -- and "Debug" pragmas to be activated, as well as
1383 -- "Check", "Precondition" and "Postcondition" pragmas.
1385 -- SUPPRESS_ALL Suppress all runtime checks as though you have
1386 -- "pragma Suppress (all_checks)" in your source. Use
1387 -- this switch to improve the performance of the code at
1388 -- the expense of safety in the presence of invalid data
1391 -- UNSUPPRESS_ALL Cancels effect of previous SUPPRESS_ALL.
1393 -- DEFAULT Suppress the effect of any option OVERFLOW or
1396 -- FULL (D) Similar to OVERFLOW, but suppress the effect of any
1397 -- option ELABORATION or SUPPRESS_ALL.
1399 -- These keywords only control the default setting of the checks. You
1400 -- may modify them using either "Suppress" (to remove checks) or
1401 -- "Unsuppress" (to add back suppressed checks) pragmas in your program
1404 S_GCC_ChecksX : aliased constant S := "/NOCHECKS " &
1405 "-gnatp,!-gnato,!-gnatE";
1406 -- NODOC (see /CHECKS)
1408 S_GCC_Chflov : aliased constant S := "/FLOAT_OVERFLOW_CHECK " &
1410 -- /NOFLOAT_OVERFLOW_CHECK (D)
1411 -- /FLOAT_OVERFLOW_CHECK
1413 -- Set mode to check overflow for all floating-point operations including
1414 -- those using an unconstrained predefined type (i.e. no infinities).
1416 S_GCC_Compres : aliased constant S := "/COMPRESS_NAMES " &
1418 -- /NOCOMPRESS_NAMES (D)
1421 -- Compress debug information and external symbol name table entries.
1422 -- In the generated debugging information, and also in the case of long
1423 -- external names, the compiler uses a compression mechanism if the name
1424 -- is very long. This compression method uses a checksum, and avoids
1425 -- trouble on some operating systems which have difficulty with very long
1428 S_GCC_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
1430 -- /CONFIGURATION_PRAGMAS_FILE=file
1432 -- Specify a configuration pragmas file that needs to be taken into
1435 S_GCC_Current : aliased constant S := "/CURRENT_DIRECTORY " &
1437 -- /CURRENT_DIRECTORY (D)
1438 -- /NOCURRENT_DIRECTORY
1440 -- Look for source files in the default directory.
1442 S_GCC_Data : aliased constant S := "/DATA_PREPROCESSING=<" &
1444 -- /DATA_PREPROCESSING=file_name
1446 -- This qualifier indicates to the compiler the file name (without
1447 -- directory information) of the preprocessor data file to use.
1448 -- The preprocessor data file should be found in the source directories.
1450 -- A preprocessing data file is a text file with significant lines
1451 -- indicating how should be preprocessed either a specific source or all
1452 -- sources not mentioned in other lines. A significant line is a non
1453 -- empty, non comment line. Comments are similar to Ada comments.
1455 -- Each significant line starts with either a literal string or the
1456 -- character '*'. A literal string is the file name (without directory
1457 -- information) of the source to preprocess. A character '*' indicates the
1458 -- preprocessing for all the sources that are not specified explicitly on
1459 -- other lines. It is an error to have two lines with the same file name
1460 -- or two lines starting with the character '*'.
1462 -- After the file name or the character '*', another optional literal
1463 -- string indicating the file name of the definition file to be used for
1464 -- preprocessing. (see 15.3 Form of Definitions File. The definition files
1465 -- are found by the compiler in one of the source directories. In some
1466 -- cases, when compiling a source in a directory other than the current
1467 -- directory, if the definition file is in the current directory, it may
1468 -- be necessary to add the current directory as a source directory through
1469 -- qualifier "/SEARCH=[]", otherwise the compiler would not find the
1472 -- Then, optionally, switches similar to those of gnatprep may be found.
1473 -- Those switches are:
1475 -- -b Causes both preprocessor lines and the lines deleted by
1476 -- preprocessing to be replaced by blank lines, preserving
1477 -- the line number. This switch is always implied;
1478 -- however, if specified after `-c' it cancels the effect
1481 -- -c Causes both preprocessor lines and the lines deleted by
1482 -- preprocessing to be retained as comments marked with
1483 -- the special string "--! ".
1485 -- -Dsymbol=value Define or redefine a symbol, associated with value.
1486 -- A symbol is an Ada identifier, or an Ada reserved word,
1487 -- with the exception of "if", "else", "elsif", "end",
1488 -- "and", "or" and "then". value is either a literal
1489 -- string, an Ada identifier or any Ada reserved word.
1490 -- A symbol declared with this switch replaces a symbol
1491 -- with the same name defined in a definition file.
1493 -- -s Causes a sorted list of symbol names and values to be
1494 -- listed on the standard output file.
1496 -- -u Causes undefined symbols to be treated as having the
1497 -- value FALSE in the context of a preprocessor test.
1498 -- In the absence of this option, an undefined symbol
1499 -- in a #if or #elsif test will be treated as an error.
1501 -- Examples of valid lines in a preprocessor data file:
1503 -- "toto.adb" "prep.def" -u
1504 -- -- preprocess "toto.adb", using definition file "prep.def",
1505 -- -- undefined symbol are False.
1507 -- * -c -DVERSION=V101
1508 -- -- preprocess all other sources without a definition file;
1509 -- -- suppressed lined are commented; symbol VERSION has the value
1512 -- "titi.adb" "prep2.def" -s
1513 -- -- preprocess "titi.adb", using definition file "prep2.def";
1514 -- -- list all symbols with their values.
1516 S_GCC_Debug : aliased constant S := "/DEBUG=" &
1529 -- /DEBUG[=debug-level]
1532 -- Specifies how much debugging information is to be included in
1533 -- the resulting object fie.
1535 -- 'debug-level' is one of the following:
1537 -- SYMBOLS (D) Include both debugger symbol records and traceback
1538 -- in the object file.
1540 -- ALL Include debugger symbol records, traceback plus
1541 -- extra debug information in the object file.
1543 -- NONE Excludes both debugger symbol records and traceback
1544 -- from the object file. Same as /NODEBUG.
1546 -- TRACEBACK Includes only traceback records in the object
1547 -- file. This is the default when /DEBUG is not used.
1549 S_GCC_DebugX : aliased constant S := "/NODEBUG " &
1551 -- NODOC (see /Debug)
1553 S_GCC_DisAtom : aliased constant S := "/DISABLE_ATOMIC_SYNCHRONIZATION " &
1555 -- /NODISABLE_ATOMIC_SYNCHRONIZATION (D)
1556 -- /DISABLE_ATOMIC_SYNCHRONIZATION
1557 -- Disable synchronization of atomic variables.
1559 S_GCC_Dist : aliased constant S := "/DISTRIBUTION_STUBS=" &
1564 -- /NODISTRIBUTION_STUBS (D)
1565 -- /DISTRIBUTION_STUBS[=dist-opt]
1567 -- 'dist-opt' is either RECEIVER (the default) or SENDER and indicates
1568 -- that stubs for use in distributed programs (see the Distributed
1569 -- Systems Annex of the Ada RM) should be generated.
1571 S_GCC_DistX : aliased constant S := "/NODISTRIBUTION_STUBS " &
1572 "!-gnatzr,!-gnatzc";
1573 -- NODOC (see /DISTRIBUTION_STUBS)
1575 S_GCC_Error : aliased constant S := "/ERROR_LIMIT=#" &
1577 -- /NOERROR_LIMIT (D)
1580 -- NNN is a decimal integer in the range of 1 to 999999 and limits the
1581 -- number of error messages to be generated to that number. Once that
1582 -- number has been reached, the compilation is abandoned.
1583 -- Specifying 999999 is equivalent to /NOERROR_LIMIT.
1585 S_GCC_ErrorX : aliased constant S := "/NOERROR_LIMIT " &
1587 -- NODOC (see /ERROR_LIMIT)
1589 S_GCC_Except : aliased constant S := "/EXTRA_EXCEPTION_INFORMATION " &
1591 -- /EXTRA_EXCEPTION_INFORMATION
1593 -- Generate extra information in exception messages, in particular
1594 -- display extra column information and the value and range associated
1595 -- with index and range check failures, and extra column information for
1598 S_GCC_Expand : aliased constant S := "/EXPAND_SOURCE " &
1600 -- /NOEXPAND_SOURCE (D)
1603 -- Produces a listing of the expanded code in Ada source form. For
1604 -- example, all tasking constructs are reduced to appropriate run-time
1605 -- library calls. The maximum line length for the listing 72.
1607 S_GCC_Lexpand : aliased constant S := "/LEXPAND_SOURCE=#" &
1609 -- /LEXPAND_SOURCE=nnn
1611 -- Produces a listing of the expanded code in Ada source form. For
1612 -- example, all tasking constructs are reduced to appropriate run-time
1613 -- library calls. The parameter is the maximum line length for the
1616 S_GCC_Extend : aliased constant S := "/EXTENSIONS_ALLOWED " &
1618 -- /NOEXTENSIONS_ALLOWED (D)
1619 -- /EXTENSIONS_ALLOWED
1621 -- GNAT specific language extensions allowed.
1623 S_GCC_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
1625 -- /EXTERNAL_REFERENCE="name=val"
1627 -- Specifies an external reference to the project manager. Useful only if
1628 -- /PROJECT_FILE is used.
1631 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
1633 S_GCC_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
1635 -- /FILE_NAME_MAX_LENGTH=nnn
1637 -- Activates file name "krunching". NNN, a decimal integer in the range
1638 -- 1-999, indicates the maximum allowable length of a file name (not
1639 -- including the ADS or ADB filetype. The default is not to enable file
1642 S_GCC_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
1644 -- /NOFOLLOW_LINKS_FOR_FILES (D)
1645 -- /FOLLOW_LINKS_FOR_FILES
1647 -- Follow links when parsing project files
1649 S_GCC_Force : aliased constant S := "/FORCE_ALI " &
1654 -- In normal operation mode, the .ALI file is not generated if any
1655 -- illegalities are detected in the program. The use of this qualifier
1656 -- forces generation of the .ALI file. This file is marked as being
1657 -- in error, so it cannot be used for binding purposes, but it does
1658 -- contain reasonably complete cross-reference information, and thus may
1659 -- be useful for use by tools (e.g. semantic browsing tools or integrated
1660 -- development environments) that are driven from the .ALI file.
1662 S_GCC_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
1664 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
1665 -- /FULL_PATH_IN_BRIEF_MESSAGES
1667 -- When using project files, if some errors or warnings are detected
1668 -- during parsing and verbose mode is not in effect (no use of qualifier
1669 -- /VERBOSE), then error lines start with the full path name of the
1670 -- project file, rather than its simple file name.
1672 S_GCC_Generate : aliased constant S := "/GENERATE_PROCESSED_SOURCE " &
1674 -- /NOGENERATE_PROCESSED_SOURCE (D)
1675 -- /GENERATE_PROCESSED_SOURCE
1677 -- Generate a file <source>_prep if the integrated preprocessing
1678 -- is modifying the source text.
1680 S_GCC_GNAT : aliased constant S := "/GNAT_INTERNAL " &
1682 -- /NOGNAT_INTERNAL (D)
1685 -- Internal GNAT implementation mode. This should not be used for
1686 -- applications programs, it is intended only for use by the compiler
1687 -- and its run-time library. For documentation, see the GNAT sources.
1688 -- Note that it implies /WARNINGS=ALL,ERRORS and /STYLE_CHECKS=GNAT
1689 -- so that all standard warnings and all standard style options are
1690 -- turned on. All warnings and style error messages are treated as
1693 S_GCC_Help : aliased constant S := "/HELP " &
1698 -- Output usage information.
1700 S_GCC_Ident : aliased constant S := "/IDENTIFIER_CHARACTER_SET=" &
1723 -- /NOIDENTIFIER_CHARACTER_SET (D)
1724 -- /IDENTIFIER_CHARACTER_SET=char-set
1726 -- Normally GNAT recognizes the Latin-1 character set in source program
1727 -- identifiers, as described in the reference manual. This qualifier
1728 -- causes GNAT to recognize alternate character sets in identifiers.
1729 -- 'char-set' is one of the following strings indicating the character
1732 -- DEFAULT (D) Equivalent to 1, below. Also equivalent to
1733 -- /NOIDENTIFIER_CHARACTER_SET.
1735 -- 1 The basic character set is Latin-1. This character
1736 -- set is defined by ISO standard 8859, part 1. The lower
1737 -- half (character codes 16#00# ... 16#7F#) is identical
1738 -- to standard ASCII coding, but the upper half is used
1739 -- to represent additional characters. This includes
1740 -- extended letters used by European languages, such as
1741 -- the umlaut used in German.
1743 -- You may use any of these extended characters freely
1744 -- in character or string literals. In addition, the
1745 -- extended characters that represent letters can be
1746 -- used in identifiers.
1748 -- 2 Latin-2 letters allowed in identifiers, with uppercase
1749 -- and lowercase equivalence.
1751 -- 3 Latin-3 letters allowed in identifiers, with uppercase
1752 -- and lower case equivalence.
1754 -- 4 Latin-4 letters allowed in identifiers, with uppercase
1755 -- and lower case equivalence.
1757 -- PC IBM PC code page 437. This code page is the normal
1758 -- default for PCs in the U.S. It corresponds to the
1759 -- original IBM PC character set. This set has some, but
1760 -- not all, of the extended Latin-1 letters, but these
1761 -- letters do not have the same encoding as Latin-1. In
1762 -- this mode, these letters are allowed in identifiers
1763 -- with uppercase and lowercase equivalence.
1765 -- PC850 This code page (850) is a modification of 437 extended
1766 -- to include all the Latin-1 letters, but still not with
1767 -- the usual Latin-1 encoding. In this mode, all these
1768 -- letters are allowed in identifiers with uppercase and
1769 -- lower case equivalence.
1771 -- FULL_UPPER Any character in the range 80-FF allowed in
1772 -- identifiers, and all are considered distinct. In
1773 -- other words, there are no uppercase and lower case
1774 -- equivalences in this range.
1776 -- NO_UPPER No upper-half characters in the range 80-FF are
1777 -- allowed in identifiers. This gives Ada 95
1778 -- compatibility for identifier names.
1780 -- WIDE GNAT allows wide character codes to appear in
1781 -- character and string literals, and also optionally
1782 -- in identifiers. See the /WIDE_CHARACTER_ENCODING
1783 -- qualifier for information on encoding formats.
1785 S_GCC_IdentX : aliased constant S := "/NOIDENTIFIER_CHARACTER_SET " &
1787 -- NODOC (see /IDENTIFIER_CHARACTER_SET)
1789 S_GCC_IgnoreR : aliased constant S := "/IGNORE_REP_CLAUSES " &
1791 -- /IGNORE_REP_CLAUSES
1793 -- Causes all representation clauses to be ignored and treated as
1794 -- comments. Useful when compiling foreign code (for example when ASIS
1795 -- is used to analyze such code).
1797 S_GCC_IgnoreS : aliased constant S := "/IGNORE_STYLE_CHECKS_PRAGMAS " &
1799 -- /IGNORE_STYLE_CHECKS_PRAGMAS
1801 -- Causes all Style_Checks pragmas to be checked for legality, but
1802 -- otherwise ignored. Allows style checks to be fully controlled by
1803 -- command line qualifiers.
1805 S_GCC_Immed : aliased constant S := "/IMMEDIATE_ERRORS " &
1807 -- /NOIMMEDIATE_ERRORS (D)
1808 -- /IMMEDIATE_ERRORS
1810 -- Causes errors to be displayed as soon as they are encountered, rather
1811 -- than after compilation is terminated. If GNAT terminates prematurely
1812 -- or goes into an infinite loop, the last error message displayed may
1813 -- help to pinpoint the culprit.
1815 -- Note that this qualifier is intended only for helping to diagnose
1816 -- illegal programs when the compiler fails. It disconnects many of the
1817 -- normal handling procedures for error messages, and may for example
1818 -- cause malfunction of pragma Warnings.
1820 S_GCC_Inline : aliased constant S := "/INLINE=" &
1832 -- /INLINE[=keyword]
1834 -- Selects the level of inlining for your program. In the absence of this
1835 -- qualifier, GNAT does not attempt inlining across units and does not
1836 -- need to access the bodies of subprograms for which "pragma Inline" is
1837 -- specified if they are not in the current unit.
1839 -- The supported keywords are as follows:
1841 -- PRAGMA (D) Recognize and process "Inline" pragmas. However,
1842 -- for the inlining to actually occur, optimization
1843 -- must be enabled. This enables inlining across unit
1844 -- boundaries, that is, inlining a call in one unit of
1845 -- a subprogram declared in a with'ed unit. The compiler
1846 -- will access these bodies, creating an extra source
1847 -- dependency for the resulting object file, and where
1848 -- possible, the call will be inlined.
1850 -- This qualifier also turns on full optimization and
1851 -- requests GNAT to try to attempt automatic inlining
1852 -- of small subprograms within a unit.
1854 -- Specifying /OPTIMIZE=NONE will disable the main effect
1855 -- of this qualifier, but you may specify other
1856 -- optimization options, to get either lower
1857 -- (/OPTIMIZE=SOME) or higher (/OPTIMIZE=UNROLL_LOOPS)
1858 -- levels of optimization.
1861 -- Direct control of the level of "Inline" pragmas
1862 -- optimization with moderate inlining across modules.
1865 -- Direct control of the level of "Inline" pragmas
1866 -- optimization with full inlining across modules.
1868 -- FULL Front end inlining. The front end inlining activated
1869 -- by this switch is generally more extensive, and quite
1870 -- often more effective than the standard PRAGMA inlining
1871 -- mode. It will also generate additional dependencies.
1873 -- SUPPRESS Suppresses all inlining, even if other optimization
1874 -- or inlining switches are set.
1876 S_GCC_InlineX : aliased constant S := "/NOINLINE " &
1878 -- NODOC (see /INLINE)
1880 S_GCC_Intsrc : aliased constant S := "/INTERSPERSE_SOURCE " &
1883 -- /NO_INTERSPERSE_SOURCE (D)
1884 -- /INTERSPERSE_SOURCE
1886 -- Causes output from /XDEBUG or /EXPAND_SOURCE to be interspersed with
1887 -- lines from the original source file, output as comment lines with the
1888 -- associated line number.
1890 S_GCC_Just : aliased constant S := "/JUSTIFY_MESSAGES=#" &
1893 -- /NO_JUSTIFY_MESSAGES (D)
1894 -- /JUSTIFY_MESSAGES=nnn
1896 -- Causes error messages to be reformatted so that a message and all its
1897 -- continuation lines count as one warning or error in the statistics on
1898 -- total errors, and the message is broken down into lines (justified) so
1899 -- that no line is longer than nnn characters. The default message
1900 -- behavior (each message counted separately and not reformatted to fit
1901 -- a particular line length) can be obtained using /NO_JUSTIFY_MESSAGES.
1903 S_GCC_JustX : aliased constant S := "/NO_JUSTIFY_MESSAGES " &
1906 -- NODOC (see /JUSTIFY_MESSAGES)
1908 S_GCC_Length : aliased constant S := "/MAX_LINE_LENGTH=#" &
1910 -- /MAX_LINE_LENGTH=nnn
1912 -- Set maximum line length.
1913 -- The length of lines must not exceed the given value nnn.
1915 S_GCC_List : aliased constant S := "/LIST " &
1920 -- Cause a full listing of the file to be generated. In the case where
1921 -- a body is compiled, the corresponding spec is also listed, along
1922 -- with any subunits.
1924 S_GCC_Machine : aliased constant S := "/MACHINE_CODE_LISTING " &
1926 -- /NOMACHINE_CODE_LISTING (D)
1927 -- /MACHINE_CODE_LISTING
1929 -- Cause a full machine code listing of the file to be generated to
1930 -- <filename>.lis. Interspersed source is included if the /DEBUG
1931 -- qualifier is also present.
1933 S_GCC_Mapping : aliased constant S := "/MAPPING_FILE=<" &
1935 -- /MAPPING_FILE=file_name
1937 -- Use mapping file file_name
1939 -- A mapping file is a way to communicate to the compiler two mappings:
1940 -- from unit names to file names (without any directory information) and
1941 -- from file names to path names (with full directory information).
1942 -- These mappings are used by the compiler to short-circuit the path
1945 -- The use of mapping files is not required for correct operation of the
1946 -- compiler, but mapping files can improve efficiency, particularly when
1947 -- sources are read over a slow network connection. In normal operation,
1948 -- you need not be concerned with the format or use of mapping files,
1949 -- and /MAPPING_FILE is not a qualifier that you would use explicitly.
1950 -- It is intended only for use by automatic tools such as GNAT MAKE
1951 -- running under the project file facility. The description here of the
1952 -- format of mapping files is provided for completeness and for possible
1953 -- use by other tools.
1955 -- A mapping file is a sequence of sets of three lines. In each set, the
1956 -- first line is the unit name, in lower case, with "%s" appended for
1957 -- specifications and "%b" appended for bodies; the second line is the
1958 -- file name; and the third line is the path name.
1964 -- /gnat/project1/sources/main.2_ada
1966 -- When qualifier ?MAPPING_FILE is specified, the compiler will create in
1967 -- memory the two mappings from the specified file. If there is any
1968 -- problem (non existent file, truncated file or duplicate entries),
1969 -- no mapping will be created.
1971 -- Several /MAPPING_FILE qualifiers may be specified; however, only the
1972 -- last one on the command line will be taken into account.
1974 -- When using a project file, GNAT MAKE creates a temporary mapping file
1975 -- and communicates it to the compiler using this switch.
1977 S_GCC_MaxI : aliased constant S := "/MAX_INSTANTIATIONS=#" &
1980 -- /MAX_INSTANTIATIONS=nnn
1982 -- Specify the maximum number of instantiations permitted. The default
1983 -- value is 8000, which is probably enough for all programs except those
1984 -- containing some kind of runaway unintended instantiation loop.
1986 S_GCC_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
1993 -- /MESSAGES_PROJECT_FILE[=messages-option]
1995 -- Specifies the "verbosity" of the parsing of project files.
1996 -- messages-option may be one of the following:
1998 -- DEFAULT (D) No messages are output if there is no error or warning.
2000 -- MEDIUM A small number of messages are output.
2002 -- HIGH A great number of messages are output, most of them not
2003 -- being useful for the user.
2005 S_GCC_Multi : aliased constant S := "/MULTI_UNIT_INDEX=#" &
2007 -- /MULTI_UNIT_INDEX=nnn
2009 -- Specify the index of the unit to compile in a multi-unit source file.
2011 S_GCC_Nesting : aliased constant S := "/MAX_NESTING=#" &
2015 -- Set maximum level of nesting of constructs (including subprograms,
2016 -- loops, blocks, packages, and conditionals).
2017 -- The level of nesting must not exceed the given value nnn.
2018 -- A value of zero disable this style check (not enabled by default).
2020 S_GCC_Noadc : aliased constant S := "/NO_GNAT_ADC " &
2024 -- Cause the compiler to ignore any configuration pragmas file GNAT.ADC
2025 -- in the default directory. Implied by qualifier /PROJECT_FILE.
2026 -- Often used in conjunction with qualifier /CONFIGURATION_PRAGMAS_FILE.
2028 S_GCC_Noload : aliased constant S := "/NOLOAD " &
2032 -- Cause the compiler to operate in semantic check mode with full
2033 -- checking for all illegalities specified in the reference manual, but
2034 -- without generation of any source code (no object or ALI file
2037 -- Since dependent files must be accessed, you must follow the GNAT
2038 -- semantic restrictions on file structuring to operate in this mode:
2040 -- o The needed source files must be accessible.
2041 -- o Each file must contain only one compilation unit.
2042 -- o The file name and unit name must match.
2044 -- The output consists of error messages as appropriate. No object file
2045 -- or ALI file is generated. The checking corresponds exactly to the
2046 -- notion of legality in the Ada reference manual.
2048 -- Any unit can be compiled in semantics-checking-only mode, including
2049 -- units that would not normally be compiled (generic library units,
2050 -- subunits, and specifications where a separate body is present).
2052 S_GCC_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
2056 -- Do not look in the default directory for source files of the runtime.
2058 S_GCC_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
2062 -- Do not look for library files in the system default directory.
2064 S_GCC_NoWarnP : aliased constant S := "/NOWARNING_PRAGMAS " &
2066 -- /NOWARNING_PRAGMAS
2068 -- Causes all Warnings pragmas to be ignored. Useful to check if the
2069 -- program has obsolete warnings pragmas that are hiding problems.
2071 S_GCC_Opt : aliased constant S := "/OPTIMIZE=" &
2073 "-O2,!-O0,!-O1,!-O3 " &
2075 "-O0,!-O1,!-O2,!-O3 " &
2077 "-O1,!-O0,!-O2,!-O3 " &
2079 "-Os,!-O0,!-O1,!-O2,!-O3 " &
2081 "-O1,!-O0,!-O2,!-O3 " &
2084 "NO_STRICT_ALIASING " &
2085 "-fno-strict-aliasing " &
2087 "-O3,!-O0,!-O1,!-O2";
2089 -- /OPTIMIZE[=(keyword[,...])]
2091 -- Selects the level of optimization for your program. The supported
2092 -- keywords are as follows:
2094 -- ALL (D) Perform most optimizations, including those that
2095 -- may be expensive.
2097 -- NONE Do not do any optimizations. Same as /NOOPTIMIZE.
2099 -- SOME Perform some optimizations, but omit ones that
2100 -- are costly in compilation time.
2102 -- SPACE Optimize space usage
2104 -- DEVELOPMENT Same as SOME.
2106 -- INLINING Full optimization, and also attempt automatic inlining
2107 -- of small subprograms within a unit
2109 -- UNROLL_LOOPS Try to unroll loops. This keyword may be specified
2110 -- with any keyword above other than NONE. Loop
2111 -- unrolling usually, but not always, improves the
2112 -- performance of programs.
2114 -- NO_STRICT_ALIASING
2115 -- Suppress aliasing analysis. When optimization is
2116 -- enabled (ALL or SOME above), the compiler assumes
2117 -- that pointers do in fact point to legitimate values
2118 -- of the pointer type (allocated from the proper pool).
2119 -- If this assumption is violated, e.g. by the use of
2120 -- unchecked conversion, then it may be necessary to
2121 -- suppress this assumption using this keyword (which
2122 -- may be specified only in conjunction with any
2123 -- keyword above, other than NONE).
2125 S_GCC_OptX : aliased constant S := "/NOOPTIMIZE " &
2126 "-O0,!-O1,!-O2,!-O3";
2127 -- NODOC (see /OPTIMIZE)
2129 S_GCC_Output : aliased constant S := "/OUTPUT_FILE=<" &
2131 -- /OUTPUT_FILE=fname
2133 -- This has the same effect as /LIST except that the output is written
2134 -- to a file instead of to standard output. If the given fname
2135 -- does not start with a period, then it is the full name of the file
2136 -- to be written. If fname starts with a period, the name of the file
2137 -- is the concatenation of to the name of the file being compiled with
2138 -- fname where the period is replace by an underline. For example, if
2139 -- file xyz.adb is compiled with -gnatl=.lst, then the output is written
2140 -- to file xyz.adb_lst.
2142 S_GCC_Overflo : aliased constant S := "/OVERFLOW_CHECKS=#" &
2144 -- /OVERFLOW_CHECKS=nn
2146 -- Set default overflow cheecking mode. If nn is a single digit, in the
2147 -- range 0-3, it sets the overflow checking mode for all expressions,
2148 -- including those outside and within assertions. The meaning of nnn is:
2150 -- 1 all intermediate computations done using base type (STRICT)
2151 -- 2 minimize intermediate overflows (MINIMIZED)
2152 -- 3 eliminate intermediate overflows (ELIMINATED)
2154 -- Otherwise nn can be two digits, both 1-3, and in this case the first
2155 -- digit sets the mode (using the above code) for expressions outside an
2156 -- assertion, and the second digit sets the mode for expressions within
2159 S_GCC_PValid : aliased constant S := "/PARAMETER_VALIDITY_CHECK " &
2161 -- /NOPARAMETER_VALIDITY_CHECK (D)
2162 -- /PARAMETER_VALIDITY_CHECK
2164 -- Check validity of subprogram parameters.
2166 S_GCC_Pointer : aliased constant S := "/POINTER_SIZE=" &
2175 -- /POINTER_SIZE=64 (D)
2176 -- /POINTER_SIZE[=(keyword[,...])]
2178 -- Change how pointers and descriptors are allocated. The following
2179 -- keywords are supported:
2181 -- 64 (D) Allocate heap pointers in 64bit space except as
2182 -- constrained by a 32bit size clause or by
2183 -- Convention_C and generate 64bit descriptors for
2184 -- Descriptor mechanisms for calling imported
2185 -- subprograms and accept both 64bit and 32bit
2186 -- descriptors for calls to exported subprograms.
2188 -- LONG Equivalent to option 64.
2190 -- 32 Allocate all heap pointers in 32bit space and
2191 -- generate 32bit descriptors for Descriptor
2192 -- mechanisms for calling imported subprograms.
2194 -- SHORT Equivalent to option 32.
2196 S_GCC_Polling : aliased constant S := "/POLLING " &
2201 -- Enable polling. See the description of pragma Polling in the GNAT
2202 -- Reference Manual for full details.
2204 S_GCC_Project : aliased constant S := "/PROJECT_FILE=<" &
2206 -- /PROJECT_FILE=filename
2208 -- Specifies the main project file to be used. The project files rooted
2209 -- at the main project file will be parsed before the invocation of the
2210 -- compiler. The source and object directories to be searched will be
2211 -- communicated to the compiler through logical names
2212 -- ADA_PRJ_INCLUDE_FILE and ADA_PRJ_OBJECTS_FILE.
2214 S_GCC_Psta : aliased constant S := "/PRINT_STANDARD " &
2218 -- cause the compiler to output a representation of package Standard
2219 -- in a form very close to standard Ada. It is not quite possible to
2220 -- do this and remain entirely Standard (since new numeric base types
2221 -- cannot be created in standard Ada), but the output is easily
2222 -- readable to any Ada programmer, and is useful to determine the
2223 -- characteristics of target dependent types in package Standard.
2225 S_GCC_Reswarn : aliased constant S := "/TREAT_RESTRICTIONS_AS_WARNINGS " &
2228 -- /NO_TREAT_RESTRICTIONS_AS_WARNINGS (D)
2229 -- /TREAT_RESTRICTIONS_AS_WARNINGS
2231 -- Causes all restrictions to be treated as warnings (pragma Restriction
2232 -- treated as Restriction_Warnings, pragma Profile as Profile_Warnings,
2233 -- and pragma Ravenscar sets restriction warnings instead of restrictions)
2235 S_GCC_Report : aliased constant S := "/REPORT_ERRORS=" &
2246 -- /NOREPORT_ERRORS (D)
2247 -- /REPORT_ERRORS[=(keyword[,...])]
2249 -- Change the way errors are reported. The following keywords are
2252 -- VERBOSE (D) Verbose mode. Full error output with source lines
2255 -- BRIEF Generate the brief format error messages to
2256 -- SYS$OUTPUT as well as the verbose format message or
2259 -- FULL Normally, the compiler suppresses error messages that
2260 -- are likely to be redundant. This keyword causes all
2261 -- error messages to be generated. One particular effect
2262 -- is for the case of references to undefined variables.
2263 -- If a given variable is referenced several times, the
2264 -- normal format of messages produces one error. With
2265 -- FULL, each undefined reference produces a separate
2268 -- IMMEDIATE Normally, the compiler saves up error messages and
2269 -- generates them at the end of compilation in proper
2270 -- sequence. This keyword causes error messages to be
2271 -- generated as soon as they are detected. The use of
2272 -- IMMEDIATE usually causes error messages to be
2273 -- generated out of sequence. Use it when the compiler
2274 -- blows up due to an internal error. In this case, the
2275 -- error messages may be lost. Sometimes blowups are
2276 -- the result of mishandled error messages, so you may
2277 -- want to run with this keyword to determine whether
2278 -- any error messages were generated.
2280 -- DEFAULT Turn off VERBOSE and BRIEF. Same as /NOREPORT_ERRORS.
2282 S_GCC_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
2284 -- NODOC (see /REPORT_ERRORS)
2286 S_GCC_Repinfo : aliased constant S := "/REPRESENTATION_INFO=" &
2305 "MECHANISMS_FILE " &
2307 -- /NOREPRESENTATION_INFO (D)
2308 -- /REPRESENTATION_INFO[=(keyword[,...])]
2310 -- This qualifier controls output from the compiler of a listing showing
2311 -- representation information for declared types and objects.
2313 -- ARRAYS (D) Size and alignment information is listed for
2314 -- declared array and record types.
2316 -- ARRAYS_FILE Similar to ARRAYS, but the output is to a file
2317 -- with the name 'file_rep' where 'file' is the name
2318 -- of the corresponding source file.
2320 -- NONE no information is output (equivalent to omitting
2321 -- the /REPRESENTATION_INFO qualifiers).
2323 -- OBJECTS Size and alignment information is listed for all
2324 -- declared types and objects.
2326 -- OBJECTS_FILE Similar to OBJECTS, but the output is to a file
2327 -- with the name 'file_rep' where 'file' is the name
2328 -- of the corresponding source file.
2330 -- SYMBOLIC Symbolic expression information for values that
2331 -- are computed at run time for variant records.
2333 -- SYMBOLIC_FILE Similar to SYMBOLIC, but the output is to a file
2334 -- with the name 'file_rep' where 'file' is the name
2335 -- of the corresponding source file.
2337 -- MECHANISMS List convention and argument passing mechanisms
2338 -- for all subprograms
2340 -- MECHANISMS_FILE Similar to MECHANISMS, but the output is to a file
2341 -- with the name 'file_rep' where file is the name
2342 -- of the corresponding source file.
2344 -- DEFAULT Equivalent to ARRAYS.
2346 S_GCC_RepinfX : aliased constant S := "/NOREPRESENTATION_INFO " &
2348 -- NODOC (see /REPRESENTATION_INFO)
2350 S_GCC_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
2352 -- /RUNTIME_SYSTEM=xxx
2354 -- Build against an alternate runtime system named xxx or RTS-xxx.
2356 S_GCC_SCO : aliased constant S := "/SCO_OUTPUT " &
2358 -- /NOSCO_OUTPUT (D)
2361 -- Controls the output of SCO (Source Coverage Obligation) information
2362 -- in the generated ALI file. This information is used by advanced source
2363 -- coverage tools. For a full description of the SCO format, see unit
2364 -- SCOs in the compiler sources (sco.ads/sco.adb).
2366 S_GCC_Search : aliased constant S := "/SEARCH=*" &
2368 -- /SEARCH=(directory[,...])
2370 -- When looking for source files also look in directories specified.
2372 S_GCC_Src_Info : aliased constant S := "/SRC_INFO=<" &
2374 -- /SRC_INFO=source-info-file
2376 -- Specify a source info file to be read or written by the Project
2377 -- Manager when project files are used.
2379 S_GCC_Style : aliased constant S := "/STYLE_CHECKS=" &
2408 "NOARRAY_INDEXES " &
2414 "BOOLEAN_OPERATORS " &
2416 "NOBOOLEAN_OPERATORS " &
2426 "DOS_LINE_ENDINGS " &
2428 "NODOS_LINE_ENDINGS " &
2466 "STANDARD_CASING " &
2468 "NOSTANDARD_CASING " &
2470 "ORDERED_SUBPROGRAMS " &
2472 "NOORDERED_SUBPROGRAMS " &
2474 "OVERRIDING_INDICATORS " &
2476 "NOOVERRIDING_INDICATORS " &
2490 "STATEMENTS_AFTER_THEN_ELSE " &
2492 "NOSTATEMENTS_AFTER_THEN_ELSE " &
2498 "UNNECESSARY_BLANK_LINES " &
2500 "NOUNNECESSARY_BLANK_LINES " &
2506 -- /NOSTYLE_CHECKS (D)
2507 -- /STYLE_CHECKS[=(keyword,[...])]
2509 -- Normally, GNAT permits any code layout consistent with the reference
2510 -- manual requirements. This qualifier imposes style checking on the
2511 -- input source code. The following keywords are supported:
2513 -- ALL_BUILTIN (D) Equivalent to the following list of options:
2514 -- 3, ATTRIBUTE, BLANKS, COMMENTS2, END, VTABS,
2515 -- HTABS, IF_THEN, KEYWORD, LAYOUT, LINE_LENGTH,
2516 -- PRAGMA, REFERENCES, SPECS, TOKEN.
2518 -- 1 .. 9 Specify indentation level from 1 to 9.
2519 -- The general style of required indentation is as
2520 -- specified by the examples in the Ada Reference
2521 -- Manual. Full line comments must be aligned with
2522 -- the -- starting on a column that is a multiple
2523 -- of the alignment level.
2525 -- ATTRIBUTE Check attribute casing.
2526 -- Attribute names, including the case of keywords
2527 -- such as digits used as attributes names,
2528 -- must be written in mixed case, that is,
2529 -- the initial letter and any letter following an
2530 -- underscore must be uppercase.
2531 -- All other letters must be lowercase.
2533 -- ARRAY_INDEXES Check indexes of array attributes.
2534 -- For array attributes First, Last, Range,
2535 -- or Length, the index number must be omitted
2536 -- for one-dimensional arrays and is required
2537 -- for multi-dimensional arrays.
2539 -- BLANKS Blanks not allowed at statement end.
2540 -- Trailing blanks are not allowed at the end of
2541 -- statements. The purpose of this rule, together
2542 -- with option HTABS (no horizontal tabs), is to
2543 -- enforce a canonical format for the use of
2544 -- blanks to separate source tokens.
2546 -- COMMENTS2 Check comments.
2547 -- COMMENTS Comments must meet the following set of rules:
2549 -- * The "--" that starts the column must either
2550 -- start in column one, or else at least one
2551 -- blank must precede this sequence.
2553 -- * Comments that follow other tokens on a line
2554 -- must have at least one blank following the
2555 -- "--" at the start of the comment.
2557 -- * Full line comments must have two blanks
2558 -- following the "--" that starts the comment,
2559 -- with the following exceptions.
2561 -- * A line consisting only of the "--"
2562 -- characters, possibly preceded by blanks is
2565 -- * A comment starting with "--x" where x is
2566 -- a special character is permitted. This
2567 -- allows proper processing of the output
2568 -- generated by specialized tools including
2569 -- gnatprep (where --! is used) and the SPARK
2570 -- annotation language (where --# is used).
2571 -- For the purposes of this rule, a special
2572 -- character is defined as being in one of the
2573 -- ASCII ranges 16#21#..16#2F# or
2576 -- * A line consisting entirely of minus signs,
2577 -- possibly preceded by blanks, is permitted.
2578 -- This allows the construction of box
2579 -- comments where lines of minus signs are
2580 -- used to form the top and bottom of the box.
2582 -- * If a comment starts and ends with "--" is
2583 -- permitted as long as at least one blank
2584 -- follows the initial "--". Together with
2585 -- the preceding rule, this allows the
2586 -- construction of box comments, as shown in
2587 -- the following example:
2589 -- ---------------------------
2590 -- -- This is a box comment --
2591 -- ---------------------------
2593 -- COMMENTS1 Check comments (single space).
2594 -- Like COMMENTS2, but the -- of a comment only
2595 -- requires one or more spaces following, instead
2596 -- of two or more spaces.
2598 -- DOS_LINE_ENDINGS Check that no DOS line terminators are present
2599 -- All lines must be terminated by a single
2600 -- ASCII.LF character. In particular the DOS line
2601 -- terminator sequence CR / LF is not allowed).
2603 -- END Check end/exit labels.
2604 -- Optional labels on end statements ending
2605 -- subprograms and on exit statements exiting
2606 -- named loops, are required to be present.
2608 -- GNAT Enforces a set of style conventions that
2609 -- match the style used in the GNAT source code.
2610 -- This maybe useful when developing code that
2611 -- is eventually intended to be incorporated into
2612 -- GNAT. For further details, see GNAT sources.
2614 -- HTABS No horizontal tabs.
2615 -- Horizontal tab characters are not permitted in
2616 -- the source text. Together with the BLANKS
2617 -- (no blanks at end of line) option, this
2618 -- enforces a canonical form for the use of blanks
2619 -- to separate source tokens.
2621 -- IF_THEN Check if-then layout.
2622 -- The keyword then must appear either on the
2623 -- same line as the corresponding if, or on a line
2624 -- on its own, lined up under the if with at least
2625 -- one non-blank line in between containing all or
2626 -- part of the condition to be tested.
2628 -- KEYWORD Check keyword casing.
2629 -- All keywords must be in lower case (with the
2630 -- exception of keywords such as digits used as
2631 -- attribute names to which this check does not
2634 -- LAYOUT Check layout.
2635 -- Layout of statement and declaration constructs
2636 -- must follow the recommendations in the Ada
2637 -- Reference Manual, as indicated by the form of
2638 -- the syntax rules. For example an else keyword
2639 -- must be lined up with the corresponding if
2642 -- There are two respects in which the style rule
2643 -- enforced by this check option are more liberal
2644 -- than those in the Ada Reference Manual.
2645 -- First in the case of record declarations,
2646 -- it is permissible to put the record keyword on
2647 -- the same line as the type keyword, and then
2648 -- the end in end record must line up under type.
2649 -- For example, either of the following two
2650 -- layouts is acceptable:
2663 -- Second, in the case of a block statement,
2664 -- a permitted alternative is to put the block
2665 -- label on the same line as the declare or begin
2666 -- keyword, and then line the end keyword up under
2667 -- the block label. For example both the following
2673 -- A : Integer := 3;
2680 -- A : Integer := 3;
2685 -- The same alternative format is allowed for
2686 -- loops. For example, both of the following are
2691 -- Clear : while J < 10 loop
2696 -- while J < 10 loop
2702 -- LINE_LENGTH Check maximum line length.
2703 -- The length of source lines must not exceed 79
2704 -- characters, including any trailing blanks
2705 -- The value of 79 allows convenient display on
2706 -- an 80 character wide device or window, allowing
2707 -- for possible special treatment of 80 character
2710 -- NONE Clear any previously set style checks.
2712 -- ORDERED_SUBPROGRAMS Check order of subprogram bodies.
2713 -- All subprogram bodies in a given scope (e.g.
2714 -- a package body) must be in alphabetical order.
2715 -- The ordering rule uses normal Ada rules for
2716 -- comparing strings, ignoring casing of letters,
2717 -- except that if there is a trailing numeric
2718 -- suffix, then the value of this suffix is used
2719 -- in the ordering (e.g. Junk2 comes before
2722 -- OVERRIDING_INDICATORS Check that overriding subprograms are
2723 -- explicitly marked as such. The declaration of
2724 -- a primitive operation of a type extension that
2725 -- overrides an inherited operation must carry
2726 -- an overriding indicator.
2728 -- PRAGMA Check pragma casing.
2729 -- Pragma names must be written in mixed case,
2730 -- that is, the initial letter and any letter
2731 -- following an underscore must be uppercase.
2732 -- All other letters must be lowercase.
2734 -- REFERENCES Check references.
2735 -- All identifier references must be cased in the
2736 -- same way as the corresponding declaration.
2737 -- No specific casing style is imposed on
2738 -- identifiers. The only requirement is for
2739 -- consistency of references with declarations.
2741 -- SPECS Check separate specs.
2742 -- Separate declarations ("specs") are required
2743 -- for subprograms (a body is not allowed to serve
2744 -- as its own declaration). The only exception is
2745 -- that parameterless library level procedures are
2746 -- not required to have a separate declaration.
2747 -- This exception covers the most frequent form of
2748 -- main program procedures.
2750 -- STANDARD_CASING Check casing of entities in Standard.
2751 -- Any identifier from Standard must be cased to
2752 -- match the presentation in the Ada Reference
2753 -- Manual (for example, Integer and ASCII.NUL).
2755 -- TOKEN Check token spacing.
2756 -- The following token spacing rules are enforced:
2758 -- * The keywords abs and not must be followed
2761 -- * The token => must be surrounded by spaces.
2763 -- * The token <> must be preceded by a space or
2764 -- a left parenthesis.
2766 -- * Binary operators other than ** must be
2767 -- surrounded by spaces. There is no
2768 -- restriction on the layout of the ** binary
2771 -- * Colon must be surrounded by spaces.
2773 -- * Colon-equal (assignment) must be surrounded
2776 -- * Comma must be the first non-blank character
2777 -- on the line, or be immediately preceded by
2778 -- a non-blank character, and must be followed
2781 -- * If the token preceding a left paren ends
2782 -- with a letter or digit, then a space must
2783 -- separate the two tokens.
2785 -- * A right parenthesis must either be the
2786 -- first non-blank character on a line, or it
2787 -- must be preceded by a non-blank character.
2789 -- * A semicolon must not be preceded by
2790 -- a space, and must not be followed by
2791 -- a non-blank character.
2793 -- * A unary plus or minus may not be followed
2796 -- * A vertical bar must be surrounded by
2799 -- In the above rules, appearing in column one is
2800 -- always permitted, that is, counts as meeting
2801 -- either a requirement for a required preceding
2802 -- space, or as meeting a requirement for no
2805 -- Appearing at the end of a line is also always
2806 -- permitted, that is, counts as meeting either
2807 -- a requirement for a following space,
2808 -- or as meeting a requirement for no following
2811 -- UNNECESSARY_BLANK_LINES
2812 -- Check for unnecessary blank lines.
2813 -- A blank line is considered unnecessary if it
2814 -- appears at the end of the file, or if more
2815 -- than one blank line occurs in sequence.
2817 -- VTABS No form feeds or vertical tabs.
2818 -- Form feeds or vertical tab characters are not
2819 -- permitted in the source text.
2821 -- XTRA_PARENS Check for the use of an unnecessary extra
2822 -- level of parentheses (C - style) around
2823 -- conditions in if statements, while statements
2824 -- and exit statements.
2826 S_GCC_StyleX : aliased constant S := "/NOSTYLE_CHECKS " &
2828 -- NODOC (see /STYLE_CHECKS)
2830 S_GCC_Subdirs : aliased constant S := "/SUBDIRS=<" &
2834 -- The actual directories (object, exec, library, ...) are subdirectories
2835 -- of the directory specified in the project file. If the subdirectory
2836 -- does not exist, it is created automatically.
2838 S_GCC_Symbol : aliased constant S := "/SYMBOL_PREPROCESSING=" & '"' &
2840 -- /SYMBOL_PREPROCESSING="symbol=value"
2842 -- Define or redefine a preprocessing symbol, associated with value.
2843 -- If "=value" is not specified, then the value of the symbol is True.
2844 -- A symbol is an identifier, following normal Ada (case-insensitive)
2845 -- rules for its syntax, and value is any sequence (including an empty
2846 -- sequence) of characters from the set (letters, digits, period,
2847 -- underline). Ada reserved words may be used as symbols, with the
2848 -- exceptions of "if", "else", "elsif", "end", "and", "or" and "then".
2850 -- A symbol declared with this qualifier on the command line replaces
2851 -- a symbol with the same name either in a definition file or specified
2852 -- with a switch -D in the preprocessor data file.
2854 -- This qualifier is similar to qualifier /ASSOCIATE of
2855 -- GNAT PREPROCESSING.
2857 S_GCC_Syntax : aliased constant S := "/SYNTAX_ONLY " &
2859 -- /NOSYNTAX_ONLY (D)
2862 -- Run GNAT in syntax checking only mode. You can check a series of
2863 -- files in a single command, and can use wild cards to specify such a
2866 -- You may use other qualifiers in conjunction with this qualifier. In
2867 -- particular, /LIST and /REPORT_ERRORS=VERBOSE are useful to control the
2868 -- format of any generated error messages.
2870 -- The output is simply the error messages, if any. No object file or ALI
2871 -- file is generated by a syntax-only compilation. Also, no units other
2872 -- than the one specified are accessed. For example, if a unit "X" with's
2873 -- a unit "Y", compiling unit "X" in syntax check only mode does not
2874 -- access the source file containing unit "Y".
2876 -- Normally, GNAT allows only a single unit in a source file. However,
2877 -- this restriction does not apply in syntax-check-only mode, and it is
2878 -- possible to check a file containing multiple compilation units
2879 -- concatenated together. This is primarily used by the GNAT CHOP
2882 S_GCC_Table : aliased constant S := "/TABLE_MULTIPLIER=#" &
2884 -- /TABLE_MULTIPLIER=nnn
2886 -- All compiler tables start at nnn times usual starting size.
2888 S_GCC_Target : aliased constant S := "/TARGET_DEPENDENT_INFO " &
2890 -- /NOTARGET_DEPENDENT_INFO (D)
2891 -- /TARGET_DEPENDENT_INFO
2893 -- Generate target dependent information.
2895 S_GCC_Trace : aliased constant S := "/TRACE_UNITS " &
2900 -- This switch that does for the frontend what /VERBOSE does for the
2901 -- backend. The system prints the name of each unit, either a compilation
2902 -- unit or nested unit, as it is being analyzed.
2904 S_GCC_Tree : aliased constant S := "/TREE_OUTPUT " &
2909 -- Cause GNAT to write the internal tree for a unit to a file (with the
2910 -- filetype ATB for a body or ATS for a spec). This is not normally
2911 -- required, but is used by separate analysis tools. Typically these
2912 -- tools do the necessary compilations automatically, so you should never
2913 -- have to specify this switch in normal operation.
2915 S_GCC_Trys : aliased constant S := "/TRY_SEMANTICS " &
2920 -- In normal operation mode the compiler first parses the program and
2921 -- determines if there are any syntax errors. If there are, appropriate
2922 -- error messages are generated and compilation is immediately
2923 -- terminated. This qualifier tells GNAT to continue with semantic
2924 -- analysis even if syntax errors have been found. This may enable the
2925 -- detection of more errors in a single run. On the other hand, the
2926 -- semantic analyzer is more likely to encounter some internal fatal
2927 -- error when given a syntactically invalid tree.
2929 S_GCC_USL : aliased constant S := "/UNCHECKED_SHARED_LIB_IMPORTS " &
2930 "--unchecked-shared-lib-imports";
2931 -- /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
2932 -- /UNCHECKED_SHARED_LIB_IMPORTS
2934 -- Allow shared library projects to import static library projects
2936 S_GCC_Units : aliased constant S := "/UNITS_LIST " &
2938 -- /NOUNITS_LIST (D)
2941 -- Print a list of units required by this compilation on SYS$OUTPUT. The
2942 -- listing includes all units on which the unit being compiled depends
2943 -- either directly or indirectly.
2945 S_GCC_Unique : aliased constant S := "/UNIQUE_ERROR_TAG " &
2947 -- /NOUNIQUE_ERROR_TAG (D)
2948 -- /UNIQUE_ERROR_TAG
2950 -- Tag compiler error messages with the string "error: ".
2952 S_GCC_Upcase : aliased constant S := "/UPPERCASE_EXTERNALS " &
2954 -- /NOUPPERCASE_EXTERNALS (D)
2955 -- /UPPERCASE_EXTERNALS
2957 -- Fold default and explicit external names in pragmas Import and Export
2958 -- to uppercase for compatibility with the default behavior of DEC C.
2960 S_GCC_Valid : aliased constant S := "/VALIDITY_CHECKING=" &
3009 -- /VALIDITY_CHECKING[=(keyword,[...])]
3011 -- Control level of validity checking.
3013 -- DEFAULT (D) In this mode checks are made to prevent
3014 -- erroneous behavior in accordance with the RM.
3015 -- Notably extra checks may be needed for case
3016 -- statements and subscripted array assignments.
3018 -- NONE No special checks for invalid values are
3019 -- performed. This means that references to
3020 -- uninitialized variables can cause erroneous
3021 -- behavior from constructs like case statements
3022 -- and subscripted array assignments. In this
3023 -- mode, invalid values can lead to erroneous
3026 -- FULL Every assignment is checked for validity, so
3027 -- that it is impossible to assign invalid values.
3028 -- The RM specifically allows such assignments,
3029 -- but in this mode, invalid values can never be
3030 -- assigned, and an attempt to perform such an
3031 -- assignment immediately raises Constraint_Error.
3032 -- This behavior is allowed (but not required) by
3033 -- the RM. This mode is intended as a debugging aid,
3034 -- and may be useful in helping to track down
3035 -- uninitialized variables. It may be useful to
3036 -- use this in conjunction with the Normalize_Scalars
3037 -- pragma which attempts to initialize with invalid
3038 -- values where possible.
3040 S_GCC_Verbose : aliased constant S := "/VERBOSE " &
3045 -- Show commands generated by the GCC driver. Normally used only for
3046 -- debugging purposes or if you need to be sure what version of the
3047 -- compiler you are executing.
3049 S_GCC_Verb_Asm : aliased constant S := "/VERBOSE_ASM " &
3050 "-S,-verbose_asm,!-c";
3054 -- Use to cause the assembler source file to be generated, using S as the
3055 -- filetype, instead of the object file. This may be useful if you need
3056 -- to examine the generated assembly code.
3058 S_GCC_Warn : aliased constant S := "/WARNINGS=" &
3060 "!-gnatws,!-gnatwe " &
3073 "FAILING_ASSERTIONS " &
3075 "NO_FAILING_ASSERTIONS " &
3077 "BAD_FIXED_VALUES " &
3079 "NO_BAD_FIXED_VALUES " &
3081 "BIASED_REPRESENTATION " &
3083 "NO_BIASED_REPRESENTATION " &
3089 "MISSING_COMPONENT_CLAUSES " &
3091 "NOMISSING_COMPONENT_CLAUSES " &
3093 "IMPLICIT_DEREFERENCE " &
3095 "NO_IMPLICIT_DEREFERENCE " &
3103 "UNREFERENCED_FORMALS " &
3105 "NOUNREFERENCED_FORMALS " &
3107 "UNRECOGNIZED_PRAGMAS " &
3109 "NOUNRECOGNIZED_PRAGMAS " &
3121 "NOIMPLEMENTATION " &
3127 "CONSTANT_VARIABLES " &
3129 "NOCONSTANT_VARIABLES " &
3131 "STANDARD_REDEFINITION " &
3133 "NOSTANDARD_REDEFINITION " &
3141 "NOMODIFIED_UNREF " &
3143 "SUSPICIOUS_MODULUS " &
3145 "NOSUSPICIOUS_MODULUS " &
3153 "OUT_PARAM_UNREF " &
3155 "NOOUT_PARAM_UNREF " &
3157 "INEFFECTIVE_INLINE " &
3159 "NOINEFFECTIVE_INLINE " &
3163 "PARAMETER_ORDER " &
3165 "NOPARAMETER_ORDER " &
3167 "NOMISSING_PARENS " &
3175 "NOOBJECT_RENAMES " &
3179 "OVERRIDING_SIZE " &
3181 "NOOVERRIDING_SIZE " &
3188 "-Wuninitialized " &
3193 "UNORDERED_ENUMERATIONS " &
3195 "NOUNORDERED_ENUMERATIONS " &
3197 "VARIABLES_UNINITIALIZED " &
3199 "NOVARIABLES_UNINITIALIZED " &
3201 "REVERSE_BIT_ORDER " &
3203 "NOREVERSE_BIT_ORDER " &
3205 "LOWBOUND_ASSUMED " &
3207 "NOLOWBOUND_ASSUMED " &
3209 "WARNINGS_OFF_PRAGMAS " &
3211 "NO_WARNINGS_OFF_PRAGMAS " &
3213 "IMPORT_EXPORT_PRAGMAS " &
3215 "NOIMPORT_EXPORT_PRAGMAS " &
3217 "LOCAL_RAISE_HANDLING " &
3219 "NOLOCAL_RAISE_HANDLING " &
3221 "ADA_2005_COMPATIBILITY " &
3223 "NOADA_2005_COMPATIBILITY " &
3225 "UNCHECKED_CONVERSIONS " &
3227 "NOUNCHECKED_CONVERSIONS " &
3231 -- Suppress the output of all warning messages from the GNAT front end.
3232 -- Note that it does not suppress warnings from the gcc back end.
3234 -- /WARNINGS[=(keyword[,...])]
3236 -- In addition to error messages, corresponding to illegalities as
3237 -- defined in the reference manual, the compiler detects two kinds of
3238 -- warning situations. First, the compiler considers some constructs
3239 -- suspicious and generates a warning message to alert you to a possible
3240 -- error. Second, if the compiler detects a situation that is sure to
3241 -- raise an exception at runtime, it generates a warning message.
3243 -- You may specify the following keywords to change this behavior:
3245 -- DEFAULT (D) The default behavior above.
3247 -- ALL Activate all optional warnings.
3248 -- Activates most optional warning messages,
3249 -- see remaining list in this section for
3250 -- details on optional warning messages that
3251 -- can be individually controlled.
3252 -- The warnings that are not turned on by
3253 -- this option are BIASED_ROUNDING,
3254 -- IMPLICIT_DEREFERENCE, HIDING and
3255 -- ELABORATION. All other optional Ada
3256 -- warnings are turned on.
3258 -- EVERY Activate every optional warning.
3259 -- Activates all optional warnings, including
3260 -- those listed above as exceptions for ALL.
3262 -- NOALL Suppress all optional errors.
3263 -- Suppresses all optional warning messages
3264 -- that can be activated by option ALL.
3266 -- ALL_GCC Request additional messages from the GCC
3267 -- backend. Most of these are not relevant
3270 -- CONDITIONALS Activate warnings for conditional
3271 -- Expressions used in tests that are known
3272 -- to be True or False at compile time. The
3273 -- default is that such warnings are not
3276 -- NOCONDITIONALS Suppress warnings for conditional
3277 -- expressions used in tests that are known
3278 -- to be True or False at compile time.
3280 -- IMPLICIT_DEREFERENCE Activate warnings on implicit dereferencing.
3281 -- The use of a prefix of an access type in an
3282 -- indexed component, slice, or selected component
3283 -- without an explicit .all will generate
3284 -- a warning. With this warning enabled, access
3285 -- checks occur only at points where an explicit
3286 -- .all appears in the source code (assuming no
3287 -- warnings are generated as a result of this
3288 -- option). The default is that such warnings are
3289 -- not generated. Note that /WARNINGS=ALL does not
3290 -- affect the setting of this warning option.
3292 -- NOIMPLICIT_DEREFERENCE Suppress warnings on implicit dereferencing.
3293 -- in indexed components, slices, and selected
3296 -- ELABORATION Activate warnings on missing pragma
3297 -- Elaborate_All statements. The default is
3298 -- that such warnings are not generated.
3300 -- NOELABORATION Suppress warnings on missing pragma
3301 -- Elaborate_All statements.
3303 -- ERRORS Warning messages are to be treated as errors.
3304 -- The warning string still appears, but the
3305 -- warning messages are counted as errors, and
3306 -- prevent the generation of an object file.
3308 -- HIDING Activate warnings on hiding declarations.
3309 -- A declaration is considered hiding if it is
3310 -- for a non-overloadable entity, and it declares
3311 -- an entity with the same name as some other
3312 -- entity that is directly or use-visible. The
3313 -- default is that such warnings are not
3316 -- NOHIDING Suppress warnings on hiding declarations.
3318 -- IMPLEMENTATION Activate warnings for a with of an internal
3319 -- GNAT implementation unit, defined as any unit
3320 -- from the Ada, Interfaces, GNAT, DEC or
3321 -- System hierarchies that is not documented in
3322 -- either the Ada Reference Manual or the GNAT
3323 -- Programmer's Reference Manual. Such units are
3324 -- intended only for internal implementation
3325 -- purposes and should not be with'ed by user
3326 -- programs. The default is that such warnings
3329 -- NOIMPLEMENTATION Disables warnings for a with of an internal
3330 -- GNAT implementation unit.
3332 -- INEFFECTIVE_INLINE Activate warnings on ineffective pragma Inlines
3333 -- Activates warnings for failure of front end
3334 -- inlining (activated by /INLINE=FULL) to inline
3335 -- a particular call. There are many reasons for
3336 -- not being able to inline a call, including most
3337 -- commonly that the call is too complex to
3338 -- inline. This warning can also be turned on
3339 -- using /INLINE=FULL.
3341 -- NOINEFFECTIVE_INLINE Suppress warnings on ineffective pragma Inlines
3342 -- Suppresses warnings on ineffective pragma
3343 -- Inlines. If the inlining mechanism cannot
3344 -- inline a call, it will simply ignore the
3345 -- request silently.
3347 -- MISSING_COMPONENT_CLAUSES
3348 -- Activate warnings for cases when there are
3349 -- component clauses for a record type, but not
3350 -- for every component of the record.
3352 -- NOMISSING_COMPONENT_CLAUSES
3353 -- Suppress warnings for cases when there are
3354 -- missing component clauses for a record type.
3357 -- Activate warnings for cases where parentheses
3358 -- are not used and the result is potential
3359 -- ambiguity from a reader's point of view.
3360 -- For example (not a > b) when a and b are
3361 -- modular means (not (a) > b) and very likely
3362 -- the programmer intended (not (a > b)).
3365 -- Suppress warnings for cases where parentheses
3366 -- are not used and the result is potential
3367 -- ambiguity from a reader's point of view.
3369 -- MODIFIED_UNREF Activates warnings for variables that are
3370 -- assigned (using an initialization value or with
3371 -- one or more assignment statements) but whose
3372 -- value is never read. The warning is suppressed
3373 -- for volatile variables and also for variables
3374 -- that are renamings of other variables or for
3375 -- which an address clause is given. This warning
3376 -- can also be turned on using /WARNINGS/OPTIONAL.
3378 -- NOMODIFIED_UNREF Disables warnings for variables that are
3379 -- assigned or initialized, but never read.
3381 -- NORMAL Sets normal warning mode, in which enabled
3382 -- warnings are issued and treated as warnings
3383 -- rather than errors. This is the default mode.
3384 -- It can be used to cancel the effect of an
3385 -- explicit /WARNINGS=SUPPRESS or
3386 -- /WARNINGS=ERRORS. It also cancels the effect
3387 -- of the implicit /WARNINGS=ERRORS that is
3388 -- activated by the use of /STYLE=GNAT.
3390 -- OBSOLESCENT Activates warnings for calls to subprograms
3391 -- marked with pragma Obsolescent and for use of
3392 -- features in Annex J of the Ada Reference
3393 -- Manual. In the case of Annex J, not all
3394 -- features are flagged. In particular use of the
3395 -- renamed packages (like Text_IO), use of package
3396 -- ASCII and use of the attribute 'Constrained are
3397 -- not flagged, since these are very common and
3398 -- would generate many annoying positive warnings.
3399 -- The default is that such warnings are not
3402 -- NOOBSOLESCENT Disables warnings on use of obsolescent
3405 -- OBJECT_RENAME Activate warnings for non limited objects
3406 -- renaming parameterless functions.
3408 -- NOOBJECT_RENAME Suppress warnings for non limited objects
3409 -- renaming parameterless functions.
3411 -- OPTIONAL Equivalent to ALL.
3413 -- NOOPTIONAL Equivalent to NOALL.
3415 -- OVERLAYS Activate warnings for possibly unintended
3416 -- initialization effects of defining address
3417 -- clauses that cause one variable to overlap
3418 -- another. The default is that such warnings
3421 -- NOOVERLAYS Suppress warnings on possibly unintended
3422 -- initialization effects of defining address
3423 -- clauses that cause one variable to overlap
3426 -- REDUNDANT Activate warnings for redundant constructs.
3427 -- In particular assignments of a variable to
3428 -- itself, and a type conversion that converts
3429 -- an object to its own type. The default
3430 -- is that such warnings are not generated.
3432 -- NOREDUNDANT Suppress warnings for redundant constructs.
3434 -- SUPPRESS Completely suppress the output of all warning
3435 -- messages. Same as /NOWARNINGS.
3437 -- UNCHECKED_CONVERSIONS Activates warnings on unchecked conversions.
3438 -- Causes warnings to be generated for
3439 -- unchecked conversions when the two types are
3440 -- known at compile time to have different sizes.
3441 -- The default is that such warnings are
3444 -- NOUNCHECKED_CONVERSIONS Suppress warnings for unchecked conversions.
3446 -- UNINITIALIZED Generate warnings for uninitialized variables.
3447 -- This is a GCC option, not an Ada option.
3448 -- You must also specify the /OPTIMIZE qualifier
3449 -- with a value other than NONE (in other words,
3450 -- this keyword works only if optimization is
3453 -- UNREFERENCED_FORMALS Activate warnings on unreferenced formals.
3454 -- Causes a warning to be generated if a formal
3455 -- parameter is not referenced in the body of
3456 -- the subprogram. This warning can also be turned
3457 -- on using option ALL or UNUSED.
3459 -- NOUNREFERENCED_FORMALS Suppress warnings on unreferenced formals.
3460 -- Suppresses warnings for unreferenced formal
3461 -- parameters. Note that the combination UNUSED
3462 -- followed by NOUNREFERENCED_FORMALS has the
3463 -- effect of warning on unreferenced entities
3464 -- other than subprogram formals.
3466 -- UNUSED Activates warnings to be generated for entities
3467 -- that are defined but not referenced, and for
3468 -- units that are with'ed and not referenced. In
3469 -- the case of packages, a warning is also
3470 -- generated if no entities in the package are
3471 -- referenced. This means that if the package
3472 -- is referenced but the only references are in
3473 -- use clauses or renames declarations, a warning
3474 -- is still generated. A warning is also generated
3475 -- for a generic package that is with'ed but never
3476 -- instantiated. In the case where a package or
3477 -- subprogram body is compiled, and there is a
3478 -- with on the corresponding spec that is only
3479 -- referenced in the body, a warning is also
3480 -- generated, noting that the with can be moved
3481 -- to the body. The default is that such warnings
3482 -- are not generated.
3484 -- NOUNUSED Suppress warnings for unused entities and
3487 -- VARIABLES_UNINITIALIZED Activates warnings on unassigned variables.
3488 -- Causes warnings to be generated when a variable
3489 -- is accessed which may not be properly
3491 -- The default is that such warnings are
3494 -- NOVARIABLES_UNINITIALIZED Suppress warnings for uninitialized
3497 -- TAG_WARNINGS Causes the string [xxx] to be added to warnings
3498 -- that are controlled by the warning string xxx,
3499 -- e.g. [REDUNDANT], or if the warning is enabled
3500 -- by default, the tag is [enabled by default].
3502 -- NOTAG_WARNINGS Turns off warning tag output (default setting).
3504 S_GCC_WarnX : aliased constant S := "/NOWARNINGS " &
3506 -- NODOC (see /WARNINGS)
3508 S_GCC_No_Back : aliased constant S := "/NO_BACK_END_WARNINGS " &
3510 -- /NO_BACK_END_WARNINGS
3512 -- Inhibit all warning messages of the GCC back-end.
3514 S_GCC_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" &
3527 -- /NOWIDE_CHARACTER_ENCODING (D)
3528 -- /WIDE_CHARACTER_ENCODING[=encode-type]
3530 -- Specifies the mechanism used to encode wide characters. 'encode-type'
3531 -- is one of the following:
3533 -- BRACKETS (D) A wide character is encoded as ["xxxx"] where XXXX
3534 -- are four hexadecimal digits representing the coding
3535 -- ('Pos value) of the character in type
3536 -- Wide_Character. The hexadecimal digits may use upper
3537 -- or lower case letters.
3539 -- This notation can also be used for upper half
3540 -- Character values using the format ["xx"] where XX is
3541 -- two hexadecimal digits representing the coding ('Pos
3542 -- value) of the character in type Character (or
3543 -- Wide_Character). The hexadecimal digits may use upper
3546 -- NONE No wide characters are allowed. Same
3547 -- as /NOWIDE_CHARACTER_ENCODING.
3549 -- HEX In this encoding, a wide character is represented by
3550 -- the following five character sequence: ESC a b c d
3551 -- Where 'a', 'b', 'c', and 'd' are the four hexadecimal
3552 -- characters (using uppercase letters) of the wide
3553 -- character code. For example, ESC A345 is used to
3554 -- represent the wide character with code 16#A345#. This
3555 -- scheme is compatible with use of the full
3556 -- Wide_Character set.
3558 -- UPPER The wide character with encoding 16#abcd# where the
3559 -- upper bit is on (in other words, "a" is in the range
3560 -- 8-F) is represented as two bytes, 16#ab# and 16#cd#.
3561 -- The second byte may never be a format control
3562 -- character, but is not required to be in the upper
3563 -- half. This method can be also used for shift-JIS or
3564 -- EUC, where the internal coding matches the external
3567 -- SHIFT_JIS A wide character is represented by a two-character
3568 -- sequence, 16#ab# and 16#cd#, with the restrictions
3569 -- described for upper-half encoding as described above.
3570 -- The internal character code is the corresponding JIS
3571 -- character according to the standard algorithm for
3572 -- Shift-JIS conversion. Only characters defined in the
3573 -- JIS code set table can be used with this encoding
3576 -- UTF8 A wide character is represented using
3577 -- UCS Transformation Format 8 (UTF-8) as defined in Annex
3578 -- R of ISO 10646-1/Am.2. Depending on the character
3579 -- value, the representation is a one, two, or three byte
3582 -- 16#0000#-16#007f#: 2#0xxxxxxx#
3583 -- 16#0080#-16#07ff#: 2#110xxxxx# 2#10xxxxxx#
3584 -- 16#0800#-16#ffff#: 2#1110xxxx# 2#10xxxxxx# 2#10xxxxxx#
3586 -- where the xxx bits correspond to the left-padded bits
3587 -- of the 16-bit character value. Note that all lower
3588 -- half ASCII characters are represented as ASCII bytes
3589 -- and all upper half characters and other wide characters
3590 -- are represented as sequences of upper-half (The full
3591 -- UTF-8 scheme allows for encoding 31-bit characters as
3592 -- 6-byte sequences, but in this implementation, all UTF-8
3593 -- sequences of four or more bytes length will be treated
3596 -- EUC A wide character is represented by a two-character
3597 -- sequence 16#ab# and 16#cd#, with both characters being
3598 -- in the upper half. The internal character code is the
3599 -- corresponding JIS character according to the EUC
3600 -- encoding algorithm. Only characters defined in the JIS
3601 -- code set table can be used with this encoding method.
3603 S_GCC_WideX : aliased constant S := "/NOWIDE_CHARACTER_ENCODING " &
3605 -- NODOC (see /WIDE_CHARACTER_ENCODING)
3607 S_GCC_Xdebug : aliased constant S := "/XDEBUG " &
3612 -- Output expanded source files for source level debugging.
3613 -- The expanded source (see /EXPAND_SOURCE) is written to files
3614 -- with names formed by appending "_DG" to the input file name,
3615 -- The debugging information generated by the /DEBUG qualifier will then
3616 -- refer to the generated file. This allows source level debugging using
3617 -- the generated code which is sometimes useful for complex code, for
3618 -- example to find out exactly which part of a complex construction
3619 -- raised an exception. The maximum line length for the output is 72.
3621 S_GCC_Lxdebug : aliased constant S := "/LXDEBUG=#" &
3625 -- Output expanded source files for source level debugging.
3626 -- The expanded source (see /EXPAND_SOURCE) is written to files
3627 -- with names formed by appending "_DG" to the input file name,
3628 -- The debugging information generated by the /DEBUG qualifier will then
3629 -- refer to the generated file. This allows source level debugging using
3630 -- the generated code which is sometimes useful for complex code, for
3631 -- example to find out exactly which part of a complex construction
3632 -- raised an exception. The parameter is the maximum line length for
3635 S_GCC_Xref : aliased constant S := "/XREF=" &
3642 -- Normally the compiler generates full cross-referencing information in
3643 -- the .ALI file. This information is used by a number of tools,
3644 -- including GNAT FIND and GNAT XREF.
3646 -- GENERATE (D) Generate cross-referencing information.
3648 -- SUPPRESS Suppress cross-referencing information.
3649 -- This saves some space and may slightly
3650 -- speed up compilation, but means that some
3651 -- tools cannot be used.
3653 GCC_Switches : aliased constant Switches :=
3654 (S_GCC_Ada_83 'Access,
3655 S_GCC_Ada_95 'Access,
3656 S_GCC_Ada_05 'Access,
3657 S_GCC_Ada_2005'Access,
3658 S_GCC_Ada_12 'Access,
3659 S_GCC_Ada_2012'Access,
3661 S_GCC_AlCheck 'Access,
3663 S_GCC_AValid 'Access,
3664 S_GCC_CategW 'Access,
3665 S_GCC_Checks 'Access,
3666 S_GCC_Chflov 'Access,
3667 S_GCC_ChecksX 'Access,
3668 S_GCC_Compres 'Access,
3669 S_GCC_Config 'Access,
3670 S_GCC_Current 'Access,
3671 S_GCC_Debug 'Access,
3672 S_GCC_DebugX 'Access,
3674 S_GCC_DisAtom 'Access,
3676 S_GCC_DistX 'Access,
3677 S_GCC_Error 'Access,
3678 S_GCC_ErrorX 'Access,
3679 S_GCC_Expand 'Access,
3680 S_GCC_Lexpand 'Access,
3681 S_GCC_Except 'Access,
3682 S_GCC_Extend 'Access,
3685 S_GCC_Follow 'Access,
3686 S_GCC_Force 'Access,
3688 S_GCC_Generate'Access,
3691 S_GCC_Ident 'Access,
3692 S_GCC_IdentX 'Access,
3693 S_GCC_IgnoreR 'Access,
3694 S_GCC_IgnoreS 'Access,
3695 S_GCC_Immed 'Access,
3696 S_GCC_Inline 'Access,
3697 S_GCC_InlineX 'Access,
3698 S_GCC_Intsrc 'Access,
3700 S_GCC_JustX 'Access,
3701 S_GCC_Length 'Access,
3703 S_GCC_Output 'Access,
3704 S_GCC_Machine 'Access,
3705 S_GCC_Mapping 'Access,
3707 S_GCC_Multi 'Access,
3709 S_GCC_Nesting 'Access,
3710 S_GCC_Noadc 'Access,
3711 S_GCC_Noload 'Access,
3712 S_GCC_Nostinc 'Access,
3713 S_GCC_Nostlib 'Access,
3714 S_GCC_NoWarnP 'Access,
3717 S_GCC_Overflo 'Access,
3718 S_GCC_PValid 'Access,
3719 S_GCC_Pointer 'Access,
3720 S_GCC_Polling 'Access,
3721 S_GCC_Project 'Access,
3723 S_GCC_Report 'Access,
3724 S_GCC_ReportX 'Access,
3725 S_GCC_Repinfo 'Access,
3726 S_GCC_RepinfX 'Access,
3729 S_GCC_Search 'Access,
3730 S_GCC_Src_Info'Access,
3731 S_GCC_Style 'Access,
3732 S_GCC_StyleX 'Access,
3733 S_GCC_Subdirs 'Access,
3734 S_GCC_Symbol 'Access,
3735 S_GCC_Syntax 'Access,
3736 S_GCC_Table 'Access,
3737 S_GCC_Target 'Access,
3738 S_GCC_Trace 'Access,
3742 S_GCC_Units 'Access,
3743 S_GCC_Unique 'Access,
3744 S_GCC_Upcase 'Access,
3745 S_GCC_Valid 'Access,
3746 S_GCC_Verbose 'Access,
3747 S_GCC_Verb_Asm'Access,
3749 S_GCC_WarnX 'Access,
3751 S_GCC_WideX 'Access,
3752 S_GCC_No_Back 'Access,
3753 S_GCC_Xdebug 'Access,
3754 S_GCC_Lxdebug 'Access,
3755 S_GCC_Xref 'Access);
3757 ----------------------------
3758 -- Switches for GNAT ELIM --
3759 ----------------------------
3761 S_Elim_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
3763 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
3765 -- Add directories to the project search path.
3767 S_Elim_All : aliased constant S := "/ALL " &
3772 -- Also look for subprograms from the GNAT run time that can be
3773 -- eliminated. Note that when 'gnat.adc' is produced using this switch,
3774 -- the entire program must be recompiled with qualifier /ALL_FILES of
3777 S_Elim_Bind : aliased constant S := "/BIND_FILE=<" &
3779 -- /BIND_FILE=file_name
3781 -- Specifies file_name as the bind file to process. If this qualifier is
3782 -- not used, the name of the bind file is computed from the full expanded
3783 -- Ada name of a main subprogram.
3785 S_Elim_Comp : aliased constant S := "/COMPILER=@" &
3787 -- /COMPILER=path_name
3789 -- Instructs GNAT ELIM to use a specific gcc compiler instead of one
3790 -- available on the path.
3792 S_Elim_Config : aliased constant S := "/CONFIGURATION_PRAGMAS=<" &
3794 -- /CONFIGURATION_PRAGMAS=path_name
3796 -- Specifies a file that contains configuration pragmas.
3797 -- The file must be specified with absolute path.
3799 S_Elim_Current : aliased constant S := "/CURRENT_DIRECTORY " &
3801 -- /CURRENT_DIRECTORY (D)
3802 -- /NOCURRENT_DIRECTORY
3804 -- Look for source files in the default directory.
3806 S_Elim_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3808 -- /EXTERNAL_REFERENCE="name=val"
3810 -- Specifies an external reference to the project manager. Useful only if
3811 -- /PROJECT_FILE is used.
3814 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3816 S_Elim_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
3818 -- /NOFOLLOW_LINKS_FOR_FILES (D)
3819 -- /FOLLOW_LINKS_FOR_FILES
3821 -- Follow links when parsing project files
3823 S_Elim_GNATMAKE : aliased constant S := "/GNATMAKE=@" &
3825 -- /GNATMAKE=path_name
3827 -- Instructs GNAT MAKE to use a specific gnatmake instead of one available
3830 S_Elim_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3837 -- /MESSAGES_PROJECT_FILE[=messages-option]
3839 -- Specifies the "verbosity" of the parsing of project files.
3840 -- messages-option may be one of the following:
3842 -- DEFAULT (D) No messages are output if there is no error or warning.
3844 -- MEDIUM A small number of messages are output.
3846 -- HIGH A great number of messages are output, most of them not
3847 -- being useful for the user.
3849 S_Elim_Nodisp : aliased constant S := "/NO_DISPATCH " &
3850 "--no-elim-dispatch";
3851 -- /NONO_DISPATCH (D)
3854 -- Do not generate pragmas for dispatching operations.
3856 S_Elim_Ignore : aliased constant S := "/IGNORE=@" &
3860 -- Do not generate pragmas for subprograms declared in the sources
3861 -- listed in a specified file
3863 S_Elim_Project : aliased constant S := "/PROJECT_FILE=<" &
3865 -- /PROJECT_FILE=filename
3867 -- Specifies the main project file to be used. The project files rooted
3868 -- at the main project file will be parsed before the invocation of the
3869 -- gnatelim. The source directories to be searched will be communicated
3870 -- to gnatelim through logical name ADA_PRJ_INCLUDE_FILE.
3872 S_Elim_Quiet : aliased constant S := "/QUIET " &
3877 -- Quiet mode: by default GNAT ELIM outputs to the standard error stream
3878 -- the number of program units left to be processed. This option turns
3881 S_Elim_Files : aliased constant S := "/FILES=@" &
3886 -- Take as arguments the files that are listed in the specified
3889 S_Elim_Log : aliased constant S := "/LOG " &
3894 -- Duplicate all the output sent to Stderr into a default log file.
3896 S_Elim_Logfile : aliased constant S := "/LOGFILE=@" &
3899 -- /LOGFILE=logfilename
3901 -- Duplicate all the output sent to Stderr into a specified log file.
3903 S_Elim_Main : aliased constant S := "/MAIN=@" &
3908 -- Specify the main subprogram of the partition to analyse.
3910 S_Elim_Out : aliased constant S := "/OUTPUT=@" &
3914 -- Specify the name of the output file.
3916 S_Elim_Time : aliased constant S := "/TIME " &
3921 -- Print out execution time
3923 S_Elim_Search : aliased constant S := "/SEARCH=*" &
3925 -- /SEARCH=(directory, ...)
3927 -- When looking for source files also look in the specified directories.
3929 S_Elim_Subdirs : aliased constant S := "/SUBDIRS=<" &
3933 -- The actual directories (object, exec, library, ...) are subdirectories
3934 -- of the directory specified in the project file. If the subdirectory
3935 -- does not exist, it is created automatically.
3937 S_Elim_Verb : aliased constant S := "/VERBOSE " &
3942 -- Verbose mode: GNAT ELIM version information is output as Ada comments
3943 -- to the standard output stream. Also, in addition to the number of
3944 -- program units left, GNAT ELIM will output the name of the current unit
3947 S_Elim_Warn : aliased constant S := "/WARNINGS=" &
3953 -- /WARNINGS[=(keyword[,...])]
3955 -- The following keywords are supported:
3957 -- NORMAL (D) Print warning all the messages.
3958 -- QUIET Some warning messages are suppressed
3960 Elim_Switches : aliased constant Switches :=
3961 (S_Elim_Add 'Access,
3963 S_Elim_Bind 'Access,
3964 S_Elim_Comp 'Access,
3965 S_Elim_Config 'Access,
3966 S_Elim_Current 'Access,
3968 S_Elim_Files 'Access,
3969 S_Elim_Follow 'Access,
3970 S_Elim_GNATMAKE'Access,
3972 S_Elim_Logfile 'Access,
3973 S_Elim_Main 'Access,
3974 S_Elim_Mess 'Access,
3975 S_Elim_Nodisp 'Access,
3977 S_Elim_Project 'Access,
3978 S_Elim_Quiet 'Access,
3979 S_Elim_Search 'Access,
3980 S_Elim_Subdirs 'Access,
3981 S_Elim_Time 'Access,
3982 S_Elim_Verb 'Access,
3983 S_Elim_Warn 'Access);
3985 ----------------------------
3986 -- Switches for GNAT FIND --
3987 ----------------------------
3989 S_Find_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
3991 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
3993 -- Add directories to the project search path.
3995 S_Find_All : aliased constant S := "/ALL_FILES " &
4000 -- If this switch is present, FIND and XREF will parse the read-only
4001 -- files found in the library search path. Otherwise, these files will
4002 -- be ignored. This option can be used to protect Gnat sources or your
4003 -- own libraries from being parsed, thus making FIND and XREF much
4004 -- faster, and their output much smaller.
4006 S_Find_Deriv : aliased constant S := "/DERIVED_TYPE_INFORMATION " &
4008 -- /NODERIVED_TYPE_INFORMATION (D)
4009 -- /DERIVED_TYPE_INFORMATION
4011 -- Output the parent type reference for each matching derived types.
4013 S_Find_Expr : aliased constant S := "/EXPRESSIONS " &
4015 -- /NOEXPRESSIONS (D)
4018 -- By default, FIND accepts the simple regular expression set for pattern.
4019 -- If this switch is set, then the pattern will be considered as a full
4020 -- Unix-style regular expression.
4022 S_Find_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4024 -- /EXTERNAL_REFERENCE="name=val"
4026 -- Specifies an external reference to the project manager. Useful only if
4027 -- /PROJECT_FILE is used.
4030 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4032 S_Find_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
4034 -- /NOFOLLOW_LINKS_FOR_FILES (D)
4035 -- /FOLLOW_LINKS_FOR_FILES
4037 -- Follow links when parsing project files
4039 S_Find_Full : aliased constant S := "/FULL_PATHNAME " &
4041 -- /NOFULL_PATHNAME (D)
4044 -- If this switch is set, the output file names will be preceded by their
4045 -- directory (if the file was found in the search path). If this switch
4046 -- is not set, the directory will not be printed.
4048 S_Find_Ignore : aliased constant S := "/IGNORE_LOCALS " &
4050 -- /NOIGNORE_LOCALS (D)
4053 -- If this switch is set, information is output only for library-level
4054 -- entities, ignoring local entities. The use of this switch may
4055 -- accelerate FIND and XREF.
4057 S_Find_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4064 -- /MESSAGES_PROJECT_FILE[=messages-option]
4066 -- Specifies the "verbosity" of the parsing of project files.
4067 -- messages-option may be one of the following:
4069 -- DEFAULT (D) No messages are output if there is no error or warning.
4071 -- MEDIUM A small number of messages are output.
4073 -- HIGH A great number of messages are output, most of them not
4074 -- being useful for the user.
4076 S_Find_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
4080 -- Do not look for sources in the system default directory.
4082 S_Find_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
4086 -- Do not look for library files in the system default directory.
4088 S_Find_Object : aliased constant S := "/OBJECT_SEARCH=*" &
4090 -- /OBJECT_SEARCH=(directory,...)
4092 -- When searching for library and object files, look in the specified
4093 -- directories. The order in which library files are searched is the same
4096 S_Find_Print : aliased constant S := "/PRINT_LINES " &
4098 -- /NOPRINT_LINES (D)
4101 -- Output the content of the Ada source file lines were the entity was
4104 S_Find_Project : aliased constant S := "/PROJECT=@" &
4108 -- Specify a project file to use. By default, FIND and XREF will try to
4109 -- locate a project file in the current directory.
4111 -- If a project file is either specified or found by the tools, then the
4112 -- content of the source directory and object directory lines are added
4113 -- as if they had been specified respectively by /SOURCE_SEARCH and
4116 -- This qualifier is not compatible with /PROJECT_FILE
4118 S_Find_Prj : aliased constant S := "/PROJECT_FILE=<" &
4120 -- /PROJECT_FILE=filename
4122 -- Specifies the main project file to be used. The project files rooted
4123 -- at the main project file will be parsed before looking for sources.
4124 -- The source and object directories to be searched will be communicated
4125 -- to gnatfind through logical names ADA_PRJ_INCLUDE_FILE and
4126 -- ADA_PRJ_OBJECTS_FILE.
4128 S_Find_Ref : aliased constant S := "/REFERENCES " &
4130 -- /NOREFERENCES (D)
4133 -- By default, FIND will output only the information about the
4134 -- declaration, body or type completion of the entities. If this switch
4135 -- is set, the FIND will locate every reference to the entities in the
4136 -- files specified on the command line (or in every file in the search
4137 -- path if no file is given on the command line).
4139 S_Find_Search : aliased constant S := "/SEARCH=*" &
4141 -- /SEARCH=(directory,...)
4144 -- /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
4146 S_Find_Source : aliased constant S := "/SOURCE_SEARCH=*" &
4148 -- /SOURCE_SEARCH=(directory,...)
4150 -- When looking for source files also look in the specified directories.
4151 -- The order in which source file search is undertaken is the same as for
4154 S_Find_Subdirs : aliased constant S := "/SUBDIRS=<" &
4158 -- The actual directories (object, exec, library, ...) are subdirectories
4159 -- of the directory specified in the project file. If the subdirectory
4160 -- does not exist, it is created automatically.
4162 S_Find_Types : aliased constant S := "/TYPE_HIERARCHY " &
4164 -- /NOTYPE_HIERARCHY (D)
4167 -- Output the type hierarchy for the specified type. It acts like the
4168 -- /DERIVED_TYPE_INFORMATION qualifier, but recursively from parent type
4169 -- to parent type. When this qualifier is specified it is not possible to
4170 -- specify more than one file.
4172 Find_Switches : aliased constant Switches :=
4173 (S_Find_Add 'Access,
4175 S_Find_Deriv 'Access,
4176 S_Find_Expr 'Access,
4178 S_Find_Follow 'Access,
4179 S_Find_Full 'Access,
4180 S_Find_Ignore 'Access,
4181 S_Find_Mess 'Access,
4182 S_Find_Nostinc 'Access,
4183 S_Find_Nostlib 'Access,
4184 S_Find_Object 'Access,
4185 S_Find_Print 'Access,
4186 S_Find_Project 'Access,
4189 S_Find_Search 'Access,
4190 S_Find_Source 'Access,
4191 S_Find_Subdirs 'Access,
4192 S_Find_Types 'Access);
4194 ------------------------------
4195 -- Switches for GNAT KRUNCH --
4196 ------------------------------
4198 S_Krunch_Count : aliased constant S := "/COUNT=#" &
4203 -- Limit file names to nnn characters (where nnn is a decimal
4204 -- integer). The maximum file name length is 39, but if you want to
4205 -- generate a set of files that would be usable if ported to a system
4206 -- with some different maximum file length, then a different value can
4209 Krunch_Switches : aliased constant Switches :=
4210 (1 .. 1 => S_Krunch_Count 'Access);
4212 ----------------------------
4213 -- Switches for GNAT LINK --
4214 ----------------------------
4216 S_Link_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
4218 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
4220 -- Add directories to the project search path.
4222 S_Link_Bind : aliased constant S := "/BIND_FILE=" &
4227 -- /BIND_FILE=[bind-file-option]
4229 -- Specifies the language of the binder generated file.
4231 -- ADA (D) Binder file is Ada.
4233 -- C Binder file is 'C'.
4235 S_Link_Debug : aliased constant S := "/DEBUG=" &
4245 -- /DEBUG[=debug-option]
4247 -- Specifies the amount of debugging information included. 'debug-option'
4248 -- is one of the following:
4250 -- ALL (D) Include full debugging information.
4252 -- NONE Provide no debugging information. Same as /NODEBUG.
4254 -- TRACEBACK Provide sufficient debug information for a traceback.
4256 -- NOTRACEBACK Same as NONE.
4258 S_Link_Nodebug : aliased constant S := "/NODEBUG " &
4260 -- NODOC (see /DEBUG)
4262 S_Link_Execut : aliased constant S := "/EXECUTABLE=@" &
4264 -- /EXECUTABLE=exec-name
4266 -- 'exec-name' specifies an alternative name for the generated executable
4267 -- program. If this qualifier switch is omitted, the executable is called
4268 -- the name of the main unit. So "$ GNAT LINK TRY.ALI" creates an
4269 -- executable called TRY.EXE.
4271 S_Link_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4273 -- /EXTERNAL_REFERENCE="name=val"
4275 -- Specifies an external reference to the project manager. Useful only if
4276 -- /PROJECT_FILE is used.
4279 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4281 S_Link_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
4283 -- /NOFOLLOW_LINKS_FOR_FILES (D)
4284 -- /FOLLOW_LINKS_FOR_FILES
4286 -- Follow links when parsing project files
4288 S_Link_Forlink : aliased constant S := "/FOR_LINKER=" & '"' &
4289 "--for-linker=" & '"';
4290 -- /FOR_LINKER=<string>
4292 -- Transmit the option <string> to the underlying linker.
4294 S_Link_Force : aliased constant S := "/FORCE_OBJECT_FILE_LIST " &
4296 -- /NOFORCE_OBJECT_FILE_LIST (D)
4297 -- /FORCE_OBJECT_FILE_LIST
4299 -- Forces the generation of a file that contains commands for the linker.
4300 -- This is useful in some cases to deal with special situations where the
4301 -- command line length is exceeded.
4303 S_Link_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
4304 "--for-linker=IDENT=" &
4306 -- /IDENTIFICATION="<string>"
4308 -- "<string>" specifies the string to be stored in the image file ident-
4309 -- ification field in the image header. It overrides any pragma Ident
4310 -- specified string.
4312 S_Link_NoInhib : aliased constant S := "/NOINHIBIT-EXEC " &
4313 "--for-linker=--noinhibit-exec";
4314 -- /NOINHIBIT-EXEC (D)
4316 -- Preserve executable if there are warnings. This is the default.
4318 S_Link_Inhib : aliased constant S := "/INHIBIT-EXEC " &
4319 "--for-linker=--inhibit-exec";
4322 -- Remove executable if there are warnings.
4324 S_Link_Libdir : aliased constant S := "/LIBDIR=*" &
4326 -- /LIBDIR=(directory, ...)
4328 -- Look for libraries in the specified directories.
4330 S_Link_Library : aliased constant S := "/LIBRARY=|" &
4334 -- Link with library named "xyz".
4336 S_Link_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4343 -- /MESSAGES_PROJECT_FILE[=messages-option]
4345 -- Specifies the "verbosity" of the parsing of project files.
4346 -- messages-option may be one of the following:
4348 -- DEFAULT (D) No messages are output if there is no error or warning.
4350 -- MEDIUM A small number of messages are output.
4352 -- HIGH A great number of messages are output, most of them not
4353 -- being useful for the user.
4355 S_Link_Nocomp : aliased constant S := "/NOCOMPILE " &
4359 -- Do not compile the file generated by the binder.
4360 -- This may be used when a link is rerun with different options,
4361 -- but there is no need to recompile the binder generated file.
4363 S_Link_Nofiles : aliased constant S := "/NOSTART_FILES " &
4367 -- Link in default image initialization and startup functions.
4369 S_Link_Project : aliased constant S := "/PROJECT_FILE=<" &
4371 -- /PROJECT_FILE=filename
4373 -- Specifies the main project file to be used. The project files rooted
4374 -- at the main project file will be parsed before the invocation of the
4376 -- The source and object directories to be searched will be communicated
4377 -- to the linker through logical names ADA_PRJ_INCLUDE_FILE and
4378 -- ADA_PRJ_OBJECTS_FILE.
4380 S_Link_Return : aliased constant S := "/RETURN_CODES=" &
4382 "!-mvms-return-codes " &
4384 "-mvms-return-codes";
4385 -- /RETURN_CODES=POSIX (D)
4386 -- /RETURN_CODES=VMS
4388 -- Specifies the style of codes returned by
4389 -- Ada.Command_Line.Set_Exit_Status. Must be used in conjunction with
4390 -- and match the Bind qualifier with the same name.
4392 -- POSIX (D) Return Posix compatible exit codes.
4394 -- VMS Return VMS compatible exit codes. The value returned
4395 -- is identically equal to the Set_Exit_Status parameter.
4397 S_Link_Static : aliased constant S := "/STATIC " &
4398 "--for-linker=-static";
4402 -- Indicate to the linker that the link is static.
4404 S_Link_Subdirs : aliased constant S := "/SUBDIRS=<" &
4408 -- The actual directories (object, exec, library, ...) are subdirectories
4409 -- of the directory specified in the project file. If the subdirectory
4410 -- does not exist, it is created automatically.
4412 S_Link_Verb : aliased constant S := "/VERBOSE " &
4417 -- Causes additional information to be output, including a full list of
4418 -- the included object files. This switch option is most useful when you
4419 -- want to see what set of object files are being used in the link step.
4421 S_Link_ZZZZZ : aliased constant S := "/<other> " &
4425 -- Any other switch that will be transmitted to the underlying linker.
4427 Link_Switches : aliased constant Switches :=
4428 (S_Link_Add 'Access,
4429 S_Link_Bind 'Access,
4430 S_Link_Debug 'Access,
4431 S_Link_Nodebug 'Access,
4432 S_Link_Execut 'Access,
4434 S_Link_Follow 'Access,
4435 S_Link_Forlink 'Access,
4436 S_Link_Force 'Access,
4437 S_Link_Ident 'Access,
4438 S_Link_NoInhib 'Access,
4439 S_Link_Inhib 'Access,
4440 S_Link_Libdir 'Access,
4441 S_Link_Library 'Access,
4442 S_Link_Mess 'Access,
4443 S_Link_Nocomp 'Access,
4444 S_Link_Nofiles 'Access,
4445 S_Link_Project 'Access,
4446 S_Link_Return 'Access,
4447 S_Link_Static 'Access,
4448 S_Link_Subdirs 'Access,
4449 S_Link_Verb 'Access,
4450 S_Link_ZZZZZ 'Access);
4452 ----------------------------
4453 -- Switches for GNAT LIST --
4454 ----------------------------
4456 S_List_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
4458 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
4460 -- Add directories to the project search path.
4462 S_List_All : aliased constant S := "/ALL_UNITS " &
4467 -- Consider all units, including those of the predefined Ada library.
4468 -- Especially useful with /DEPENDENCIES.
4470 S_List_Allproj : aliased constant S := "/ALL_PROJECTS " &
4472 -- /NOALL_PROJECTS (D)
4475 -- When used with a project file and no file specified, indicate
4476 -- that gnatls should be called for all sources of all projects in
4477 -- the project tree.
4479 S_List_Current : aliased constant S := "/CURRENT_DIRECTORY " &
4481 -- /CURRENT_DIRECTORY (D)
4482 -- /NOCURRENT_DIRECTORY
4484 -- Look for source, library or object files in the default directory.
4486 S_List_Depend : aliased constant S := "/DEPENDENCIES " &
4488 -- /NODEPENDENCIES (D)
4491 S_List_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4493 -- /EXTERNAL_REFERENCE="name=val"
4495 -- Specifies an external reference to the project manager. Useful only if
4496 -- /PROJECT_FILE is used.
4499 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4501 S_List_Files : aliased constant S := "/FILES=@" &
4505 -- Take as arguments the files that are listed in the specified
4508 S_List_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
4510 -- /NOFOLLOW_LINKS_FOR_FILES (D)
4511 -- /FOLLOW_LINKS_FOR_FILES
4513 -- Follow links when parsing project files
4515 S_List_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4522 -- /MESSAGES_PROJECT_FILE[=messages-option]
4524 -- Specifies the "verbosity" of the parsing of project files.
4525 -- messages-option may be one of the following:
4527 -- DEFAULT (D) No messages are output if there is no error or warning.
4529 -- MEDIUM A small number of messages are output.
4531 -- HIGH A great number of messages are output, most of them not
4532 -- being useful for the user.
4534 S_List_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
4538 -- Do not look for sources of the run time in the standard directory.
4540 S_List_Object : aliased constant S := "/OBJECT_SEARCH=*" &
4542 -- /OBJECT_SEARCH=(directory,...)
4544 -- When looking for library and object files look also in the specified
4547 S_List_Output : aliased constant S := "/OUTPUT=" &
4560 -- /OUTPUT=(option,option,...)
4562 -- SOURCES (D) Only output information about source files.
4564 -- DEPEND List sources from which specified units depend on.
4566 -- OBJECTS Only output information about object files.
4568 -- UNITS Only output information about compilation units.
4570 -- OPTIONS Output the list of options.
4572 -- VERBOSE Output the complete source and object paths.
4573 -- Do not use the default column layout but instead
4574 -- use long format giving as much as information
4575 -- possible on each requested units, including
4576 -- special characteristics.
4578 S_List_Project : aliased constant S := "/PROJECT_FILE=<" &
4580 -- /PROJECT_FILE=filename
4582 -- Specifies the main project file to be used. The project files rooted
4583 -- at the main project file will be parsed before doing any listing.
4584 -- The source and object directories to be searched will be communicated
4585 -- to gnatlist through logical names ADA_PRJ_INCLUDE_FILE and
4586 -- ADA_PRJ_OBJECTS_FILE.
4588 S_List_Search : aliased constant S := "/SEARCH=*" &
4590 -- /SEARCH=(directory,...)
4592 -- Search the specified directories for both source and object files.
4594 S_List_Source : aliased constant S := "/SOURCE_SEARCH=*" &
4596 -- /SOURCE_SEARCH=(directory,...)
4598 -- When looking for source files also look in the specified directories.
4600 S_List_Subdirs : aliased constant S := "/SUBDIRS=<" &
4604 -- The actual directories (object, exec, library, ...) are subdirectories
4605 -- of the directory specified in the project file. If the subdirectory
4606 -- does not exist, it is created automatically.
4608 List_Switches : aliased constant Switches :=
4609 (S_List_Add 'Access,
4611 S_List_Allproj 'Access,
4612 S_List_Current 'Access,
4613 S_List_Depend 'Access,
4615 S_List_Files 'Access,
4616 S_List_Follow 'Access,
4617 S_List_Mess 'Access,
4618 S_List_Nostinc 'Access,
4619 S_List_Object 'Access,
4620 S_List_Output 'Access,
4621 S_List_Project 'Access,
4622 S_List_Search 'Access,
4623 S_List_Source 'Access,
4624 S_List_Subdirs 'Access);
4626 ----------------------------
4627 -- Switches for GNAT MAKE --
4628 ----------------------------
4630 S_Make_Actions : aliased constant S := "/ACTIONS=" &
4637 -- /ACTIONS=(keyword[,...])
4639 -- GNAT MAKE default behavior is to check if the sources are up to date,
4640 -- compile those sources that are not up to date, bind the main source,
4641 -- then link the executable.
4643 -- With the /ACTIONS qualifier, GNAT MAKE may be restricted to one or
4644 -- two of these three steps:
4651 -- You may specify one or more of the following keywords to the /ACTIONS
4654 -- BIND Bind only. Can be combined with /ACTIONS=COMPILE
4655 -- to do compilation and binding, but no linking.
4656 -- Can be combined with /ACTIONS=LINK to do binding and
4657 -- linking. When not combined with /ACTIONS=COMPILE,
4658 -- all the units in the closure of the main program must
4659 -- have been previously compiled and must be up to date.
4661 -- COMPILE Compile only. Do not perform binding, except when
4662 -- /ACTIONS=BIND is also specified. Do not perform
4663 -- linking, except if both /ACTIONS=BIND and /ACTIONS=LINK
4664 -- are also specified.
4666 -- LINK Link only. Can be combined with /ACTIONS=BIND to do
4667 -- binding and linking. Linking will not be performed
4668 -- if combined with /ACTIONS=COMPILE but not with
4669 -- /ACTIONS=BIND\. When not combined with /ACTIONS=BIND
4670 -- all the units in the closure of the main program must
4671 -- have been previously compiled and must be up to date,
4672 -- and the main program need to have been bound.
4674 S_Make_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
4676 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
4678 -- Add directories to the project search path.
4680 S_Make_All : aliased constant S := "/ALL_FILES " &
4685 -- Consider all files in the make process, even the GNAT internal system
4686 -- files (for example, the predefined Ada library files). By default,
4687 -- GNAT MAKE does not check these files (however, if there is an
4688 -- installation problem, it will be caught when GNAT MAKE binds your
4689 -- program). You may have to specify this qualifier if you are working on
4690 -- GNAT itself. The vast majority of GNAT MAKE users never need to
4691 -- specify this switch. All GNAT internal files with will be compiled
4692 -- with /STYLE_CHECK=GNAT.
4694 S_Make_Allproj : aliased constant S := "/ALL_PROJECTS " &
4696 -- /NOALL_PROJECTS (D)
4700 -- When used without project files, it is equivalent to /UNIQUE.
4701 -- When used with a project file with no main (neither on the command
4702 -- line nor in the attribute Main) check every source of every project,
4703 -- recompile all sources that are not up to date and rebuild libraries
4706 S_Make_Bind : aliased constant S := "/BINDER_QUALIFIERS=?" &
4708 -- /BINDER_QUALIFIERS
4710 -- Any qualifiers specified after this qualifier other than
4711 -- /COMPILER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
4712 -- passed to any GNAT BIND commands generated by GNAT MAKE.
4714 S_Make_Bindprj : aliased constant S := "/BND_LNK_FULL_PROJECT " &
4716 -- /BND_LNK_FULL_PROJECT
4718 -- Bind and link all sources of a project, without any consideration
4719 -- to attribute Main, if there is one. This qualifier need to be
4720 -- used in conjunction with the /PROJECT_FILE= qualifier and cannot
4721 -- be used with a main subprogram on the command line or for
4722 -- a library project file. As the binder is invoked with the option
4723 -- meaning "No Ada main subprogram", the user must ensure that the
4724 -- proper options are specified to the linker. This qualifier is
4725 -- normally used when the main subprogram is in a foreign language
4728 S_Make_Comp : aliased constant S := "/COMPILER_QUALIFIERS=?" &
4730 -- /COMPILER_QUALIFIERS
4732 -- Any qualifiers specified after this qualifier other than
4733 -- /BINDER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
4734 -- passed to any GNAT COMPILE commands generated by GNAT MAKE.
4736 S_Make_Cond : aliased constant S := "/CONDITIONAL_SOURCE_SEARCH=*" &
4738 -- /CONDITIONAL_SOURCE_SEARCH=dir
4740 -- Equivalent to "/SOURCE_SEARCH=dir /SKIP_MISSING=dir".
4742 S_Make_Cont : aliased constant S := "/CONTINUE_ON_ERROR " &
4744 -- /NOCONTINUE_ON_ERROR (D)
4745 -- /CONTINUE_ON_ERROR
4747 -- Keep going. Continue as much as possible after a compilation error.
4748 -- To ease the programmer's task in case of compilation errors, the list
4749 -- of sources for which the compile fails is given when GNAT MAKE
4752 S_Make_Current : aliased constant S := "/CURRENT_DIRECTORY " &
4754 -- /CURRENT_DIRECTORY (D)
4755 -- /NOCURRENT_DIRECTORY
4757 -- Look for source, library or object files in the default directory.
4759 S_Make_Dep : aliased constant S := "/DEPENDENCIES_LIST " &
4761 -- /NODEPENDENCIES_LIST (D)
4762 -- /DEPENDENCIES_LIST
4764 -- Check if all objects are up to date. If they are, output the object
4765 -- dependences to SYS$OUTPUT in a form that can be directly exploited in
4766 -- a Unix-style Makefile. By default, each source file is prefixed with
4767 -- its (relative or absolute) directory name. This name is whatever you
4768 -- specified in the various /SOURCE_SEARCH and /SEARCH qualifiers. If
4769 -- you also specify the /QUIET qualifier, only the source file names,
4770 -- without relative paths, are output. If you just specify the
4771 -- /DEPENDENCY_LIST qualifier, dependencies of the GNAT internal system
4772 -- files are omitted. This is typically what you want. If you also
4773 -- specify the /ALL_FILES qualifier, dependencies of the GNAT internal
4774 -- files are also listed. Note that dependencies of the objects in
4775 -- external Ada libraries (see the /SKIP_MISSING qualifier) are never
4778 S_Make_Dirobj : aliased constant S := "/DIRECTORY_OBJECTS=@" &
4780 -- /DIRECTORY_OBJECTS=<file>
4782 -- Put all object files and .ALI files in <file>.
4783 -- This qualifier is not compatible with /PROJECT_FILE.
4785 S_Make_Disprog : aliased constant S := "/DISPLAY_PROGRESS " &
4787 -- /NOPLAY_PROGRESS (D)
4788 -- /DISPLAY_PROGRESS
4790 -- Display progress for each source, up to date or not, as a single line
4791 -- completed x out of y (zz%)
4792 -- If the file needs to be compiled this is displayed after the
4793 -- invocation of the compiler. These lines are displayed even in quiet
4794 -- output mode (/QUIET).
4796 S_Make_Doobj : aliased constant S := "/DO_OBJECT_CHECK " &
4798 -- /NODO_OBJECT_CHECK (D)
4801 -- Don't compile, bind, or link. Output a single command that will
4802 -- recompile an out of date unit, if any. Repeated use of this option,
4803 -- followed by carrying out the indicated compilation, will eventually
4804 -- result in recompiling all required units.
4806 -- If any ALI is missing during the process, GNAT MAKE halts and
4807 -- displays an error message.
4809 S_Make_Execut : aliased constant S := "/EXECUTABLE=@" &
4811 -- /EXECUTABLE=exec-name
4813 -- The name of the final executable program will be 'exec_name'. If this
4814 -- qualifier is omitted the default name for the executable will be the
4815 -- name of the input file with an EXE filetype. You may prefix
4816 -- 'exec_name' with a relative or absolute directory path.
4818 S_Make_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4820 -- /EXTERNAL_REFERENCE="name=val"
4822 -- Specifies an external reference to the project manager. Useful only if
4823 -- /PROJECT_FILE is used.
4826 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4828 S_Make_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
4830 -- /NOFOLLOW_LINKS_FOR_FILES (D)
4831 -- /FOLLOW_LINKS_FOR_FILES
4833 -- Follow links when parsing project files
4835 S_Make_Force : aliased constant S := "/FORCE_COMPILE " &
4837 -- /NOFORCE_COMPILE (D)
4840 -- Force recompilations. Recompile all sources, even though some object
4841 -- files may be up to date, but don't recompile predefined or GNAT
4842 -- internal files unless the /ALL_FILES qualifier is also specified.
4844 S_Make_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
4846 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
4847 -- /FULL_PATH_IN_BRIEF_MESSAGES
4849 -- When using project files, if some errors or warnings are detected
4850 -- during parsing and verbose mode is not in effect (no use of qualifier
4851 -- /VERBOSE), then error lines start with the full path name of the
4852 -- project file, rather than its simple file name.
4854 S_Make_Hi_Verb : aliased constant S := "/HIGH_VERBOSITY " &
4856 -- /NOHIGH_VERBOSITY (D)
4859 -- Displays the reason for all recompilations GNAT MAKE decides are
4860 -- necessary, in high verbosity. Equivalent to /VERBOSE.
4862 S_Make_Inplace : aliased constant S := "/IN_PLACE " &
4867 -- In normal mode, GNAT MAKE compiles all object files and ALI files
4868 -- into the current directory. If the /IN_PLACE switch is used,
4869 -- then instead object files and ALI files that already exist are over-
4870 -- written in place. This means that once a large project is organized
4871 -- into separate directories in the desired manner, then GNAT MAKE will
4872 -- automatically maintain and update this organization. If no ALI files
4873 -- are found on the Ada object path, the new object and ALI files are
4874 -- created in the directory containing the source being compiled.
4876 S_Make_Index : aliased constant S := "/SOURCE_INDEX=#" &
4878 -- /SOURCE_INDEX=nnn
4880 -- Specifies the index of the units in the source file
4881 -- By default, source files are mono-unit and there is no index
4882 -- When /SOURCE_INDEX=nnn is specified, only one main may be specified
4883 -- on the command line.
4885 S_Make_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
4887 -- /LIBRARY_SEARCH=(directory[,...])
4889 -- Add the specified directories to the list of directories in which the
4890 -- linker will search for libraries.
4892 S_Make_Link : aliased constant S := "/LINKER_QUALIFIERS=?" &
4894 -- /LINKER_QUALIFIERS
4896 -- Any qualifiers specified after this qualifier other than
4897 -- /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /MAKE_QUALIFIERS will be
4898 -- passed to any GNAT LINK commands generated by GNAT LINK.
4900 S_Make_Low_Verb : aliased constant S := "/LOW_VERBOSITY " &
4902 -- /NOLOW_VERBOSITY (D)
4905 -- Displays the reason for all recompilations GNAT MAKE decides are
4906 -- necessary, in low verbosity, that is with less output than
4907 -- /MEDIUM_VERBOSITY, /HIGH_VERBOSITY or /VERBOSE.
4909 S_Make_Make : aliased constant S := "/MAKE_QUALIFIERS=?" &
4913 -- Any qualifiers specified after this qualifier other than
4914 -- /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /LINKER_QUALIFIERS
4915 -- are for the benefit of GNAT MAKE itself.
4917 S_Make_Mapping : aliased constant S := "/MAPPING " &
4922 -- Use a mapping file. A mapping file is a way to communicate to the
4923 -- compiler two mappings: from unit names to file names (without any
4924 -- directory information) and from file names to path names (with full
4925 -- directory information). These mappings are used by the compiler to
4926 -- short-circuit the path search. When GNAT MAKE is invoked with this
4927 -- qualifier, it will create a mapping file, initially populated by the
4928 -- project manager, if /PROJECT_File= is used, otherwise initially empty.
4929 -- Each invocation of the compiler will add the newly accessed sources to
4930 -- the mapping file. This will improve the source search during the next
4931 -- invocations of the compiler
4933 S_Make_Med_Verb : aliased constant S := "/MEDIUM_VERBOSITY " &
4935 -- /NOMEDIUM_VERBOSITY (D)
4936 -- /MEDIUM_VERBOSITY
4938 -- Displays the reason for all recompilations GNAT MAKE decides are
4939 -- necessary, in medium verbosity, that is with potentially less output
4940 -- than /HIGH_VERBOSITY or /VERBOSE.
4942 S_Make_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4949 -- /MESSAGES_PROJECT_FILE[=messages-option]
4951 -- Specifies the "verbosity" of the parsing of project files.
4952 -- messages-option may be one of the following:
4954 -- DEFAULT (D) No messages are output if there is no error or warning.
4956 -- MEDIUM A small number of messages are output.
4958 -- HIGH A great number of messages are output, most of them not
4959 -- being useful for the user.
4961 S_Make_Minimal : aliased constant S := "/MINIMAL_RECOMPILATION " &
4963 -- /NOMINIMAL_RECOMPILATION (D)
4964 -- /MINIMAL_RECOMPILATION
4966 -- Specifies that the minimum necessary amount of recompilation
4967 -- be performed. In this mode GNAT MAKE ignores time stamp differences
4968 -- when the only modifications to a source file consist in
4969 -- adding/removing comments, empty lines, spaces or tabs.
4971 S_Make_Missing : aliased constant S := "/CREATE_MISSING_DIRS " &
4973 -- /NOCREATE_MISSING_DIRS (D)
4974 -- /CREATE_MISSING_DIRS
4976 -- When an object directory, a library directory or an exec directory
4977 -- in missing, attempt to create the directory.
4979 S_Make_Nolink : aliased constant S := "/NOLINK " &
4983 -- Compile only. Do not perform binding and linking. If the root unit is
4984 -- not a main unit, this is the default. Otherwise GNAT MAKE will
4985 -- attempt binding and linking unless all objects are up to date and the
4986 -- executable is more recent than the objects.
4987 -- This is equivalent to /ACTIONS=COMPILE
4989 S_Make_Nomain : aliased constant S := "/NOMAIN " &
4993 -- No main subprogram. Bind and link the program even if the unit name
4994 -- given on the command line is a package name. The resulting executable
4995 -- will execute the elaboration routines of the package and its closure,
4996 -- then the finalization routines.
4998 S_Make_Nonpro : aliased constant S := "/NON_PROJECT_UNIT_COMPILATION " &
5000 -- /NON_PROJECT_UNIT_COMPILATION
5002 -- Normally, when using project files, a unit that is not part of any
5003 -- project file, cannot be compile. These units may be compile, when
5004 -- needed, if this qualifier is specified.
5006 S_Make_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
5010 -- Do not look for sources the in the system default directory.
5012 S_Make_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
5016 -- Do not look for library files in the system default directory.
5018 S_Make_Object : aliased constant S := "/OBJECT_SEARCH=*" &
5020 -- /OBJECT_SEARCH=(directory[,...])
5022 -- When looking for library and object files look also in the specified
5025 S_Make_Proc : aliased constant S := "/PROCESSES=#" &
5030 -- Use NNN processes to carry out the (re)compilations. If you have a
5031 -- multiprocessor machine, compilations will occur in parallel. In the
5032 -- event of compilation errors, messages from various compilations might
5033 -- get interspersed (but GNAT MAKE will give you the full ordered list of
5034 -- failing compiles at the end). This can at times be annoying. To get a
5035 -- clean list of error messages don't use this qualifier.
5037 S_Make_Nojobs : aliased constant S := "/NOPROCESSES " &
5039 -- NODOC (see /PROCESS)
5041 S_Make_Project : aliased constant S := "/PROJECT_FILE=<" &
5043 -- /PROJECT_FILE=filename
5045 -- Specifies the main project file to be used. The project files rooted
5046 -- at the main project file will be parsed before any other processing to
5047 -- set the building environment.
5049 S_Make_Quiet : aliased constant S := "/QUIET " &
5054 -- When this qualifiers is specified, the commands carried out by GNAT
5055 -- MAKE are not displayed.
5057 S_Make_Reason : aliased constant S := "/REASONS " &
5062 -- Displays the reason for all recompilations GNAT MAKE decides are
5065 S_Make_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
5067 -- /RUNTIME_SYSTEM=xxx
5069 -- Build against an alternate runtime system named xxx or RTS-xxx.
5071 S_Make_Search : aliased constant S := "/SEARCH=*" &
5073 -- /SEARCH=(directory[,...])
5075 -- Search the specified directories for both source and object files.
5077 S_Make_Single : aliased constant S := "/SINGLE_COMPILE_PER_OBJ_DIR " &
5078 "--single-compile-per-obj-dir";
5079 -- /NOSINGLE_COMPILE_PER_OBJ_DIR (D)
5080 -- /SINGLE_COMPILE_PER_OBJ_DIR
5082 -- When project files are used, do not allow simultaneous compilations
5083 -- for the same object directory.
5085 S_Make_Skip : aliased constant S := "/SKIP_MISSING=*" &
5087 -- /SKIP_MISSING=(directory[,...])
5089 -- Skip missing library sources if ALI in 'directory'.
5091 S_Make_Source : aliased constant S := "/SOURCE_SEARCH=*" &
5093 -- /SOURCE_SEARCH=(directory[,...])
5095 -- When looking for source files also look in the specified directories.
5097 S_Make_Src_Info : aliased constant S := "/SRC_INFO=<" &
5099 -- /SRC_INFO=source-info-file
5101 -- Specify a source info file to be read or written by the Project
5102 -- Manager when project files are used.
5104 S_Make_Stand : aliased constant S := "/STANDARD_OUTPUT_FOR_COMMANDS " &
5106 -- /NOSTANDARD_OUTPUT_FOR_COMMANDS (D)
5107 -- /STANDARD_OUTPUT_FOR_COMMANDS
5109 -- Output the commands for the compiler, the binder and the linker
5110 -- on SYS$OUTPUT, instead of SYS$ERROR.
5112 S_Make_Subdirs : aliased constant S := "/SUBDIRS=<" &
5116 -- The actual directories (object, exec, library, ...) are subdirectories
5117 -- of the directory specified in the project file. If the subdirectory
5118 -- does not exist, it is created automatically.
5120 S_Make_Switch : aliased constant S := "/SWITCH_CHECK " &
5122 -- /NOSWITCH_CHECK (D)
5125 -- Recompile if compiler switches have changed since last compilation.
5126 -- All compiler switches but -I and -o are taken into account in the
5127 -- following way: orders between different "first letter" switches are
5128 -- ignored, but orders between same switches are taken into account.
5129 -- For example, -O -O2 is different than -O2 -O, but -g -O is equivalent
5132 S_Make_USL : aliased constant S := "/UNCHECKED_SHARED_LIB_IMPORTS " &
5133 "--unchecked-shared-lib-imports";
5134 -- /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
5135 -- /UNCHECKED_SHARED_LIB_IMPORTS
5137 -- Allow shared library projects to import static library projects
5139 S_Make_Unique : aliased constant S := "/UNIQUE " &
5144 -- Recompile at most the main file. It implies /ACTIONS=COMPILE.
5145 -- Combined with /FORCE_COMPILE, it is equivalent to calling the compiler
5148 S_Make_Use_Map : aliased constant S := "/USE_MAPPING_File=@" &
5150 -- /USE_MAPPING_FILE=file_name
5152 -- Use a specific mapping file. The file 'file_name', specified as a path
5153 -- name (absolute or relative) by this qualifier, should already exist,
5154 -- otherwise the qualifier is ineffective. The specified mapping file
5155 -- will be communicated to the compiler. This switch is not compatible
5156 -- with a project file (/PROJECT_FILE=) or with multiple compiling
5157 -- processes (/PROCESSES=nnn, when nnn is greater than 1).
5159 S_Make_Verbose : aliased constant S := "/VERBOSE " &
5164 -- Displays the reason for all recompilations GNAT MAKE decides are
5167 Make_Switches : aliased constant Switches :=
5168 (S_Make_Add 'Access,
5169 S_Make_Actions 'Access,
5171 S_Make_Allproj 'Access,
5172 S_Make_Bind 'Access,
5173 S_Make_Comp 'Access,
5174 S_Make_Cond 'Access,
5175 S_Make_Cont 'Access,
5176 S_Make_Current 'Access,
5178 S_Make_Dirobj 'Access,
5179 S_Make_Disprog 'Access,
5180 S_Make_Doobj 'Access,
5181 S_Make_Execut 'Access,
5183 S_Make_Follow 'Access,
5184 S_Make_Force 'Access,
5185 S_Make_Full 'Access,
5186 S_Make_Hi_Verb 'Access,
5187 S_Make_Inplace 'Access,
5188 S_Make_Index 'Access,
5189 S_Make_Library 'Access,
5190 S_Make_Link 'Access,
5191 S_Make_Low_Verb'Access,
5192 S_Make_Make 'Access,
5193 S_Make_Mapping 'Access,
5194 S_Make_Med_Verb'Access,
5195 S_Make_Mess 'Access,
5196 S_Make_Minimal 'Access,
5197 S_Make_Missing 'Access,
5198 S_Make_Nolink 'Access,
5199 S_Make_Nomain 'Access,
5200 S_Make_Nonpro 'Access,
5201 S_Make_Nostinc 'Access,
5202 S_Make_Nostlib 'Access,
5203 S_Make_Object 'Access,
5204 S_Make_Proc 'Access,
5205 S_Make_Nojobs 'Access,
5206 S_Make_Project 'Access,
5207 S_Make_Quiet 'Access,
5208 S_Make_Reason 'Access,
5210 S_Make_Search 'Access,
5211 S_Make_Single 'Access,
5212 S_Make_Skip 'Access,
5213 S_Make_Source 'Access,
5214 S_Make_Src_Info'Access,
5215 S_Make_Stand 'Access,
5216 S_Make_Subdirs 'Access,
5217 S_Make_Switch 'Access,
5219 S_Make_Unique 'Access,
5220 S_Make_Use_Map 'Access,
5221 S_Make_Verbose 'Access);
5223 ------------------------------
5224 -- Switches for GNAT METRIC --
5225 ------------------------------
5227 S_Metric_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
5229 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
5231 -- Add directories to the project search path.
5233 S_Metric_All_Prjs : aliased constant S := "/ALL_PROJECTS " &
5235 -- /NOALL_PROJECTS (D)
5237 -- When GNAT METRIC is used with a Project File and no source is
5238 -- specified, the underlying tool gnatmetric is called for all the
5239 -- sources of all the Project Files in the project tree.
5241 S_Metric_Debug : aliased constant S := "/DEBUG_OUTPUT " &
5245 -- Generate the debug information
5247 S_Metric_Direct : aliased constant S := "/DIRECTORY=@" &
5249 -- /DIRECTORY=pathname
5251 -- Put the files with detailed metric information into the specified
5254 S_Metric_Element : aliased constant S := "/ELEMENT_METRICS=" &
5256 "!-ed,!-es,!-enl,!-eps," &
5257 "!-eas,!-ept,!-eat,!-enu," &
5259 "DECLARATION_TOTAL " &
5261 "STATEMENT_TOTAL " &
5263 "LOOP_NESTING_MAX " &
5265 "INT_SUBPROGRAMS " &
5267 "SUBPROGRAMS_ALL " &
5273 "PROGRAM_NESTING_MAX " &
5275 "CONSTRUCT_NESTING_MAX " &
5277 -- NODOC (see /SYNTAX_METRICS)
5279 S_Metric_Syntax : aliased constant S := "/SYNTAX_METRICS=" &
5283 "--no-syntax-all " &
5287 "--no-declarations " &
5291 "--no-statements " &
5292 "PUBLIC_SUBPROGRAMS " &
5293 "--public-subprograms " &
5294 "NOPUBLIC_SUBPROGRAMS " &
5295 "--no-public-subprograms " &
5296 "ALL_SUBPROGRAMS " &
5297 "--all-subprograms " &
5298 "NOALL_SUBPROGRAMS " &
5299 "--no-all-subprograms " &
5303 "--no-public-types " &
5311 "--no-unit-nesting " &
5312 "CONSTRUCT_NESTING " &
5313 "--construct-nesting " &
5314 "NOCONSTRUCT_NESTING " &
5315 "--no-construct-nesting";
5316 -- /SYNTAX_METRICS(option, option ...)
5318 -- Specifies the syntax element metrics to be computed (if at least one
5319 -- positive syntax element metric, line metric, complexity or coupling
5320 -- metric is specified then only explicitly specified syntax element
5321 -- metrics are computed and reported)
5323 -- option may be one of the following:
5325 -- ALL (D) All the syntax element metrics are computed
5326 -- NONE None of syntax element metrics is computed
5327 -- DECLARATIONS Compute the total number of declarations
5328 -- NODECLARATIONS Do not compute the total number of declarations
5329 -- STATEMENTS Compute the total number of statements
5330 -- NOSTATEMENTS Do not compute the total number of statements
5331 -- PUBLIC_SUBPROGRAMS Compute the number of public subprograms
5332 -- NOPUBLIC_SUBPROGRAMS Do not compute the number of public subprograms
5333 -- ALL_SUBPROGRAMS Compute the number of all the subprograms
5334 -- NOALL_SUBPROGRAMS Do not compute the number of all the
5336 -- PUBLIC_TYPES Compute the number of public types
5337 -- NOPUBLIC_TYPES Do not compute the number of public types
5338 -- ALL_TYPES Compute the number of all the types
5339 -- NOALL_TYPES Do not compute the number of all the types
5340 -- UNIT_NESTING Compute the maximal program unit nesting
5342 -- NOUNIT_NESTING Do not compute the maximal program unit
5344 -- CONSTRUCT_NESTING Compute the maximal construct nesting level
5345 -- NOCONSTRUCT_NESTING Do not compute the maximal construct nesting
5348 -- All combinations of syntax element metrics options are allowed.
5350 S_Metric_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
5352 -- /EXTERNAL_REFERENCE="name=val"
5354 -- Specifies an external reference to the project manager. Useful only if
5355 -- /PROJECT_FILE is used.
5358 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
5360 S_Metric_Files : aliased constant S := "/FILES=@" &
5364 -- Take as arguments the files that are listed in the specified
5367 S_Metric_Format : aliased constant S := "/FORMAT_OUTPUT=" &
5376 "SHORT_SOURCE_FILE_NAME " &
5378 -- /FORMAT_OUTPUT=(option, option ...)
5380 -- Specifies the details of the tool output
5382 -- option may be one of the following:
5384 -- DEFAULT (D) Generate the text output only, use full
5385 -- argument source names in global information
5386 -- XML Generate the output in XML format
5387 -- XSD Generate the output in XML format, and
5388 -- generate an XML schema file that describes
5389 -- the structure of XML metrics report
5390 -- NO_TEXT Do not generate the text output (implies XML)
5391 -- SHORT_SOURCE_FILE_NAME Use short argument source names in output
5393 S_Metric_Globout : aliased constant S := "/GLOBAL_OUTPUT=@" &
5395 -- /GLOBAL_OUTPUT=filename
5397 -- Put the textual global metric information into the specified file
5399 S_Metric_Line : aliased constant S := "/LINE_METRICS=" &
5401 "!-la,!-lcode,!-lcomm," &
5409 "MIXED_CODE_COMMENTS " &
5411 "COMMENT_PERCENTAGE " &
5415 "AVERAGE_LINES_IN_BODIES " &
5417 -- NODOC (see /LINE_COUNT_METRICS)
5419 S_Metric_Lines : aliased constant S := "/LINE_COUNT_METRICS=" &
5431 "--no-lines-code " &
5433 "--lines-comment " &
5434 "NOCOMMENT_LINES " &
5435 "--no-lines-comment " &
5436 "CODE_COMMENT_LINES " &
5437 "--lines-eol-comment " &
5438 "NOCODE_COMMENT_LINES " &
5439 "--no-lines-eol-comment " &
5440 "COMMENT_PERCENTAGE " &
5442 "NOCOMMENT_PERCENTAGE " &
5443 "--no-lines-ratio " &
5447 "--no-lines-blank " &
5448 "AVERAGE_BODY_LINES " &
5449 "--lines-average " &
5450 "NOAVERAGE_BODY_LINES " &
5451 "--no-lines-average";
5452 -- /LINE_COUNT_METRICS=(option, option ...)
5454 -- Specifies the line metrics to be computed (if at least one positive
5455 -- syntax element metric, line metric, complexity or coupling metric is
5456 -- specified then only explicitly specified line metrics are computed
5459 -- option may be one of the following:
5461 -- ALL (D) All the line metrics are computed
5462 -- NONE None of line metrics is computed
5463 -- ALL_LINES All lines are computed
5464 -- NOALL_LINES All lines are not computed
5465 -- CODE_LINES Lines with Ada code are computed
5466 -- NOCODE_LINES Lines with Ada code are not computed
5467 -- COMMENT_LINES Comment lines are computed
5468 -- NOCOMMENT_LINES Comment lines are not computed
5469 -- CODE_COMMENT_LINES Lines containing both code and comment parts
5471 -- NOCODE_COMMENT_LINES Lines containing both code and comment parts
5473 -- COMMENT_PERCENTAGE Ratio between comment lines and all the lines
5474 -- containing comments and program code is
5476 -- NOCOMMENT_PERCENTAGE Ratio between comment lines and all the lines
5477 -- containing comments and program code is not
5479 -- BLANK_LINES Blank lines are computed
5480 -- NOBLANK_LINES Blank lines are not computed
5481 -- AVERAGE_BODY_LINES Average number of code lines in subprogram,
5482 -- task and entry bodies and statement sequences
5483 -- of package bodies is computed
5484 -- NOAVERAGE_BODY_LINES Average number of code lines in subprogram,
5485 -- task and entry bodies and statement sequences
5486 -- of package bodies is not computed
5488 -- All combinations of line metrics options are allowed.
5490 S_Metric_Complexity : aliased constant S := "/COMPLEXITY_METRICS=" &
5492 "--complexity-all " &
5494 "--no-complexity-all " &
5496 "--complexity-cyclomatic " &
5498 "--no-complexity-cyclomatic "&
5500 "--complexity-essential " &
5502 "--no-complexity-essential " &
5506 "--no-loop-nesting " &
5507 "AVERAGE_COMPLEXITY " &
5508 "--complexity-average " &
5509 "NOAVERAGE_COMPLEXITY " &
5510 "--no-complexity-average " &
5511 "EXTRA_EXIT_POINTS " &
5512 "--extra-exit-points " &
5513 "NOEXTRA_EXIT_POINTS " &
5514 "--no-extra-exit-points";
5515 -- /COMPLEXITY_METRICS=(option, option ...)
5517 -- Specifies the complexity metrics to be computed (if at least one
5518 -- positive syntax element metric, line metric, complexity or coupling
5519 -- metric is specified then only explicitly specified complexity metrics
5520 -- are computed and reported)
5522 -- option may be one of the following:
5524 -- ALL (D) All the complexity metrics are computed
5525 -- NONE None of complexity metrics is computed
5526 -- CYCLOMATIC Compute the McCabe Cyclomatic Complexity
5527 -- NOCYCLOMATIC Do not compute the McCabe Cyclomatic Complexity
5528 -- ESSENTIAL Compute the Essential Complexity
5529 -- NOESSENTIAL Do not compute the Essential Complexity
5530 -- LOOP_NESTING Compute the maximal loop nesting
5531 -- NOLOOP_NESTING Do not compute the maximal loop nesting
5532 -- AVERAGE_COMPLEXITY Compute the average complexity for executable
5534 -- NOAVERAGE_COMPLEXITY Do not compute the average complexity for
5535 -- executable bodies
5536 -- EXTRA_EXIT_POINTS Compute extra exit points metric
5537 -- NOEXTRA_EXIT_POINTS Do not compute extra exit points metric
5539 -- All combinations of line metrics options are allowed.
5541 S_Metric_Coupling : aliased constant S := "/COUPLING_METRICS=" &
5545 "--tagged-coupling-out " &
5547 "--tagged-coupling-in " &
5549 "--hierarchy-coupling-out " &
5551 "--hierarchy-coupling-in " &
5553 "--unit-coupling-out " &
5555 "--unit-coupling-in " &
5557 "--control-coupling-out " &
5559 "--control-coupling-in";
5561 -- /COUPLING_METRICS=(option, option ...)
5563 -- Specifies the coupling metrics to be computed.
5565 -- option may be one of the following:
5567 -- ALL All the coupling metrics are computed
5568 -- NOALL (D) None of coupling metrics is computed
5569 -- TAGGED_OUT Compute tagged (class) far-out coupling
5570 -- TAGGED_IN Compute tagged (class) far-in coupling
5571 -- HIERARCHY_OUT Compute hieraqrchy (category) far-out coupling
5572 -- HIERARCHY_IN Compute hieraqrchy (category) far-in coupling
5573 -- UNIT_OUT Compute unit far-out coupling
5574 -- UNIT_IN Compute unit far-in coupling
5575 -- CONTROL_OUT Compute control far-out coupling
5576 -- CONTROL_IN Compute control far-in coupling
5579 -- All combinations of coupling metrics options are allowed.
5581 S_Metric_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
5583 -- /NOFOLLOW_LINKS_FOR_FILES (D)
5584 -- /FOLLOW_LINKS_FOR_FILES
5586 -- Follow links when parsing project files
5588 S_Metric_No_Local : aliased constant S := "/NO_LOCAL_DETAILS " &
5590 -- /LOCAL_DETAILS (D)
5591 -- /NO_LOCAL_DETAILS
5593 -- Do not compute the detailed metrics for local program units.
5595 S_Metric_No_Exits_As_Gotos : aliased constant S := "/NO_EXITS_AS_GOTOS " &
5597 -- /EXITS_AS_GOTOS (D)
5598 -- /NO_EXITS_AS_GOTOS
5600 -- Do not count EXIT statements as GOTOs when computing the Essential
5603 S_Metric_No_Static_Loop : aliased constant S := "/NO_STATIC_LOOP " &
5608 -- Do not count static FOR loop statements when computing the Cyclomatic
5611 S_Metric_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
5618 -- /MESSAGES_PROJECT_FILE[=messages-option]
5620 -- Specifies the "verbosity" of the parsing of project files.
5621 -- messages-option may be one of the following:
5623 -- DEFAULT (D) No messages are output if there is no error or warning.
5625 -- MEDIUM A small number of messages are output.
5627 -- HIGH A great number of messages are output, most of them not
5628 -- being useful for the user.
5630 S_Metric_Project : aliased constant S := "/PROJECT_FILE=<" &
5632 -- /PROJECT_FILE=filename
5634 -- Specifies the main project file to be used. The project files rooted
5635 -- at the main project file will be parsed before the invocation of the
5638 S_Metric_Quiet : aliased constant S := "/QUIET " &
5643 -- Quiet mode: by default GNAT METRIC outputs to the standard error stream
5644 -- the number of program units left to be processed. This option turns
5647 S_Metric_Subdirs : aliased constant S := "/SUBDIRS=<" &
5651 -- The actual directories (object, exec, library, ...) are subdirectories
5652 -- of the directory specified in the project file. If the subdirectory
5653 -- does not exist, it is created automatically.
5655 S_Metric_Suffix : aliased constant S := "/SUFFIX_DETAILS=" & '"' &
5657 -- /SUFFIX_DETAILS=suffix
5659 -- Use the given suffix as the suffix for the name of the file to place
5660 -- the detailed metrics into.
5662 S_Metric_Suppress : aliased constant S := "/SUPPRESS=" &
5664 "!-nocc,!-noec,!-nonl," &
5666 "CYCLOMATIC_COMPLEXITY " &
5668 "ESSENTIAL_COMPLEXITY " &
5670 "MAXIMAL_LOOP_NESTING " &
5676 -- NODOC (see /COMPLEXITY_METRICS /NO_LOCAL_DETAILS /NO_EXITS_AS_GOTOS)
5678 S_Metric_Verbose : aliased constant S := "/VERBOSE " &
5685 S_Metric_XMLout : aliased constant S := "/XML_OUTPUT=@" &
5687 -- /XML_OUTPUT=filename
5689 -- Place the XML output into the specified file
5691 Metric_Switches : aliased constant Switches :=
5692 (S_Metric_Add 'Access,
5693 S_Metric_All_Prjs 'Access,
5694 S_Metric_Complexity 'Access,
5695 S_Metric_Coupling 'Access,
5696 S_Metric_Debug 'Access,
5697 S_Metric_Direct 'Access,
5698 S_Metric_Element 'Access,
5699 S_Metric_Ext 'Access,
5700 S_Metric_Files 'Access,
5701 S_Metric_Follow 'Access,
5702 S_Metric_Format 'Access,
5703 S_Metric_Globout 'Access,
5704 S_Metric_Line 'Access,
5705 S_Metric_Lines 'Access,
5706 S_Metric_Mess 'Access,
5707 S_Metric_No_Exits_As_Gotos'Access,
5708 S_Metric_No_Local 'Access,
5709 S_Metric_No_Static_Loop 'Access,
5710 S_Metric_Project 'Access,
5711 S_Metric_Quiet 'Access,
5712 S_Metric_Suffix 'Access,
5713 S_Metric_Subdirs 'Access,
5714 S_Metric_Syntax 'Access,
5715 S_Metric_Suppress 'Access,
5716 S_Metric_Verbose 'Access,
5717 S_Metric_XMLout 'Access);
5719 ----------------------------
5720 -- Switches for GNAT NAME --
5721 ----------------------------
5723 S_Name_Conf : aliased constant S := "/CONFIG_FILE=<" &
5725 -- /CONFIG_FILE=path_name
5727 -- Create a configuration pragmas file 'path_name' (instead of the default
5728 -- 'gnat.adc'). 'path_name' may include directory information. 'path_name'
5729 -- must be writable. There may be only one qualifier /CONFIG_FILE.
5730 -- This qualifier is not compatible with qualifier /PROJECT_FILE.
5732 S_Name_Dirs : aliased constant S := "/SOURCE_DIRS=*" &
5734 -- /SOURCE_DIRS=(directory, ...)
5736 -- Look for source files in the specified directories. When this qualifier
5737 -- is specified, the current working directory will not be searched for
5738 -- source files, unless it is explicitly specified with a qualifier
5739 -- /SOURCE_DIRS or /DIRS_FILE. Several qualifiers /SOURCE_DIRS may be
5740 -- specified. If a directory is specified as a relative path, it is
5741 -- relative to the directory of the configuration pragmas file specified
5742 -- with qualifier /CONFIG_FILE, or to the directory of the project file
5743 -- specified with qualifier /PROJECT_FILE or, if neither qualifier
5744 -- /CONFIG_FILE nor qualifier /PROJECT_FILE are specified, it is relative
5745 -- to the current working directory. The directories specified with
5746 -- qualifiers /SOURCE_DIRS must exist and be readable.
5748 S_Name_Dfile : aliased constant S := "/DIRS_FILE=<" &
5750 -- /DIRS_FILE=file_name
5752 -- Look for source files in all directories listed in text file
5753 -- 'file_name'. 'file_name' must be an existing, readable text file.
5754 -- Each non empty line in the specified file must be a directory.
5755 -- Specifying qualifier /DIRS_FILE is equivalent to specifying as many
5756 -- qualifiers /SOURCE_DIRS as there are non empty lines in the specified
5759 S_Name_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
5761 -- /NOFOLLOW_LINKS_FOR_FILES (D)
5762 -- /FOLLOW_LINKS_FOR_FILES
5764 -- Follow links when parsing project files
5766 S_Name_Frng : aliased constant S := "/FOREIGN_PATTERN=" & '"' &
5768 -- /FOREIGN_PATTERN=<string>
5770 -- Specify a foreign pattern.
5771 -- Using this qualifier, it is possible to add sources of languages other
5772 -- than Ada to the list of sources of a project file. It is only useful
5773 -- if a qualifier /PROJECT_FILE is used. For example,
5775 -- GNAT NAME /PROJECT_FILE=PRJ /FOREIGN_PATTERN="*.C" "*.ADA"
5777 -- will look for Ada units in all files with the '.ADA' extension, and
5778 -- will add to the list of file for project PRJ.GPR the C files with
5781 S_Name_Help : aliased constant S := "/HELP " &
5786 -- Output usage information to the standard output stream.
5788 S_Name_Proj : aliased constant S := "/PROJECT_FILE=<" &
5790 -- /PROJECT_FILE=file_name
5792 -- Create or update a project file. 'file_name' may include directory
5793 -- information. The specified file must be writable. There may be only
5794 -- one qualifier /PROJECT_FILE. When a qualifier /PROJECT_FILE is
5795 -- specified, no qualifier /CONFIG_FILE may be specified.
5797 S_Name_Subdirs : aliased constant S := "/SUBDIRS=<" &
5801 -- The actual directories (object, exec, library, ...) are subdirectories
5802 -- of the directory specified in the project file. If the subdirectory
5803 -- does not exist, it is created automatically.
5805 S_Name_Verbose : aliased constant S := "/VERBOSE " &
5810 -- Verbose mode. Output detailed explanation of behavior to the standard
5811 -- output stream. This includes name of the file written, the name of the
5812 -- directories to search and, for each file in those directories whose
5813 -- name matches at least one of the Naming Patterns, an indication of
5814 -- whether the file contains a unit, and if so the name of the unit.
5816 S_Name_Excl : aliased constant S := "/EXCLUDED_PATTERN=" & '"' &
5818 -- /EXCLUDED_PATTERN=<string>
5820 -- Specify an excluded pattern.
5821 -- Using this qualifier, it is possible to exclude some files that would
5822 -- match the Naming patterns. For example,
5824 -- GNAT NAME /EXCLUDED_PATTERN="*_NT.ADA" "*.ADA"
5826 -- will look for Ada units in all files with the '.ADA' extension, except
5827 -- those whose names end with '_NT.ADA'.
5829 Name_Switches : aliased constant Switches :=
5830 (S_Name_Conf 'Access,
5831 S_Name_Dirs 'Access,
5832 S_Name_Dfile 'Access,
5833 S_Name_Follow 'Access,
5834 S_Name_Frng 'Access,
5835 S_Name_Help 'Access,
5836 S_Name_Proj 'Access,
5837 S_Name_Subdirs 'Access,
5838 S_Name_Verbose 'Access,
5839 S_Name_Excl 'Access);
5841 ----------------------------------
5842 -- Switches for GNAT PREPROCESS --
5843 ----------------------------------
5845 S_Prep_Assoc : aliased constant S := "/ASSOCIATE=" & '"' &
5847 -- /ASSOCIATE="name=val"
5849 -- Defines a new symbol, associated with value. If no value is given
5850 -- on the command line, then symbol is considered to be True.
5851 -- This qualifier can be used in place of a definition file.
5853 S_Prep_Blank : aliased constant S := "/BLANK_LINES " &
5855 -- /NOBLANK_LINES (D)
5858 -- Causes both preprocessor lines and the lines deleted by preprocessing
5859 -- to be replaced by blank lines in the output source file, thus
5860 -- preserving line numbers in the output file.
5862 S_Prep_Com : aliased constant S := "/COMMENTS " &
5867 -- /COMMENTS causes both preprocessor lines and the lines deleted
5868 -- by preprocessing to be retained in the output source as comments marked
5869 -- with the special string "--! ". This option will result in line numbers
5870 -- being preserved in the output file.
5872 -- /NOCOMMENTS causes both preprocessor lines and the lines deleted by
5873 -- preprocessing to be replaced by blank lines in the output source file,
5874 -- thus preserving line numbers in the output file.
5876 S_Prep_Ref : aliased constant S := "/REFERENCE " &
5881 -- Causes a "Source_Reference" pragma to be generated that references the
5882 -- original input file, so that error messages will use the file name of
5883 -- this original file. Also implies /BLANK_LINES if /COMMENTS is not
5886 S_Prep_Remove : aliased constant S := "/REMOVE " &
5891 -- Preprocessor lines and deleted lines are completely removed from the
5894 S_Prep_Replace : aliased constant S := "/REPLACE_IN_COMMENTS " &
5896 -- /NOREPLACE_IN_COMMENTS (D)
5897 -- /REPLACE_IN_COMMENTS
5899 -- Causes preprocessor to scan comments and perform replacements on
5900 -- any $symbol occurrences within the comment text.
5902 S_Prep_Symbols : aliased constant S := "/SYMBOLS " &
5907 -- Causes a sorted list of symbol names and values to be listed on
5910 S_Prep_Undef : aliased constant S := "/UNDEFINED " &
5915 Prep_Switches : aliased constant Switches :=
5916 (S_Prep_Assoc 'Access,
5917 S_Prep_Blank 'Access,
5920 S_Prep_Remove 'Access,
5921 S_Prep_Replace 'Access,
5922 S_Prep_Symbols 'Access,
5923 S_Prep_Undef 'Access);
5925 ------------------------------
5926 -- Switches for GNAT PRETTY --
5927 ------------------------------
5929 S_Pretty_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
5931 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
5933 -- Add directories to the project search path.
5935 S_Pretty_Align : aliased constant S := "/ALIGN=" &
5948 "COMPONENT_CLAUSES " &
5950 -- /ALIGN[=align-option, align-option, ...]
5952 -- Set alignments. By default, all alignments (colons in declarations,
5953 -- initialisations in declarations, assignments and arrow delimiters) are
5956 -- align-option may be one of the following:
5958 -- OFF (D) Set all alignments to OFF
5959 -- COLONS Set alignments of colons in declarations to ON
5960 -- DECLARATIONS Set alignments of initialisations in declarations
5962 -- STATEMENTS Set alignments of assignments statements to ON
5963 -- ARROWS Set alignments of arrow delimiters to ON.
5964 -- COMPONENT_CLAUSES Set alignments of AT keywords in component
5967 -- Specifying one of the ON options without first specifying the OFF
5968 -- option has no effect, because by default all alignments are set to ON.
5970 S_Pretty_All_Prjs : aliased constant S := "/ALL_PROJECTS " &
5972 -- /NOALL_PROJECTS (D)
5974 -- When GNAT PRETTY is used with a Project File and no source is
5975 -- specified, the underlying tool gnatpp is called for all the
5976 -- sources of all the Project Files in the project tree.
5978 S_Pretty_Attrib : aliased constant S := "/ATTRIBUTE_CASING=" &
5985 -- /ATTRIBUTE_CASING[=casing-option]
5987 -- Set the case of the attributes. By default the attributes are in mixed
5989 -- casing-option may be one of the following:
5995 S_Pretty_Comments : aliased constant S := "/COMMENTS_LAYOUT=" &
6000 "STANDARD_INDENT " &
6008 -- /COMMENTS_LAYOUT[=layout-option, layout-option, ...]
6010 -- Set the comment layout. By default, comments use the GNAT style
6011 -- comment line indentation.
6013 -- layout-option may be one of the following:
6015 -- UNTOUCHED All the comments remain unchanged
6016 -- DEFAULT (D) GNAT style comment line indentation
6017 -- STANDARD_INDENT Standard comment line indentation
6018 -- GNAT_BEGINNING GNAT style comment beginning
6019 -- REFORMAT Reformat comment blocks
6020 -- KEEP_SPECIAL Keep unchanged special form comments
6022 -- All combinations of layout options are allowed, except for DEFAULT
6023 -- and STANDARD_INDENT which are mutually exclusive, and also if
6024 -- UNTOUCHED is specified, this must be the only option.
6026 -- The difference between "GNAT style comment line indentation" and
6027 -- "standard comment line indentation" is the following: for standard
6028 -- comment indentation, any comment line is indented as if it were
6029 -- a declaration or statement at the same place.
6030 -- For GNAT style comment indentation, comment lines which are
6031 -- immediately followed by if or case statement alternative, record
6032 -- variant or 'begin' keyword are indented as the keyword that follows
6035 -- Standard indentation:
6044 -- GNAT style indentation:
6053 -- Option "GNAT style comment beginning" means that for each comment
6054 -- which is not considered as non-formattable separator (that is, the
6055 -- comment line contains only dashes, or a comment line ends with two
6056 -- dashes), there will be at least two spaces between starting "--" and
6057 -- the first non-blank character of the comment.
6059 S_Pretty_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
6061 -- /CONFIGURATION_PRAGMAS_FILE=file
6063 -- Specify a configuration pragmas file that need to be passed to the
6066 S_Pretty_Constr : aliased constant S := "/CONSTRUCT_LAYOUT=" &
6073 -- /CONSTRUCT_LAYOUT[=construct-option]
6075 -- Set construct layout. Default is GNAT style layout.
6076 -- construct-option may be one of the following:
6082 -- The difference between GNAT style and Compact layout on one hand
6083 -- and Uncompact layout on the other hand can be illustrated by the
6084 -- following examples:
6086 -- GNAT style and Uncompact layout
6089 -- type q is record type q is
6090 -- a : integer; record
6091 -- b : integer; a : integer;
6092 -- end record; b : integer;
6096 -- Block : declare Block :
6097 -- A : Integer := 3; declare
6098 -- begin A : Integer := 3;
6099 -- Proc (A, A); begin
6100 -- end Block; Proc (A, A);
6103 -- Clear : for J in 1 .. 10 loop Clear :
6104 -- A (J) := 0; for J in 1 .. 10 loop
6105 -- end loop Clear; A (J) := 0;
6109 -- A further difference between GNAT style layout and compact layout is
6110 -- that in GNAT style layout compound statements, return statements and
6111 -- bodies are always separated by empty lines.
6113 S_Pretty_Comind : aliased constant S := "/CONTINUATION_INDENT=#" &
6115 -- /CONTINUATION_INDENT=nnn
6117 -- Indentation level for continuation lines, nnn from 1 .. 9.
6118 -- The default value is one less than the (normal) indentation level,
6119 -- unless the indentation is set to 1: in that case the default value for
6120 -- continuation line indentation is also 1.
6122 S_Pretty_Compact_Is : aliased constant S := "/NO_SEPARATE_IS " &
6126 -- Do not place the IS keyword on a separate line in a subprogram body in
6127 -- case if the specification occupies more than one line.
6129 S_Pretty_Sep_Label : aliased constant S := "/SEPARATE_LABEL " &
6133 -- Place statement label(s) and the statement itself on separate lines.
6135 S_Pretty_Sep_Loop_Then : aliased constant S := "/SEPARATE_LOOP_THEN " &
6136 "--separate-loop-then";
6137 -- /SEPARATE_LOOP_THEN
6139 -- Place the THEN keyword in IF statement and the LOOP keyword in for-
6140 -- and while-loops on a separate line.
6142 S_Pretty_N_Sep_Loop_Then : aliased constant S := "/NO_SEPARATE_LOOP_THEN " &
6143 "--no-separate-loop-then";
6144 -- /NO_SEPARATE_LOOP_THEN
6146 -- Do not place the THEN keyword in IF statement and the LOOP keyword in
6147 -- for- and while-loops on a separate line.
6149 S_Pretty_Use_On_New_Line : aliased constant S := "/USE_ON_NEW_LINE " &
6150 "--use-on-new-line";
6153 -- Start any USE clause that is a part of a context clause from a
6156 S_Pretty_Stnm_On_Nw_Line : aliased constant S := "/STMT_NAME_ON_NEW_LINE " &
6157 "--separate-stmt-name";
6158 -- /STMT_NAME_ON_NEW_LINE
6160 -- For named block and loop statements use a separate line for the
6161 -- statement name, but do not use an extra indentation level for the
6162 -- statement itself.
6164 S_Pretty_Eol : aliased constant S := "/END_OF_LINE=" &
6173 -- /END_OF_LINE=[option]
6175 -- Specifies the form of the line terminators in the produced source.
6176 -- By default, the form of the line terminator depends on the platforms.
6177 -- On Unix and VMS, it is a Line Feed (LF) character. On Windows (DOS),
6178 -- It is a Carriage Return (CR) followed by a Line Feed.
6180 -- The Options DOS and CRLF are equivalent. The options UNIX and LF are
6183 S_Pretty_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
6185 -- /EXTERNAL_REFERENCE="name=val"
6187 -- Specifies an external reference to the project manager. Useful only if
6188 -- /PROJECT_FILE is used.
6191 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
6193 S_Pretty_Current : aliased constant S := "/CURRENT_DIRECTORY " &
6195 -- /CURRENT_DIRECTORY (D)
6197 -- Look for source files in the current working directory.
6199 -- /NOCURRENT_DIRECTORY
6200 -- Do not look for source files in the current working directory.
6202 S_Pretty_Dico : aliased constant S := "/DICTIONARY=*" &
6204 -- /DICTIONARY=(file_name, ...)
6206 -- Use each specified file as a dictionary file that defines the casing
6207 -- for a set of specified names, thereby overriding the effect on these
6208 -- names by any explicit or implicit /NAME_CASING qualifier.
6210 -- GNAT PRETTY implicitly uses a default dictionary file to define the
6211 -- casing for the Ada predefined names and the names declared in the GNAT
6214 -- The structure of a dictionary file, and details on the conventions
6215 -- used in the default dictionary file, are defined in the GNAT User's
6218 S_Pretty_Encoding : aliased constant S := "/RESULT_ENCODING=" &
6231 -- /RESULT_ENCODING[=encoding-type]
6233 -- Specify the wide character encoding method used when writing the
6234 -- reformatted code in the result file. 'encoding-type' is one of the
6237 -- BRACKETS (D) Brackets encoding.
6239 -- HEX Hex ESC encoding.
6241 -- UPPER Upper half encoding.
6243 -- SHIFT_JIS Shift-JIS encoding.
6245 -- EUC EUC Encoding.
6247 -- UTF8 UTF-8 encoding.
6249 -- See 'HELP GNAT COMPILE /WIDE_CHARACTER_ENCODING' for an explanation
6250 -- about the different character encoding methods.
6252 S_Pretty_Enums : aliased constant S := "/ENUM_CASING=" &
6261 -- /ENUM_CASING=name-option
6263 -- Specify the casing of enumeration literals. If not specified, the
6264 -- casing of enumeration literals is defined by the NAME_CASING option.
6265 -- 'name-option' may be one of:
6267 -- AS_DECLARED Literals casing for defining occurrences are
6268 -- as they appear in the source file.
6270 -- LOWER_CASE Literals are in lower case.
6272 -- UPPER_CASE Literals are in upper case.
6274 -- MIXED_CASE Literals are in mixed case.
6276 S_Pretty_Files : aliased constant S := "/FILES=@" &
6280 -- Take as arguments the files that are listed in the specified
6283 S_Pretty_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
6285 -- /NOFOLLOW_LINKS_FOR_FILES (D)
6286 -- /FOLLOW_LINKS_FOR_FILES
6288 -- Follow links when parsing project files
6290 S_Pretty_Forced : aliased constant S := "/FORCED_OUTPUT=@" &
6292 -- /FORCED_OUTPUT=file
6294 -- Write the output into the specified file, overriding any possibly
6297 S_Pretty_Formfeed : aliased constant S := "/FORM_FEED_AFTER_PRAGMA_PAGE " &
6299 -- /FORM_FEED_AFTER_PRAGMA_PAGE
6301 -- When there is a pragma Page in the source, insert a Form Feed
6302 -- character immediately after the semicolon that follows the pragma
6305 S_Pretty_Indent : aliased constant S := "/INDENTATION_LEVEL=#" &
6307 -- /INDENTATION_LEVEL=nnn
6309 -- Specify the number of spaces to add for each indentation level.
6310 -- nnn must be between 1 and 9. The default is 3.
6312 S_Pretty_Keyword : aliased constant S := "/KEYWORD_CASING=" &
6317 -- /KEYWORD_CASING[=keyword-option]
6319 -- Specify the case of Ada keywords. The default is keywords in lower
6322 -- keyword-option may be one of the following:
6327 S_Pretty_Maxlen : aliased constant S := "/LINE_LENGTH_MAX=#" &
6329 -- /LINE_LENGTH_MAX=nnn
6331 -- Set the maximum line length, nnn from 32 ..256. The default is 79.
6333 S_Pretty_Maxact : aliased constant S := "/MAX_ACT=#" &
6334 "--call_threshold=#";
6337 -- If the number of parameter associations is greater than nnn and if at
6338 -- least one association uses named notation, start each association from
6341 S_Pretty_Maxind : aliased constant S := "/MAX_INDENT=#" &
6345 -- Do not use an additional indentation level for case alternatives
6346 -- and variants if their number is nnn or more. The default is 10.
6347 -- If nnn is zero, an additional indentation level is used for any
6348 -- number of case alternatives and variants.
6350 S_Pretty_Maxpar : aliased constant S := "/MAX_PAR=#" &
6351 "--par_threshold=#";
6354 -- If the number of parameter specifications is greater than nnn (or equal
6355 -- to nnn in case of a function), start each specification from a new line.
6356 -- The default value is 3.
6358 S_Pretty_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
6365 -- /MESSAGES_PROJECT_FILE[=messages-option]
6367 -- Specifies the "verbosity" of the parsing of project files.
6368 -- messages-option may be one of the following:
6370 -- DEFAULT (D) No messages are output if there is no error or warning.
6372 -- MEDIUM A small number of messages are output.
6374 -- HIGH A great number of messages are output, most of them not
6375 -- being useful for the user.
6377 S_Pretty_Names : aliased constant S := "/NAME_CASING=" &
6386 -- /NAME_CASING[=name-option]
6388 -- Specify the casing of names.
6389 -- 'name-option' may be one of:
6391 -- AS_DECLARED (D) Name casing for defining occurrences are as they
6392 -- appear in the source file.
6394 -- LOWER_CASE Names are in lower case.
6396 -- UPPER_CASE Names are in upper case.
6398 -- MIXED_CASE Names are in mixed case.
6400 S_Pretty_Replace_No_Backup : aliased constant S := "/REPLACE_NO_BACKUP " &
6402 -- /REPLACE_NO_BACKUP
6404 -- Replace the argument source with the pretty-printed source without
6405 -- creating any backup copy of the argument source.
6407 S_Pretty_No_Labels : aliased constant S := "/NO_MISSED_LABELS " &
6409 -- /NO_MISSED_LABELS
6411 -- Do not insert missing end/exit labels. The end label is the name of
6412 -- a construct that may optionally appear at the end of the construct.
6413 -- This includes the names of packages and subprograms.
6414 -- Similarly, the exit label is the name of a loop that may appear as the
6415 -- argument of an exit statement within the loop. By default, GNAT PRETTY
6416 -- inserts these end/exit labels when they are absent in the original
6417 -- source. This qualifier /NO_MISSED_LABELS suppresses this insertion,
6418 -- so that the formatted source reflects the original.
6420 S_Pretty_Notabs : aliased constant S := "/NOTABS " &
6424 -- Replace all tabulations in comments with spaces.
6426 S_Pretty_Numbers : aliased constant S := "/NUMBER_CASING=" &
6435 -- /NUMBER_CASING=name-option
6437 -- Specify the casing of named number names. If not specified, the casing
6438 -- of these names is defined by the NAME_CASING option. 'name-option'
6441 -- AS_DECLARED Names are cased as they appear in the declaration
6442 -- in the source file.
6444 -- LOWER_CASE Names are in lower case.
6446 -- UPPER_CASE Names are in upper case.
6448 -- MIXED_CASE Names are in mixed case.
6450 S_Pretty_Output : aliased constant S := "/OUTPUT=@" &
6454 -- Write the output to the specified file. If the file already exists,
6455 -- an error is reported.
6457 S_Pretty_Override : aliased constant S := "/OVERRIDING_REPLACE " &
6459 -- /NOOVERRIDING_REPLACE (D)
6460 -- /OVERRIDING_REPLACE
6462 -- Replace the argument source with the pretty-printed source and copy the
6463 -- argument source into filename.NPP, overriding any existing file if
6466 S_Pretty_Pragma : aliased constant S := "/PRAGMA_CASING=" &
6473 -- /PRAGMA_CASING[=pragma-option]
6475 -- Set the case of pragma identifiers. The default is Mixed case.
6476 -- pragma-option may be one of the following:
6482 S_Pretty_Project : aliased constant S := "/PROJECT_FILE=<" &
6484 -- /PROJECT_FILE=filename
6486 -- Specifies the main project file to be used. The project files rooted
6487 -- at the main project file will be parsed before any other processing to
6488 -- set the building environment.
6490 S_Pretty_Replace : aliased constant S := "/REPLACE " &
6495 -- Replace the argument source with the pretty-printed source and copy the
6496 -- argument source into filename.NPP. If filename.NPP already exists,
6497 -- report an error and exit.
6499 S_Pretty_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
6501 -- /RUNTIME_SYSTEM=xxx
6503 -- Compile against an alternate runtime system named xxx or RTS-xxx.
6505 S_Pretty_Search : aliased constant S := "/SEARCH=*" &
6507 -- /SEARCH=(directory[,...])
6509 -- When looking for source files also look in directories specified.
6511 S_Pretty_Specific : aliased constant S := "/SPECIFIC_CASING " &
6515 -- Do not use the default dictionary file; instead, use the casing
6516 -- defined by a qualifier /NAME_CASING and/or any explicit dictionary
6517 -- file specified by a qualifier /DICTIONARY.
6519 S_Pretty_Standard : aliased constant S := "/STANDARD_OUTPUT " &
6521 -- /NOSTANDARD_OUTPUT (D)
6524 -- Redirect the output to the standard output.
6526 S_Pretty_Subdirs : aliased constant S := "/SUBDIRS=<" &
6530 -- The actual directories (object, exec, library, ...) are subdirectories
6531 -- of the directory specified in the project file. If the subdirectory
6532 -- does not exist, it is created automatically.
6534 S_Pretty_Types : aliased constant S := "/TYPE_CASING=" &
6543 -- /TYPE_CASING=name-option
6545 -- Specify the casing of subtype names (including first subtypes from
6546 -- type declarations). If not specified, the casing of these names is
6547 -- defined by the NAME_CASING option. 'name-option' is one of:
6549 -- AS_DECLARED Names are cased as they appear in the declaration
6550 -- in the source file.
6552 -- LOWER_CASE Names are in lower case.
6554 -- UPPER_CASE Names are in upper case.
6556 -- MIXED_CASE Names are in mixed case.
6558 S_Pretty_Verbose : aliased constant S := "/VERBOSE " &
6563 -- Verbose mode; GNAT PRETTY generates version information and then a
6564 -- trace of the actions it takes to produce or obtain the ASIS tree.
6566 S_Pretty_Warnings : aliased constant S := "/WARNINGS " &
6571 -- Issue a warning to the standard error stream if it is not possible
6572 -- to provide the required layout in the result source.
6573 -- By default such warnings are not activated.
6575 Pretty_Switches : aliased constant Switches :=
6576 (S_Pretty_Add 'Access,
6577 S_Pretty_Align 'Access,
6578 S_Pretty_All_Prjs 'Access,
6579 S_Pretty_Attrib 'Access,
6580 S_Pretty_Comments 'Access,
6581 S_Pretty_Compact_Is 'Access,
6582 S_Pretty_Config 'Access,
6583 S_Pretty_Constr 'Access,
6584 S_Pretty_Comind 'Access,
6585 S_Pretty_Current 'Access,
6586 S_Pretty_Dico 'Access,
6587 S_Pretty_Eol 'Access,
6588 S_Pretty_Ext 'Access,
6589 S_Pretty_Encoding 'Access,
6590 S_Pretty_Enums 'Access,
6591 S_Pretty_Files 'Access,
6592 S_Pretty_Follow 'Access,
6593 S_Pretty_Forced 'Access,
6594 S_Pretty_Formfeed 'Access,
6595 S_Pretty_Indent 'Access,
6596 S_Pretty_Keyword 'Access,
6597 S_Pretty_Maxlen 'Access,
6598 S_Pretty_Maxact 'Access,
6599 S_Pretty_Maxind 'Access,
6600 S_Pretty_Maxpar 'Access,
6601 S_Pretty_Mess 'Access,
6602 S_Pretty_Names 'Access,
6603 S_Pretty_No_Labels 'Access,
6604 S_Pretty_Notabs 'Access,
6605 S_Pretty_Numbers 'Access,
6606 S_Pretty_Output 'Access,
6607 S_Pretty_Override 'Access,
6608 S_Pretty_Pragma 'Access,
6609 S_Pretty_Replace 'Access,
6610 S_Pretty_Replace_No_Backup'Access,
6611 S_Pretty_Project 'Access,
6612 S_Pretty_RTS 'Access,
6613 S_Pretty_Search 'Access,
6614 S_Pretty_Sep_Label 'Access,
6615 S_Pretty_Sep_Loop_Then 'Access,
6616 S_Pretty_N_Sep_Loop_Then 'Access,
6617 S_Pretty_Subdirs 'Access,
6618 S_Pretty_Use_On_New_Line 'Access,
6619 S_Pretty_Stnm_On_Nw_Line 'Access,
6620 S_Pretty_Specific 'Access,
6621 S_Pretty_Standard 'Access,
6622 S_Pretty_Types 'Access,
6623 S_Pretty_Verbose 'Access,
6624 S_Pretty_Warnings 'Access);
6626 ------------------------------
6627 -- Switches for GNAT SHARED --
6628 ------------------------------
6630 S_Shared_Debug : aliased constant S := "/DEBUG=" &
6639 -- /DEBUG[=debug-option]
6642 -- Specifies the amount of debugging information included. 'debug-option'
6643 -- is one of the following:
6645 -- ALL (D) Include full debugging information.
6647 -- NONE Provide no debugging information. Same as /NODEBUG.
6649 -- TRACEBACK Provide sufficient debug information for a traceback.
6651 -- NOTRACEBACK Same as NONE.
6653 S_Shared_Image : aliased constant S := "/IMAGE=@" &
6655 -- /IMAGE=image-name
6657 -- 'image-name' specifies the name for the generated shared library.
6659 S_Shared_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
6660 "--for-linker=IDENT=" &
6662 -- /IDENTIFICATION="<string>"
6664 -- "<string>" specifies the string to be stored in the image file ident-
6665 -- ification field in the image header. It overrides any pragma Ident
6666 -- specified string.
6668 S_Shared_NoInhib : aliased constant S := "/NOINHIBIT-IMAGE " &
6669 "--for-linker=--noinhibit-exec";
6670 -- /NOINHIBIT-EXEC (D)
6672 -- Preserve image if there are warnings. This is the default.
6674 S_Shared_Inhib : aliased constant S := "/INHIBIT-IMAGE " &
6675 "--for-linker=--inhibit-exec";
6678 -- Remove image if there are warnings.
6680 S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES " &
6684 -- Link in default image initialization and startup functions.
6686 S_Shared_Verb : aliased constant S := "/VERBOSE " &
6691 -- Causes additional information to be output, including a full list of
6692 -- the included object files. This switch option is most useful when you
6693 -- want to see what set of object files are being used in the link step.
6695 S_Shared_ZZZZZ : aliased constant S := "/<other> " &
6699 -- Any other switch transmitted to the underlying linker.
6701 Shared_Switches : aliased constant Switches :=
6702 (S_Shared_Debug 'Access,
6703 S_Shared_Image 'Access,
6704 S_Shared_Ident 'Access,
6705 S_Shared_NoInhib 'Access,
6706 S_Shared_Inhib 'Access,
6707 S_Shared_Nofiles 'Access,
6708 S_Shared_Verb 'Access,
6709 S_Shared_ZZZZZ 'Access);
6711 -----------------------------
6712 -- Switches for GNAT STACK --
6713 -----------------------------
6715 S_Stack_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
6717 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
6719 -- Add directories to the project search path.
6721 S_Stack_All : aliased constant S := "/ALL_SUBPROGRAMS " &
6723 -- /NOALL_SUBPROGRAMS (D)
6726 -- Consider all subprograms as entry points.
6728 S_Stack_All_Cycles : aliased constant S := "/ALL_CYCLES " &
6730 -- /NOALL_CYCLES (D)
6733 -- Extract all possible cycles in the call graph.
6735 S_Stack_All_Prjs : aliased constant S := "/ALL_PROJECTS " &
6737 -- /NOALL_PROJECTS (D)
6740 -- When GNAT STACK is used with a Project File and no source is
6741 -- specified, the underlying tool gnatstack is called for all the
6742 -- units of all the Project Files in the project tree.
6744 S_Stack_Debug : aliased constant S := "/DEBUG " &
6749 -- Generate internal debug information.
6751 S_Stack_Directory : aliased constant S := "/DIRECTORY=*" &
6753 -- /DIRECTORY=(direc[,...])
6755 -- When looking for .ci files look also in directories specified.
6757 S_Stack_Entries : aliased constant S := "/ENTRIES=*" &
6760 -- /ENTRY=(entry_point[,...])
6762 -- Name of symbol to be used as entry point for the analysis.
6764 S_Stack_Files : aliased constant S := "/FILES=@" &
6768 -- Take as arguments the files that are listed in the specified
6771 S_Stack_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
6773 -- /NOFOLLOW_LINKS_FOR_FILES (D)
6774 -- /FOLLOW_LINKS_FOR_FILES
6776 -- Follow links when parsing project files
6778 S_Stack_Help : aliased constant S := "/HELP " &
6783 -- Output a message explaining the usage of gnatstack.
6785 S_Stack_List : aliased constant S := "/LIST=#" &
6789 -- Print the nnn subprograms requiring the biggest local stack usage. By
6790 -- default none will be displayed.
6792 S_Stack_Order : aliased constant S := "/ORDER=" &
6797 -- /ORDER[=order-option]
6799 -- Specifies the order for displaying the different call graphs.
6800 -- order-option may be one of the following:
6802 -- STACK (D) Select stack usage order
6804 -- ALPHABETICAL Select alphabetical order
6806 S_Stack_Path : aliased constant S := "/PATH " &
6811 -- Print all the subprograms that make up the worst-case path for every
6814 S_Stack_Project : aliased constant S := "/PROJECT_FILE=<" &
6816 -- /PROJECT_FILE=filename
6818 -- Specifies the main project file to be used. The project files rooted
6819 -- at the main project file will be parsed before the invocation of
6822 S_Stack_Output : aliased constant S := "/OUTPUT=@" &
6826 -- Name of the file containing the generated graph (VCG format).
6828 S_Stack_Regexp : aliased constant S := "/EXPRESSION=|" &
6831 -- /EXPRESSION=regular-expression
6833 -- Any symbol matching the regular expression will be considered as a
6834 -- potential entry point for the analysis.
6836 S_Stack_Subdirs : aliased constant S := "/SUBDIRS=<" &
6840 -- The actual directories (object, exec, library, ...) are subdirectories
6841 -- of the directory specified in the project file. If the subdirectory
6842 -- does not exist, it is created automatically.
6844 S_Stack_Unbounded : aliased constant S := "/UNBOUNDED=#" &
6848 -- Default stack size to be used for unbounded (dynamic) frames.
6850 S_Stack_Unknown : aliased constant S := "/UNKNOWN=#" &
6854 -- Default stack size to be used for unknown (external) calls.
6856 S_Stack_Verbose : aliased constant S := "/VERBOSE " &
6861 -- Specifies the amount of information to be displayed about the
6862 -- different subprograms. In verbose mode the full location of the
6863 -- subprogram will be part of the output, as well as detailed information
6864 -- about inaccurate data.
6866 S_Stack_Warnings : aliased constant S := "/WARNINGS=" &
6877 -- /WARNINGS[=(keyword[,...])]
6879 -- The following keywords are supported:
6881 -- ALL Turn on all optional warnings
6883 -- CYCLES Turn on warnings for cycles
6885 -- UNBOUNDED Turn on warnings for unbounded frames
6887 -- EXTERNAL Turn on warnings for external calls
6889 -- INDIRECT Turn on warnings for indirect calls
6891 Stack_Switches : aliased constant Switches :=
6892 (S_Stack_Add 'Access,
6893 S_Stack_All 'Access,
6894 S_Stack_All_Cycles 'Access,
6895 S_Stack_All_Prjs 'Access,
6896 S_Stack_Debug 'Access,
6897 S_Stack_Directory 'Access,
6898 S_Stack_Entries 'Access,
6899 S_Stack_Files 'Access,
6900 S_Stack_Follow 'Access,
6901 S_Stack_Help 'Access,
6902 S_Stack_List 'Access,
6903 S_Stack_Order 'Access,
6904 S_Stack_Path 'Access,
6905 S_Stack_Project 'Access,
6906 S_Stack_Output 'Access,
6907 S_Stack_Regexp 'Access,
6908 S_Stack_Subdirs 'Access,
6909 S_Stack_Unbounded 'Access,
6910 S_Stack_Unknown 'Access,
6911 S_Stack_Verbose 'Access,
6912 S_Stack_Warnings 'Access);
6914 ----------------------------
6915 -- Switches for GNAT STUB --
6916 ----------------------------
6918 S_Stub_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
6920 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
6922 -- Add directories to the project search path.
6924 S_Stub_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
6926 -- /CONFIGURATION_PRAGMAS_FILE=filespec
6928 -- Specifies a configuration pragmas file that must be taken into account
6931 S_Stub_Current : aliased constant S := "/CURRENT_DIRECTORY " &
6933 -- /CURRENT_DIRECTORY (D)
6934 -- /NOCURRENT_DIRECTORY
6936 -- Look for source, library or object files in the default directory.
6938 S_Stub_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
6940 -- /EXTERNAL_REFERENCE="name=val"
6942 -- Specifies an external reference to the project manager. Useful only if
6943 -- /PROJECT_FILE is used.
6946 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
6948 S_Stub_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
6950 -- /NOFOLLOW_LINKS_FOR_FILES (D)
6951 -- /FOLLOW_LINKS_FOR_FILES
6953 -- Follow links when parsing project files
6955 S_Stub_Full : aliased constant S := "/FULL " &
6960 -- If the destination directory already contains a file with the name of
6961 -- the body file for the argument file spec, replace it with the generated
6962 -- body stub. If /FULL is not used and there is already a body file, this
6963 -- existing body file is not replaced.
6965 S_Stub_Header : aliased constant S := "/HEADER=" &
6970 -- /HEADER[=header-option]
6972 -- Specifies the form of the comment header above the generated body stub.
6973 -- If no /HEADER qualifier is specified, there is no comment header.
6974 -- header-option is one of the following:
6977 -- GENERAL (D) Put a sample comment header into the body stub.
6979 -- SPEC Put the comment header (i.e., all the comments
6980 -- preceding the compilation unit) from the source of the
6981 -- library unit declaration into the body stub.
6983 S_Stub_Header_File : aliased constant S := "/FROM_HEADER_FILE=<" &
6986 -- /FROM_HEADER_FILE==filename
6988 -- Use the content of the file as the comment header for a generated body
6991 S_Stub_Indent : aliased constant S := "/INDENTATION=#" &
6995 -- (nnn is a non-negative integer). Set the indentation level in the
6996 -- generated body stub to nnn. nnn=0 means "no indentation".
6997 -- Default indentation is 3.
6999 S_Stub_Keep : aliased constant S := "/KEEP " &
7004 -- Do not delete the tree file (i.e., the snapshot of the compiler
7005 -- internal structures used by gnatstub) after creating the body stub.
7007 S_Stub_Length : aliased constant S := "/LINE_LENGTH=#" &
7011 -- (n is a non-negative integer). Set the maximum line length in the body
7012 -- stub to nnn. Default is 78.
7014 S_Stub_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
7021 -- /MESSAGES_PROJECT_FILE[=messages-option]
7023 -- Specifies the "verbosity" of the parsing of project files.
7024 -- messages-option may be one of the following:
7026 -- DEFAULT (D) No messages are output if there is no error or warning.
7028 -- MEDIUM A small number of messages are output.
7030 -- HIGH A great number of messages are output, most of them not
7031 -- being useful for the user.
7033 S_Stub_No_Exc : aliased constant S := "/NO_EXCEPTION " &
7035 -- /NONO_EXCEPTION (D)
7038 -- Avoid raising PROGRAM_ERROR in the generated program unit stubs.
7040 S_Stub_No_Head : aliased constant S := "/NO_LOCAL_HEADER " &
7041 "--no-local-header";
7042 -- /NONO_LOCAL_HEADER (D)
7045 -- Do not put local comment header before body stub for local program unit.
7047 S_Stub_Output : aliased constant S := "/OUTPUT=@" &
7051 -- Body file name. This should be set if the argument file name does not
7052 -- follow the GNAT file naming conventions. If this switch is omitted,
7053 -- the default name for the body will be obtained from the argument file
7054 -- name according to the GNAT file naming conventions.
7056 S_Stub_Project : aliased constant S := "/PROJECT_FILE=<" &
7058 -- /PROJECT_FILE=filename
7060 -- Specifies the main project file to be used. The project files rooted
7061 -- at the main project file will be parsed before any other processing.
7062 -- The source and object directories to be searched will be communicated
7063 -- to gnatstub through logical names ADA_PRJ_INCLUDE_FILE and
7064 -- ADA_PRJ_OBJECTS_FILE.
7066 S_Stub_Quiet : aliased constant S := "/QUIET " &
7071 -- Quiet mode: do not generate a confirmation when a body is successfully
7072 -- created, and do not generate a message when a body is not required for
7073 -- an argument unit.
7075 S_Stub_Search : aliased constant S := "/SEARCH=*" &
7077 -- /SEARCH=(directory[,...])
7079 -- When looking for source files also look in directories specified.
7081 S_Stub_Subdirs : aliased constant S := "/SUBDIRS=<" &
7085 -- The actual directories (object, exec, library, ...) are subdirectories
7086 -- of the directory specified in the project file. If the subdirectory
7087 -- does not exist, it is created automatically.
7089 S_Stub_Tree : aliased constant S := "/TREE_FILE=" &
7096 -- /TREE_FILE[=treefile-option]
7098 -- Specify what to do with the tree file.
7099 -- treefile-option is one of the following:
7101 -- OVERWRITE (D) Overwrite the existing tree file. If the current
7102 -- directory already contains the file which, according
7103 -- to the GNAT file naming rules should be considered
7104 -- as a tree file for the argument source file, gnatstub
7105 -- will refuse to create the tree file needed to create
7106 -- a sample body unless this option is chosen.
7108 -- SAVE Do not remove the tree file (i.e., the snapshot
7109 -- of the compiler internal structures used by gnatstub)
7110 -- after creating the body stub.
7112 -- REUSE Reuse the tree file (if it exists) instead of
7114 -- Instead of creating the tree file for the library
7115 -- unit declaration, gnatstub tries to find it in the
7116 -- current directory and use it for creating a body.
7117 -- If the tree file is not found, no body is created.
7118 -- This option also implies `SAVE', whether or not the
7119 -- latter is set explicitly.
7121 S_Stub_Verbose : aliased constant S := "/VERBOSE " &
7126 -- Verbose mode: generate version information.
7128 Stub_Switches : aliased constant Switches :=
7129 (S_Stub_Add 'Access,
7130 S_Stub_Config 'Access,
7131 S_Stub_Current 'Access,
7133 S_Stub_Follow 'Access,
7134 S_Stub_Full 'Access,
7135 S_Stub_Header 'Access,
7136 S_Stub_Header_File'Access,
7137 S_Stub_Indent 'Access,
7138 S_Stub_Keep 'Access,
7139 S_Stub_Length 'Access,
7140 S_Stub_Mess 'Access,
7141 S_Stub_Output 'Access,
7142 S_Stub_Project 'Access,
7143 S_Stub_No_Exc 'Access,
7144 S_Stub_No_Head 'Access,
7145 S_Stub_Quiet 'Access,
7146 S_Stub_Search 'Access,
7147 S_Stub_Subdirs 'Access,
7148 S_Stub_Tree 'Access,
7149 S_Stub_Verbose 'Access);
7151 ----------------------------
7152 -- Switches for GNAT SYNC --
7153 ----------------------------
7155 S_Sync_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
7157 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
7159 -- Add directories to the project search path.
7161 S_Sync_All : aliased constant S := "/ALL " &
7166 -- Also check the components of the GNAT run time and process the needed
7167 -- components of the GNAT RTL when building and analyzing the global
7168 -- structure for checking the global rules.
7170 S_Sync_Allproj : aliased constant S := "/ALL_PROJECTS " &
7172 -- /NOALL_PROJECTS (D)
7175 -- When GNAT SYNC is used with a Project File and no source is
7176 -- specified, the underlying tool gnatsync is called for all the
7177 -- sources of all the Project Files in the project tree.
7179 S_Sync_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
7181 -- /EXTERNAL_REFERENCE="name=val"
7183 -- Specifies an external reference to the project manager. Useful only if
7184 -- /PROJECT_FILE is used.
7187 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
7189 S_Sync_Files : aliased constant S := "/FILES=@" &
7193 -- Take as arguments the files that are listed in the specified
7196 S_Sync_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
7198 -- /NOFOLLOW_LINKS_FOR_FILES (D)
7199 -- /FOLLOW_LINKS_FOR_FILES
7201 -- Follow links when parsing project files
7203 S_Sync_Main : aliased constant S := "/MAIN_SUBPROGRAM=@" &
7205 -- /MAIN_SUBPROGRAM=filename
7207 -- Specify the name of the file containing the main subprogram
7209 S_Sync_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
7216 -- /MESSAGES_PROJECT_FILE[=messages-option]
7218 -- Specifies the "verbosity" of the parsing of project files.
7219 -- messages-option may be one of the following:
7221 -- DEFAULT (D) No messages are output if there is no error or warning.
7223 -- MEDIUM A small number of messages are output.
7225 -- HIGH A great number of messages are output, most of them not
7226 -- being useful for the user.
7228 S_Sync_Project : aliased constant S := "/PROJECT_FILE=<" &
7230 -- /PROJECT_FILE=filename
7232 -- Specifies the main project file to be used. The project files rooted
7233 -- at the main project file will be parsed before the invocation of the
7234 -- gnatcheck. The source directories to be searched will be communicated
7235 -- to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE.
7237 S_Sync_Quiet : aliased constant S := "/QUIET " &
7242 -- Work quietly, only output warnings and errors.
7244 S_Sync_Subdirs : aliased constant S := "/SUBDIRS=<" &
7248 -- The actual directories (object, exec, library, ...) are subdirectories
7249 -- of the directory specified in the project file. If the subdirectory
7250 -- does not exist, it is created automatically.
7252 S_Sync_Verb : aliased constant S := "/VERBOSE " &
7257 -- The version number and copyright notice are output, as well as exact
7258 -- copies of the gnat1 commands spawned to obtain the chop control
7261 S_Sync_Exec : aliased constant S := "/EXECUTION_TIME " &
7263 -- /NOEXECUTION_TIME (D)
7266 -- Output the execution time
7268 S_Sync_Details : aliased constant S := "/DETAILS=" &
7275 -- /DETAILS[=options]
7277 -- Specifies the details of the output.
7278 -- Options may be one of the following:
7284 S_Sync_Warnoff : aliased constant S := "/WARNINGS_OFF " &
7289 -- Turn warnings off
7291 S_Sync_Output : aliased constant S := "/OUTPUT_FILE=<" &
7294 -- /OUTPUT_FILE=filename
7296 -- Redirect output to a text file
7298 Sync_Switches : aliased constant Switches :=
7299 (S_Sync_Add 'Access,
7301 S_Sync_Allproj 'Access,
7303 S_Sync_Follow 'Access,
7304 S_Sync_Files 'Access,
7305 S_Sync_Main 'Access,
7306 S_Sync_Mess 'Access,
7307 S_Sync_Project 'Access,
7308 S_Sync_Quiet 'Access,
7309 S_Sync_Subdirs 'Access,
7310 S_Sync_Verb 'Access,
7311 S_Sync_Exec 'Access,
7312 S_Sync_Details 'Access,
7313 S_Sync_Warnoff 'Access,
7314 S_Sync_Output 'Access);
7316 ----------------------------
7317 -- Switches for GNAT TEST --
7318 ----------------------------
7320 Test_Switches : aliased constant Switches :=
7323 ----------------------------
7324 -- Switches for GNAT XREF --
7325 ----------------------------
7327 S_Xref_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" &
7329 -- /ADD_PROJECT_SEARCH_PATH=(directory[,...])
7331 -- Add directories to the project search path.
7333 S_Xref_All : aliased constant S := "/ALL_FILES " &
7338 -- If this switch is present, FIND and XREF will parse the read-only
7339 -- files found in the library search path. Otherwise, these files will
7340 -- be ignored. This option can be used to protect Gnat sources or your
7341 -- own libraries from being parsed, thus making FIND and XREF much
7342 -- faster, and their output much smaller.
7344 S_Xref_Deriv : aliased constant S := "/DERIVED_TYPES " &
7346 -- /NODERIVED_TYPES (D)
7349 -- Output the parent type reference for each matching derived types.
7351 S_Xref_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
7353 -- /EXTERNAL_REFERENCE="name=val"
7355 -- Specifies an external reference to the project manager. Useful only if
7356 -- /PROJECT_FILE is used.
7359 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
7361 S_Xref_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES " &
7363 -- /NOFOLLOW_LINKS_FOR_FILES (D)
7364 -- /FOLLOW_LINKS_FOR_FILES
7366 -- Follow links when parsing project files
7368 S_Xref_Full : aliased constant S := "/FULL_PATHNAME " &
7370 -- /NOFULL_PATHNAME (D)
7373 -- If this switch is set, the output file names will be preceded by their
7374 -- directory (if the file was found in the search path). If this switch
7375 -- is not set, the directory will not be printed.
7377 S_Xref_Global : aliased constant S := "/IGNORE_LOCALS " &
7379 -- /NOIGNORE_LOCALS (D)
7382 -- If this switch is set, information is output only for library-level
7383 -- entities, ignoring local entities. The use of this switch may
7384 -- accelerate FIND and XREF.
7386 S_Xref_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
7393 -- /MESSAGES_PROJECT_FILE[=messages-option]
7395 -- Specifies the "verbosity" of the parsing of project files.
7396 -- messages-option may be one of the following:
7398 -- DEFAULT (D) No messages are output if there is no error or warning.
7400 -- MEDIUM A small number of messages are output.
7402 -- HIGH A great number of messages are output, most of them not
7403 -- being useful for the user.
7405 S_Xref_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
7409 -- Do not look for sources in the system default directory.
7411 S_Xref_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
7415 -- Do not look for library files in the system default directory.
7417 S_Xref_Object : aliased constant S := "/OBJECT_SEARCH=*" &
7419 -- /OBJECT_SEARCH=(directory,...)
7421 -- When searching for library and object files, look in the specified
7422 -- directories. The order in which library files are searched is the same
7425 S_Xref_Project : aliased constant S := "/PROJECT=@" &
7429 -- Specify a project file to use. By default, FIND and XREF will try to
7430 -- locate a project file in the current directory.
7432 -- If a project file is either specified or found by the tools, then the
7433 -- content of the source directory and object directory lines are added
7434 -- as if they had been specified respectively by /SOURCE_SEARCH and
7437 S_Xref_Prj : aliased constant S := "/PROJECT_FILE=<" &
7439 -- /PROJECT_FILE=filename
7441 -- Specifies the main project file to be used. The project files rooted
7442 -- at the main project file will be parsed before doing any processing.
7443 -- The source and object directories to be searched will be communicated
7444 -- to gnatxref through logical names ADA_PRJ_INCLUDE_FILE and
7445 -- ADA_PRJ_OBJECTS_FILE.
7447 S_Xref_Search : aliased constant S := "/SEARCH=*" &
7449 -- /SEARCH=(directory,...)
7452 -- /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
7454 S_Xref_Source : aliased constant S := "/SOURCE_SEARCH=*" &
7456 -- /SOURCE_SEARCH=(directory,...)
7458 -- When looking for source files also look in the specified directories.
7459 -- The order in which source file search is undertaken is the same as for
7462 S_Xref_Subdirs : aliased constant S := "/SUBDIRS=<" &
7466 -- The actual directories (object, exec, library, ...) are subdirectories
7467 -- of the directory specified in the project file. If the subdirectory
7468 -- does not exist, it is created automatically.
7470 S_Xref_Output : aliased constant S := "/UNUSED " &
7472 -- /SOURCE_SEARCH=(directory,...)
7474 -- When looking for source files also look in the specified directories.
7475 -- The order in which source file search is undertaken is the same as for
7478 S_Xref_Tags : aliased constant S := "/TAGS " &
7483 -- Print a 'tags' file for vi.
7485 Xref_Switches : aliased constant Switches :=
7486 (S_Xref_Add 'Access,
7488 S_Xref_Deriv 'Access,
7490 S_Xref_Follow 'Access,
7491 S_Xref_Full 'Access,
7492 S_Xref_Global 'Access,
7493 S_Xref_Mess 'Access,
7494 S_Xref_Nostinc 'Access,
7495 S_Xref_Nostlib 'Access,
7496 S_Xref_Object 'Access,
7497 S_Xref_Project 'Access,
7499 S_Xref_Search 'Access,
7500 S_Xref_Source 'Access,
7501 S_Xref_Subdirs 'Access,
7502 S_Xref_Output 'Access,
7503 S_Xref_Tags 'Access);