Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / ada / vms_data.ads
blob2b028bbe2a5e116b0529bb8a3aa8bffb0db8b2b5
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- V M S _ D A T A --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1996-2005 Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 -- This package contains, for each of the command of the GNAT driver, one
28 -- constant array; each component of this array is a string that defines,
29 -- in coded form as explained below, the conversion of a VMS qualifier of the
30 -- command to the corresponding switch of the GNAT tool corresponding to the
31 -- command.
33 -- This package is used by the GNAT driver to invokes the GNAT tools with the
34 -- switches corresponding to the VMS qualifier and by the Project Manager to
35 -- convert VMS qualifiers in project files to their corresponding switch
36 -- values.
38 -- This package is also an input to the tool that generates the VMS GNAT
39 -- help information automatically.
41 -- NOTE: the format of this package must follow the following rules, so that
42 -- the VMS GNAT help tool works properly:
44 -- - Each command zone (where the eventual qualifiers are declared must
45 -- begin with a boxed comment of the form:
47 -- ---------------------------------
48 -- -- Switches for GNAT <COMMAND> --
49 -- ---------------------------------
51 -- where <COMMAND> is the name of a GNAT command in capital letters, for
52 -- example BIND, COMPILE, XREF, ...
54 -- - each qualifier declaration must be followed either by
55 -- - a comment starting with "-- NODOC", to indicate that there is
56 -- no documentation for this qualifier, or
57 -- - a contiguous sequence of comments that constitute the
58 -- documentation of the qualifier.
60 -- - each command zone ends with the declaration of the contant array
61 -- for the command, of the form:
63 -- <Command>__Switches : aliased constant Switches :=
65 package VMS_Data is
67 ----------------
68 -- QUALIFIERS --
69 ----------------
71 -- The syntax of a qualifier delaration is as follows:
73 -- SWITCH_STRING ::= "/ command-qualifier-name TRANSLATION"
75 -- TRANSLATION ::=
76 -- DIRECT_TRANSLATION
77 -- | DIRECTORIES_TRANSLATION
78 -- | FILE_TRANSLATION
79 -- | NO_SPACE_FILE_TRANSL
80 -- | NUMERIC_TRANSLATION
81 -- | STRING_TRANSLATION
82 -- | OPTIONS_TRANSLATION
83 -- | COMMANDS_TRANSLATION
84 -- | ALPHANUMPLUS_TRANSLATION
85 -- | OTHER_TRANSLATION
87 -- DIRECT_TRANSLATION ::= space UNIX_SWITCHES
88 -- DIRECTORIES_TRANSLATION ::= =* UNIX_SWITCH *
89 -- DIRECTORY_TRANSLATION ::= =% UNIX_SWITCH %
90 -- FILE_TRANSLATION ::= =@ UNIX_SWITCH @
91 -- NO_SPACE_FILE_TRANSL ::= =< UNIX_SWITCH >
92 -- NUMERIC_TRANSLATION ::= =# UNIX_SWITCH # | # number #
93 -- STRING_TRANSLATION ::= =" UNIX_SWITCH "
94 -- OPTIONS_TRANSLATION ::= =OPTION {space OPTION}
95 -- COMMANDS_TRANSLATION ::= =? ARGS space command-name
96 -- ALPHANUMPLUS_TRANSLATION ::= =| UNIX_SWITCH |
98 -- UNIX_SWITCHES ::= UNIX_SWITCH {, UNIX_SWITCH}
100 -- UNIX_SWITCH ::= unix-switch-string | !unix-switch-string | `string'
102 -- OPTION ::= option-name space UNIX_SWITCHES
104 -- ARGS ::= -cargs | -bargs | -largs
106 -- Here command-qual is the name of the switch recognized by the GNATCmd.
107 -- This is always given in upper case in the templates, although in the
108 -- actual commands, either upper or lower case is allowed.
110 -- The unix-switch-string always starts with a minus, and has no commas
111 -- or spaces in it. Case is significant in the unix switch string. If a
112 -- unix switch string is preceded by the not sign (!) it means that the
113 -- effect of the corresponding command qualifer is to remove any previous
114 -- occurrence of the given switch in the command line.
116 -- The DIRECTORIES_TRANSLATION format is used where a list of directories
117 -- is given. This possible corresponding formats recognized by GNATCmd are
118 -- as shown by the following example for the case of PATH
120 -- PATH=direc
121 -- PATH=(direc,direc,direc,direc)
123 -- When more than one directory is present for the DIRECTORIES case, then
124 -- multiple instances of the corresponding unix switch are generated,
125 -- with the file name being substituted for the occurrence of *.
127 -- The FILE_TRANSLATION format is similar except that only a single
128 -- file is allowed, not a list of files, and only one unix switch is
129 -- generated as a result.
131 -- the NO_SPACE_FILE_TRANSL is similar to FILE_TRANSLATION, except that
132 -- no space is inserted between the switch and the file name.
134 -- The NUMERIC_TRANSLATION format is similar to the FILE_TRANSLATION case
135 -- except that the parameter is a decimal integer in the range 0 to 999.
137 -- For the OPTIONS_TRANSLATION case, GNATCmd similarly permits one or
138 -- more options to appear (although only in some cases does the use of
139 -- multiple options make logical sense). For example, taking the
140 -- case of ERRORS for GCC, the following are all allowed:
142 -- /ERRORS=BRIEF
143 -- /ERRORS=(FULL,VERBOSE)
144 -- /ERRORS=(BRIEF IMMEDIATE)
146 -- If no option is provided (e.g. just /ERRORS is written), then the
147 -- first option in the list is the default option. For /ERRORS this
148 -- is NORMAL, so /ERRORS with no option is equivalent to /ERRORS=NORMAL.
150 -- The COMMANDS_TRANSLATION case is only used for gnatmake, to correspond
151 -- to the use of -cargs, -bargs and -largs (the ARGS string as indicated
152 -- is one of these three possibilities). The name given by COMMAND is the
153 -- corresponding command name to be used to interprete the switches to be
154 -- passed on. Switches of this type set modes, e.g. /COMPILER_QUALIFIERS
155 -- sets the mode so that all subsequent switches, up to another switch
156 -- with COMMANDS_TRANSLATION apply to the corresponding commands issued
157 -- by the make utility. For example
159 -- /COMPILER_QUALIFIERS /LIST /BINDER_QUALIFIERS /MAIN
160 -- /COMPILER_QUALIFIERS /NOLIST /COMPILE_CHECKS=SYNTAX
162 -- Clearly these switches must come at the end of the list of switches
163 -- since all subsequent switches apply to an issued command.
165 -- For the DIRECT_TRANSLATION case, an implicit additional qualifier
166 -- declaration is created by prepending NO to the name of the qualifer,
167 -- and then inverting the sense of the UNIX_SWITCHES string. For example,
168 -- given the qualifier definition:
170 -- "/LIST -gnatl"
172 -- An implicit qualifier definition is created:
174 -- "/NOLIST !-gnatl"
176 -- In the case where, a ! is already present, inverting the sense of the
177 -- switch means removing it.
179 subtype S is String;
180 -- A synonym to shorten the table
182 type String_Ptr is access constant String;
183 -- String pointer type used throughout
185 type Switches is array (Natural range <>) of String_Ptr;
186 -- Type used for array of swtiches
188 type Switches_Ptr is access constant Switches;
190 ----------------------------
191 -- Switches for GNAT BIND --
192 ----------------------------
194 S_Bind_Bind : aliased constant S := "/BIND_FILE=" &
195 "ADA " &
196 "-A " &
197 "C " &
198 "-C";
199 -- /BIND_FILE[=bind-file-option]
201 -- Specifies the language of the binder generated file.
203 -- ADA (D) Binder file is Ada.
205 -- C Binder file is 'C'.
207 S_Bind_Build : aliased constant S := "/BUILD_LIBRARY=|" &
208 "-L|";
209 -- /BUILD_LIBRARY=xxx
211 -- Binds the units for library building. In this case the adainit and
212 -- adafinal procedures are rename to xxxinit and xxxfinal. Implies
213 -- /NOMAIN.
215 S_Bind_Current : aliased constant S := "/CURRENT_DIRECTORY " &
216 "!-I-";
217 -- /CURRENT_DIRECTORY (D)
218 -- /NOCURRENT_DIRECTORY
220 -- Look for source, library or object files in the default directory.
222 S_Bind_Debug : aliased constant S := "/DEBUG=" &
223 "TRACEBACK " &
224 "-g2 " &
225 "ALL " &
226 "-g3 " &
227 "NONE " &
228 "-g0 " &
229 "SYMBOLS " &
230 "-g1 " &
231 "NOSYMBOLS " &
232 "!-g1 " &
233 "LINK " &
234 "-g3 " &
235 "NOTRACEBACK " &
236 "!-g2";
237 -- /DEBUG[=debug-level]
238 -- /NODEBUG
240 -- Specify level of debugging information generated for the elaboration
241 -- routine. See corresponding qualifier for GNAT COMPILE.
243 S_Bind_DebugX : aliased constant S := "/NODEBUG " &
244 "!-g";
245 -- NODOC (see /DEBUG)
247 S_Bind_Elab : aliased constant S := "/ELABORATION_DEPENDENCIES " &
248 "-e";
249 -- /ELABORATION_DEPENDENCIES
250 -- /NOELABORATION_DEPENDENCIES (D)
252 -- Output complete list of elaboration-order dependencies, showing the
253 -- reason for each dependency. This output can be rather extensive but may
254 -- be useful in diagnosing problems with elaboration order. The output is
255 -- written to SYS$OUTPUT.
257 S_Bind_Error : aliased constant S := "/ERROR_LIMIT=#" &
258 "-m#";
259 -- /ERROR_LIMIT=nnn
261 -- Limit number of detected errors to nnn (1-999999).
263 S_Bind_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
264 "-X" & '"';
265 -- /EXTERNAL_REFERENCE="name=val"
267 -- Specifies an external reference to the project manager. Useful only if
268 -- /PROJECT_FILE is used.
270 -- Example:
271 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
273 S_Bind_Force : aliased constant S := "/FORCE_ELAB_FLAGS " &
274 "-F";
275 -- /NOFORCE_ELAB_FLAGS (D)
276 -- /FORCE_ELAB_FLAGS
278 -- Force checking of elaboration Flags
280 S_Bind_Help : aliased constant S := "/HELP " &
281 "-h";
282 -- /HELP
284 -- Output usage information.
286 S_Bind_Init : aliased constant S := "/INITIALIZE_SCALARS=" &
287 "INVALID " &
288 "-Sin " &
289 "LOW " &
290 "-Slo " &
291 "HIGH " &
292 "-Shi";
293 -- /INITIALIZE_SCALARS[=scalar-option]
295 -- Indicate how uninitialized scalar values for which a pragma
296 -- Initialize_Scalars applies should be initialized.
297 -- scalar-option may be one of the following:
299 -- INVALID (D) Initialize with an invalid value.
300 -- LOW Initialize with the lowest valid value of the subtype.
301 -- HIGH Initialize with the highest valid value of the subtype.
303 S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
304 "-aO*";
305 -- /LIBRARY_SEARCH=(direc[,...])
307 -- When looking for library and object files look also in directories
308 -- specified.
310 S_Bind_Linker : aliased constant S := "/LINKER_OPTION_LIST " &
311 "-K";
312 -- /NOLINKER_OPTION_LIST (D)
313 -- /LINKER_OPTION_LIST
315 -- Output linker options to SYS$OUTPUT. Includes library search
316 -- paths, contents of pragmas Ident and Linker_Options, and
317 -- libraries added by GNAT BIND.
319 S_Bind_Main : aliased constant S := "/MAIN " &
320 "!-n";
321 -- /MAIN (D)
323 -- The main program is in Ada.
325 -- /NOMAIN
327 -- The main program is not in Ada.
329 S_Bind_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
330 "DEFAULT " &
331 "-vP0 " &
332 "MEDIUM " &
333 "-vP1 " &
334 "HIGH " &
335 "-vP2";
336 -- /MESSAGES_PROJECT_FILE[=messages-option]
338 -- Specifies the "verbosity" of the parsing of project files.
339 -- messages-option may be one of the following:
341 -- DEFAULT (D) No messages are output if there is no error or warning.
343 -- MEDIUM A small number of messages are output.
345 -- HIGH A great number of messages are output, most of them not
346 -- being useful for the user.
348 S_Bind_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
349 "-nostdinc";
350 -- /NOSTD_INCLUDES
352 -- Do not look for sources the in the system default directory.
354 S_Bind_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
355 "-nostdlib";
356 -- /NOSTD_LIBRARIES
358 -- Do not look for library files in the system default directory.
360 S_Bind_No_Time : aliased constant S := "/NO_TIME_STAMP_CHECK " &
361 "-t";
362 -- NODOC (see /TIME_STAMP_CHECK)
364 S_Bind_Object : aliased constant S := "/OBJECT_LIST " &
365 "-O";
366 -- /NOOBJECT_LIST (D)
367 -- /OBJECT_LIST
369 -- Output full names of all the object files that must be linker to
370 -- provide the Ada component of the program. The output is written to
371 -- SYS$OUTPUT.
373 S_Bind_Order : aliased constant S := "/ORDER_OF_ELABORATION " &
374 "-l";
375 -- /NOORDER_OF_ELABORATION (D)
376 -- /ORDER_OF_ELABORATION
378 -- Output chosen elaboration order. The output is written to SYS$OUTPUT.
380 S_Bind_Output : aliased constant S := "/OUTPUT=@" &
381 "-o@";
382 -- /OUTPUT=filename
384 -- File name to use for the program containing the elaboration code.
386 S_Bind_OutputX : aliased constant S := "/NOOUTPUT " &
387 "-c";
388 -- /NOOUTPUT
390 -- Check only. Do not generate the binder output file.
392 -- In this mode the binder performs all error checks but does not generate
393 -- an output file.
395 S_Bind_Pess : aliased constant S := "/PESSIMISTIC_ELABORATION " &
396 "-p";
397 -- /PESSIMISTIC_ELABORATION
399 -- Causes the binder to choose a "pessimistic" elaboration order, i.e. one
400 -- which is most likely to cause elaboration order problems. This can be
401 -- useful in testing portable code to make sure that there are no missing
402 -- elaborate pragmas.
404 S_Bind_Project : aliased constant S := "/PROJECT_FILE=<" &
405 "-P>";
406 -- /PROJECT_FILE=filename
408 -- Specifies the main project file to be used. The project files rooted
409 -- at the main project file will be parsed before the invocation of the
410 -- binder. The source and object directories to be searched will be
411 -- communicated to the binder through logical names ADA_PRJ_INCLUDE_FILE
412 -- and ADA_PRJ_OBJECTS_FILE.
414 S_Bind_Read : aliased constant S := "/READ_SOURCES=" &
415 "ALL " &
416 "-s " &
417 "NONE " &
418 "-x " &
419 "AVAILABLE " &
420 "!-x,!-s";
421 -- /READ_SOURCES[=(keyword[,...])]
422 -- /NOREAD_SOURCES
424 -- The following keyword are accepted:
426 -- ALL (D) Require source files to be present. In this mode, the
427 -- binder insists on being able to locate all source files
428 -- that are referenced and checks their consistency. In
429 -- normal mode, if a source file cannot be located it is
430 -- simply ignored. If you specify the ALL keyword, a
431 -- missing source file is an error.
433 -- NONE Exclude source files. In this mode, the binder only
434 -- checks that ALI files are consistent with one another.
435 -- source files are not accessed. The binder runs faster
436 -- in this mode, and there is still a guarantee that the
437 -- resulting program is self-consistent.
439 -- If a source file has been edited since it was last
440 -- compiled and you specify the NONE keyword, the binder
441 -- will not detect that the object file is out of date
442 -- with the source file.
444 -- This is the same as specifying /NOREAD_SOURCES.
446 -- AVAILABLE Check that object files are consistent with one
447 -- another and are consistent with any source files that
448 -- can be located.
450 S_Bind_ReadX : aliased constant S := "/NOREAD_SOURCES " &
451 "-x";
452 -- NODOC (see /READ_SOURCES)
454 S_Bind_Rename : aliased constant S := "/RENAME_MAIN=<" &
455 "-M>";
456 -- /RENAME_MAIN=xxx
458 -- Renames the generated main program from main to xxx.
459 -- This is useful in the case of some cross-building environments, where
460 -- the actual main program is separate from the one generated
461 -- by GNAT BIND.
463 S_Bind_Report : aliased constant S := "/REPORT_ERRORS=" &
464 "VERBOSE " &
465 "-v " &
466 "BRIEF " &
467 "-b " &
468 "DEFAULT " &
469 "!-b,!-v";
470 -- /REPORT_ERRORS[=(keyword[,...])]
471 -- VERBOSE (D)
472 -- BRIEF
473 -- DEFAULT
474 -- /NOREPORT_ERRORS
476 -- With the DEFAULT keyword (which is not the default when the binder is
477 -- run from GNAT BIND) or the /NOREPORT_ERRORS qualifier, brief error
478 -- messages are generated to SYS$ERROR. If the VERBOSE keyword is
479 -- present, a header is written to SYS$OUTPUT and any error messages are
480 -- directed to SYS$OUTPUT All that is written to SYS$ERROR is a brief
481 -- summary message.
483 -- If the BRIEF keyword is specified, the binder will generate brief error
484 -- messages to SYS$ERROR even if verbose mode is specified. This is
485 -- relevant only when used together with the VERBOSE keyword or /VERBOSE
486 -- qualifier.
488 S_Bind_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
489 "!-b,!-v";
490 -- NODOC (see /REPORT_ERRORS)
492 S_Bind_Restr : aliased constant S := "/RESTRICTION_LIST " &
493 "-r";
494 -- /NORESTRICTION_LIST (D)
495 -- /RESTRICTION_LIST
497 -- Generate list of pragma Rerstrictions that could be applied to the
498 -- current unit. This is useful for code audit purposes, and also may be
499 -- used to improve code generation in some cases.
501 S_Bind_Return : aliased constant S := "/RETURN_CODES=" &
502 "POSIX " &
503 "!-X1 " &
504 "VMS " &
505 "-X1";
506 -- /RETURN_CODES=POSIX (D)
507 -- /RETURN_CODES=VMS
509 -- Specifies the style of default exit code returned. Must be used in
510 -- conjunction with and match the Link qualifer with same name.
512 -- POSIX (D) Return Posix success (0) by default.
514 -- VMS Return VMS success (1) by default.
516 S_Bind_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
517 "--RTS=|";
518 -- /RUNTIME_SYSTEM=xxx
520 -- Binds against an alternate runtime system named xxx or RTS-xxx.
522 S_Bind_Search : aliased constant S := "/SEARCH=*" &
523 "-I*";
524 -- /SEARCH=(directory[,...])
526 -- When looking for source or object files also look in directories
527 -- specified.
529 -- This is the same as specifying both /LIBRARY_SEARCH and /SOURCE_SEARCH
530 -- for a directory.
532 S_Bind_Shared : aliased constant S := "/SHARED " &
533 "-shared,!-static";
534 -- /SHARED
535 -- /NOSHARED
537 -- Link against a shared GNAT run time when available.
539 S_Bind_Slice : aliased constant S := "/TIME_SLICE=#" &
540 "-T#";
541 -- /TIME_SLICE=nnn
543 -- Set the time slice value to nnn milliseconds. A value of zero means no
544 -- time slicing and also indicates to the tasking run time to match as
545 -- close as possible to the annex D requirements of the RM.
547 S_Bind_Source : aliased constant S := "/SOURCE_SEARCH=*" &
548 "-aI*";
549 -- /SOURCE_SEARCH=(directory[,...])
551 -- When looking for source files also look in directories specified.
553 S_Bind_Static : aliased constant S := "/STATIC " &
554 "-static,!-shared";
555 -- /STATIC
556 -- /NOSTATIC
558 -- Link against a static GNAT run time.
560 S_Bind_Store : aliased constant S := "/STORE_TRACEBACKS " &
561 "-E";
562 -- /STORE_TRACEBACKS (D)
563 -- /NOSTORE_TRACEBACKS
565 -- Store tracebacks in exception occurrences.
566 -- This is the default on VMS, with the zero-cost exception mechanism.
567 -- This qualifier has no impact, except when using the setjmp/longjmp
568 -- exception mechanism, with the GNAT COMPILE qualifier /LONGJMP_SETJMP.
570 S_Bind_Time : aliased constant S := "/TIME_STAMP_CHECK " &
571 "!-t";
572 -- /TIME_STAMP_CHECK (D)
574 -- Time stamp errors will be treated as errors.
576 -- /NOTIME_STAMP_CHECK
578 -- Ignore time stamp errors. Any time stamp error messages are treated as
579 -- warning messages. This switch essentially disconnects the normal
580 -- consistency checking, and the resulting program may have undefined
581 -- semantics if inconsistent units are present.
583 -- This means that /NOTIME_STAMP_CHECK should be used only in unusual
584 -- situations, with extreme care.
586 S_Bind_Verbose : aliased constant S := "/VERBOSE " &
587 "-v";
588 -- /VERBOSE (D)
589 -- /NOVERBOSE
591 -- Equivalent to /REPORT_ERRORS=VERBOSE.
593 S_Bind_Warn : aliased constant S := "/WARNINGS=" &
594 "NORMAL " &
595 "!-ws,!-we " &
596 "SUPPRESS " &
597 "-ws " &
598 "ERROR " &
599 "-we";
600 -- /WARNINGS[=(keyword[,...])]
601 -- /NOWARNINGS
603 -- The following keywords are supported:
605 -- NORMAL (D) Print warning messages and treat them as warning.
606 -- SUPPRESS Suppress all warning messages (same as /NOWARNINGS).
607 -- ERROR Treat any warning messages as fatal errors
609 S_Bind_WarnX : aliased constant S := "/NOWARNINGS " &
610 "-ws";
611 -- NODOC (see /WARNINGS)
613 S_Bind_Zero : aliased constant S := "/ZERO_MAIN " &
614 "-z";
615 -- /NOZERO_MAIN (D)
616 -- /ZERO_MAIN
618 -- Normally the binder checks that the unit name given on the command line
619 -- corresponds to a suitable main subprogram. When /ZERO_MAIN is used,
620 -- a list of ALI files can be given, and the execution of the program
621 -- consists of elaboration of these units in an appropriate order.
623 Bind_Switches : aliased constant Switches :=
624 (S_Bind_Bind 'Access,
625 S_Bind_Build 'Access,
626 S_Bind_Current 'Access,
627 S_Bind_Debug 'Access,
628 S_Bind_DebugX 'Access,
629 S_Bind_Elab 'Access,
630 S_Bind_Error 'Access,
631 S_Bind_Ext 'Access,
632 S_Bind_Force 'Access,
633 S_Bind_Help 'Access,
634 S_Bind_Init 'Access,
635 S_Bind_Library 'Access,
636 S_Bind_Linker 'Access,
637 S_Bind_Main 'Access,
638 S_Bind_Mess 'Access,
639 S_Bind_Nostinc 'Access,
640 S_Bind_Nostlib 'Access,
641 S_Bind_No_Time 'Access,
642 S_Bind_Object 'Access,
643 S_Bind_Order 'Access,
644 S_Bind_Output 'Access,
645 S_Bind_OutputX 'Access,
646 S_Bind_Pess 'Access,
647 S_Bind_Project 'Access,
648 S_Bind_Read 'Access,
649 S_Bind_ReadX 'Access,
650 S_Bind_Rename 'Access,
651 S_Bind_Report 'Access,
652 S_Bind_ReportX 'Access,
653 S_Bind_Restr 'Access,
654 S_Bind_Return 'Access,
655 S_Bind_RTS 'Access,
656 S_Bind_Search 'Access,
657 S_Bind_Shared 'Access,
658 S_Bind_Slice 'Access,
659 S_Bind_Source 'Access,
660 S_Bind_Static 'Access,
661 S_Bind_Store 'Access,
662 S_Bind_Time 'Access,
663 S_Bind_Verbose 'Access,
664 S_Bind_Warn 'Access,
665 S_Bind_WarnX 'Access,
666 S_Bind_Zero 'Access);
668 ----------------------------
669 -- Switches for GNAT CHOP --
670 ----------------------------
672 S_Chop_Comp : aliased constant S := "/COMPILATION " &
673 "-c";
674 -- /NOCOMPILATION (D)
675 -- /COMPILATION
677 -- Compilation mode, handle configuration pragmas strictly according to
678 -- RM rules.
680 S_Chop_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
681 "-k#";
682 -- /FILE_NAME_MAX_LENGTH[=nnn]
684 -- Limit generated file names to NNN (default of 8) characters. This is
685 -- useful if the resulting set of files is required to be interoperable
686 -- with systems like MS-DOS which limit the length of file names.
688 S_Chop_Help : aliased constant S := "/HELP " &
689 "-h";
690 -- /NOHELP (D)
691 -- /HELP
693 -- Print usage information.
695 S_Chop_Over : aliased constant S := "/OVERWRITE " &
696 "-w";
697 -- /NOOVERWRITE (D)
698 -- /OVERWRITE
700 -- Overwrite existing file names. Normally GNAT CHOP regards it as a
701 -- fatal error situation if there is already a file with the same name as
702 -- a file it would otherwise output. The /OVERWRITE qualifier bypasses
703 -- this check, and any such existing files will be silently overwritten.
705 S_Chop_Pres : aliased constant S := "/PRESERVE " &
706 "-p";
707 -- /NOPRESERVE (D)
708 -- /PRESERVE
710 -- Causes the file modification time stamp of the input file to be
711 -- preserved and used for the time stamp of the output file(s). This may
712 -- be useful for preserving coherency of time stamps in an enviroment
713 -- where gnatchop is used as part of a standard build process.
715 S_Chop_Quiet : aliased constant S := "/QUIET " &
716 "-q";
717 -- /NOQUIET (D)
718 -- /QUIET
720 -- Work quietly, only output warnings and errors.
722 S_Chop_Ref : aliased constant S := "/REFERENCE " &
723 "-r";
724 -- /NOREFERENCE (D)
725 -- /REFERENCE
727 -- Generate "Source_Reference" pragmas. Use this qualifier if the output
728 -- files are regarded as temporary and development is to be done in terms
729 -- of the original unchopped file. The /REFERENCE qualifier causes
730 -- "Source_Reference" pragmas to be inserted into each of the generated
731 -- files to refers back to the original file name and line number. The
732 -- result is that all error messages refer back to the original unchopped
733 -- file.
735 -- In addition, the debugging information placed into the object file
736 -- (when the /DEBUG qualifier of GNAT COMPILE or GNAT MAKE is specified)
737 -- also refers back to this original file so that tools like profilers
738 -- and debuggers will give information in terms of the original unchopped
739 -- file.
741 S_Chop_Verb : aliased constant S := "/VERBOSE " &
742 "-v";
743 -- /NOVERBOSE (D)
744 -- /VERBOSE
746 -- The version number and copyright notice are output, as well as exact
747 -- copies of the gnat1 commands spawned to obtain the chop control
748 -- information.
750 Chop_Switches : aliased constant Switches :=
751 (S_Chop_Comp 'Access,
752 S_Chop_File 'Access,
753 S_Chop_Help 'Access,
754 S_Chop_Over 'Access,
755 S_Chop_Pres 'Access,
756 S_Chop_Quiet 'Access,
757 S_Chop_Ref 'Access,
758 S_Chop_Verb 'Access);
760 -----------------------------
761 -- Switches for GNAT CLEAN --
762 -----------------------------
764 S_Clean_Compil : aliased constant S := "/COMPILER_FILES_ONLY " &
765 "-c";
766 -- /NOCOMPILER_FILES_ONLY (D)
767 -- /COMPILER_FILES_ONLY
769 -- Only attempt to delete the files produced by the compiler, not those
770 -- produced by the binder or the linker. The files that are not to be
771 -- deleted are library files, interface copy files, binder generated files
772 -- and executable files.
774 S_Clean_Current : aliased constant S := "/CURRENT_DIRECTORY " &
775 "!-I-";
776 -- /CURRENT_DIRECTORY (D)
778 -- Look for ALI or object files in the directory where GNAT CLEAN was
779 -- invoked.
781 -- /NOCURRENT_DIRECTORY
783 -- Do not look for ALI or object files in the directory where GNAT CLEAN
784 -- was invoked.
786 S_Clean_Delete : aliased constant S := "/DELETE " &
787 "!-n";
788 -- /DELETE (D)
790 -- Delete the files that are not read-only.
792 -- /NODELETE
794 -- Informative-only mode. Do not delete any files. Output the list of the
795 -- files that would have been deleted if this switch was not specified.
797 S_Clean_Dirobj : aliased constant S := "/DIRECTORY_OBJECTS=@" &
798 "-D@";
799 -- /DIRECTORY_OBJECTS=<file>
801 -- Find the object files and .ALI files in <file>.
802 -- This qualifier is not compatible with /PROJECT_FILE.
804 S_Clean_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
805 "-X" & '"';
806 -- /EXTERNAL_REFERENCE="name=val"
808 -- Specifies an external reference to the project manager. Useful only if
809 -- /PROJECT_FILE is used.
811 -- Example:
812 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
814 S_Clean_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
815 "-F";
816 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
817 -- /FULL_PATH_IN_BRIEF_MESSAGES
819 -- When using project files, if some errors or warnings are detected
820 -- during parsing and verbose mode is not in effect (no use of qualifier
821 -- /VERBOSE), then error lines start with the full path name of the
822 -- project file, rather than its simple file name.
824 S_Clean_Help : aliased constant S := "/HELP " &
825 "-h";
826 -- /NOHELP (D)
827 -- /HELP
829 -- Output a message explaining the usage of gnatclean.
831 S_Clean_Index : aliased constant S := "/SOURCE_INDEX=#" &
832 "-i#";
833 -- /SOURCE_INDEX=nnn
835 -- Specifies the index of the units in the source file
836 -- By default, source files are mono-unit and there is no index
838 S_Clean_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
839 "DEFAULT " &
840 "-vP0 " &
841 "MEDIUM " &
842 "-vP1 " &
843 "HIGH " &
844 "-vP2";
845 -- /MESSAGES_PROJECT_FILE[=messages-option]
847 -- Specifies the "verbosity" of the parsing of project files.
848 -- messages-option may be one of the following:
850 -- DEFAULT (D) No messages are output if there is no error or warning.
852 -- MEDIUM A small number of messages are output.
854 -- HIGH A great number of messages are output, most of them not
855 -- being useful for the user.
857 S_Clean_Object : aliased constant S := "/OBJECT_SEARCH=*" &
858 "-aO*";
859 -- /OBJECT_SEARCH=(directory,...)
861 -- When searching for library and object files, look in the specified
862 -- directories. The order in which library files are searched is the same
863 -- as for MAKE.
865 S_Clean_Project : aliased constant S := "/PROJECT_FILE=<" &
866 "-P>";
867 -- /PROJECT_FILE=filename
869 -- Specifies the main project file to be used. The project files rooted
870 -- at the main project file will be parsed before the invocation of the
871 -- compiler. The source and object directories to be searched will be
872 -- communicated to gnatclean through logical names ADA_PRJ_INCLUDE_FILE
873 -- and ADA_PRJ_OBJECTS_FILE.
875 S_Clean_Quiet : aliased constant S := "/QUIET " &
876 "-q";
877 -- /NOQUIET (D)
878 -- /QUIET
880 -- Quiet output. If there are no error, do not ouuput anything, except in
881 -- verbose mode (qualifier /VERBOSE) or in informative-only mode
882 -- (qualifier /NODELETE).
884 S_Clean_Recurs : aliased constant S := "/RECURSIVE " &
885 "-r";
886 -- /NORECURSIVE (D)
887 -- /RECURSIVE
889 -- When a project file is specified (using switch -P), clean all imported
890 -- and extended project files, recursively. If this qualifier is not
891 -- specified, only the files related to the main project file are to be
892 -- deleted. This qualifier has no effect if no project file is specified.
894 S_Clean_Search : aliased constant S := "/SEARCH=*" &
895 "-I*";
896 -- /SEARCH=(directory,...)
898 -- Equivalent to /OBJECT_SEARCH=(directory,...).
900 S_Clean_Verbose : aliased constant S := "/VERBOSE " &
901 "-v";
902 -- /NOVERBOSE (D)
903 -- /VERBOSE
905 -- Verbose mode.
907 Clean_Switches : aliased constant Switches :=
908 (S_Clean_Compil 'Access,
909 S_Clean_Current'Access,
910 S_Clean_Delete 'Access,
911 S_Clean_Dirobj 'Access,
912 S_Clean_Ext 'Access,
913 S_Clean_Full 'Access,
914 S_Clean_Help 'Access,
915 S_Clean_Index 'Access,
916 S_Clean_Mess 'Access,
917 S_Clean_Object 'Access,
918 S_Clean_Project'Access,
919 S_Clean_Quiet 'Access,
920 S_Clean_Recurs 'Access,
921 S_Clean_Search 'Access,
922 S_Clean_Verbose'Access);
924 -------------------------------
925 -- Switches for GNAT COMPILE --
926 -------------------------------
928 S_GCC_Ada_83 : aliased constant S := "/83 " &
929 "-gnat83";
930 -- /NO83 (D)
931 -- /83
933 -- Although GNAT is primarily an Ada 95 compiler, it accepts this
934 -- qualifier to specify that an Ada 83 mode program is being compiled. If
935 -- you specify this qualifier, GNAT rejects Ada 95 extensions and applies
936 -- Ada 83 semantics. It is not possible to guarantee this qualifier does
937 -- a perfect job; for example, some subtle tests of pathological cases,
938 -- such as are found in ACVC tests that have been removed from the ACVC
939 -- suite for Ada 95, may not compile correctly. However for practical
940 -- purposes, using this qualifier should ensure that programs that
941 -- compile correctly under the /83 qualifier can be ported reasonably
942 -- easily to an Ada 83 compiler. This is the main use of this qualifier.
944 -- With few exceptions (most notably the need to use "<>" on
945 -- unconstrained generic formal parameters), it is not necessary to use
946 -- this qualifier switch when compiling Ada 83 programs, because, with
947 -- rare and obscure exceptions, Ada 95 is upwardly compatible with Ada
948 -- 83. This means that a correct Ada 83 program is usually also a correct
949 -- Ada 95 program.
951 S_GCC_Ada_95 : aliased constant S := "/95 " &
952 "-gnat95";
953 -- /95 (D)
955 -- Allows GNAT to recognize the full range of Ada 95 constructs.
956 -- This is the normal default for GNAT Pro.
958 S_GCC_Ada_05 : aliased constant S := "/05 " &
959 "-gnat05";
960 -- /05 (D)
962 -- Allows GNAT to recognize all implemented proposed Ada 2005
963 -- extensions. See features file for list of implemented features.
965 S_GCC_Asm : aliased constant S := "/ASM " &
966 "-S,!-c";
967 -- /NOASM (D)
968 -- /ASM
970 -- Use to cause the assembler source file to be generated, using S as the
971 -- filetype, instead of the object file. This may be useful if you need
972 -- to examine the generated assembly code.
974 S_GCC_Checks : aliased constant S := "/CHECKS=" &
975 "FULL " &
976 "-gnato,!-gnatE,!-gnatp " &
977 "OVERFLOW " &
978 "-gnato " &
979 "ELABORATION " &
980 "-gnatE " &
981 "ASSERTIONS " &
982 "-gnata " &
983 "DEFAULT " &
984 "!-gnato,!-gnatp " &
985 "STACK " &
986 "-fstack-check " &
987 "SUPPRESS_ALL " &
988 "-gnatp";
989 -- /NOCHECKS
990 -- /CHECKS[=(keyword[,...])]
992 -- If you compile with the default options, GNAT will insert many runtime
993 -- checks into the compiled code, including code that performs range
994 -- checking against constraints, but not arithmetic overflow checking for
995 -- integer operations (including division by zero) or checks for access
996 -- before elaboration on subprogram calls. All other runtime checks, as
997 -- required by the Ada 95 Reference Manual, are generated by default.
999 -- You may specify one or more of the following keywords to the /CHECKS
1000 -- qualifier to modify this behavior:
1002 -- DEFAULT The behavior described above. This is the default
1003 -- if the /CHECKS qualifier is not present on the
1004 -- command line. Same as /NOCHECKS.
1006 -- OVERFLOW Enables overflow checking for integer operations and
1007 -- checks for access before elaboration on subprogram
1008 -- calls. This causes GNAT to generate slower and larger
1009 -- executable programs by adding code to check for both
1010 -- overflow and division by zero (resulting in raising
1011 -- "Constraint_Error" as required by Ada semantics).
1012 -- Similarly, GNAT does not generate elaboration check
1013 -- by default, and you must specify this keyword to
1014 -- enable them.
1016 -- Note that this keyword does not affect the code
1017 -- generated for any floating-point operations; it
1018 -- applies only to integer operations. For floating-point,
1019 -- GNAT has the "Machine_Overflows" attribute set to
1020 -- "False" and the normal mode of operation is to generate
1021 -- IEEE NaN and infinite values on overflow or invalid
1022 -- operations (such as dividing 0.0 by 0.0).
1024 -- ELABORATION Enables dynamic checks for access-before-elaboration
1025 -- on subprogram calls and generic instantiations.
1027 -- ASSERTIONS The pragmas "Assert" and "Debug" normally have no
1028 -- effect and are ignored. This keyword causes "Assert"
1029 -- and "Debug" pragmas to be activated.
1031 -- SUPPRESS_ALL Suppress all runtime checks as though you have "pragma
1032 -- Suppress (all_checks)" in your source. Use this switch
1033 -- to improve the performance of the code at the expense
1034 -- of safety in the presence of invalid data or program
1035 -- bugs.
1037 -- DEFAULT Suppress the effect of any option OVERFLOW or
1038 -- ASSERTIONS.
1040 -- FULL (D) Similar to OVERFLOW, but suppress the effect of any
1041 -- option ELABORATION or SUPPRESS_ALL.
1043 -- These keywords only control the default setting of the checks. You
1044 -- may modify them using either "Suppress" (to remove checks) or
1045 -- "Unsuppress" (to add back suppressed checks) pragmas in your program
1046 -- source.
1048 S_GCC_ChecksX : aliased constant S := "/NOCHECKS " &
1049 "-gnatp,!-gnato,!-gnatE";
1050 -- NODOC (see /CHECKS)
1052 S_GCC_Compres : aliased constant S := "/COMPRESS_NAMES " &
1053 "-gnatC";
1054 -- /NOCOMPRESS_NAMES (D)
1055 -- /COMPRESS_NAMES
1057 -- Compress debug information and external symbol name table entries.
1058 -- In the generated debugging information, and also in the case of long
1059 -- external names, the compiler uses a compression mechanism if the name
1060 -- is very long. This compression method uses a checksum, and avoids
1061 -- trouble on some operating systems which have difficulty with very long
1062 -- names.
1064 S_GCC_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
1065 "-gnatec>";
1066 -- /CONFIGURATION_PRAGMAS_FILE=file
1068 -- Specify a configuration pragmas file that need to be taken into account
1070 S_GCC_Current : aliased constant S := "/CURRENT_DIRECTORY " &
1071 "!-I-";
1072 -- /CURRENT_DIRECTORY (D)
1073 -- /NOCURRENT_DIRECTORY
1075 -- Look for source files in the default directory.
1077 S_GCC_Data : aliased constant S := "/DATA_PREPROCESSING=<" &
1078 "-gnatep>";
1079 -- /DATA_PREPROCESSING=file_name
1081 -- This qualifier indicates to the compiler the file name (without
1082 -- directory information) of the preprocessor data file to use.
1083 -- The preprocessor data file should be found in the source directories.
1085 -- A preprocessing data file is a text file with significant lines
1086 -- indicating how should be preprocessed either a specific source or all
1087 -- sources not mentioned in other lines. A significant line is a non
1088 -- empty, non comment line. Comments are similar to Ada comments.
1090 -- Each significant line starts with either a literal string or the
1091 -- character '*'. A literal string is the file name (without directory
1092 -- information) of the source to preprocess. A character '*' indicates the
1093 -- preprocessing for all the sources that are not specified explicitly on
1094 -- other lines. It is an error to have two lines with the same file name
1095 -- or two lines starting with the character '*'.
1097 -- After the file name or the character '*', another optional literal
1098 -- string indicating the file name of the definition file to be used for
1099 -- preprocessing. (see 15.3 Form of Definitions File. The definition files
1100 -- are found by the compiler in one of the source directories. In some
1101 -- cases, when compiling a source in a directory other than the current
1102 -- directory, if the definition file is in the current directory, it may
1103 -- be necessary to add the current directory as a source directory through
1104 -- qualifier "/SEARCH=[]", otherwise the compiler would not find the
1105 -- definition file.
1107 -- Then, optionally, switches similar to those of gnatprep may be found.
1108 -- Those switches are:
1110 -- -b Causes both preprocessor lines and the lines deleted by
1111 -- preprocessing to be replaced by blank lines, preserving
1112 -- the line number. This switch is always implied;
1113 -- however, if specified after `-c' it cancels the effect
1114 -- of `-c'.
1116 -- -c Causes both preprocessor lines and the lines deleted by
1117 -- preprocessing to be retained as comments marked with
1118 -- the special string "--! ".
1120 -- -Dsymbol=value Define or redefine a symbol, associated with value.
1121 -- A symbol is an Ada identifier, or an Ada reserved word,
1122 -- with the exception of "if", "else", "elsif", "end",
1123 -- "and", "or" and "then". value is either a literal
1124 -- string, an Ada identifier or any Ada reserved word.
1125 -- A symbol declared with this switch replaces a symbol
1126 -- with the same name defined in a definition file.
1128 -- -s Causes a sorted list of symbol names and values to be
1129 -- listed on the standard output file.
1131 -- -u Causes undefined symbols to be treated as having the
1132 -- value FALSE in the context of a preprocessor test.
1133 -- In the absence of this option, an undefined symbol
1134 -- in a #if or #elsif test will be treated as an error.
1136 -- Examples of valid lines in a preprocessor data file:
1138 -- "toto.adb" "prep.def" -u
1139 -- -- preprocess "toto.adb", using definition file "prep.def",
1140 -- -- undefined symbol are False.
1142 -- * -c -DVERSION=V101
1143 -- -- preprocess all other sources without a definition file;
1144 -- -- suppressed lined are commented; symbol VERSION has the value
1145 -- -- V101.
1147 -- "titi.adb" "prep2.def" -s
1148 -- -- preprocess "titi.adb", using definition file "prep2.def";
1149 -- -- list all symbols with their values.
1151 S_GCC_Debug : aliased constant S := "/DEBUG=" &
1152 "SYMBOLS " &
1153 "-g2 " &
1154 "NOSYMBOLS " &
1155 "!-g2 " &
1156 "TRACEBACK " &
1157 "-g1 " &
1158 "ALL " &
1159 "-g3 " &
1160 "NONE " &
1161 "-g0 " &
1162 "NOTRACEBACK " &
1163 "-g0";
1164 -- /DEBUG[=debug-level]
1165 -- /NODEBUG
1167 -- Specifies how much debugging information is to be included in
1168 -- the resulting object fie.
1170 -- 'debug-level' is one of the following:
1172 -- SYMBOLS (D) Include both debugger symbol records and traceback
1173 -- in the object file.
1175 -- ALL Include debugger symbol records, traceback plus
1176 -- extra debug information in the object file.
1178 -- NONE Excludes both debugger symbol records and traceback
1179 -- from the object file. Same as /NODEBUG.
1181 -- TRACEBACK Includes only traceback records in the object
1182 -- file. This is the default when /DEBUG is not used.
1184 S_GCC_DebugX : aliased constant S := "/NODEBUG " &
1185 "!-g";
1186 -- NODOC (see /Debug)
1188 S_GCC_Dist : aliased constant S := "/DISTRIBUTION_STUBS=" &
1189 "RECEIVER " &
1190 "-gnatzr " &
1191 "CALLER " &
1192 "-gnatzc";
1193 -- /NODISTRIBUTION_STUBS (D)
1194 -- /DISTRIBUTION_STUBS[=dist-opt]
1196 -- 'dist-opt' is either RECEIVER (the default) or SENDER and indicates
1197 -- that stubs for use in distributed programs (see the Distributed
1198 -- Systems Annex of the Ada RM) should be generated.
1200 S_GCC_DistX : aliased constant S := "/NODISTRIBUTION_STUBS " &
1201 "!-gnatzr,!-gnatzc";
1202 -- NODOC (see /DISTRIBUTION_STUBS)
1204 S_GCC_Error : aliased constant S := "/ERROR_LIMIT=#" &
1205 "-gnatm#";
1206 -- /NOERROR_LIMIT (D)
1207 -- /ERROR_LIMIT=nnn
1209 -- NNN is a decimal integer in the range of 1 to 999999 and limits the
1210 -- number of error messages to be generated to that number. Once that
1211 -- number has been reached, the compilation is abandoned.
1212 -- Specifying 999999 is equivalent to /NOERROR_LIMIT.
1214 S_GCC_ErrorX : aliased constant S := "/NOERROR_LIMIT " &
1215 "-gnatm999999";
1216 -- NODOC (see /ERROR_LIMIT)
1218 S_GCC_Expand : aliased constant S := "/EXPAND_SOURCE " &
1219 "-gnatG";
1220 -- /NOEXPAND_SOURCE (D)
1221 -- /EXPAND_SOURCE
1223 -- Produces a listing of the expanded code in Ada source form. For
1224 -- example, all tasking constructs are reduced to appropriate run-time
1225 -- library calls.
1227 S_GCC_Extend : aliased constant S := "/EXTENSIONS_ALLOWED " &
1228 "-gnatX";
1229 -- /NOEXTENSIONS_ALLOWED (D)
1230 -- /EXTENSIONS_ALLOWED
1232 -- GNAT specific language extensions allowed.
1234 S_GCC_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
1235 "-X" & '"';
1236 -- /EXTERNAL_REFERENCE="name=val"
1238 -- Specifies an external reference to the project manager. Useful only if
1239 -- /PROJECT_FILE is used.
1241 -- Example:
1242 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
1244 S_GCC_File : aliased constant S := "/FILE_NAME_MAX_LENGTH=#" &
1245 "-gnatk#";
1246 -- /FILE_NAME_MAX_LENGTH=nnn
1248 -- Activates file name "krunching". NNN, a decimal integer in the range
1249 -- 1-999, indicates the maximum allowable length of a file name (not
1250 -- including the ADS or ADB filetype. The default is not to enable file
1251 -- name krunching.
1253 S_GCC_Force : aliased constant S := "/FORCE_ALI " &
1254 "-gnatQ";
1255 -- /NOFORCE_ALI (D)
1256 -- /FORCE_ALI
1258 -- In normal operation mode, the .ALI file is not generated if any
1259 -- illegalities are detected in the program. The use of this qualifier
1260 -- forces generation of the .ALI file. This file is marked as being
1261 -- in error, so it cannot be used for binding purposes, but it does
1262 -- contain reasonably complete cross-reference information, and thus may
1263 -- be useful for use by tools (e.g. semantic browing tools or integrated
1264 -- development environments) that are driven from the .ALI file.
1266 S_GCC_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
1267 "-gnatef";
1268 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
1269 -- /FULL_PATH_IN_BRIEF_MESSAGES
1271 -- When using project files, if some errors or warnings are detected
1272 -- during parsing and verbose mode is not in effect (no use of qualifier
1273 -- /VERBOSE), then error lines start with the full path name of the
1274 -- project file, rather than its simple file name.
1276 S_GCC_Help : aliased constant S := "/HELP " &
1277 "-gnath";
1278 -- /NOHELP (D)
1279 -- /HELP
1281 -- Output usage information.
1283 S_GCC_Ident : aliased constant S := "/IDENTIFIER_CHARACTER_SET=" &
1284 "DEFAULT " &
1285 "-gnati1 " &
1286 "1 " &
1287 "-gnati1 " &
1288 "2 " &
1289 "-gnati2 " &
1290 "3 " &
1291 "-gnati3 " &
1292 "4 " &
1293 "-gnati4 " &
1294 "5 " &
1295 "-gnati5 " &
1296 "PC " &
1297 "-gnatip " &
1298 "PC850 " &
1299 "-gnati8 " &
1300 "FULL_UPPER " &
1301 "-gnatif " &
1302 "NO_UPPER " &
1303 "-gnatin " &
1304 "WIDE " &
1305 "-gnatiw";
1306 -- /NOIDENTIFIER_CHARACTER_SET (D)
1307 -- /IDENTIFIER_CHARACTER_SET=char-set
1309 -- Normally GNAT recognizes the Latin-1 character set in source program
1310 -- identifiers, as described in the reference manual. This qualifier
1311 -- causes GNAT to recognize alternate character sets in identifiers.
1312 -- 'char-set' is one of the following strings indicating the character
1313 -- set:
1315 -- DEFAULT (D) Equivalent to 1, below. Also equivalent to
1316 -- /NOIDENTIFIER_CHARACTER_SET.
1318 -- 1 The basic character set is Latin-1. This character
1319 -- set is defined by ISO standard 8859, part 1. The lower
1320 -- half (character codes 16#00# ... 16#7F#) is identical
1321 -- to standard ASCII coding, but the upper half is used
1322 -- to represent additional characters. This includes
1323 -- extended letters used by European languages, such as
1324 -- the umlaut used in German.
1326 -- You may use any of these extended characters freely
1327 -- in character or string literals. In addition, the
1328 -- extended characters that represent letters can be
1329 -- used in identifiers.
1331 -- 2 Latin-2 letters allowed in identifiers, with uppercase
1332 -- and lowercase equivalence.
1334 -- 3 Latin-3 letters allowed in identifiers, with uppercase
1335 -- and lower case equivalence.
1337 -- 4 Latin-4 letters allowed in identifiers, with uppercase
1338 -- and lower case equivalence.
1340 -- PC IBM PC code page 437. This code page is the normal
1341 -- default for PCs in the U.S. It corresponds to the
1342 -- original IBM PC character set. This set has some, but
1343 -- not all, of the extended Latin-1 letters, but these
1344 -- letters do not have the same encoding as Latin-1. In
1345 -- this mode, these letters are allowed in identifiers
1346 -- with uppercase and lowercase equivalence.
1348 -- PC850 This code page (850) is a modification of 437 extended
1349 -- to include all the Latin-1 letters, but still not with
1350 -- the usual Latin-1 encoding. In this mode, all these
1351 -- letters are allowed in identifiers with uppercase and
1352 -- lower case equivalence.
1354 -- FULL_UPPER Any character in the range 80-FF allowed in
1355 -- identifiers, and all are considered distinct. In
1356 -- other words, there are no uppercase and lower case
1357 -- equivalences in this range.
1359 -- NO_UPPER No upper-half characters in the range 80-FF are
1360 -- allowed in identifiers. This gives Ada 95
1361 -- compatibility for identifier names.
1363 -- WIDE GNAT allows wide character codes to appear in
1364 -- character and string literals, and also optionally
1365 -- in identifiers. See the /WIDE_CHARACTER_ENCODING
1366 -- qualifier for information on encoding formats.
1368 S_GCC_IdentX : aliased constant S := "/NOIDENTIFIER_CHARACTER_SET " &
1369 "-gnati1";
1370 -- NODOC (see /IDENTIFIER_CHARACTER_SET)
1372 S_GCC_Immed : aliased constant S := "/IMMEDIATE_ERRORS " &
1373 "-gnatdO";
1374 -- /NOIMMEDIATE_ERRORS (D)
1375 -- /IMMEDIATE_ERRORS
1377 -- Causes errors to be displayed as soon as they are encountered, rather
1378 -- than after compilation is terminated. If GNAT terminates prematurely
1379 -- or goes into an infinite loop, the last error message displayed may
1380 -- help to pinpoint the culprit.
1382 S_GCC_Inline : aliased constant S := "/INLINE=" &
1383 "PRAGMA " &
1384 "-gnatn " &
1385 "FULL " &
1386 "-gnatN " &
1387 "SUPPRESS " &
1388 "-fno-inline";
1389 -- /NOINLINE (D)
1390 -- /INLINE[=keyword]
1392 -- Selects the level of inlining for your program. In the absence of this
1393 -- qualifier, GNAT does not attempt inlining across units and does not
1394 -- need to access the bodies of subprograms for which "pragma Inline" is
1395 -- specified if they are not in the current unit.
1397 -- The supported keywords are as follows:
1399 -- PRAGMA (D) Recognize and process "Inline" pragmas. However,
1400 -- for the inlining to actually occur, optimization
1401 -- must be enabled. This enables inlining across unit
1402 -- boundaries, that is, inlining a call in one unit of
1403 -- a subprogram declared in a with'ed unit. The compiler
1404 -- will access these bodies, creating an extra source
1405 -- dependency for the resulting object file, and where
1406 -- possible, the call will be inlined.
1408 -- This qualifier also turns on full optimization and
1409 -- requests GNAT to try to attempt automatic inlining
1410 -- of small subprograms within a unit.
1412 -- Specifying /OPTIMIZE=NONE will disable the main effect
1413 -- of this qualifier, but you may specify other
1414 -- optimization options, to get either lower
1415 -- (/OPTIMIZE=SOME) or higher (/OPTIMIZE=UNROLL_LOOPS)
1416 -- levels of optimization.
1418 -- FULL Front end inlining. The front end inlining activated
1419 -- by this switch is generally more extensive, and quite
1420 -- often more effective than the standard PRAGMA inlining
1421 -- mode. It will also generate additional dependencies.
1423 -- SUPPRESS Suppresses all inlining, even if other optimization
1424 -- or inlining switches are set.
1426 S_GCC_InlineX : aliased constant S := "/NOINLINE " &
1427 "!-gnatn,!-gnatN";
1428 -- NODOC (see /INLINE)
1430 S_GCC_Jumps : aliased constant S := "/LONGJMP_SETJMP " &
1431 "-gnatL";
1432 -- /NOLONGJMP_SETJMP (D)
1433 -- /LONGJMP_SETJMP
1435 -- Causes the longjmp/setjmp approach to be used for exception handling.
1437 -- The default mechanism for OpenVMS is zero cost exceptions. This
1438 -- qualifier can be used to modify this default, but it must be used for
1439 -- all units in the partition, including all run-time library units.
1440 -- One way to achieve this is to use the /ALL_FILES and /FORCE_COMPILE
1441 -- for gnatmake.
1442 -- This option is rarely used. One case in which it may be advantageous is
1443 -- in an application where exception raising is common and the overall
1444 -- performance of the application is improved by favoring exception
1445 -- propagation.
1447 S_GCC_Length : aliased constant S := "/MAX_LINE_LENGTH=#" &
1448 "-gnatyM#";
1449 -- /MAX_LINE_LENGTH=nnn
1451 -- Set maximum line length.
1452 -- The length of lines must not exceed the given value nnn.
1454 S_GCC_List : aliased constant S := "/LIST " &
1455 "-gnatl";
1456 -- /NOLIST (D)
1457 -- /LIST
1459 -- Cause a full listing of the file to be generated.
1461 S_GCC_Mapping : aliased constant S := "/MAPPING_FILE=<" &
1462 "-gnatem>";
1463 -- /MAPPING_FILE=file_name
1465 -- Use mapping file file_name
1467 -- A mapping file is a way to communicate to the compiler two mappings:
1468 -- from unit names to file names (without any directory information) and
1469 -- from file names to path names (with full directory information).
1470 -- These mappings are used by the compiler to short-circuit the path
1471 -- search.
1473 -- The use of mapping files is not required for correct operation of the
1474 -- compiler, but mapping files can improve efficiency, particularly when
1475 -- sources are read over a slow network connection. In normal operation,
1476 -- you need not be concerned with the format or use of mapping files,
1477 -- and /MAPPING_FILE is not a qualifier that you would use explicitly.
1478 -- It is intended only for use by automatic tools such as GNAT MAKE
1479 -- running under the project file facility. The description here of the
1480 -- format of mapping files is provided for completeness and for possible
1481 -- use by other tools.
1483 -- A mapping file is a sequence of sets of three lines. In each set, the
1484 -- first line is the unit name, in lower case, with "%s" appended for
1485 -- specifications and "%b" appended for bodies; the second line is the
1486 -- file name; and the third line is the path name.
1488 -- Example:
1490 -- main%b
1491 -- main.2_ada
1492 -- /gnat/project1/sources/main.2_ada
1494 -- When qualifier ?MAPPING_FILE is specified, the compiler will create in
1495 -- memory the two mappings from the specified file. If there is any
1496 -- problem (non existent file, truncated file or duplicate entries),
1497 -- no mapping will be created.
1499 -- Several /MAPPING_FILE qualifiers may be specified; however, only the
1500 -- last one on the command line will be taken into account.
1502 -- When using a project file, GNAT MAKE creates a temporary mapping file
1503 -- and communicates it to the compiler using this switch.
1505 S_GCC_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
1506 "DEFAULT " &
1507 "-vP0 " &
1508 "MEDIUM " &
1509 "-vP1 " &
1510 "HIGH " &
1511 "-vP2";
1512 -- /MESSAGES_PROJECT_FILE[=messages-option]
1514 -- Specifies the "verbosity" of the parsing of project files.
1515 -- messages-option may be one of the following:
1517 -- DEFAULT (D) No messages are output if there is no error or warning.
1519 -- MEDIUM A small number of messages are output.
1521 -- HIGH A great number of messages are output, most of them not
1522 -- being useful for the user.
1524 S_GCC_Nesting : aliased constant S := "/MAX_NESTING=#" &
1525 "-gnatyL#";
1526 -- /MAX_NESTING=nnn
1528 -- Set maximum level of nesting of constructs (including subprograms,
1529 -- loops, blocks, packages, and conditionals).
1530 -- The level of nesting must not exceed the given value nnn.
1531 -- A value of zero disable this style check (not enabled by default).
1533 S_GCC_Noadc : aliased constant S := "/NO_GNAT_ADC " &
1534 "-gnatA";
1535 -- /NO_GNAT_ADC
1537 -- Cause the compiler to ignore any configuration pragmas file GNAT.ADC
1538 -- in the default directory. Implied by qualifier /PROJECT_FILE.
1539 -- Often used in conjunction with qualifier /CONFIGURATION_PRAGMAS_FILE.
1541 S_GCC_Noload : aliased constant S := "/NOLOAD " &
1542 "-gnatc";
1543 -- /NOLOAD
1545 -- Cause the compiler to operate in semantic check mode with full
1546 -- checking for all illegalities specified in the reference manual, but
1547 -- without generation of any source code (no object or ALI file
1548 -- generated).
1550 -- Since dependent files must be accessed, you must follow the GNAT
1551 -- semantic restrictions on file structuring to operate in this mode:
1553 -- o The needed source files must be accessible.
1554 -- o Each file must contain only one compilation unit.
1555 -- o The file name and unit name must match.
1557 -- The output consists of error messages as appropriate. No object file
1558 -- or ALI file is generated. The checking corresponds exactly to the
1559 -- notion of legality in the Ada reference manual.
1561 -- Any unit can be compiled in semantics-checking-only mode, including
1562 -- units that would not normally be compiled (generic library units,
1563 -- subunits, and specifications where a separate body is present).
1565 S_GCC_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
1566 "-nostdinc";
1567 -- /NOSTD_INCLUDES
1569 -- Do not look in the default directory for source files of the runtime.
1571 S_GCC_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
1572 "-nostdlib";
1573 -- /NOSTD_LIBRARIES
1575 -- Do not look for library files in the system default directory.
1577 S_GCC_Opt : aliased constant S := "/OPTIMIZE=" &
1578 "ALL " &
1579 "-O2,!-O0,!-O1,!-O3 " &
1580 "NONE " &
1581 "-O0,!-O1,!-O2,!-O3 " &
1582 "SOME " &
1583 "-O1,!-O0,!-O2,!-O3 " &
1584 "DEVELOPMENT " &
1585 "-O1,!-O0,!-O2,!-O3 " &
1586 "UNROLL_LOOPS " &
1587 "-funroll-loops " &
1588 "NO_STRICT_ALIASING " &
1589 "-fno-strict-aliasing " &
1590 "INLINING " &
1591 "-O3,!-O0,!-O1,!-O2";
1592 -- /NOOPTIMIZE (D)
1593 -- /OPTIMIZE[=(keyword[,...])]
1595 -- Selects the level of optimization for your program. The supported
1596 -- keywords are as follows:
1598 -- ALL (D) Perform most optimizations, including those that
1599 -- may be expensive.
1601 -- NONE Do not do any optimizations. Same as /NOOPTIMIZE.
1603 -- SOME Perform some optimizations, but omit ones that
1604 -- are costly in compilation time.
1606 -- DEVELOPMENT Same as SOME.
1608 -- INLINING Full optimization, and also attempt automatic inlining
1609 -- of small subprograms within a unit
1611 -- UNROLL_LOOPS Try to unroll loops. This keyword may be specified
1612 -- with any keyword above other than NONE. Loop
1613 -- unrolling usually, but not always, improves the
1614 -- performance of programs.
1616 -- NO_STRICT_ALIASING
1617 -- Suppress aliasing analysis. When optimization is
1618 -- enabled (ALL or SOME above), the compiler assumes
1619 -- that pointers do in fact point to legitimate values
1620 -- of the pointer type (allocated from the proper pool).
1621 -- If this assumption is violated, e.g. by the use of
1622 -- unchecked conversion, then it may be necessary to
1623 -- suppress this assumption using this keyword (which
1624 -- may be specified only in conjunction with any
1625 -- keyword above, other than NONE).
1627 S_GCC_OptX : aliased constant S := "/NOOPTIMIZE " &
1628 "-O0,!-O1,!-O2,!-O3";
1629 -- NODOC (see /OPTIMIZE)
1631 S_GCC_Polling : aliased constant S := "/POLLING " &
1632 "-gnatP";
1633 -- /NOPOLLING (D)
1634 -- /POLLING
1636 -- Enable polling. See the description of pragma Polling in the GNAT
1637 -- Reference Manual for full details.
1639 S_GCC_Project : aliased constant S := "/PROJECT_FILE=<" &
1640 "-P>";
1641 -- /PROJECT_FILE=filename
1643 -- Specifies the main project file to be used. The project files rooted
1644 -- at the main project file will be parsed before the invocation of the
1645 -- compiler. The source and object directories to be searched will be
1646 -- communicated to the compiler through logical names
1647 -- ADA_PRJ_INCLUDE_FILE and ADA_PRJ_OBJECTS_FILE.
1649 S_GCC_Psta : aliased constant S := "/PRINT_STANDARD " &
1650 "-gnatS";
1651 -- /PRINT_STANDARD
1653 -- cause the compiler to output a representation of package Standard
1654 -- in a form very close to standard Ada. It is not quite possible to
1655 -- do this and remain entirely Standard (since new numeric base types
1656 -- cannot be created in standard Ada), but the output is easily
1657 -- readable to any Ada programmer, and is useful to determine the
1658 -- characteristics of target dependent types in package Standard.
1660 S_GCC_Report : aliased constant S := "/REPORT_ERRORS=" &
1661 "VERBOSE " &
1662 "-gnatv " &
1663 "BRIEF " &
1664 "-gnatb " &
1665 "FULL " &
1666 "-gnatf " &
1667 "IMMEDIATE " &
1668 "-gnatdO " &
1669 "DEFAULT " &
1670 "!-gnatb,!-gnatv";
1671 -- /NOREPORT_ERRORS (D)
1672 -- /REPORT_ERRORS[=(keyword[,...])]
1674 -- Change the way errors are reported. The following keywords are
1675 -- supported:
1677 -- VERBOSE (D) Verbose mode. Full error output with source lines
1678 -- to SYS$OUTPUT.
1680 -- BRIEF Generate the brief format error messages to
1681 -- SYS$OUTPUT as well as the verbose format message or
1682 -- full listing.
1684 -- FULL Normally, the compiler suppresses error messages that
1685 -- are likely to be redundant. This keyword causes all
1686 -- error messages to be generated. One particular effect
1687 -- is for the case of references to undefined variables.
1688 -- If a given variable is referenced several times, the
1689 -- normal format of messages produces one error. With
1690 -- FULL, each undefined reference produces a separate
1691 -- error message.
1693 -- IMMEDIATE Normally, the compiler saves up error messages and
1694 -- generates them at the end of compilation in proper
1695 -- sequence. This keyword causes error messages to be
1696 -- generated as soon as they are detected. The use of
1697 -- IMMEDIATE usually causes error messages to be
1698 -- generated out of sequence. Use it when the compiler
1699 -- blows up due to an internal error. In this case, the
1700 -- error messages may be lost. Sometimes blowups are
1701 -- the result of mishandled error messages, so you may
1702 -- want to run with this keyword to determine whether
1703 -- any error messages were generated.
1705 -- DEFAULT Turn off VERBOSE and BRIEF. Same as /NOREPORT_ERRORS.
1707 S_GCC_ReportX : aliased constant S := "/NOREPORT_ERRORS " &
1708 "!-gnatb,!-gnatv";
1709 -- NODOC (see /REPORT_ERRORS)
1711 S_GCC_Repinfo : aliased constant S := "/REPRESENTATION_INFO=" &
1712 "DEFAULT " &
1713 "-gnatR " &
1714 "NONE " &
1715 "-gnatR0 " &
1716 "ARRAYS " &
1717 "-gnatR1 " &
1718 "ARRAYS_FILE " &
1719 "-gnatR1s " &
1720 "OBJECTS " &
1721 "-gnatR2 " &
1722 "OBJECTS_FILE " &
1723 "-gnatR2s " &
1724 "SYMBOLIC " &
1725 "-gnatR3 " &
1726 "SYMBOLIC_FILE " &
1727 "-gnatR3s";
1728 -- /NOREPRESENTATION_INFO (D)
1729 -- /REPRESENTATION_INFO[=(keyword[,...])]
1731 -- This qualifier controls output from the compiler of a listing showing
1732 -- representation information for declared types and objects.
1734 -- ARRAYS (D) Size and alignment information is listed for
1735 -- declared array and record types.
1737 -- ARRAYS_FILE Similar to ARRAYS, but the output is to a file
1738 -- with the name 'file_rep' where 'file' is the name
1739 -- of the corresponding source file.
1741 -- NONE no information is output (equivalent to omitting
1742 -- the /REPRESENTATION_INFO qualifiers).
1744 -- OBJECTS Size and alignment information is listed for all
1745 -- declared types and objects.
1747 -- OBJECTS_FILE Similar to OBJECTS, but the output is to a file
1748 -- with the name 'file_rep' where 'file' is the name
1749 -- of the corresponding source file.
1751 -- SYMBOLIC Symbolic expression information for values that
1752 -- are computed at run time for variant records.
1754 -- SYMBOLIC_FILE Similar to SYMBOLIC, but the output is to a file
1755 -- with the name 'file_rep' where 'file' is the name
1756 -- of the corresponding source file.
1758 -- DEFAULT Equivalent to ARRAYS.
1760 S_GCC_RepinfX : aliased constant S := "/NOREPRESENTATION_INFO " &
1761 "!-gnatR";
1762 -- NODOC (see /REPRESENTATION_INFO)
1764 S_GCC_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
1765 "--RTS=|";
1766 -- /RUNTIME_SYSTEM=xxx
1768 -- Build against an alternate runtime system named xxx or RTS-xxx.
1770 S_GCC_Search : aliased constant S := "/SEARCH=*" &
1771 "-I*";
1772 -- /SEARCH=(directory[,...])
1774 -- When looking for source files also look in directories specified.
1776 S_GCC_Style : aliased constant S := "/STYLE_CHECKS=" &
1777 "ALL_BUILTIN " &
1778 "-gnaty " &
1779 "1 " &
1780 "-gnaty1 " &
1781 "2 " &
1782 "-gnaty2 " &
1783 "3 " &
1784 "-gnaty3 " &
1785 "4 " &
1786 "-gnaty4 " &
1787 "5 " &
1788 "-gnaty5 " &
1789 "6 " &
1790 "-gnaty6 " &
1791 "7 " &
1792 "-gnaty7 " &
1793 "8 " &
1794 "-gnaty8 " &
1795 "9 " &
1796 "-gnaty9 " &
1797 "ATTRIBUTE " &
1798 "-gnatya " &
1799 "BLANKS " &
1800 "-gnatyb " &
1801 "COMMENTS " &
1802 "-gnatyc " &
1803 "END " &
1804 "-gnatye " &
1805 "VTABS " &
1806 "-gnatyf " &
1807 "GNAT " &
1808 "-gnatg " &
1809 "HTABS " &
1810 "-gnatyh " &
1811 "IF_THEN " &
1812 "-gnatyi " &
1813 "KEYWORD " &
1814 "-gnatyk " &
1815 "LAYOUT " &
1816 "-gnatyl " &
1817 "LINE_LENGTH " &
1818 "-gnatym " &
1819 "NONE " &
1820 "-gnatyN " &
1821 "STANDARD_CASING " &
1822 "-gnatyn " &
1823 "ORDERED_SUBPROGRAMS " &
1824 "-gnatyo " &
1825 "NONE " &
1826 "!-gnatg,!-gnaty* " &
1827 "PRAGMA " &
1828 "-gnatyp " &
1829 "REFERENCES " &
1830 "-gnatyr " &
1831 "SPECS " &
1832 "-gnatys " &
1833 "TOKEN " &
1834 "-gnatyt " &
1835 "XTRA_PARENS " &
1836 "-gnatyx ";
1837 -- /NOSTYLE_CHECKS (D)
1838 -- /STYLE_CHECKS[=(keyword,[...])]
1840 -- Normally, GNAT permits any code layout consistent with the reference
1841 -- manual requirements. This qualifier imposes style checking on the
1842 -- input source code. The following keywords are supported:
1844 -- ALL_BUILTIN (D) Equivalent to the following list of options:
1845 -- 3, ATTRIBUTE, BLANKS, COMMENTS, END, VTABS,
1846 -- HTABS, IF_THEN, KEYWORD, LAYOUT, LINE_LENGTH,
1847 -- PRAGMA, REFERENCES, SPECS, TOKEN.
1849 -- 1 .. 9 Specify indentation level from 1 to 9.
1850 -- The general style of required indentation is as
1851 -- specified by the examples in the Ada Reference
1852 -- Manual. Full line comments must be aligned with
1853 -- the -- starting on a column that is a multiple
1854 -- of the alignment level.
1856 -- ATTRIBUTE Check attribute casing.
1857 -- Attribute names, including the case of keywords
1858 -- such as digits used as attributes names,
1859 -- must be written in mixed case, that is,
1860 -- the initial letter and any letter following an
1861 -- underscore must be uppercase.
1862 -- All other letters must be lowercase.
1864 -- BLANKS Blanks not allowed at statement end.
1865 -- Trailing blanks are not allowed at the end of
1866 -- statements. The purpose of this rule, together
1867 -- with option HTABS (no horizontal tabs), is to
1868 -- enforce a canonical format for the use of
1869 -- blanks to separate source tokens.
1871 -- COMMENTS Check comments.
1872 -- Comments must meet the following set of rules:
1874 -- * The "--" that starts the column must either
1875 -- start in column one, or else at least one
1876 -- blank must precede this sequence.
1878 -- * Comments that follow other tokens on a line
1879 -- must have at least one blank following the
1880 -- "--" at the start of the comment.
1882 -- * Full line comments must have two blanks
1883 -- following the "--" that starts the comment,
1884 -- with the following exceptions.
1886 -- * A line consisting only of the "--"
1887 -- characters, possibly preceded by blanks is
1888 -- permitted.
1890 -- * A comment starting with "--x" where x is
1891 -- a special character is permitted. This
1892 -- allows proper processing of the output
1893 -- generated by specialized tools including
1894 -- gnatprep (where --! is used) and the SPARK
1895 -- annnotation language (where --# is used).
1896 -- For the purposes of this rule, a special
1897 -- character is defined as being in one of the
1898 -- ASCII ranges 16#21#..16#2F# or
1899 -- 16#3A#..16#3F#.
1901 -- * A line consisting entirely of minus signs,
1902 -- possibly preceded by blanks, is permitted.
1903 -- This allows the construction of box
1904 -- comments where lines of minus signs are
1905 -- used to form the top and bottom of the box.
1907 -- * If a comment starts and ends with "--" is
1908 -- permitted as long as at least one blank
1909 -- follows the initial "--". Together with
1910 -- the preceding rule, this allows the
1911 -- construction of box comments, as shown in
1912 -- the following example:
1914 -- ---------------------------
1915 -- -- This is a box comment --
1916 -- ---------------------------
1918 -- END Check end/exit labels.
1919 -- Optional labels on end statements ending
1920 -- subprograms and on exit statements exiting
1921 -- named loops, are required to be present.
1923 -- GNAT Enforces a set of style conventions that
1924 -- correspond to the style used in the GNAT
1925 -- source code. All compiler units are always
1926 -- compile with this keyword specified.
1928 -- You can find the full documentation for the
1929 -- style conventions imposed by this keyword
1930 -- in the body of the package "Style" in the
1931 -- compiler sources.
1933 -- You should not normally use this keyword.
1934 -- However, you MUST use it for compiling any
1935 -- language-defined unit, or for adding children
1936 -- to any language-defined unit other than
1937 -- "Standard".
1939 -- HTABS No horizontal tabs.
1940 -- Horizontal tab characters are not permitted in
1941 -- the source text. Together with the BLANKS
1942 -- (no blanks at end of line) option, this
1943 -- enforces a canonical form for the use of blanks
1944 -- to separate source tokens.
1946 -- IF_THEN Check if-then layout.
1947 -- The keyword then must appear either on the
1948 -- same line as the corresponding if, or on a line
1949 -- on its own, lined up under the if with at least
1950 -- one non-blank line in between containing all or
1951 -- part of the condition to be tested.
1953 -- KEYWORD Check keyword casing.
1954 -- All keywords must be in lower case (with the
1955 -- exception of keywords such as digits used as
1956 -- attribute names to which this check does not
1957 -- apply).
1959 -- LAYOUT Check layout.
1960 -- Layout of statement and declaration constructs
1961 -- must follow the recommendations in the Ada
1962 -- Reference Manual, as indicated by the form of
1963 -- the syntax rules. For example an else keyword
1964 -- must be lined up with the corresponding if
1965 -- keyword.
1967 -- There are two respects in which the style rule
1968 -- enforced by this check option are more liberal
1969 -- than those in the Ada Reference Manual.
1970 -- First in the case of record declarations,
1971 -- it is permissible to put the record keyword on
1972 -- the same line as the type keyword, and then
1973 -- the end in end record must line up under type.
1974 -- For example, either of the following two
1975 -- layouts is acceptable:
1977 -- type q is record
1978 -- a : integer;
1979 -- b : integer;
1980 -- end record;
1982 -- type q is
1983 -- record
1984 -- a : integer;
1985 -- b : integer;
1986 -- end record;
1988 -- Second, in the case of a block statement,
1989 -- a permitted alternative is to put the block
1990 -- label on the same line as the declare or begin
1991 -- keyword, and then line the end keyword up under
1992 -- the block label. For example both the following
1993 -- are permitted:
1997 -- Block : declare
1998 -- A : Integer := 3;
1999 -- begin
2000 -- Proc (A, A);
2001 -- end Block;
2003 -- Block :
2004 -- declare
2005 -- A : Integer := 3;
2006 -- begin
2007 -- Proc (A, A);
2008 -- end Block;
2010 -- The same alternative format is allowed for
2011 -- loops. For example, both of the following are
2012 -- permitted:
2016 -- Clear : while J < 10 loop
2017 -- A (J) := 0;
2018 -- end loop Clear;
2020 -- Clear :
2021 -- while J < 10 loop
2022 -- A (J) := 0;
2023 -- end loop Clear;
2027 -- LINE_LENGTH Check maximum line length.
2028 -- The length of source lines must not exceed 79
2029 -- characters, including any trailing blanks
2030 -- The value of 79 allows convenient display on
2031 -- an 80 character wide device or window, allowing
2032 -- for possible special treatment of 80 character
2033 -- lines.
2035 -- NONE Clear any previously set style checks.
2037 -- ORDERED_SUBPROGRAMS Check order of subprogram bodies.
2038 -- All subprogram bodies in a given scope (e.g.
2039 -- a package body) must be in alphabetical order.
2040 -- The ordering rule uses normal Ada rules for
2041 -- comparing strings, ignoring casing of letters,
2042 -- except that if there is a trailing numeric
2043 -- suffix, then the value of this suffix is used
2044 -- in the ordering (e.g. Junk2 comes before
2045 -- Junk10).
2047 -- NONE The default behavior. Same as /NOSTYLE_CHECKS.
2049 -- PRAGMA Check pragma casing.
2050 -- Pragma names must be written in mixed case,
2051 -- that is, the initial letter and any letter
2052 -- following an underscore must be uppercase.
2053 -- All other letters must be lowercase.
2055 -- REFERENCES Check references.
2056 -- All identifier references must be cased in the
2057 -- same way as the corresponding declaration.
2058 -- No specific casing style is imposed on
2059 -- identifiers. The only requirement is for
2060 -- consistency of references with declarations.
2062 -- RM_COLUMN_LAYOUT Enforce the layout conventions suggested by
2063 -- the examples and syntax rules of the Ada
2064 -- Language Reference Manual. For example, an
2065 -- "else" must line up with an "if" and code in
2066 -- the "then" and "else" parts must be indented.
2067 -- The compiler considers violations of the
2068 -- layout rules a syntax error if you specify
2069 -- this keyword.
2071 -- SPECS Check separate specs.
2072 -- Separate declarations ("specs") are required
2073 -- for subprograms (a body is not allowed to serve
2074 -- as its own declaration). The only exception is
2075 -- that parameterless library level procedures are
2076 -- not required to have a separate declaration.
2077 -- This exception covers the most frequent form of
2078 -- main program procedures.
2080 -- STANDARD_CASING Check casing of entities in Standard.
2081 -- Any identifier from Standard must be cased to
2082 -- match the presentation in the Ada Reference
2083 -- Manual (for example, Integer and ASCII.NUL).
2085 -- TOKEN Check token spacing.
2086 -- The following token spacing rules are enforced:
2088 -- * The keywords abs and not must be followed
2089 -- by a space.
2091 -- * The token => must be surrounded by spaces.
2093 -- * The token <> must be preceded by a space or
2094 -- a left parenthesis.
2096 -- * Binary operators other than ** must be
2097 -- surrounded by spaces. There is no
2098 -- restriction on the layout of the ** binary
2099 -- operator.
2101 -- * Colon must be surrounded by spaces.
2103 -- * Colon-equal (assignment) must be surrounded
2104 -- by spaces.
2106 -- * Comma must be the first non-blank character
2107 -- on the line, or be immediately preceded by
2108 -- a non-blank character, and must be followed
2109 -- by a space.
2111 -- * If the token preceding a left paren ends
2112 -- with a letter or digit, then a space must
2113 -- separate the two tokens.
2115 -- * A right parenthesis must either be the
2116 -- first non-blank character on a line, or it
2117 -- must be preceded by a non-blank character.
2119 -- * A semicolon must not be preceded by
2120 -- a space, and must not be followed by
2121 -- a non-blank character.
2123 -- * A unary plus or minus may not be followed
2124 -- by a space.
2126 -- * A vertical bar must be surrounded by
2127 -- spaces.
2129 -- In the above rules, appearing in column one is
2130 -- always permitted, that is, counts as meeting
2131 -- either a requirement for a required preceding
2132 -- space, or as meeting a requirement for no
2133 -- preceding space.
2135 -- Appearing at the end of a line is also always
2136 -- permitted, that is, counts as meeting either
2137 -- a requirement for a following space,
2138 -- or as meeting a requirement for no following
2139 -- space.
2141 -- VTABS No form feeds or vertical tabs.
2142 -- Form feeds or vertical tab characters are not
2143 -- permitted in the source text.
2145 S_GCC_StyleX : aliased constant S := "/NOSTYLE_CHECKS " &
2146 "!-gnatg,!-gnaty*";
2147 -- NODOC (see /STYLE_CHECKS)
2149 S_GCC_Symbol : aliased constant S := "/SYMBOL_PREPROCESSING=" & '"' &
2150 "-gnateD" & '"';
2151 -- /SYMBOL_PREPROCESSING="symbol=value"
2153 -- Define or redefine a preprocessing symbol, associated with value.
2154 -- If "=value" is not specified, then the value of the symbol is True.
2155 -- A symbol is an identifier, following normal Ada (case-insensitive)
2156 -- rules for its syntax, and value is any sequence (including an empty
2157 -- sequence) of characters from the set (letters, digits, period,
2158 -- underline). Ada reserved words may be used as symbols, with the
2159 -- exceptions of "if", "else", "elsif", "end", "and", "or" and "then".
2161 -- A symbol declared with this qualifier on the command line replaces
2162 -- a symbol with the same name either in a definition file or specified
2163 -- with a switch -D in the preprocessor data file.
2165 -- This qualifier is similar to qualifier /ASSOCIATE of
2166 -- GNAT PREPROCESSING.
2168 S_GCC_Syntax : aliased constant S := "/SYNTAX_ONLY " &
2169 "-gnats";
2170 -- /NOSYNTAX_ONLY (D)
2171 -- /SYNTAX_ONLY
2173 -- Run GNAT in syntax checking only mode. You can check a series of
2174 -- files in a single command, and can use wild cards to specify such a
2175 -- group of files.
2177 -- You may use other qualifiers in conjunction with this qualifier. In
2178 -- particular, /LIST and /REPORT_ERRORS=VERBOSE are useful to control the
2179 -- format of any generated error messages.
2181 -- The output is simply the error messages, if any. No object file or ALI
2182 -- file is generated by a syntax-only compilation. Also, no units other
2183 -- than the one specified are accessed. For example, if a unit "X" with's
2184 -- a unit "Y", compiling unit "X" in syntax check only mode does not
2185 -- access the source file containing unit "Y".
2187 -- Normally, GNAT allows only a single unit in a source file. However,
2188 -- this restriction does not apply in syntax-check-only mode, and it is
2189 -- possible to check a file containing multiple compilation units
2190 -- concatenated together. This is primarily used by the GNAT CHOP
2191 -- command.
2193 S_GCC_Table : aliased constant S := "/TABLE_MULTIPLIER=#" &
2194 "-gnatT#";
2195 -- /TABLE_MULTIPLIER=nnn
2197 -- All compiler tables start at nnn times usual starting size.
2199 S_GCC_Trace : aliased constant S := "/TRACE_UNITS " &
2200 "-gnatdc";
2201 -- /TRACE_UNITS
2202 -- /NOTRACE_UNITS
2204 -- This switch that does for the frontend what /VERBOSE does for the
2205 -- backend. The system prints the name of each unit, either a compilation
2206 -- unit or nested unit, as it is being analyzed.
2208 S_GCC_Tree : aliased constant S := "/TREE_OUTPUT " &
2209 "-gnatt";
2210 -- /TREE_OUTPUT
2211 -- /NOTREE_OUTPUT
2213 -- Cause GNAT to write the internal tree for a unit to a file (with the
2214 -- filetype ATB for a body or ATS for a spec). This is not normally
2215 -- required, but is used by separate analysis tools. Typically these
2216 -- tools do the necessary compilations automatically, so you should never
2217 -- have to specify this switch in normal operation.
2219 S_GCC_Trys : aliased constant S := "/TRY_SEMANTICS " &
2220 "-gnatq";
2221 -- /TRY_SEMANTICS
2222 -- /NOTRY_SEMANTICS
2224 -- In normal operation mode the compiler first parses the program and
2225 -- determines if there are any syntax errors. If there are, appropriate
2226 -- error messages are generated and compilation is immediately
2227 -- terminated. This qualifier tells GNAT to continue with semantic
2228 -- analysis even if syntax errors have been found. This may enable the
2229 -- detection of more errors in a single run. On the other hand, the
2230 -- semantic analyzer is more likely to encounter some internal fatal
2231 -- error when given a syntactically invalid tree.
2233 S_GCC_Units : aliased constant S := "/UNITS_LIST " &
2234 "-gnatu";
2235 -- /NOUNITS_LIST (D)
2236 -- /UNITS_LIST
2238 -- Print a list of units required by this compilation on SYS$OUTPUT. The
2239 -- listing includes all units on which the unit being compiled depends
2240 -- either directly or indirectly.
2242 S_GCC_Unique : aliased constant S := "/UNIQUE_ERROR_TAG " &
2243 "-gnatU";
2244 -- /NOUNIQUE_ERROR_TAG (D)
2245 -- /UNIQUE_ERROR_TAG
2247 -- Tag compiler error messages with the string "error: ".
2249 S_GCC_Upcase : aliased constant S := "/UPPERCASE_EXTERNALS " &
2250 "-gnatF";
2251 -- /NOUPPERCASE_EXTERNALS (D)
2252 -- /UPPERCASE_EXTERNALS
2254 -- Fold default and explicit external names in pragmas Import and Export
2255 -- to uppercase for compatibility with the default behavior of DEC C.
2257 S_GCC_Valid : aliased constant S := "/VALIDITY_CHECKING=" &
2258 "DEFAULT " &
2259 "-gnatVd " &
2260 "NODEFAULT " &
2261 "-gnatVD " &
2262 "COPIES " &
2263 "-gnatVc " &
2264 "NOCOPIES " &
2265 "-gnatVC " &
2266 "FLOATS " &
2267 "-gnatVf " &
2268 "NOFLOATS " &
2269 "-gnatVF " &
2270 "IN_PARAMS " &
2271 "-gnatVi " &
2272 "NOIN_PARAMS " &
2273 "-gnatVI " &
2274 "MOD_PARAMS " &
2275 "-gnatVm " &
2276 "NOMOD_PARAMS " &
2277 "-gnatVM " &
2278 "OPERANDS " &
2279 "-gnatVo " &
2280 "NOOPERANDS " &
2281 "-gnatVO " &
2282 "PARAMETERS " &
2283 "-gnatVp " &
2284 "NOPARAMETERS " &
2285 "-gnatVP " &
2286 "RETURNS " &
2287 "-gnatVr " &
2288 "NORETURNS " &
2289 "-gnatVR " &
2290 "SUBSCRIPTS " &
2291 "-gnatVs " &
2292 "NOSUBSCRIPTS " &
2293 "-gnatVS " &
2294 "TESTS " &
2295 "-gnatVt " &
2296 "NOTESTS " &
2297 "-gnatVT " &
2298 "ALL " &
2299 "-gnatVa " &
2300 "NONE " &
2301 "-gnatVn";
2302 -- /VALIDITY_CHECKING[=(keyword,[...])]
2304 -- Control level of validity checking.
2306 -- DEFAULT (D) In this mode checks are made to prevent
2307 -- erroneous behavior in accordance with the RM.
2308 -- Notably extra checks may be needed for case
2309 -- statements and subscripted array assignments.
2311 -- NONE No special checks for invalid values are
2312 -- performed. This means that references to
2313 -- uninitialized variables can cause erroneous
2314 -- behavior from constructs like case statements
2315 -- and subscripted array assignments. In this
2316 -- mode, invalid values can lead to erroneous
2317 -- behavior.
2319 -- FULL Every assignment is checked for validity, so
2320 -- that it is impossible to assign invalid values.
2321 -- The RM specifically allows such assignments,
2322 -- but in this mode, invalid values can never be
2323 -- assigned, and an attempt to perform such an
2324 -- assignment immediately raises Constraint_Error.
2325 -- This behavior is allowed (but not required) by
2326 -- the RM. This mode is intended as a debugging aid,
2327 -- and may be useful in helping to track down
2328 -- uninitialized variables. It may be useful to
2329 -- use this in conjunction with the Normalize_Scalars
2330 -- pragma which attempts to initialize with invalid
2331 -- values where possible.
2333 S_GCC_Verbose : aliased constant S := "/VERBOSE " &
2334 "-v";
2335 -- /VERBOSE
2336 -- /NOVERBOSE
2338 -- Show commands generated by the GCC driver. Normally used only for
2339 -- debugging purposes or if you need to be sure what version of the
2340 -- compiler you are executing.
2342 S_GCC_Verb_Asm : aliased constant S := "/VERBOSE_ASM " &
2343 "-S,-verbose_asm,!-c";
2344 -- /NOASM (D)
2345 -- /ASM
2347 -- Use to cause the assembler source file to be generated, using S as the
2348 -- filetype, instead of the object file. This may be useful if you need
2349 -- to examine the generated assembly code.
2351 S_GCC_Warn : aliased constant S := "/WARNINGS=" &
2352 "DEFAULT " &
2353 "!-gnatws,!-gnatwe " &
2354 "ALL " &
2355 "-gnatwa " &
2356 "NOALL " &
2357 "-gnatwA " &
2358 "ALL_GCC " &
2359 "-Wall " &
2360 "CONDITIONALS " &
2361 "-gnatwc " &
2362 "NOCONDITIONALS " &
2363 "-gnatwC " &
2364 "CONSTANT_VARIABLES " &
2365 "-gnatwk " &
2366 "NOCONSTANT_VARIABLES " &
2367 "-gnatwK " &
2368 "IMPLICIT_DEREFERENCE " &
2369 "-gnatwd " &
2370 "NO_IMPLICIT_DEREFERENCE " &
2371 "-gnatwD " &
2372 "ELABORATION " &
2373 "-gnatwl " &
2374 "NOELABORATION " &
2375 "-gnatwL " &
2376 "ERRORS " &
2377 "-gnatwe " &
2378 "HIDING " &
2379 "-gnatwh " &
2380 "NOHIDING " &
2381 "-gnatwH " &
2382 "IMPLEMENTATION " &
2383 "-gnatwi " &
2384 "NOIMPLEMENTATION " &
2385 "-gnatwI " &
2386 "INEFFECTIVE_INLINE " &
2387 "-gnatwp " &
2388 "NOINEFFECTIVE_INLINE " &
2389 "-gnatwP " &
2390 "MODIFIED_UNREF " &
2391 "-gnatwm " &
2392 "NOMODIFIED_UNREF " &
2393 "-gnatwM " &
2394 "OPTIONAL " &
2395 "-gnatwa " &
2396 "NOOPTIONAL " &
2397 "-gnatwA " &
2398 "NORMAL " &
2399 "-gnatwn " &
2400 "OBSOLESCENT " &
2401 "-gnatwj " &
2402 "NOOBSOLESCENT " &
2403 "-gnatwJ " &
2404 "OVERLAYS " &
2405 "-gnatwo " &
2406 "NOOVERLAYS " &
2407 "-gnatwO " &
2408 "REDUNDANT " &
2409 "-gnatwr " &
2410 "NOREDUNDANT " &
2411 "-gnatwR " &
2412 "SUPPRESS " &
2413 "-gnatws " &
2414 "UNINITIALIZED " &
2415 "-Wuninitialized " &
2416 "UNREFERENCED_FORMALS " &
2417 "-gnatwf " &
2418 "NOUNREFERENCED_FORMALS " &
2419 "-gnatwF " &
2420 "UNRECOGNIZED_PRAGMAS " &
2421 "-gnatwg " &
2422 "NOUNRECOGNIZED_PRAGMAS " &
2423 "-gnatwG " &
2424 "UNUSED " &
2425 "-gnatwu " &
2426 "NOUNUSED " &
2427 "-gnatwU " &
2428 "VARIABLES_UNINITIALIZED " &
2429 "-gnatwv " &
2430 "NOVARIABLES_UNINITIALIZED " &
2431 "-gnatwV " &
2432 "IMPORT_EXPORT_PRAGMAS " &
2433 "-gnatwx " &
2434 "NOIMPORT_EXPORT_PRAGMAS " &
2435 "-gnatwX " &
2436 "UNCHECKED_CONVERSIONS " &
2437 "-gnatwz " &
2438 "NOUNCHECKED_CONVERSIONS " &
2439 "-gnatwZ";
2440 -- /NOWARNINGS
2442 -- Suppress the output of all warning messages from the GNAT front end.
2443 -- Note that it does not suppress warnings from the gcc back end.
2445 -- /WARNINGS[=(keyword[,...])]
2447 -- In addition to error messages, corresponding to illegalities as
2448 -- defined in the reference manual, the compiler detects two kinds of
2449 -- warning situations. First, the compiler considers some constructs
2450 -- suspicious and generates a warning message to alert you to a possible
2451 -- error. Second, if the compiler detects a situation that is sure to
2452 -- raise an exception at runtime, it generates a warning message.
2454 -- You may specify the following keywords to change this behavior:
2456 -- DEFAULT (D) The default behavior above.
2458 -- ALL Activate all optional warnings.
2459 -- Activates most optional warning messages,
2460 -- see remaining list in this section for
2461 -- details on optional warning messages that
2462 -- can be individually controlled.
2463 -- The warnings that are not turned on by
2464 -- this option are BIASED_ROUNDING,
2465 -- IMPLICIT_DEREFERENCE, HIDING and
2466 -- ELABORATION. All other optional Ada
2467 -- warnings are turned on.
2469 -- NOALL Suppress all optional errors.
2470 -- Suppresses all optional warning messages
2471 -- that can be activated by option ALL.
2473 -- ALL_GCC Request additional messages from the GCC
2474 -- backend. Most of these are not relevant
2475 -- to Ada.
2477 -- CONDITIONALS Activate warnings for conditional
2478 -- Expressions used in tests that are known
2479 -- to be True or False at compile time. The
2480 -- default is that such warnings are not
2481 -- generated.
2483 -- NOCONDITIONALS Suppress warnings for conditional
2484 -- expressions used in tests that are known
2485 -- to be True or False at compile time.
2487 -- IMPLICIT_DEREFERENCE Activate warnings on implicit dereferencing.
2488 -- The use of a prefix of an access type in an
2489 -- indexed component, slice, or selected component
2490 -- without an explicit .all will generate
2491 -- a warning. With this warning enabled, access
2492 -- checks occur only at points where an explicit
2493 -- .all appears in the source code (assuming no
2494 -- warnings are generated as a result of this
2495 -- option). The default is that such warnings are
2496 -- not generated. Note that /WARNINGS=ALL does not
2497 -- affect the setting of this warning option.
2499 -- NOIMPLICIT_DEREFERENCE Suppress warnings on implicit dereferencing.
2500 -- in indexed components, slices, and selected
2501 -- components.
2503 -- ELABORATION Activate warnings on missing pragma
2504 -- Elaborate_All statements. The default is
2505 -- that such warnings are not generated.
2507 -- NOELABORATION Suppress warnings on missing pragma
2508 -- Elaborate_All statements.
2510 -- ERRORS Warning messages are to be treated as errors.
2511 -- The warning string still appears, but the
2512 -- warning messages are counted as errors, and
2513 -- prevent the generation of an object file.
2515 -- HIDING Activate warnings on hiding declarations.
2516 -- A declaration is considered hiding if it is
2517 -- for a non-overloadable entity, and it declares
2518 -- an entity with the same name as some other
2519 -- entity that is directly or use-visible. The
2520 -- default is that such warnings are not
2521 -- generated.
2523 -- NOHIDING Suppress warnings on hiding declarations.
2525 -- IMPLEMENTATION Activate warnings for a with of an internal
2526 -- GNAT implementation unit, defined as any unit
2527 -- from the Ada, Interfaces, GNAT, DEC or
2528 -- System hierarchies that is not documented in
2529 -- either the Ada Reference Manual or the GNAT
2530 -- Programmer's Reference Manual. Such units are
2531 -- intended only for internal implementation
2532 -- purposes and should not be with'ed by user
2533 -- programs. The default is that such warnings
2534 -- are generated.
2536 -- NOIMPLEMENTATION Disables warnings for a with of an internal
2537 -- GNAT implementation unit.
2539 -- INEFFECTIVE_INLINE Activate warnings on ineffective pragma Inlines
2540 -- Activates warnings for failure of front end
2541 -- inlining (activated by /INLINE=FULL) to inline
2542 -- a particular call. There are many reasons for
2543 -- not being able to inline a call, including most
2544 -- commonly that the call is too complex to
2545 -- inline. This warning can also be turned on
2546 -- using /INLINE=FULL.
2548 -- NOINEFFECTIVE_INLINE Suppress warnings on ineffective pragma Inlines
2549 -- Suppresses warnings on ineffective pragma
2550 -- Inlines. If the inlining mechanism cannot
2551 -- inline a call, it will simply ignore the
2552 -- request silently.
2554 -- MODIFIED_UNREF Activates warnings for variables that are
2555 -- assigned (using an initialization value or with
2556 -- one or more assignment statements) but whose
2557 -- value is never read. The warning is suppressed
2558 -- for volatile variables and also for variables
2559 -- that are renamings of other variables or for
2560 -- which an address clause is given. This warning
2561 -- can also be turned on using /WARNINGS/OPTIONAL.
2563 -- NOMODIFIED_UNREF Disables warnings for variables that are
2564 -- assigned or initialized, but never read.
2566 -- NORMAL Sets normal warning mode, in which enabled
2567 -- warnings are issued and treated as warnings
2568 -- rather than errors. This is the default mode.
2569 -- It can be used to cancel the effect of an
2570 -- explicit /WARNINGS=SUPPRESS or
2571 -- /WARNINGS=ERRORS. It also cancels the effect
2572 -- of the implicit /WARNINGS=ERRORS that is
2573 -- activated by the use of /STYLE=GNAT.
2575 -- OBSOLESCENT Activates warnings for calls to subprograms
2576 -- marked with pragma Obsolescent and for use of
2577 -- features in Annex J of the Ada Reference
2578 -- Manual. In the case of Annex J, not all
2579 -- features are flagged. In particular use of the
2580 -- renamed packages (like Text_IO), use of package
2581 -- ASCII and use of the attribute 'Constrained are
2582 -- not flagged, since these are very common and
2583 -- would generate many annoying positive warnings.
2584 -- The default is that such warnings are not
2585 -- generated.
2587 -- NOOBSOLESCENT Disables warnings on use of obsolescent
2588 -- features.
2590 -- OPTIONAL Activate all optional warning messages.
2591 -- See other options under this qualifier
2592 -- for details on optional warning messages
2593 -- that can be individually controlled. The
2594 -- one exception is that /WARNINGS=OPTIONAL
2595 -- doesn't activate warnings for hiding
2596 -- variables (/WARNINGS=HIDING), so if this
2597 -- warning is required it must be explicitly
2598 -- set.
2600 -- NOOPTIONAL Suppress all optional warning messages.
2601 -- See other options under this qualifier
2602 -- for details on optional warning messages
2603 -- that can be individually controlled.
2605 -- OVERLAYS Activate warnings for possibly unintended
2606 -- initialization effects of defining address
2607 -- clauses that cause one variable to overlap
2608 -- another. The default is that such warnings
2609 -- are generated.
2611 -- NOOVERLAYS Suppress warnings on possibly unintended
2612 -- initialization effects of defining address
2613 -- clauses that cause one variable to overlap
2614 -- another.
2616 -- REDUNDANT Activate warnings for redundant constructs.
2617 -- In particular assignments of a variable to
2618 -- itself, and a type conversion that converts
2619 -- an object to its own type. The default
2620 -- is that such warnings are not generated.
2622 -- NOREDUNDANT Suppress warnings for redundant constructs.
2624 -- SUPPRESS Completely suppresse the output of all warning
2625 -- messages. Same as /NOWARNINGS.
2627 -- UNCHECKED_CONVERSIONS Activates warnings on unchecked conversions.
2628 -- Causes warnings to be generated for
2629 -- unchecked conversions when the two types are
2630 -- known at compile time to have different sizes.
2631 -- The default is that such warnings are
2632 -- generated.
2634 -- NOUNCHECKED_CONVERSIONS Suppress warnings for unchecked conversions.
2636 -- UNINITIALIZED Generate warnings for uninitialized variables.
2637 -- This is a GCC option, not an Ada option.
2638 -- You must also specify the /OPTIMIZE qualifier
2639 -- with a value other than NONE (in other words,
2640 -- this keyword works only if optimization is
2641 -- turned on).
2643 -- UNREFERENCED_FORMALS Activate warnings on unreferenced formals.
2644 -- Causes a warning to be generated if a formal
2645 -- parameter is not referenced in the body of
2646 -- the subprogram. This warning can also be turned
2647 -- on using option ALL or UNUSED.
2649 -- NOUNREFERENCED_FORMALS Suppress warnings on unreferenced formals.
2650 -- Suppresses warnings for unreferenced formal
2651 -- parameters. Note that the combination UNUSED
2652 -- followed by NOUNREFERENCED_FORMALS has the
2653 -- effect of warning on unreferenced entities
2654 -- other than subprogram formals.
2656 -- UNUSED Activates warnings to be generated for entities
2657 -- that are defined but not referenced, and for
2658 -- units that are with'ed and not referenced. In
2659 -- the case of packages, a warning is also
2660 -- generated if no entities in the package are
2661 -- referenced. This means that if the package
2662 -- is referenced but the only references are in
2663 -- use clauses or renames declarations, a warning
2664 -- is still generated. A warning is also generated
2665 -- for a generic package that is with'ed but never
2666 -- instantiated. In the case where a package or
2667 -- subprogram body is compiled, and there is a
2668 -- with on the corresponding spec that is only
2669 -- referenced in the body, a warning is also
2670 -- generated, noting that the with can be moved
2671 -- to the body. The default is that such warnings
2672 -- are not generated.
2674 -- NOUNUSED Suppress warnings for unused entities and
2675 -- packages.
2677 -- VARIABLES_UNINITIALIZED Activates warnings on unassigned variables.
2678 -- Causes warnings to be generated when a variable
2679 -- is accessed which may not be properly
2680 -- uninitialized.
2681 -- The default is that such warnings are
2682 -- generated.
2684 -- NOVARIABLES_UNINITIALIZED Suppress warnings for uninitialized
2685 -- variables.
2687 S_GCC_WarnX : aliased constant S := "/NOWARNINGS " &
2688 "-gnatws";
2689 -- NODOC (see /WARNINGS)
2691 S_GCC_No_Back : aliased constant S := "/NO_BACK_END_WARNINGS " &
2692 "-w";
2693 -- /NO_BACK_END_WARNINGS
2695 -- Inhibit all warning messages of the GCC back-end.
2697 S_GCC_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" &
2698 "BRACKETS " &
2699 "-gnatWb " &
2700 "NONE " &
2701 "-gnatWn " &
2702 "HEX " &
2703 "-gnatWh " &
2704 "UPPER " &
2705 "-gnatWu " &
2706 "SHIFT_JIS " &
2707 "-gnatWs " &
2708 "UTF8 " &
2709 "-gnatW8 " &
2710 "EUC " &
2711 "-gnatWe";
2712 -- /NOWIDE_CHARACTER_ENCODING (D)
2713 -- /WIDE_CHARACTER_ENCODING[=encode-type]
2715 -- Specifies the mechanism used to encode wide characters. 'encode-type'
2716 -- is one of the following:
2718 -- BRACKETS (D) A wide character is encoded as ["xxxx"] where XXXX
2719 -- are four hexadecimal digits representing the coding
2720 -- ('Pos value) of the character in type
2721 -- Wide_Character. The hexadecimal digits may use upper
2722 -- or lower case letters.
2724 -- This notation can also be used for upper half
2725 -- Character values using the format ["xx"] where XX is
2726 -- two hexadecimal digits representing the coding ('Pos
2727 -- value) of the character in type Character (or
2728 -- Wide_Character). The hexadecimal digits may use upper
2729 -- of lower case.
2731 -- NONE No wide characters are allowed. Same
2732 -- as /NOWIDE_CHARCTER_ENCODING.
2734 -- HEX In this encoding, a wide character is represented by
2735 -- the following five character sequence: ESC a b c d
2736 -- Where 'a', 'b', 'c', and 'd' are the four hexadecimal
2737 -- characters (using uppercase letters) of the wide
2738 -- character code. For example, ESC A345 is used to
2739 -- represent the wide character with code 16#A345#. This
2740 -- scheme is compatible with use of the full
2741 -- Wide_Character set.
2743 -- UPPER The wide character with encoding 16#abcd# where the
2744 -- upper bit is on (in other words, "a" is in the range
2745 -- 8-F) is represented as two bytes, 16#ab# and 16#cd#.
2746 -- The second byte may never be a format control
2747 -- character, but is not required to be in the upper
2748 -- half. This method can be also used for shift-JIS or
2749 -- EUC, where the internal coding matches the external
2750 -- coding.
2752 -- SHIFT_JIS A wide character is represented by a two-character
2753 -- sequence, 16#ab# and 16#cd#, with the restrictions
2754 -- described for upper-half encoding as described above.
2755 -- The internal character code is the corresponding JIS
2756 -- character according to the standard algorithm for
2757 -- Shift-JIS conversion. Only characters defined in the
2758 -- JIS code set table can be used with this encoding
2759 -- method.
2761 -- UTF8 A wide character is represented using
2762 -- UCS Transformation Format 8 (UTF-8) as defined in Annex
2763 -- R of ISO 10646-1/Am.2. Depending on the character
2764 -- value, the representation is a one, two, or three byte
2765 -- sequence:
2767 -- 16#0000#-16#007f#: 2#0xxxxxxx#
2768 -- 16#0080#-16#07ff#: 2#110xxxxx# 2#10xxxxxx#
2769 -- 16#0800#-16#ffff#: 2#1110xxxx# 2#10xxxxxx# 2#10xxxxxx#
2771 -- where the xxx bits correspond to the left-padded bits
2772 -- of the the 16-bit character value. Note that all lower
2773 -- half ASCII characters are represented as ASCII bytes
2774 -- and all upper half characters and other wide characters
2775 -- are represented as sequences of upper-half (The full
2776 -- UTF-8 scheme allows for encoding 31-bit characters as
2777 -- 6-byte sequences, but in this implementation, all UTF-8
2778 -- sequences of four or more bytes length will be treated
2779 -- as illegal).
2781 -- EUC A wide character is represented by a two-character
2782 -- sequence 16#ab# and 16#cd#, with both characters being
2783 -- in the upper half. The internal character code is the
2784 -- corresponding JIS character according to the EUC
2785 -- encoding algorithm. Only characters defined in the JIS
2786 -- code set table can be used with this encoding method.
2788 S_GCC_WideX : aliased constant S := "/NOWIDE_CHARACTER_ENCODING " &
2789 "-gnatWn";
2790 -- NODOC (see /WIDE_CHARACTER_ENCODING)
2792 S_GCC_Xdebug : aliased constant S := "/XDEBUG " &
2793 "-gnatD";
2794 -- /NOXDEBUG (D)
2795 -- /XDEBUG
2797 -- Output expanded source files for source level debugging.
2798 -- The expanded source (see /EXPAND_SOURCE) is written to files
2799 -- with names formed by appending "_DG" to the input file name,
2800 -- The debugging information generated by the /DEBUG qualifier will then
2801 -- refer to the generated file. This allows source level debugging using
2802 -- the generated code which is sometimes useful for complex code, for
2803 -- example to find out exactly which part of a complex construction
2804 -- raised an exception.
2806 S_GCC_Xref : aliased constant S := "/XREF=" &
2807 "GENERATE " &
2808 "!-gnatx " &
2809 "SUPPRESS " &
2810 "-gnatx";
2811 -- /XREF[=keyword]
2813 -- Normally the compiler generates full cross-referencing information in
2814 -- the .ALI file. This information is used by a number of tools,
2815 -- including GNAT FIND and GNAT XREF.
2817 -- GENERATE (D) Generate cross-referencing information.
2819 -- SUPPRESS Suppress cross-referencing information.
2820 -- This saves some space and may slightly
2821 -- speed up compilation, but means that some
2822 -- tools cannot be used.
2824 S_GCC_Zero : aliased constant S := "/ZERO_COST_EXCEPTIONS " &
2825 "-gnatZ";
2826 -- /ZERO_COST_EXCEPTIONS
2827 -- /NOZERO_COST_EXCEPTIONS
2829 -- As zero-cost exceptions is the default on VMS, this qualifier has
2830 -- no effect, except that it cancels the effect of a previous
2831 -- /LONGJMP_SETJUMP qualifier.
2833 GCC_Switches : aliased constant Switches :=
2834 (S_GCC_Ada_83 'Access,
2835 S_GCC_Ada_95 'Access,
2836 S_GCC_Ada_05 'Access,
2837 S_GCC_Asm 'Access,
2838 S_GCC_Checks 'Access,
2839 S_GCC_ChecksX 'Access,
2840 S_GCC_Compres 'Access,
2841 S_GCC_Config 'Access,
2842 S_GCC_Current 'Access,
2843 S_GCC_Debug 'Access,
2844 S_GCC_DebugX 'Access,
2845 S_GCC_Data 'Access,
2846 S_GCC_Dist 'Access,
2847 S_GCC_DistX 'Access,
2848 S_GCC_Error 'Access,
2849 S_GCC_ErrorX 'Access,
2850 S_GCC_Expand 'Access,
2851 S_GCC_Extend 'Access,
2852 S_GCC_Ext 'Access,
2853 S_GCC_File 'Access,
2854 S_GCC_Force 'Access,
2855 S_GCC_Full 'Access,
2856 S_GCC_Help 'Access,
2857 S_GCC_Ident 'Access,
2858 S_GCC_IdentX 'Access,
2859 S_GCC_Immed 'Access,
2860 S_GCC_Inline 'Access,
2861 S_GCC_InlineX 'Access,
2862 S_GCC_Jumps 'Access,
2863 S_GCC_Length 'Access,
2864 S_GCC_List 'Access,
2865 S_GCC_Mapping 'Access,
2866 S_GCC_Mess 'Access,
2867 S_GCC_Nesting 'Access,
2868 S_GCC_Noadc 'Access,
2869 S_GCC_Noload 'Access,
2870 S_GCC_Nostinc 'Access,
2871 S_GCC_Nostlib 'Access,
2872 S_GCC_Opt 'Access,
2873 S_GCC_OptX 'Access,
2874 S_GCC_Polling 'Access,
2875 S_GCC_Project 'Access,
2876 S_GCC_Psta 'Access,
2877 S_GCC_Report 'Access,
2878 S_GCC_ReportX 'Access,
2879 S_GCC_Repinfo 'Access,
2880 S_GCC_RepinfX 'Access,
2881 S_GCC_RTS 'Access,
2882 S_GCC_Search 'Access,
2883 S_GCC_Style 'Access,
2884 S_GCC_StyleX 'Access,
2885 S_GCC_Symbol 'Access,
2886 S_GCC_Syntax 'Access,
2887 S_GCC_Table 'Access,
2888 S_GCC_Trace 'Access,
2889 S_GCC_Tree 'Access,
2890 S_GCC_Trys 'Access,
2891 S_GCC_Units 'Access,
2892 S_GCC_Unique 'Access,
2893 S_GCC_Upcase 'Access,
2894 S_GCC_Valid 'Access,
2895 S_GCC_Verbose 'Access,
2896 S_GCC_Verb_Asm'Access,
2897 S_GCC_Warn 'Access,
2898 S_GCC_WarnX 'Access,
2899 S_GCC_Wide 'Access,
2900 S_GCC_WideX 'Access,
2901 S_GCC_No_Back 'Access,
2902 S_GCC_Xdebug 'Access,
2903 S_GCC_Xref 'Access,
2904 S_GCC_Zero 'Access);
2906 ----------------------------
2907 -- Switches for GNAT ELIM --
2908 ----------------------------
2910 S_Elim_All : aliased constant S := "/ALL " &
2911 "-a";
2912 -- /NOALL (D)
2913 -- /ALL
2915 -- Also look for subprograms from the GNAT run time that can be
2916 -- eliminated. Note that when 'gnat.adc' is produced using this switch,
2917 -- the entire program must be recompiled with qualifier /ALL_FILES of
2918 -- GNAT MAKE.
2920 S_Elim_Bind : aliased constant S := "/BIND_FILE=<" &
2921 "-b>";
2922 -- /BIND_FILE=file_name
2924 -- Specifies file_name as the bind file to process. If this qualifier is
2925 -- not used, the name of the bind file is computed from the full expanded
2926 -- Ada name of a main subprogram.
2928 S_Elim_Comp : aliased constant S := "/COMPILER=@" &
2929 "--GCC=@";
2930 -- /COMPILER=path_name
2932 -- Instructs GNAT ELIM to use a specific gcc compiler instead of one
2933 -- available on the path.
2935 S_Elim_Config : aliased constant S := "/CONFIGURATION_PRAGMAS=<" &
2936 "-C>";
2937 -- /CONFIGURATION_PRAGMAS=path_name
2939 -- Specifies a file that contains configuration pragmas.
2940 -- The file must be specified with absolute path.
2942 S_Elim_Current : aliased constant S := "/CURRENT_DIRECTORY " &
2943 "!-I-";
2944 -- /CURRENT_DIRECTORY (D)
2945 -- /NOCURRENT_DIRECTORY
2947 -- Look for source files in the default directory.
2949 S_Elim_GNATMAKE : aliased constant S := "/GNATMAKE=@" &
2950 "--GNATMAKE=@";
2951 -- /GNATMAKE=path_name
2953 -- Instructs GNAT MAKE to use a specific gnatmake instead of one available
2954 -- on the path.
2956 S_Elim_Quiet : aliased constant S := "/QUIET " &
2957 "-q";
2958 -- /NOQUIET (D)
2959 -- /QUIET
2961 -- Quiet mode: by default GNAT ELIM outputs to the standard error stream
2962 -- the number of program units left to be processed. This option turns
2963 -- this trace off.
2965 S_Elim_Search : aliased constant S := "/SEARCH=*" &
2966 "-I*";
2967 -- /SEARCH=(directory, ...)
2969 -- When looking for source files also look in the specified directories.
2971 S_Elim_Verb : aliased constant S := "/VERBOSE " &
2972 "-v";
2973 -- /NOVERBOSE (D)
2974 -- /VERBOSE
2976 -- Verbose mode: GNAT ELIM version information is output as Ada comments
2977 -- to the standard output stream. Also, in addition to the number of
2978 -- program units left, GNAT ELIM will output the name of the current unit
2979 -- being processed.
2981 Elim_Switches : aliased constant Switches :=
2982 (S_Elim_All 'Access,
2983 S_Elim_Bind 'Access,
2984 S_Elim_Comp 'Access,
2985 S_Elim_Config 'Access,
2986 S_Elim_Current 'Access,
2987 S_Elim_GNATMAKE'Access,
2988 S_Elim_Quiet 'Access,
2989 S_Elim_Search 'Access,
2990 S_Elim_Verb 'Access);
2992 ----------------------------
2993 -- Switches for GNAT FIND --
2994 ----------------------------
2996 S_Find_All : aliased constant S := "/ALL_FILES " &
2997 "-a";
2998 -- /NOALL_FILES (D)
2999 -- /ALL_FILES
3001 -- If this switch is present, FIND and XREF will parse the read-only
3002 -- files found in the library search path. Otherwise, these files will
3003 -- be ignored. This option can be used to protect Gnat sources or your
3004 -- own libraries from being parsed, thus making FIND and XREF much
3005 -- faster, and their output much smaller.
3007 S_Find_Deriv : aliased constant S := "/DERIVED_TYPE_INFORMATION " &
3008 "-d";
3009 -- /NODERIVED_TYPE_INFORMATION (D)
3010 -- /DERIVED_TYPE_INFORMATION
3012 -- Output the parent type reference for each matching derived types.
3014 S_Find_Expr : aliased constant S := "/EXPRESSIONS " &
3015 "-e";
3016 -- /NOEXPRESSIONS (D)
3017 -- /EXPRESSIONS
3019 -- By default, FIND accepts the simple regular expression set for pattern.
3020 -- If this switch is set, then the pattern will be considered as a full
3021 -- Unix-style regular expression.
3023 S_Find_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3024 "-X" & '"';
3025 -- /EXTERNAL_REFERENCE="name=val"
3027 -- Specifies an external reference to the project manager. Useful only if
3028 -- /PROJECT_FILE is used.
3030 -- Example:
3031 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3033 S_Find_Full : aliased constant S := "/FULL_PATHNAME " &
3034 "-f";
3035 -- /NOFULL_PATHNAME (D)
3036 -- /FULL_PATHNAME
3038 -- If this switch is set, the output file names will be preceded by their
3039 -- directory (if the file was found in the search path). If this switch
3040 -- is not set, the directory will not be printed.
3042 S_Find_Ignore : aliased constant S := "/IGNORE_LOCALS " &
3043 "-g";
3044 -- /NOIGNORE_LOCALS (D)
3045 -- /IGNORE_LOCALS
3047 -- If this switch is set, information is output only for library-level
3048 -- entities, ignoring local entities. The use of this switch may
3049 -- accelerate FIND and XREF.
3051 S_Find_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3052 "DEFAULT " &
3053 "-vP0 " &
3054 "MEDIUM " &
3055 "-vP1 " &
3056 "HIGH " &
3057 "-vP2";
3058 -- /MESSAGES_PROJECT_FILE[=messages-option]
3060 -- Specifies the "verbosity" of the parsing of project files.
3061 -- messages-option may be one of the following:
3063 -- DEFAULT (D) No messages are output if there is no error or warning.
3065 -- MEDIUM A small number of messages are output.
3067 -- HIGH A great number of messages are output, most of them not
3068 -- being useful for the user.
3070 S_Find_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
3071 "-nostdinc";
3072 -- /NOSTD_INCLUDES
3074 -- Do not look for sources in the system default directory.
3076 S_Find_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
3077 "-nostdlib";
3078 -- /NOSTD_LIBRARIES
3080 -- Do not look for library files in the system default directory.
3082 S_Find_Object : aliased constant S := "/OBJECT_SEARCH=*" &
3083 "-aO*";
3084 -- /OBJECT_SEARCH=(directory,...)
3086 -- When searching for library and object files, look in the specified
3087 -- directories. The order in which library files are searched is the same
3088 -- as for MAKE.
3090 S_Find_Print : aliased constant S := "/PRINT_LINES " &
3091 "-s";
3092 -- /NOPRINT_LINES (D)
3093 -- /PRINT_LINES
3095 -- Output the content of the Ada source file lines were the entity was
3096 -- found.
3098 S_Find_Project : aliased constant S := "/PROJECT=@" &
3099 "-p@";
3100 -- /PROJECT=file
3102 -- Specify a project file to use. By default, FIND and XREF will try to
3103 -- locate a project file in the current directory.
3105 -- If a project file is either specified or found by the tools, then the
3106 -- content of the source directory and object directory lines are added
3107 -- as if they had been specified respectively by /SOURCE_SEARCH and
3108 -- /OBJECT_SEARCH.
3110 -- This qualifier is not compatible with /PROJECT_FILE
3112 S_Find_Prj : aliased constant S := "/PROJECT_FILE=<" &
3113 "-P>";
3114 -- /PROJECT_FILE=filename
3116 -- Specifies the main project file to be used. The project files rooted
3117 -- at the main project file will be parsed before looking for sources.
3118 -- The source and object directories to be searched will be communicated
3119 -- to gnatfind through logical names ADA_PRJ_INCLUDE_FILE and
3120 -- ADA_PRJ_OBJECTS_FILE.
3122 S_Find_Ref : aliased constant S := "/REFERENCES " &
3123 "-r";
3124 -- /NOREFERENCES (D)
3125 -- /REFERENCES
3127 -- By default, FIND will output only the information about the
3128 -- declaration, body or type completion of the entities. If this switch
3129 -- is set, the FIND will locate every reference to the entities in the
3130 -- files specified on the command line (or in every file in the search
3131 -- path if no file is given on the command line).
3133 S_Find_Search : aliased constant S := "/SEARCH=*" &
3134 "-I*";
3135 -- /SEARCH=(directory,...)
3137 -- Equivalent to:
3138 -- /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
3140 S_Find_Source : aliased constant S := "/SOURCE_SEARCH=*" &
3141 "-aI*";
3142 -- /SOURCE_SEARCH=(directory,...)
3144 -- When looking for source files also look in the specified directories.
3145 -- The order in which source file search is undertaken is the same as for
3146 -- MAKE.
3148 S_Find_Types : aliased constant S := "/TYPE_HIERARCHY " &
3149 "-t";
3150 -- /NOTYPE_HIERARCHY (D)
3151 -- /TYPE_HIERARCHY
3153 -- Output the type hierarchy for the specified type. It acts like the
3154 -- /DERIVED_TYPE_INFORMATION qualifier, but recursively from parent type
3155 -- to parent type. When this qualifier is specified it is not possible to
3156 -- specify more than one file.
3158 Find_Switches : aliased constant Switches :=
3159 (S_Find_All 'Access,
3160 S_Find_Deriv 'Access,
3161 S_Find_Expr 'Access,
3162 S_Find_Ext 'Access,
3163 S_Find_Full 'Access,
3164 S_Find_Ignore 'Access,
3165 S_Find_Mess 'Access,
3166 S_Find_Nostinc 'Access,
3167 S_Find_Nostlib 'Access,
3168 S_Find_Object 'Access,
3169 S_Find_Print 'Access,
3170 S_Find_Project 'Access,
3171 S_Find_Prj 'Access,
3172 S_Find_Ref 'Access,
3173 S_Find_Search 'Access,
3174 S_Find_Source 'Access,
3175 S_Find_Types 'Access);
3177 ------------------------------
3178 -- Switches for GNAT KRUNCH --
3179 ------------------------------
3181 S_Krunch_Count : aliased constant S := "/COUNT=#" &
3182 "`#";
3183 -- /COUNT=39 (D)
3184 -- /COUNT=nnn
3186 -- Limit file names to nnn characters (where nnn is a decimal
3187 -- integer). The maximum file name length is 39, but if you want to
3188 -- generate a set of files that would be usable if ported to a system
3189 -- with some different maximum file length, then a different value can
3190 -- be specified.
3192 Krunch_Switches : aliased constant Switches :=
3193 (1 .. 1 => S_Krunch_Count 'Access);
3195 -------------------------------
3196 -- Switches for GNAT LIBRARY --
3197 -------------------------------
3199 S_Lbr_Config : aliased constant S := "/CONFIG=@" &
3200 "--config=@";
3201 -- /CONFIG=file
3203 -- File containing configuration pragmas.
3205 S_Lbr_Create : aliased constant S := "/CREATE=%" &
3206 "--create=%";
3207 -- /CREATE=directory
3209 -- Directory to create and build alternate library in.
3211 S_Lbr_Delete : aliased constant S := "/DELETE=%" &
3212 "--delete=%";
3213 -- /DELETE=directory
3215 -- Directory containing alternate library to be deleted.
3217 S_Lbr_Set : aliased constant S := "/SET=%" &
3218 "--set=%";
3219 -- /SET=directory
3221 -- Directory containing alternate library to be made the current library.
3223 Lbr_Switches : aliased constant Switches :=
3224 (S_Lbr_Config 'Access,
3225 S_Lbr_Create 'Access,
3226 S_Lbr_Delete 'Access,
3227 S_Lbr_Set 'Access);
3229 ----------------------------
3230 -- Switches for GNAT LINK --
3231 ----------------------------
3233 S_Link_Bind : aliased constant S := "/BIND_FILE=" &
3234 "ADA " &
3235 "-A " &
3236 "C " &
3237 "-C";
3238 -- /BIND_FILE=[bind-file-option]
3240 -- Specifies the language of the binder generated file.
3242 -- ADA (D) Binder file is Ada.
3244 -- C Binder file is 'C'.
3246 S_Link_Debug : aliased constant S := "/DEBUG=" &
3247 "ALL " &
3248 "-g3 " &
3249 "NONE " &
3250 "-g0 " &
3251 "TRACEBACK " &
3252 "-g1 " &
3253 "NOTRACEBACK " &
3254 "-g0";
3255 -- /NODEBUG (D)
3256 -- /DEBUG[=debug-option]
3258 -- Specifies the amount of debugging information included. 'debug-option'
3259 -- is one of the following:
3261 -- ALL (D) Include full debugging information.
3263 -- NONE Provide no debugging information. Same as /NODEBUG.
3265 -- TRACEBACK Provide sufficient debug information for a traceback.
3267 -- NOTRACEBACK Same as NONE.
3269 S_Link_Nodebug : aliased constant S := "/NODEBUG " &
3270 "-g0";
3271 -- NODOC (see /DEBUG)
3273 S_Link_Execut : aliased constant S := "/EXECUTABLE=@" &
3274 "-o@";
3275 -- /EXECUTABLE=exec-name
3277 -- 'exec-name' specifies an alternative name for the generated executable
3278 -- program. If this qualifier switch is omitted, the executable is called
3279 -- the name of the main unit. So "$ GNAT LINK TRY.ALI" creates an
3280 -- executable called TRY.EXE.
3282 S_Link_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3283 "-X" & '"';
3284 -- /EXTERNAL_REFERENCE="name=val"
3286 -- Specifies an external reference to the project manager. Useful only if
3287 -- /PROJECT_FILE is used.
3289 -- Example:
3290 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3292 S_Link_Forlink : aliased constant S := "/FOR_LINKER=" & '"' &
3293 "--for-linker=" & '"';
3294 -- /FOR_LINKER=<string>
3296 -- Transmit the option <string> to the underlying linker.
3298 S_Link_Force : aliased constant S := "/FORCE_OBJECT_FILE_LIST " &
3299 "-f";
3300 -- /NOFORCE_OBJECT_FILE_LIST (D)
3301 -- /FORCE_OBJECT_FILE_LIST
3303 -- Forces the generation of a file that contains commands for the linker.
3304 -- This is useful in some cases to deal with special situations where the
3305 -- command line length is exceeded.
3307 S_Link_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
3308 "--for-linker=IDENT=" &
3309 '"';
3310 -- /IDENTIFICATION="<string>"
3312 -- "<string>" specifies the string to be stored in the image file ident-
3313 -- ification field in the image header. It overrides any pragma Ident
3314 -- specified string.
3316 S_Link_Libdir : aliased constant S := "/LIBDIR=*" &
3317 "-L*";
3318 -- /LIBDIR=(directory, ...)
3320 -- Look for libraries in the specified directories.
3322 S_Link_Library : aliased constant S := "/LIBRARY=|" &
3323 "-l|";
3324 -- /LYBRARY=xyz
3326 -- Link with library named "xyz".
3328 S_Link_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3329 "DEFAULT " &
3330 "-vP0 " &
3331 "MEDIUM " &
3332 "-vP1 " &
3333 "HIGH " &
3334 "-vP2";
3335 -- /MESSAGES_PROJECT_FILE[=messages-option]
3337 -- Specifies the "verbosity" of the parsing of project files.
3338 -- messages-option may be one of the following:
3340 -- DEFAULT (D) No messages are output if there is no error or warning.
3342 -- MEDIUM A small number of messages are output.
3344 -- HIGH A great number of messages are output, most of them not
3345 -- being useful for the user.
3347 S_Link_Nocomp : aliased constant S := "/NOCOMPILE " &
3348 "-n";
3349 -- /NOCOMPILE
3351 -- Do not compile the file generated by the binder.
3352 -- This may be used when a link is rerun with different options,
3353 -- but there is no need to recompile the binder generated file.
3355 S_Link_Noinhib : aliased constant S := "/NOINHIBIT-EXEC " &
3356 "--for-linker=--noinhibit-exec";
3357 -- /NOINHIBIT-EXEC
3359 -- Delete executable if there are errors or warnings.
3361 S_Link_Nofiles : aliased constant S := "/NOSTART_FILES " &
3362 "-nostartfiles";
3363 -- /NOSTART_FILES
3365 -- Link in default image initialization and startup functions.
3367 S_Link_Project : aliased constant S := "/PROJECT_FILE=<" &
3368 "-P>";
3369 -- /PROJECT_FILE=filename
3371 -- Specifies the main project file to be used. The project files rooted
3372 -- at the main project file will be parsed before the invocation of the
3373 -- linker.
3374 -- The source and object directories to be searched will be communicated
3375 -- to the linker through logical names ADA_PRJ_INCLUDE_FILE and
3376 -- ADA_PRJ_OBJECTS_FILE.
3378 S_Link_Return : aliased constant S := "/RETURN_CODES=" &
3379 "POSIX " &
3380 "!-mvms-return-codes " &
3381 "VMS " &
3382 "-mvms-return-codes";
3383 -- /RETURN_CODES=POSIX (D)
3384 -- /RETURN_CODES=VMS
3386 -- Specifies the style of codes returned by
3387 -- Ada.Command_Line.Set_Exit_Status. Must be used in conjunction with
3388 -- and match the Bind qualifer with the same name.
3390 -- POSIX (D) Return Posix compatible exit codes.
3392 -- VMS Return VMS compatible exit codes. The value returned
3393 -- is identically equal to the Set_Exit_Status parameter.
3395 S_Link_Static : aliased constant S := "/STATIC " &
3396 "--for-linker=-static";
3397 -- /NOSTATIC (D)
3398 -- /STATIC
3400 -- Indicate to the linker that the link is static.
3402 S_Link_Verb : aliased constant S := "/VERBOSE " &
3403 "-v";
3404 -- /NOVERBOSE (D)
3405 -- /VERBOSE
3407 -- Causes additional information to be output, including a full list of
3408 -- the included object files. This switch option is most useful when you
3409 -- want to see what set of object files are being used in the link step.
3411 S_Link_ZZZZZ : aliased constant S := "/<other> " &
3412 "--for-linker=";
3413 -- /<other>
3415 -- Any other switch that will be transmited to the underlying linker.
3417 Link_Switches : aliased constant Switches :=
3418 (S_Link_Bind 'Access,
3419 S_Link_Debug 'Access,
3420 S_Link_Nodebug 'Access,
3421 S_Link_Execut 'Access,
3422 S_Link_Ext 'Access,
3423 S_Link_Forlink 'Access,
3424 S_Link_Force 'Access,
3425 S_Link_Ident 'Access,
3426 S_Link_Libdir 'Access,
3427 S_Link_Library 'Access,
3428 S_Link_Mess 'Access,
3429 S_Link_Nocomp 'Access,
3430 S_Link_Nofiles 'Access,
3431 S_Link_Noinhib 'Access,
3432 S_Link_Project 'Access,
3433 S_Link_Return 'Access,
3434 S_Link_Static 'Access,
3435 S_Link_Verb 'Access,
3436 S_Link_ZZZZZ 'Access);
3438 ----------------------------
3439 -- Switches for GNAT LIST --
3440 ----------------------------
3442 S_List_All : aliased constant S := "/ALL_UNITS " &
3443 "-a";
3444 -- /NOALL_UNITS (D)
3445 -- /ALL_UNITS
3447 -- Consider all units, including those of the predefined Ada library.
3448 -- Especially useful with /DEPENDENCIES.
3450 S_List_Current : aliased constant S := "/CURRENT_DIRECTORY " &
3451 "!-I-";
3452 -- /CURRENT_DIRECTORY (D)
3453 -- /NOCURRENT_DIRECTORY
3455 -- Look for source, library or object files in the default directory.
3457 S_List_Depend : aliased constant S := "/DEPENDENCIES " &
3458 "-d";
3459 -- /NODEPENDENCIES (D)
3460 -- /DEPENDENCIES
3462 S_List_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3463 "-X" & '"';
3464 -- /EXTERNAL_REFERENCE="name=val"
3466 -- Specifies an external reference to the project manager. Useful only if
3467 -- /PROJECT_FILE is used.
3469 -- Example:
3470 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3472 S_List_Files : aliased constant S := "/FILES=@" &
3473 "-files=@";
3474 -- /FILES=filename
3476 -- Take as arguments the files that are listed in the specified
3477 -- text file.
3479 S_List_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3480 "DEFAULT " &
3481 "-vP0 " &
3482 "MEDIUM " &
3483 "-vP1 " &
3484 "HIGH " &
3485 "-vP2";
3486 -- /MESSAGES_PROJECT_FILE[=messages-option]
3488 -- Specifies the "verbosity" of the parsing of project files.
3489 -- messages-option may be one of the following:
3491 -- DEFAULT (D) No messages are output if there is no error or warning.
3493 -- MEDIUM A small number of messages are output.
3495 -- HIGH A great number of messages are output, most of them not
3496 -- being useful for the user.
3498 S_List_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
3499 "-nostdinc";
3500 -- /NOSTD_INCLUDES
3502 -- Do not look for sources of the run time in the standard directory.
3504 S_List_Object : aliased constant S := "/OBJECT_SEARCH=*" &
3505 "-aO*";
3506 -- /OBJECT_SEARCH=(directory,...)
3508 -- When looking for library and object files look also in the specified
3509 -- directories.
3511 S_List_Output : aliased constant S := "/OUTPUT=" &
3512 "SOURCES " &
3513 "-s " &
3514 "DEPEND " &
3515 "-d " &
3516 "OBJECTS " &
3517 "-o " &
3518 "UNITS " &
3519 "-u " &
3520 "OPTIONS " &
3521 "-h " &
3522 "VERBOSE " &
3523 "-v ";
3524 -- /OUTPUT=(option,option,...)
3526 -- SOURCES (D) Only output information about source files.
3528 -- DEPEND List sources from which specified units depend on.
3530 -- OBJECTS Only output information about object files.
3532 -- UNITS Only output information about compilation units.
3534 -- OPTIONS Output the list of options.
3536 -- VERBOSE Output the complete source and object paths.
3537 -- Do not use the default column layout but instead
3538 -- use long format giving as much as information
3539 -- possible on each requested units, including
3540 -- special characteristics.
3542 S_List_Project : aliased constant S := "/PROJECT_FILE=<" &
3543 "-P>";
3544 -- /PROJECT_FILE=filename
3546 -- Specifies the main project file to be used. The project files rooted
3547 -- at the main project file will be parsed before doing any listing.
3548 -- The source and object directories to be searched will be communicated
3549 -- to gnatlist through logical names ADA_PRJ_INCLUDE_FILE and
3550 -- ADA_PRJ_OBJECTS_FILE.
3552 S_List_Search : aliased constant S := "/SEARCH=*" &
3553 "-I*";
3554 -- /SEARCH=(directory,...)
3556 -- Search the specified directories for both source and object files.
3558 S_List_Source : aliased constant S := "/SOURCE_SEARCH=*" &
3559 "-aI*";
3560 -- /SOURCE_SEARCH=(directory,...)
3562 -- When looking for source files also look in the specified directories.
3564 List_Switches : aliased constant Switches :=
3565 (S_List_All 'Access,
3566 S_List_Current 'Access,
3567 S_List_Depend 'Access,
3568 S_List_Ext 'Access,
3569 S_List_Files 'Access,
3570 S_List_Mess 'Access,
3571 S_List_Nostinc 'Access,
3572 S_List_Object 'Access,
3573 S_List_Output 'Access,
3574 S_List_Project 'Access,
3575 S_List_Search 'Access,
3576 S_List_Source 'Access);
3578 ----------------------------
3579 -- Switches for GNAT MAKE --
3580 ----------------------------
3582 S_Make_Actions : aliased constant S := "/ACTIONS=" &
3583 "COMPILE " &
3584 "-c " &
3585 "BIND " &
3586 "-b " &
3587 "LINK " &
3588 "-l ";
3589 -- /ACTIONS=(keyword[,...])
3591 -- GNAT MAKE default behavior is to check if the sources are up to date,
3592 -- compile those sources that are not up to date, bind the main source,
3593 -- then link the executable.
3595 -- With the /ACTIONS qualifier, GNAT MAKE may be restricted to one or
3596 -- two of these three steps:
3598 -- o Compile
3599 -- o Bind
3600 -- o Link
3603 -- You may specify one or more of the following keywords to the /ACTIONS
3604 -- qualifier:
3606 -- BIND Bind only. Can be combined with /ACTIONS=COMPILE
3607 -- to do compilation and binding, but no linking.
3608 -- Can be combined with /ACTIONS=LINK to do binding and
3609 -- linking. When not combined with /ACTIONS=COMPILE,
3610 -- all the units in the closure of the main program must
3611 -- have been previously compiled and must be up to date.
3613 -- COMPILE Compile only. Do not perform binding, except when
3614 -- /ACTIONS=BIND is also specified. Do not perform
3615 -- linking, except if both /ACTIONS=BIND and /ACTIONS=LINK
3616 -- are also specified.
3618 -- LINK Link only. Can be combined with /ACTIONS=BIND to do
3619 -- binding and linking. Linking will not be performed
3620 -- if combined with /ACTIONS=COMPILE but not with
3621 -- /ACTIONS=BIND\. When not combined with /ACTIONS=BIND
3622 -- all the units in the closure of the main program must
3623 -- have been previously compiled and must be up to date,
3624 -- and the main program need to have been bound.
3626 S_Make_All : aliased constant S := "/ALL_FILES " &
3627 "-a";
3628 -- /NOALL_FILES (D)
3629 -- /ALL_FILES
3631 -- Consider all files in the make process, even the GNAT internal system
3632 -- files (for example, the predefined Ada library files). By default,
3633 -- GNAT MAKE does not check these files (however, if there is an
3634 -- installation problem, it will be caught when GNAT MAKE binds your
3635 -- program). You may have to specify this qualifier if you are working on
3636 -- GNAT itself. The vast majority of GNAT MAKE users never need to
3637 -- specify this switch. All GNAT internal files with will be compiled
3638 -- with /STYLE_CHECK=GNAT.
3640 S_Make_Allproj : aliased constant S := "/ALL_PROJECTS " &
3641 "-U";
3642 -- /NOALL_PROJECTS (D)
3643 -- /ALL_PROJECTS
3645 -- Implies /Unique.
3646 -- When used without project files, it is equivalent to /UNIQUE.
3647 -- When used with a project file wit no main (neither on the command
3648 -- line nor in the attribute Main) check every source of every project,
3649 -- recompile all sources that are not up to date and rebuild libraries
3650 -- if necessary.
3652 S_Make_Bind : aliased constant S := "/BINDER_QUALIFIERS=?" &
3653 "-bargs BIND";
3654 -- /BINDER_QUALIFIERS
3656 -- Any qualifiers specified after this qualifier other than
3657 -- /COMPILER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
3658 -- passed to any GNAT BIND commands generated by GNAT MAKE.
3660 S_Make_Bindprj : aliased constant S := "/BND_LNK_FULL_PROJECT " &
3661 "-B";
3662 -- /BND_LNK_FULL_PROJECT
3664 -- Bind and link all sources of a project, without any consideration
3665 -- to attribute Main, if there is one. This qualifier need to be
3666 -- used in conjunction with the /PROJECT_FILE= qualifier and cannot
3667 -- be used with a main subprogram on the command line or for
3668 -- a library project file. As the binder is invoked with the option
3669 -- meaning "No Ada main subprogram", the user must ensure that the
3670 -- proper options are specified to the linker. This qualifier is
3671 -- normally used when the main subprogram is in a foreign language
3672 -- such as C.
3674 S_Make_Comp : aliased constant S := "/COMPILER_QUALIFIERS=?" &
3675 "-cargs COMPILE";
3676 -- /COMPILER_QUALIFIERS
3678 -- Any qualifiers specified after this qualifier other than
3679 -- /BINDER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
3680 -- passed to any GNAT COMPILE commands generated by GNAT MAKE.
3682 S_Make_Cond : aliased constant S := "/CONDITIONAL_SOURCE_SEARCH=*" &
3683 "-A*";
3684 -- /CONDITIONAL_SOURCE_SEARCH=dir
3686 -- Equivalent to "/SOURCE_SEARCH=dir /SKIP_MISSING=dir".
3688 S_Make_Cont : aliased constant S := "/CONTINUE_ON_ERROR " &
3689 "-k";
3690 -- /NOCONTINUE_ON_ERROR (D)
3691 -- /CONTINUE_ON_ERROR
3693 -- Keep going. Continue as much as possible after a compilation error.
3694 -- To ease the programmer's task in case of compilation errors, the list
3695 -- of sources for which the compile fails is given when GNAT MAKE
3696 -- terminates.
3698 S_Make_Current : aliased constant S := "/CURRENT_DIRECTORY " &
3699 "!-I-";
3700 -- /CURRENT_DIRECTORY (D)
3701 -- /NOCURRENT_DIRECTORY
3703 -- Look for source, library or object files in the default directory.
3705 S_Make_Dep : aliased constant S := "/DEPENDENCIES_LIST " &
3706 "-M";
3707 -- /NODEPENDENCIES_LIST (D)
3708 -- /DEPENDENCIES_LIST
3710 -- Check if all objects are up to date. If they are, output the object
3711 -- dependences to SYS$OUTPUT in a form that can be directly exploited in
3712 -- a Unix-style Makefile. By default, each source file is prefixed with
3713 -- its (relative or absolute) directory name. This name is whatever you
3714 -- specified in the various /SOURCE_SEARCH and /SEARCH qualifiers. If
3715 -- you also speficy the /QUIET qualifier, only the source file names,
3716 -- without relative paths, are output. If you just specify the
3717 -- /DEPENDENCY_LIST qualifier, dependencies of the GNAT internal system
3718 -- files are omitted. This is typically what you want. If you also
3719 -- specify the /ALL_FILES qualifier, dependencies of the GNAT internal
3720 -- files are also listed. Note that dependencies of the objects in
3721 -- external Ada libraries (see the /SKIP_MISSING qualifier) are never
3722 -- reported.
3724 S_Make_Dirobj : aliased constant S := "/DIRECTORY_OBJECTS=@" &
3725 "-D@";
3726 -- /DIRECTORY_OBJECTS=<file>
3728 -- Put all object files and .ALI files in <file>.
3729 -- This qualifier is not compatible with /PROJECT_FILE.
3731 S_Make_Doobj : aliased constant S := "/DO_OBJECT_CHECK " &
3732 "-n";
3733 -- /NODO_OBJECT_CHECK (D)
3734 -- /DO_OBJECT_CHECK
3736 -- Don't compile, bind, or link. Output a single command that will
3737 -- recompile an out of date unit, if any. Repeated use of this option,
3738 -- followed by carrying out the indicated compilation, will eventually
3739 -- result in recompiling all required units.
3741 -- If any ALI is missing during the process, GNAT MAKE halts and
3742 -- displays an error message.
3744 S_Make_Execut : aliased constant S := "/EXECUTABLE=@" &
3745 "-o@";
3746 -- /EXECUTABLE=exec-name
3748 -- The name of the final executable program will be 'exec_name'. If this
3749 -- qualifier is omitted the default name for the executable will be the
3750 -- name of the input file with an EXE filetype. You may prefix
3751 -- 'exec_name' with a relative or absolute directory path.
3753 S_Make_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
3754 "-X" & '"';
3755 -- /EXTERNAL_REFERENCE="name=val"
3757 -- Specifies an external reference to the project manager. Useful only if
3758 -- /PROJECT_FILE is used.
3760 -- Example:
3761 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
3763 S_Make_Force : aliased constant S := "/FORCE_COMPILE " &
3764 "-f";
3765 -- /NOFORCE_COMPILE (D)
3766 -- /FORCE_COMPILE
3768 -- Force recompilations. Recompile all sources, even though some object
3769 -- files may be up to date, but don't recompile predefined or GNAT
3770 -- internal files unless the /ALL_FILES qualfier is also specified.
3772 S_Make_Full : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
3773 "-F";
3774 -- /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
3775 -- /FULL_PATH_IN_BRIEF_MESSAGES
3777 -- When using project files, if some errors or warnings are detected
3778 -- during parsing and verbose mode is not in effect (no use of qualifier
3779 -- /VERBOSE), then error lines start with the full path name of the
3780 -- project file, rather than its simple file name.
3782 S_Make_Inplace : aliased constant S := "/IN_PLACE " &
3783 "-i";
3784 -- /NOIN_PLACE (D)
3785 -- /IN_PLACE
3787 -- In normal mode, GNAT MAKE compiles all object files and ALI files
3788 -- into the current directory. If the /IN_PLACE switch is used,
3789 -- then instead object files and ALI files that already exist are over-
3790 -- written in place. This means that once a large project is organized
3791 -- into separate directories in the desired manner, then GNAT MAKE will
3792 -- automatically maintain and update this organization. If no ALI files
3793 -- are found on the Ada object path, the new object and ALI files are
3794 -- created in the directory containing the source being compiled.
3796 S_Make_Index : aliased constant S := "/SOURCE_INDEX=#" &
3797 "-eI#";
3798 -- /SOURCE_INDEX=nnn
3800 -- Specifies the index of the units in the source file
3801 -- By default, source files are mono-unit and there is no index
3802 -- When /SOURCE_INDEX=nnn is specified, only one main may be specified
3803 -- on the command line.
3805 S_Make_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
3806 "-L*";
3807 -- /LIBRARY_SEARCH=(directory[,...])
3809 -- Add the specified directories to the list of directories in which the
3810 -- linker will search for libraries.
3812 S_Make_Link : aliased constant S := "/LINKER_QUALIFIERS=?" &
3813 "-largs LINK";
3814 -- /LINKER_QUALIFIERS
3816 -- Any qualifiers specified after this qualifier other than
3817 -- /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /MAKE_QUALIFIERS will be
3818 -- passed to any GNAT LINK commands generated by GNAT LINK.
3820 S_Make_Make : aliased constant S := "/MAKE_QUALIFIERS=?" &
3821 "-margs MAKE";
3822 -- /MAKE_QUALIFIERS
3824 -- Any qualifiers specified after this qualifier other than
3825 -- /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /LINKER_QUALIFIERS
3826 -- are for the benefit of GNAT MAKE itself.
3828 S_Make_Mapping : aliased constant S := "/MAPPING " &
3829 "-C";
3830 -- /NOMAPPING (D)
3831 -- /MAPPING
3833 -- Use a mapping file. A mapping file is a way to communicate to the
3834 -- compiler two mappings: from unit names to file names (without any
3835 -- directory information) and from file names to path names (with full
3836 -- directory information). These mappings are used by the compiler to
3837 -- short-circuit the path search. When GNAT MAKE is invoked with this
3838 -- qualifier, it will create a mapping file, initially populated by the
3839 -- project manager, if /PROJECT_File= is used, otherwise initially empty.
3840 -- Each invocation of the compiler will add the newly accessed sources to
3841 -- the mapping file. This will improve the source search during the next
3842 -- invocations of the compiler
3844 S_Make_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
3845 "DEFAULT " &
3846 "-vP0 " &
3847 "MEDIUM " &
3848 "-vP1 " &
3849 "HIGH " &
3850 "-vP2";
3851 -- /MESSAGES_PROJECT_FILE[=messages-option]
3853 -- Specifies the "verbosity" of the parsing of project files.
3854 -- messages-option may be one of the following:
3856 -- DEFAULT (D) No messages are output if there is no error or warning.
3858 -- MEDIUM A small number of messages are output.
3860 -- HIGH A great number of messages are output, most of them not
3861 -- being useful for the user.
3863 S_Make_Minimal : aliased constant S := "/MINIMAL_RECOMPILATION " &
3864 "-m";
3865 -- /NOMINIMAL_RECOMPILATION (D)
3866 -- /MINIMAL_RECOMPILATION
3868 -- Specifies that the minimum necessary amount of recompilation
3869 -- be performed. In this mode GNAT MAKE ignores time stamp differences
3870 -- when the only modifications to a source file consist in
3871 -- adding/removing comments, empty lines, spaces or tabs.
3873 S_Make_Nolink : aliased constant S := "/NOLINK " &
3874 "-c";
3875 -- /NOLINK
3877 -- Compile only. Do not perform binding and linking. If the root unit is
3878 -- not a main unit, this is the default. Otherwise GNAT MAKE will
3879 -- attempt binding and linking unless all objects are up to date and the
3880 -- executable is more recent than the objects.
3881 -- This is equivalent to /ACTIONS=COMPILE
3883 S_Make_Nomain : aliased constant S := "/NOMAIN " &
3884 "-z";
3885 -- /NOMAIN
3887 -- No main subprogram. Bind and link the program even if the unit name
3888 -- given on the command line is a package name. The resulting executable
3889 -- will execute the elaboration routines of the package and its closure,
3890 -- then the finalization routines.
3892 S_Make_Nonpro : aliased constant S := "/NON_PROJECT_UNIT_COMPILATION " &
3893 "-x";
3894 -- /NON_PROJECT_UNIT_COMPILATION
3896 -- Normally, when using project files, a unit that is not part of any
3897 -- project file, cannot be compile. These units may be compile, when
3898 -- needed, if this qualifier is specified.
3900 S_Make_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
3901 "-nostdinc";
3902 -- /NOSTD_INCLUDES
3904 -- Do not look for sources the in the system default directory.
3906 S_Make_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
3907 "-nostdlib";
3908 -- /NOSTD_LIBRARIES
3910 -- Do not look for library files in the system default directory.
3912 S_Make_Object : aliased constant S := "/OBJECT_SEARCH=*" &
3913 "-aO*";
3914 -- /OBJECT_SEARCH=(directory[,...])
3916 -- When looking for library and object files look also in the specified
3917 -- directories.
3919 S_Make_Proc : aliased constant S := "/PROCESSES=#" &
3920 "-j#";
3921 -- /NOPROCESSES (D)
3922 -- /PROCESSES=NNN
3924 -- Use NNN processes to carry out the (re)complations. If you have a
3925 -- multiprocessor machine, compilations will occur in parallel. In the
3926 -- event of compilation errors, messages from various compilations might
3927 -- get interspersed (but GNAT MAKE will give you the full ordered list of
3928 -- failing compiles at the end). This can at times be annoying. To get a
3929 -- clean list of error messages don't use this qualifier.
3931 S_Make_Nojobs : aliased constant S := "/NOPROCESSES " &
3932 "-j1";
3933 -- NODOC (see /PROCESS)
3935 S_Make_Project : aliased constant S := "/PROJECT_FILE=<" &
3936 "-P>";
3937 -- /PROJECT_FILE=filename
3939 -- Specifies the main project file to be used. The project files rooted
3940 -- at the main project file will be parsed before any other processing to
3941 -- set the building environment.
3943 S_Make_Quiet : aliased constant S := "/QUIET " &
3944 "-q";
3945 -- /NOQUIET (D)
3946 -- /QUIET
3948 -- When this qualifiers is specified, the commands carried out by GNAT
3949 -- MAKE are not displayed.
3951 S_Make_Reason : aliased constant S := "/REASONS " &
3952 "-v";
3953 -- /NOREASONS (D)
3954 -- /REASONS
3956 -- Displays the reason for all recompilations GNAT MAKE decides are
3957 -- necessary.
3959 S_Make_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
3960 "--RTS=|";
3961 -- /RUNTIME_SYSTEM=xxx
3963 -- Build against an alternate runtime system named xxx or RTS-xxx.
3965 S_Make_Search : aliased constant S := "/SEARCH=*" &
3966 "-I*";
3967 -- /SEARCH=(directory[,...])
3969 -- Search the specified directories for both source and object files.
3971 S_Make_Skip : aliased constant S := "/SKIP_MISSING=*" &
3972 "-aL*";
3973 -- /SKIP_MISSING=(directory[,...])
3975 -- Skip missing library sources if ALI in 'directory'.
3977 S_Make_Source : aliased constant S := "/SOURCE_SEARCH=*" &
3978 "-aI*";
3979 -- /SOURCE_SEARCH=(directory[,...])
3981 -- When looking for source files also look in the specified directories.
3983 S_Make_Switch : aliased constant S := "/SWITCH_CHECK " &
3984 "-s";
3985 -- /NOSWITCH_CHECK (D)
3986 -- /SWITCH_CHECK
3988 -- Recompile if compiler switches have changed since last compilation.
3989 -- All compiler switches but -I and -o are taken into account in the
3990 -- following way: orders between different "first letter" switches are
3991 -- ignored, but orders between same switches are taken into account.
3992 -- For example, -O -O2 is different than -O2 -O, but -g -O is equivalent
3993 -- to -O -g.
3995 S_Make_Unique : aliased constant S := "/UNIQUE " &
3996 "-u";
3997 -- /NOUNIQUE (D)
3998 -- /UNIQUE
4000 -- Recompile at most the main file. It implies /ACTIONS=COMPILE.
4001 -- Combined with /FORCE_COMPILE, it is equivalent to calling the compiler
4002 -- directly.
4004 S_Make_Use_Map : aliased constant S := "/USE_MAPPING_File=@" &
4005 "-C=@";
4006 -- /USE_MAPPING_FILE=file_name
4008 -- Use a specific mapping file. The file 'file_name', specified as a path
4009 -- name (absolute or relative) by this qualifier, should already exist,
4010 -- otherwise the qualifier is ineffective. The specified mapping file
4011 -- will be communicated to the compiler. This switch is not compatible
4012 -- with a project file (/PROJECT_FILE=) or with multiple compiling
4013 -- processes (/PROCESSES=nnn, when nnn is greater than 1).
4015 S_Make_Verbose : aliased constant S := "/VERBOSE " &
4016 "-v";
4017 -- /NOVERBOSE (D)
4018 -- /VERBOSE
4020 -- Displays the reason for all recompilations GNAT MAKE decides are
4021 -- necessary.
4023 Make_Switches : aliased constant Switches :=
4024 (S_Make_Actions 'Access,
4025 S_Make_All 'Access,
4026 S_Make_Allproj 'Access,
4027 S_Make_Bind 'Access,
4028 S_Make_Comp 'Access,
4029 S_Make_Cond 'Access,
4030 S_Make_Cont 'Access,
4031 S_Make_Current 'Access,
4032 S_Make_Dep 'Access,
4033 S_Make_Dirobj 'Access,
4034 S_Make_Doobj 'Access,
4035 S_Make_Execut 'Access,
4036 S_Make_Ext 'Access,
4037 S_Make_Force 'Access,
4038 S_Make_Full 'Access,
4039 S_Make_Inplace 'Access,
4040 S_Make_Index 'Access,
4041 S_Make_Library 'Access,
4042 S_Make_Link 'Access,
4043 S_Make_Make 'Access,
4044 S_Make_Mapping 'Access,
4045 S_Make_Mess 'Access,
4046 S_Make_Minimal 'Access,
4047 S_Make_Nolink 'Access,
4048 S_Make_Nomain 'Access,
4049 S_Make_Nonpro 'Access,
4050 S_Make_Nostinc 'Access,
4051 S_Make_Nostlib 'Access,
4052 S_Make_Object 'Access,
4053 S_Make_Proc 'Access,
4054 S_Make_Nojobs 'Access,
4055 S_Make_Project 'Access,
4056 S_Make_Quiet 'Access,
4057 S_Make_Reason 'Access,
4058 S_Make_RTS 'Access,
4059 S_Make_Search 'Access,
4060 S_Make_Skip 'Access,
4061 S_Make_Source 'Access,
4062 S_Make_Switch 'Access,
4063 S_Make_Unique 'Access,
4064 S_Make_Use_Map 'Access,
4065 S_Make_Verbose 'Access);
4067 ------------------------------
4068 -- Switches for GNAT METRIC --
4069 ------------------------------
4071 S_Metric_Debug : aliased constant S := "/DEBUG_OUTPUT " &
4072 "-dv";
4073 -- /DEBUG_OUTPUT
4075 -- Generate the debug information
4077 S_Metric_Direct : aliased constant S := "/DIRECTORY=@" &
4078 "-d=@";
4079 -- /DIRECTORY=pathname
4081 -- Put the files with detailed metric information into the specified
4082 -- directory
4084 S_Metric_Element : aliased constant S := "/ELEMENT_METRICS=" &
4085 "ALL " &
4086 "!-ed,!-es,!-enl,!-eps," &
4087 "!-eas,!-ept,!-eat,!-enu," &
4088 "!-ec " &
4089 "DECLARATION_TOTAL " &
4090 "-ed " &
4091 "STATEMENT_TOTAL " &
4092 "-es " &
4093 "LOOP_NESTING_MAX " &
4094 "-enl " &
4095 "INT_SUBPROGRAMS " &
4096 "-eps " &
4097 "SUBPROGRAMS_ALL " &
4098 "-eas " &
4099 "INT_TYPES " &
4100 "-ept " &
4101 "TYPES_ALL " &
4102 "-eat " &
4103 "PROGRAM_NESTING_MAX " &
4104 "-enu " &
4105 "CONSTRUCT_NESTING_MAX " &
4106 "-ec";
4107 -- /ELEMENT_METRICS=(option, option ...)
4109 -- Specifies the element metrics to be computed (if not set, all the
4110 -- element metrics are set on, otherwise only specified metrics are
4111 -- computed and reported)
4113 -- option may be one of the following:
4115 -- ALL (D) All the element metrics are computed
4116 -- DECLARATION_TOTAL Compute the total number of declarations
4117 -- STATEMENT_TOTAL Compute the total number of statements
4118 -- LOOP_NESTING_MAX Compute the maximal loop nesting level
4119 -- INT_SUBPROGRAMS Compute the number of interface subprograms
4120 -- SUBPROGRAMS_ALL Compute the number of all the subprograms
4121 -- INT_TYPES Compute the number of interface types
4122 -- TYPES_ALL Compute the number of all the types
4123 -- PROGRAM_NESTING_MAX Compute the maximal program unit nesting level
4125 -- All combinations of element metrics options are allowed.
4127 S_Metric_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4128 "-X" & '"';
4129 -- /EXTERNAL_REFERENCE="name=val"
4131 -- Specifies an external reference to the project manager. Useful only if
4132 -- /PROJECT_FILE is used.
4134 -- Example:
4135 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4137 S_Metric_Files : aliased constant S := "/FILES=@" &
4138 "-files=@";
4139 -- /FILES=filename
4141 -- Take as arguments the files that are listed in the specified
4142 -- text file.
4144 S_Metric_Format : aliased constant S := "/FORMAT_OUTPUT=" &
4145 "DEFAULT " &
4146 "!-x,!-nt,!-sfn " &
4147 "XML " &
4148 "-x " &
4149 "NO_TEXT " &
4150 "-nt " &
4151 "SHORT_SOURCE_FILE_NAME " &
4152 "-sfn";
4153 -- /FORMAT_OUTPUT=(option, option ...)
4155 -- Specifies the details of the tool output
4157 -- option may be one of the following:
4159 -- DEFAULT (D) Generate the text output only, use full
4160 -- argument source names in global information
4161 -- XML Generate the output in XML format
4162 -- NO_TEXT Do not generate the text output (implies XML)
4163 -- SHORT_SOURCE_FILE_NAME Use short argument source names in output
4165 S_Metric_Globout : aliased constant S := "/GLOBAL_OUTPUT=@" &
4166 "-og@";
4167 -- /GLOBAL_OUTPUT=filename
4169 -- Put the textual global metric information into the specified file
4171 S_Metric_Line : aliased constant S := "/LINE_METRICS=" &
4172 "ALL " &
4173 "!-la,!-lcode,!-lcomm," &
4174 "!-leol,!-lb " &
4175 "LINES_ALL " &
4176 "-la " &
4177 "CODE_LINES " &
4178 "-lcode " &
4179 "COMENT_LINES " &
4180 "-lcomm " &
4181 "MIXED_CODE_COMMENTS " &
4182 "-leol " &
4183 "BLANK_LINES " &
4184 "-lb ";
4185 -- /LINE_METRICS=(option, option ...)
4187 -- Specifies the line metrics to be computed (if not set, all the line
4188 -- metrics are set on, otherwise only specified metrics are computed and
4189 -- reported)
4191 -- option may be one of the following:
4193 -- ALL (D) All the line metrics are computed
4194 -- LINES_ALL All lines are computed
4195 -- CODE_LINES Lines with Ada code are computed
4196 -- COMENT_LINES All comment lines are computed
4197 -- MIXED_CODE_COMMENTS All lines containing both code and comment are
4198 -- computed
4199 -- BLANK_LINES Blank lines are computed
4201 -- All combinations of line metrics options are allowed.
4203 S_Metric_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4204 "DEFAULT " &
4205 "-vP0 " &
4206 "MEDIUM " &
4207 "-vP1 " &
4208 "HIGH " &
4209 "-vP2";
4210 -- /MESSAGES_PROJECT_FILE[=messages-option]
4212 -- Specifies the "verbosity" of the parsing of project files.
4213 -- messages-option may be one of the following:
4215 -- DEFAULT (D) No messages are output if there is no error or warning.
4217 -- MEDIUM A small number of messages are output.
4219 -- HIGH A great number of messages are output, most of them not
4220 -- being useful for the user.
4222 S_Metric_Project : aliased constant S := "/PROJECT_FILE=<" &
4223 "-P>";
4224 -- /PROJECT_FILE=filename
4226 -- Specifies the main project file to be used. The project files rooted
4227 -- at the main project file will be parsed before the invocation of the
4228 -- binder.
4230 S_Metric_Quiet : aliased constant S := "/QUIET " &
4231 "-q";
4232 -- /NOQUIET (D)
4233 -- /QUIET
4235 -- Quiet mode: by default GNAT METRIC outputs to the standard error stream
4236 -- the number of program units left to be processed. This option turns
4237 -- this trace off.
4239 S_Metric_Suffix : aliased constant S := "/SUFFIX_DETAILS=" & '"' &
4240 "-o" & '"';
4241 -- /SUFFIX_DETAILS=suffix
4243 -- Use the given suffix as the suffix for the name of the file to place
4244 -- the detailed metrics into.
4246 S_Metric_Suppress : aliased constant S := "/SUPPRESS=" &
4247 "NOTHING " &
4248 "!-nocc,!-noec,!-nonl," &
4249 "!-ne,!-nolocal " &
4250 "CYCLOMATIC_COMPLEXITY " &
4251 "-nocc " &
4252 "ESSENTIAL_COMPLEXITY " &
4253 "-noec " &
4254 "MAXIMAL_LOOP_NESTING " &
4255 "-nonl " &
4256 "EXITS_AS_GOTOS " &
4257 "-ne " &
4258 "LOCAL_DETAILS " &
4259 "-nolocal ";
4260 -- /SUPPRESS=(option, option ...)
4262 -- Specifies the metric that should not be computed
4264 -- option may be one of the following:
4266 -- NOTHING (D) Do not suppress computation of any metric
4267 -- CYCLOMATIC_COMPLEXITY Do not compute the Cyclomatic Complexity
4268 -- ESSENTIAL_COMPLEXITY Do not compute the Essential Complexity
4269 -- MAXIMAL_LOOP_NESTING Do not compute the maximal loop nesting
4270 -- EXITS_AS_GOTOS Do not count EXIT statements as GOTOs when
4271 -- computing the Essential Complexity
4272 -- LOCAL_DETAILS Do not compute the detailed metrics for local
4273 -- program units
4275 -- All combinations of options are allowed.
4277 S_Metric_Verbose : aliased constant S := "/VERBOSE " &
4278 "-v";
4279 -- /NOVERBOSE (D)
4280 -- /VERBOSE
4282 -- Verbose mode.
4284 S_Metric_XMLout : aliased constant S := "/XML_OUTPUT=@" &
4285 "-ox@";
4286 -- /XML_OUTPUT=filename
4288 -- Place the XML output into the specified file
4290 Metric_Switches : aliased constant Switches :=
4291 (S_Metric_Debug 'Access,
4292 S_Metric_Direct 'Access,
4293 S_Metric_Element 'Access,
4294 S_Metric_Ext 'Access,
4295 S_Metric_Files 'Access,
4296 S_Metric_Format 'Access,
4297 S_Metric_Globout 'Access,
4298 S_Metric_Line 'Access,
4299 S_Metric_Mess 'Access,
4300 S_Metric_Project 'Access,
4301 S_Metric_Quiet 'Access,
4302 S_Metric_Suffix 'Access,
4303 S_Metric_Suppress 'Access,
4304 S_Metric_Verbose 'Access,
4305 S_Metric_XMLout 'Access);
4307 ----------------------------
4308 -- Switches for GNAT NAME --
4309 ----------------------------
4311 S_Name_Conf : aliased constant S := "/CONFIG_FILE=<" &
4312 "-c>";
4313 -- /CONFIG_FILE=path_name
4315 -- Create a configuration pragmas file 'path_name' (instead of the default
4316 -- 'gnat.adc'). 'path_name' may include directory information. 'path_name'
4317 -- must be writable. There may be only one qualifier /CONFIG_FILE.
4318 -- This qualifier is not compatible with qualifier /PROJECT_FILE.
4320 S_Name_Dirs : aliased constant S := "/SOURCE_DIRS=*" &
4321 "-d*";
4322 -- /SOURCE_DIRS=(directory, ...)
4324 -- Look for source files in the specified directories. When this qualifier
4325 -- is specified, the current working directory will not be searched for
4326 -- source files, unless it is explicitly specified with a qualifier
4327 -- /SOURCE_DIRS or /DIRS_FILE. Several qualifiers /SOURCE_DIRS may be
4328 -- specified. If a directory is specified as a relative path, it is
4329 -- relative to the directory of the configuration pragmas file specified
4330 -- with qualifier /CONFIG_FILE, or to the directory of the project file
4331 -- specified with qualifier /PROJECT_FILE or, if neither qualifier
4332 -- /CONFIG_FILE nor qualifier /PROJECT_FILE are specified, it is relative
4333 -- to the current working directory. The directories specified with
4334 -- qualifiers /SOURCE_DIRS must exist and be readable.
4336 S_Name_Dfile : aliased constant S := "/DIRS_FILE=<" &
4337 "-D>";
4338 -- /DIRS_FILE=file_name
4340 -- Look for source files in all directories listed in text file
4341 -- 'file_name'. 'file_name' must be an existing, readable text file.
4342 -- Each non empty line in the specified file must be a directory.
4343 -- Specifying qualifier /DIRS_FILE is equivalent to specifying as many
4344 -- qualifiers /SOURCE_DIRS as there are non empty lines in the specified
4345 -- text file.
4347 S_Name_Frng : aliased constant S := "/FOREIGN_PATTERN=" & '"' &
4348 "-f" & '"';
4349 -- /FOREIGN_PATTERN=<string>
4351 -- Specify a foreign pattern.
4352 -- Using this qualifier, it is possible to add sources of languages other
4353 -- than Ada to the list of sources of a project file. It is only useful
4354 -- if a qualifier /PROJECT_FILE is used. For example,
4356 -- GNAT NAME /PROJECT_FILE=PRJ /FOREIGN_PATTERN="*.C" "*.ADA"
4358 -- will look for Ada units in all files with the '.ADA' extension, and
4359 -- will add to the list of file for project PRJ.GPR the C files with
4360 -- extension ".C".
4362 S_Name_Help : aliased constant S := "/HELP " &
4363 "-h";
4364 -- /NOHELP (D)
4365 -- /HELP
4367 -- Output usage information to the standard output stream.
4369 S_Name_Proj : aliased constant S := "/PROJECT_FILE=<" &
4370 "-P>";
4371 -- /PROJECT_FILE=file_name
4373 -- Create or update a project file. 'file_name' may include directory
4374 -- information. The specified file must be writable. There may be only
4375 -- one qualifier /PROJECT_FILE. When a qualifier /PROJECT_DILE is
4376 -- specified, no qualifier /CONFIG_FILE may be specified.
4378 S_Name_Verbose : aliased constant S := "/VERBOSE " &
4379 "-v";
4380 -- /NOVERBOSE (D)
4381 -- /VERBOSE
4383 -- Verbose mode. Output detailed explanation of behavior to the standard
4384 -- output stream. This includes name of the file written, the name of the
4385 -- directories to search and, for each file in those directories whose
4386 -- name matches at least one of the Naming Patterns, an indication of
4387 -- whether the file contains a unit, and if so the name of the unit.
4389 S_Name_Excl : aliased constant S := "/EXCLUDED_PATTERN=" & '"' &
4390 "-x" & '"';
4391 -- /EXCLUDED_PATTERN=<string>
4393 -- Specify an excluded pattern.
4394 -- Using this qualifier, it is possible to exclude some files that would
4395 -- match the Naming patterns. For example,
4397 -- GNAT NAME /EXCLUDED_PATTERN="*_NT.ADA" "*.ADA"
4399 -- will look for Ada units in all files with the '.ADA' extension, except
4400 -- those whose names end with '_NT.ADA'.
4402 Name_Switches : aliased constant Switches :=
4403 (S_Name_Conf 'Access,
4404 S_Name_Dirs 'Access,
4405 S_Name_Dfile 'Access,
4406 S_Name_Frng 'Access,
4407 S_Name_Help 'Access,
4408 S_Name_Proj 'Access,
4409 S_Name_Verbose 'Access,
4410 S_Name_Excl 'Access);
4412 ----------------------------------
4413 -- Switches for GNAT PREPROCESS --
4414 ----------------------------------
4416 S_Prep_Assoc : aliased constant S := "/ASSOCIATE=" & '"' &
4417 "-D" & '"';
4418 -- /ASSOCIATE="name=val"
4420 -- Defines a new symbol, associated with value. If no value is given
4421 -- on the command line, then symbol is considered to be True.
4422 -- This qualifier can be used in place of a definition file.
4424 S_Prep_Blank : aliased constant S := "/BLANK_LINES " &
4425 "-b";
4426 -- /NOBLANK_LINES (D)
4427 -- /BLANK_LINES
4429 -- Causes both preprocessor lines and the lines deleted by preprocessing
4430 -- to be replaced by blank lines in the output source file, thus
4431 -- preserving line numbers in the output file.
4433 S_Prep_Com : aliased constant S := "/COMMENTS " &
4434 "-c";
4435 -- /NOCOMMENTS (D)
4436 -- /COMMENTS
4438 -- /COMMENTS causes both preprocessor lines and the lines deleted
4439 -- by preprocessing to be retained in the output source as comments marked
4440 -- with the special string "--! ". This option will result in line numbers
4441 -- being preserved in the output file.
4443 -- /NOCOMMENTS causes both preprocessor lines and the lines deleted by
4444 -- preprocessing to be replaced by blank lines in the output source file,
4445 -- thus preserving line numbers in the output file.
4447 S_Prep_Ref : aliased constant S := "/REFERENCE " &
4448 "-r";
4449 -- /NOREFERENCE (D)
4450 -- /REFERENCE
4452 -- Causes a "Source_Reference" pragma to be generated that references the
4453 -- original input file, so that error messages will use the file name of
4454 -- this original file. Also implies /BLANK_LINES if /COMMENTS is not
4455 -- specified.
4457 S_Prep_Remove : aliased constant S := "/REMOVE " &
4458 "!-b,!-c";
4459 -- /REMOVE (D)
4460 -- /NOREMOVE
4462 -- Preprocessor lines and deleted lines are completely removed from the
4463 -- output.
4465 S_Prep_Symbols : aliased constant S := "/SYMBOLS " &
4466 "-s";
4467 -- /NOSYMBOLS (D)
4468 -- /SYMBOLS
4470 -- Causes a sorted list of symbol names and values to be listed on
4471 -- SYS$OUTPUT.
4473 S_Prep_Undef : aliased constant S := "/UNDEFINED " &
4474 "-u";
4475 -- /NOUNDEFINED (D)
4476 -- /UNDEFINED
4478 Prep_Switches : aliased constant Switches :=
4479 (S_Prep_Assoc 'Access,
4480 S_Prep_Blank 'Access,
4481 S_Prep_Com 'Access,
4482 S_Prep_Ref 'Access,
4483 S_Prep_Remove 'Access,
4484 S_Prep_Symbols 'Access,
4485 S_Prep_Undef 'Access);
4487 ------------------------------
4488 -- Switches for GNAT PRETTY --
4489 ------------------------------
4491 S_Pretty_Align : aliased constant S := "/ALIGN=" &
4492 "DEFAULT " &
4493 "-A12345 " &
4494 "OFF " &
4495 "-A0 " &
4496 "COLONS " &
4497 "-A1 " &
4498 "DECLARATIONS " &
4499 "-A2 " &
4500 "STATEMENTS " &
4501 "-A3 " &
4502 "ARROWS " &
4503 "-A4 " &
4504 "COMPONENT_CLAUSES " &
4505 "-A5";
4506 -- /ALIGN[=align-option, align-option, ...]
4508 -- Set alignments. By default, all alignments (colons in declarations,
4509 -- initialisations in declarations, assignments and arrow delimiters) are
4510 -- ON.
4512 -- align-option may be one of the following:
4514 -- OFF (D) Set all alignments to OFF
4515 -- COLONS Set alignments of colons in declarations to ON
4516 -- DECLARATIONS Set alignments of initialisations in declarations
4517 -- to ON
4518 -- STATEMENTS Set alignments of assignments statements to ON
4519 -- ARROWS Set alignments of arrow delimiters to ON.
4520 -- COMPONENT_CLAUSES Set alignments of AT keywords in component
4521 -- clauses ON
4523 -- Specifying one of the ON options without first specifying the OFF
4524 -- option has no effect, because by default all alignments are set to ON.
4526 S_Pretty_Attrib : aliased constant S := "/ATTRIBUTE_CASING=" &
4527 "MIXED_CASE " &
4528 "-aM " &
4529 "LOWER_CASE " &
4530 "-aL " &
4531 "UPPER_CASE " &
4532 "-aU";
4533 -- /ATTRIBUTE_CASING[=casing-option]
4535 -- Set the case of the attributes. By default the attributes are in mixed
4536 -- case.
4537 -- casing-option may be one of the following:
4539 -- MIXED_CASE (D)
4540 -- LOWER_CASE
4541 -- UPPER_CASE
4543 S_Pretty_Comments : aliased constant S := "/COMMENTS_LAYOUT=" &
4544 "UNTOUCHED " &
4545 "-c0 " &
4546 "DEFAULT " &
4547 "-c1 " &
4548 "STANDARD_INDENT " &
4549 "-c2 " &
4550 "GNAT_BEGINNING " &
4551 "-c3 " &
4552 "REFORMAT " &
4553 "-c4";
4554 -- /COMMENTS_LAYOUT[=layout-option, layout-option, ...]
4556 -- Set the comment layout. By default, comments use the GNAT style
4557 -- comment line indentation.
4559 -- layout-option may be one of the following:
4561 -- UNTOUCHED           All the comments remain unchanged
4562 -- DEFAULT (D) GNAT style comment line indentation
4563 -- STANDARD_INDENT Standard comment line indentation
4564 -- GNAT_BEGINNING GNAT style comment beginning
4565 -- REFORMAT Reformat comment blocks
4567 -- All combinations of layout options are allowed, except for DEFAULT
4568 -- and STANDARD_INDENT which are mutually exclusive, and also if
4569 -- UNTOUCHED is specified, this must be the only option.
4571 -- The difference between "GNAT style comment line indentation" and
4572 -- "standard comment line indentation" is the following: for standard
4573 -- comment indentation, any comment line is indented as if it were
4574 -- a declaration or statement at the same place.
4575 -- For GNAT style comment indentation, comment lines which are
4576 -- immediately followed by if or case statement alternative, record
4577 -- variant or 'begin' keyword are indented as the keyword that follows
4578 -- them.:
4580 -- Standard indentation:
4582 -- if A then
4583 -- null;
4584 -- -- some comment
4585 -- else
4586 -- null;
4587 -- end if;
4589 -- GNAT style indentation:
4591 -- if A then
4592 -- null;
4593 -- -- some comment
4594 -- else
4595 -- null;
4596 -- end if;
4598 -- Option "GNAT style comment beginning" means that for each comment
4599 -- which is not considered as non-formattable separator (that is, the
4600 -- comment line contains only dashes, or a comment line ends with two
4601 -- dashes), there will be at least two spaces between starting "--" and
4602 -- the first non-blank character of the comment.
4604 S_Pretty_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
4605 "-gnatec>";
4606 -- /CONFIGURATION_PRAGMAS_FILE=file
4608 -- Specify a configuration pragmas file that need to be passed to the
4609 -- compiler.
4611 S_Pretty_Constr : aliased constant S := "/CONSTRUCT_LAYOUT=" &
4612 "GNAT " &
4613 "-l1 " &
4614 "COMPACT " &
4615 "-l2 " &
4616 "UNCOMPACT " &
4617 "-l3";
4618 -- /CONSTRUCT_LAYOUT[=construct-option]
4620 -- Set construct layout. Default is GNAT style layout.
4621 -- construct-option may be one of the following:
4623 -- GNAT (D)
4624 -- COMPACT
4625 -- UNCOMPACT
4627 -- The difference between GNAT style and Compact layout on one hand
4628 -- and Uncompact layout on the other hand can be illustrated by the
4629 -- following examples:
4631 -- GNAT style and Uncompact layout
4632 -- Compact layout
4634 -- type q is record type q is
4635 -- a : integer; record
4636 -- b : integer; a : integer;
4637 -- end record; b : integer;
4638 -- end record;
4641 -- Block : declare Block :
4642 -- A : Integer := 3; declare
4643 -- begin A : Integer := 3;
4644 -- Proc (A, A); begin
4645 -- end Block; Proc (A, A);
4646 -- end Block;
4648 -- Clear : for J in 1 .. 10 loop Clear :
4649 -- A (J) := 0; for J in 1 .. 10 loop
4650 -- end loop Clear; A (J) := 0;
4651 -- end loop Clear;
4654 -- A further difference between GNAT style layout and compact layout is
4655 -- that in GNAT style layout compound statements, return statements and
4656 -- bodies are always separated by empty lines.
4658 S_Pretty_Comind : aliased constant S := "/CONTINUATION_INDENT=#" &
4659 "-cl#";
4660 -- /CONTINUATION_INDENT=nnn
4662 -- Indentation level for continuation lines, nnn from 1 .. 9.
4663 -- The default value is one less then the (normal) indentation level,
4664 -- unless the indentation is set to 1: in that case the default value for
4665 -- continuation line indentation is also 1.
4667 S_Pretty_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4668 "-X" & '"';
4669 -- /EXTERNAL_REFERENCE="name=val"
4671 -- Specifies an external reference to the project manager. Useful only if
4672 -- /PROJECT_FILE is used.
4674 -- Example:
4675 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4677 S_Pretty_Current : aliased constant S := "/CURRENT_DIRECTORY " &
4678 "!-I-";
4679 -- /CURRENT_DIRECTORY (D)
4681 -- Look for source files in the current working directory.
4683 -- /NOCURRENT_DIRECTORY
4684 -- Do not look for source files in the current working directory.
4686 S_Pretty_Dico : aliased constant S := "/DICTIONARY=*" &
4687 "-D*";
4688 -- /DICTIONARY=(file_name, ...)
4690 -- Use each specified file as a dictionary file that defines the casing
4691 -- for a set of specified names, thereby overriding the effect on these
4692 -- names by any explicit or implicit /NAME_CASING qualifier.
4694 -- GNAT PRETTY implicitly uses a default dictionary file to define the
4695 -- casing for the Ada predefined names and the names declared in the GNAT
4696 -- libraries.
4698 -- The structure of a dictionary file, and details on the conventions
4699 -- used in the default dictionary file, are defined in the GNAT User's
4700 -- Guide.
4702 S_Pretty_Files : aliased constant S := "/FILES=@" &
4703 "-files=@";
4704 -- /FILES=filename
4706 -- Take as arguments the files that are listed in the specified
4707 -- text file.
4709 S_Pretty_Forced : aliased constant S := "/FORCED_OUTPUT=@" &
4710 "-of@";
4711 -- /FORCED_OUTPUT=file
4713 -- Write the output into the specified file, overriding any possibly
4714 -- existing file.
4716 S_Pretty_Formfeed : aliased constant S := "/FORM_FEED_AFTER_PRAGMA_PAGE " &
4717 "-ff";
4718 -- /FORM_FEED_AFTER_PRAGMA_PAGE
4720 -- When there is a pragma Page in the source, insert a Form Feed
4721 -- character immediately after the semicolon that follows the pragma
4722 -- Page.
4724 S_Pretty_Indent : aliased constant S := "/INDENTATION_LEVEL=#" &
4725 "-i#";
4726 -- /INDENTATION_LEVEL=nnn
4728 -- Specify the number of spaces to add for each indentation level.
4729 -- nnn must be between 1 and 9. The default is 3.
4731 S_Pretty_Keyword : aliased constant S := "/KEYWORD_CASING=" &
4732 "LOWER_CASE " &
4733 "-kL " &
4734 "UPPER_CASE " &
4735 "-kU";
4736 -- /KEYWORD_CASING[=keyword-option]
4738 -- Specify the case of Ada keywords. The default is keywords in lower
4739 -- case.
4740 -- keyword-option may be one of the following:
4742 -- LOWER_CASE (D)
4743 -- UPPER_CASE
4745 S_Pretty_Maxlen : aliased constant S := "/LINE_LENGTH_MAX=#" &
4746 "-M#";
4747 -- /LINE_LENGTH_MAX=nnn
4749 -- Set the maximum line length, nnn from 32 ..256. The default is 79.
4751 S_Pretty_Maxind : aliased constant S := "/MAX_INDENT=#" &
4752 "-T#";
4753 -- /MAX_INDENT=nnn
4755 -- Do not use an additional indentation level for case alternatives
4756 -- and variants if their number is nnn or more. The default is 10.
4757 -- If nnn is zero, an additional indentation level is used for any number
4758 -- of case alternatives and variants.
4760 S_Pretty_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4761 "DEFAULT " &
4762 "-vP0 " &
4763 "MEDIUM " &
4764 "-vP1 " &
4765 "HIGH " &
4766 "-vP2";
4767 -- /MESSAGES_PROJECT_FILE[=messages-option]
4769 -- Specifies the "verbosity" of the parsing of project files.
4770 -- messages-option may be one of the following:
4772 -- DEFAULT (D) No messages are output if there is no error or warning.
4774 -- MEDIUM A small number of messages are output.
4776 -- HIGH A great number of messages are output, most of them not
4777 -- being useful for the user.
4779 S_Pretty_Names : aliased constant S := "/NAME_CASING=" &
4780 "AS_DECLARED " &
4781 "-nD " &
4782 "LOWER_CASE " &
4783 "-nL " &
4784 "UPPER_CASE " &
4785 "-nU " &
4786 "MIXED_CASE " &
4787 "-nM";
4788 -- /NAME_CASING[=name-option]
4790 -- Specify the casing of names.
4791 -- 'name-option' may be one of:
4793 -- AS_DECLARED (D) Name casing for defining occurrences are as they
4794 -- appear in the source file.
4796 -- LOWER_CASE Names are in lower case.
4798 -- UPPER_CASE Names are in upper case.
4800 -- MIXED_CASE Names are in mixed case.
4802 S_Pretty_No_Backup : aliased constant S := "/NO_BACKUP " &
4803 "-rnb";
4804 -- /REPLACE_NO_BACKUP
4806 -- Replace the argument source with the pretty-printed source without
4807 -- creating any backup copy of the argument source.
4809 S_Pretty_No_Labels : aliased constant S := "/NO_MISSED_LABELS " &
4810 "-e";
4811 -- /NO_MISSED_LABELS
4813 -- Do not insert missing end/exit labels. The end label is the name of
4814 -- a construct that may optionally appear at the end of the construct.
4815 -- This includes the names of packages and subprograms.
4816 -- Similarly, the exit label is the name of a loop that may appear as the
4817 -- argument of an exit statement within the loop. By default, GNAT PRETTY
4818 -- inserts these end/exit labels when they are absent in the original
4819 -- source. This qualifier /NO_MISSED_LABELS suppresses this insertion,
4820 -- so that the formatted source reflects the original.
4822 S_Pretty_Notabs : aliased constant S := "/NOTABS " &
4823 "-notabs";
4824 -- /NOTABS
4826 -- Replace all tabulations in comments with spaces.
4828 S_Pretty_Output : aliased constant S := "/OUTPUT=@" &
4829 "-o@";
4830 -- /OUTPUT=file
4832 -- Write the output to the specified file. If the file already exists,
4833 -- an error is reported.
4835 S_Pretty_Override : aliased constant S := "/OVERRIDING_REPLACE " &
4836 "-rf";
4837 -- /NOOVERRIDING_REPLACE (D)
4838 -- /OVERRIDING_REPLACE
4840 -- Replace the argument source with the pretty-printed source and copy the
4841 -- argument source into filename.NPP, overriding any existing file if
4842 -- needed.
4844 S_Pretty_Pragma : aliased constant S := "/PRAGMA_CASING=" &
4845 "MIXED_CASE " &
4846 "-pM " &
4847 "LOWER_CASE " &
4848 "-pL " &
4849 "UPPER_CASE " &
4850 "-pU";
4851 -- /PRAGMA_CASING[=pragma-option]
4853 -- Set the case of pragma identifiers. The default is Mixed case.
4854 -- pragma-option may be one of the following:
4856 -- MIXED_CASE (D)
4857 -- LOWER_CASE
4858 -- UPPER_CASE
4860 S_Pretty_Project : aliased constant S := "/PROJECT_FILE=<" &
4861 "-P>";
4862 -- /PROJECT_FILE=filename
4864 -- Specifies the main project file to be used. The project files rooted
4865 -- at the main project file will be parsed before any other processing to
4866 -- set the building environment.
4868 S_Pretty_Replace : aliased constant S := "/REPLACE " &
4869 "-r";
4870 -- /NOREPLACE (D)
4871 -- /REPLACE
4873 -- Replace the argument source with the pretty-printed source and copy the
4874 -- argument source into filename.NPP. If filename.NPP already exists,
4875 -- report an error and exit.
4877 S_Pretty_RTS : aliased constant S := "/RUNTIME_SYSTEM=|" &
4878 "--RTS=|";
4879 -- /RUNTIME_SYSTEM=xxx
4881 -- Compile against an alternate runtime system named xxx or RTS-xxx.
4883 S_Pretty_Search : aliased constant S := "/SEARCH=*" &
4884 "-I*";
4885 -- /SEARCH=(directory[,...])
4887 -- When looking for source files also look in directories specified.
4889 S_Pretty_Specific : aliased constant S := "/SPECIFIC_CASING " &
4890 "-D-";
4891 -- /SPECIFIC_CASING
4893 -- Do not use the default dictionary file; instead, use the casing
4894 -- defined by a qualifier /NAME_CASING and/or any explicit dictionary
4895 -- file specified by a qualifier /DICTIONARY.
4897 S_Pretty_Standard : aliased constant S := "/STANDARD_OUTPUT " &
4898 "-pipe";
4899 -- /NOSTANDARD_OUTPUT (D)
4900 -- /STANDARD_OUTPUT
4902 -- Redirect the output to the standard output.
4904 S_Pretty_Verbose : aliased constant S := "/VERBOSE " &
4905 "-v";
4906 -- /NOVERBOSE (D)
4907 -- /VERBOSE
4909 -- Verbose mode; GNAT PRETTY generates version information and then a
4910 -- trace of the actions it takes to produce or obtain the ASIS tree.
4912 S_Pretty_Warnings : aliased constant S := "/WARNINGS " &
4913 "-w";
4914 -- /NOWARNINGS (D)
4915 -- /WARNINGS
4917 -- Issue a warning to the standard error stream if it is not possible
4918 -- to provide the required layout in the result source.
4919 -- By default such warnings are not activated.
4921 Pretty_Switches : aliased constant Switches :=
4922 (S_Pretty_Align 'Access,
4923 S_Pretty_Attrib 'Access,
4924 S_Pretty_Comments 'Access,
4925 S_Pretty_Config 'Access,
4926 S_Pretty_Constr 'Access,
4927 S_Pretty_Comind 'Access,
4928 S_Pretty_Ext 'Access,
4929 S_Pretty_Current 'Access,
4930 S_Pretty_Dico 'Access,
4931 S_Pretty_Files 'Access,
4932 S_Pretty_Forced 'Access,
4933 S_Pretty_Formfeed 'Access,
4934 S_Pretty_Indent 'Access,
4935 S_Pretty_Keyword 'Access,
4936 S_Pretty_Maxlen 'Access,
4937 S_Pretty_Maxind 'Access,
4938 S_Pretty_Mess 'Access,
4939 S_Pretty_Names 'Access,
4940 S_Pretty_No_Backup 'Access,
4941 S_Pretty_No_Labels 'Access,
4942 S_Pretty_Notabs 'Access,
4943 S_Pretty_Output 'Access,
4944 S_Pretty_Override 'Access,
4945 S_Pretty_Pragma 'Access,
4946 S_Pretty_Replace 'Access,
4947 S_Pretty_Project 'Access,
4948 S_Pretty_RTS 'Access,
4949 S_Pretty_Search 'Access,
4950 S_Pretty_Specific 'Access,
4951 S_Pretty_Standard 'Access,
4952 S_Pretty_Verbose 'Access,
4953 S_Pretty_Warnings 'Access);
4955 -----------------------------
4956 -- Switches for GNAT SETUP --
4957 -----------------------------
4959 S_Setup_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
4960 "-X" & '"';
4961 -- /EXTERNAL_REFERENCE="name=val"
4963 -- Specifies an external reference to the project manager. Useful only if
4964 -- /PROJECT_FILE is used.
4966 -- Example:
4967 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
4969 S_Setup_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
4970 "DEFAULT " &
4971 "-vP0 " &
4972 "MEDIUM " &
4973 "-vP1 " &
4974 "HIGH " &
4975 "-vP2";
4976 -- /MESSAGES_PROJECT_FILE[=messages-option]
4978 -- Specifies the "verbosity" of the parsing of project files.
4979 -- messages-option may be one of the following:
4981 -- DEFAULT (D) No messages are output if there is no error or warning.
4983 -- MEDIUM A small number of messages are output.
4985 -- HIGH A great number of messages are output, most of them not
4986 -- being useful for the user.
4988 S_Setup_Project : aliased constant S := "/PROJECT_FILE=<" &
4989 "-P>";
4990 -- /PROJECT_FILE=filename
4992 -- Specifies the main project file to be used. The project files rooted
4993 -- at the main project file are parsed and non existing object
4994 -- directories, library directories and exec directories are created.
4996 S_Setup_Quiet : aliased constant S := "/QUIET " &
4997 "-q";
4998 -- /NOQUIET (D)
4999 -- /QUIET
5001 -- Work quietly, only output warnings and errors.
5003 S_Setup_Verbose : aliased constant S := "/VERBOSE " &
5004 "-v";
5005 -- /NOVERBOSE (D)
5006 -- /VERBOSE
5008 -- Verbose mode; GNAT PRETTY generates version information and then a
5009 -- trace of the actions it takes to produce or obtain the ASIS tree.
5011 Setup_Switches : aliased constant Switches :=
5012 (S_Setup_Ext 'Access,
5013 S_Setup_Mess 'Access,
5014 S_Setup_Project 'Access,
5015 S_Setup_Quiet 'Access,
5016 S_Setup_Verbose 'Access);
5018 ------------------------------
5019 -- Switches for GNAT SHARED --
5020 ------------------------------
5022 S_Shared_Debug : aliased constant S := "/DEBUG=" &
5023 "ALL " &
5024 "-g3 " &
5025 "NONE " &
5026 "-g0 " &
5027 "TRACEBACK " &
5028 "-g1 " &
5029 "NOTRACEBACK " &
5030 "-g0";
5031 -- /DEBUG[=debug-option]
5032 -- /NODEBUG
5034 -- Specifies the amount of debugging information included. 'debug-option'
5035 -- is one of the following:
5037 -- ALL (D) Include full debugging information.
5039 -- NONE Provide no debugging information. Same as /NODEBUG.
5041 -- TRACEBACK Provide sufficient debug information for a traceback.
5043 -- NOTRACEBACK Same as NONE.
5045 S_Shared_Image : aliased constant S := "/IMAGE=@" &
5046 "-o@";
5047 -- /IMAGE=image-name
5049 -- 'image-name' specifies the name for the generated shared library.
5051 S_Shared_Ident : aliased constant S := "/IDENTIFICATION=" & '"' &
5052 "--for-linker=IDENT=" &
5053 '"';
5054 -- /IDENTIFICATION="<string>"
5056 -- "<string>" specifies the string to be stored in the image file ident-
5057 -- ification field in the image header. It overrides any pragma Ident
5058 -- specified string.
5060 S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES " &
5061 "-nostartfiles";
5062 -- /NOSTART_FILES
5064 -- Link in default image initialization and startup functions.
5066 S_Shared_Noinhib : aliased constant S := "/NOINHIBIT-IMAGE " &
5067 "--for-linker=--noinhibit-exec";
5068 -- /NOINHIBIT-IMAGE
5070 -- Delete image if there are errors or warnings.
5072 S_Shared_Verb : aliased constant S := "/VERBOSE " &
5073 "-v";
5074 -- /NOVERBOSE (D)
5075 -- /VERBOSE
5077 -- Causes additional information to be output, including a full list of
5078 -- the included object files. This switch option is most useful when you
5079 -- want to see what set of object files are being used in the link step.
5081 S_Shared_ZZZZZ : aliased constant S := "/<other> " &
5082 "--for-linker=";
5083 -- /<other>
5085 -- Any other switch transmitted to the underlying linker.
5087 Shared_Switches : aliased constant Switches :=
5088 (S_Shared_Debug 'Access,
5089 S_Shared_Image 'Access,
5090 S_Shared_Ident 'Access,
5091 S_Shared_Nofiles 'Access,
5092 S_Shared_Noinhib 'Access,
5093 S_Shared_Verb 'Access,
5094 S_Shared_ZZZZZ 'Access);
5096 ----------------------------
5097 -- Switches for GNAT STUB --
5098 ----------------------------
5100 S_Stub_Config : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
5101 "-gnatec>";
5102 -- /CONFIGURATION_PRAGMAS_FILE=filespec
5104 -- Specifies a configuration pragmas file that must be taken into account
5105 -- when compiling.
5107 S_Stub_Current : aliased constant S := "/CURRENT_DIRECTORY " &
5108 "!-I-";
5109 -- /CURRENT_DIRECTORY (D)
5110 -- /NOCURRENT_DIRECTORY
5112 -- Look for source, library or object files in the default directory.
5114 S_Stub_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
5115 "-X" & '"';
5116 -- /EXTERNAL_REFERENCE="name=val"
5118 -- Specifies an external reference to the project manager. Useful only if
5119 -- /PROJECT_FILE is used.
5121 -- Example:
5122 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
5124 S_Stub_Full : aliased constant S := "/FULL " &
5125 "-f";
5126 -- /NOFULL (D)
5127 -- /FULL
5129 -- If the destination directory already contains a file with the name of
5130 -- the body file for the argument file spec, replace it with the generated
5131 -- body stub. If /FULL is not used and there is already a body file, this
5132 -- existing body file is not replaced.
5134 S_Stub_Header : aliased constant S := "/HEADER=" &
5135 "GENERAL " &
5136 "-hg " &
5137 "SPEC " &
5138 "-hs";
5139 -- /HEADER[=header-option]
5141 -- Specifies the form of the comment header above the generated body stub.
5142 -- If no /HEADER qualifier is specified, there is no comment header.
5143 -- header-option is one of the following:
5146 -- GENERAL (D) Put a sample comment header into the body stub.
5148 -- SPEC Put the comment header (i.e., all the comments
5149 -- preceding the compilation unit) from the source of the
5150 -- library unit declaration into the body stub.
5152 S_Stub_Indent : aliased constant S := "/INDENTATION=#" &
5153 "-i#";
5154 -- /INDENTATION=nnn
5156 -- (nnn is a non-negative integer). Set the indentation level in the
5157 -- generated body stub to nnn. nnn=0 means "no indentation".
5158 -- Default insdentation is 3.
5160 S_Stub_Keep : aliased constant S := "/KEEP " &
5161 "-k";
5162 -- /NOKEEP (D)
5163 -- /KEEP
5165 -- Do not delete the tree file (i.e., the snapshot of the compiler
5166 -- internal structures used by gnatstub) after creating the body stub.
5168 S_Stub_Length : aliased constant S := "/LINE_LENGTH=#" &
5169 "-l#";
5170 -- /LINE_LENGTH=nnn
5172 -- (n is a non-negative integer). Set the maximum line length in the body
5173 -- stub to nnn. Default is 78.
5175 S_Stub_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
5176 "DEFAULT " &
5177 "-vP0 " &
5178 "MEDIUM " &
5179 "-vP1 " &
5180 "HIGH " &
5181 "-vP2";
5182 -- /MESSAGES_PROJECT_FILE[=messages-option]
5184 -- Specifies the "verbosity" of the parsing of project files.
5185 -- messages-option may be one of the following:
5187 -- DEFAULT (D) No messages are output if there is no error or warning.
5189 -- MEDIUM A small number of messages are output.
5191 -- HIGH A great number of messages are output, most of them not
5192 -- being useful for the user.
5194 S_Stub_Output : aliased constant S := "/OUTPUT=@" &
5195 "-o@";
5196 -- /OUTPUT=filespec
5198 -- Body file name. This should be set if the argument file name does not
5199 -- follow the GNAT file naming conventions. If this switch is omitted,
5200 -- the default name for the body will be obtained from the argument file
5201 -- name according to the GNAT file naming conventions.
5203 S_Stub_Project : aliased constant S := "/PROJECT_FILE=<" &
5204 "-P>";
5205 -- /PROJECT_FILE=filename
5207 -- Specifies the main project file to be used. The project files rooted
5208 -- at the main project file will be parsed before any other processing.
5209 -- The source and object directories to be searched will be communicated
5210 -- to gnatstub through logical names ADA_PRJ_INCLUDE_FILE and
5211 -- ADA_PRJ_OBJECTS_FILE.
5213 S_Stub_Quiet : aliased constant S := "/QUIET " &
5214 "-q";
5215 -- /NOQUIET (D)
5216 -- /QUIET
5218 -- Quiet mode: do not generate a confirmation when a body is successfully
5219 -- created, and do not generate a message when a body is not required for
5220 -- an argument unit.
5222 S_Stub_Search : aliased constant S := "/SEARCH=*" &
5223 "-I*";
5224 -- /SEARCH=(directory[,...])
5226 -- When looking for source files also look in directories specified.
5228 S_Stub_Tree : aliased constant S := "/TREE_FILE=" &
5229 "OVERWRITE " &
5230 "-t " &
5231 "SAVE " &
5232 "-k " &
5233 "REUSE " &
5234 "-r";
5235 -- /TREE_FILE[=treefile-option]
5237 -- Specify what to do with the tree file.
5238 -- treefile-option is one of the following:
5240 -- OVERWRITE (D) Overwrite the existing tree file. If the current
5241 -- directory already contains the file which, according
5242 -- to the GNAT file naming rules should be considered
5243 -- as a tree file for the argument source file,
5244 -- gnatstub will refuse to create the tree file needed
5245 -- to create a sample body unless this option is chosen.
5247 -- SAVE Do not remove the tree file (i.e., the snapshot
5248 -- of the compiler internal structures used by gnatstub)
5249 -- after creating the body stub.
5251 -- REUSE Reuse the tree file (if it exists) instead of
5252 -- creating it.
5253 -- Instead of creating the tree file for the library
5254 -- unit declaration, gnatstub tries to find it in the
5255 -- current directory and use it for creating a body.
5256 -- If the tree file is not found, no body is created.
5257 -- This option also implies `SAVE', whether or not the
5258 -- latter is set explicitly.
5260 S_Stub_Verbose : aliased constant S := "/VERBOSE " &
5261 "-v";
5262 -- /NOVERBOSE (D)
5263 -- /VERBOSE
5265 -- Verbose mode: generate version information.
5267 Stub_Switches : aliased constant Switches :=
5268 (S_Stub_Config 'Access,
5269 S_Stub_Current 'Access,
5270 S_Stub_Ext 'Access,
5271 S_Stub_Full 'Access,
5272 S_Stub_Header 'Access,
5273 S_Stub_Indent 'Access,
5274 S_Stub_Keep 'Access,
5275 S_Stub_Length 'Access,
5276 S_Stub_Mess 'Access,
5277 S_Stub_Output 'Access,
5278 S_Stub_Project 'Access,
5279 S_Stub_Quiet 'Access,
5280 S_Stub_Search 'Access,
5281 S_Stub_Tree 'Access,
5282 S_Stub_Verbose 'Access);
5284 ----------------------------
5285 -- Switches for GNAT XREF --
5286 ----------------------------
5288 S_Xref_All : aliased constant S := "/ALL_FILES " &
5289 "-a";
5290 -- /NOALL_FILES (D)
5291 -- /ALL_FILES
5293 -- If this switch is present, FIND and XREF will parse the read-only
5294 -- files found in the library search path. Otherwise, these files will
5295 -- be ignored. This option can be used to protect Gnat sources or your
5296 -- own libraries from being parsed, thus making FIND and XREF much
5297 -- faster, and their output much smaller.
5299 S_Xref_Deriv : aliased constant S := "/DERIVED_TYPES " &
5300 "-d";
5301 -- /NODERIVED_TYPES (D)
5302 -- /DERIVED_TYPES
5304 -- Output the parent type reference for each matching derived types.
5306 S_Xref_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
5307 "-X" & '"';
5308 -- /EXTERNAL_REFERENCE="name=val"
5310 -- Specifies an external reference to the project manager. Useful only if
5311 -- /PROJECT_FILE is used.
5313 -- Example:
5314 -- /EXTERNAL_REFERENCE="DEBUG=TRUE"
5316 S_Xref_Full : aliased constant S := "/FULL_PATHNAME " &
5317 "-f";
5318 -- /NOFULL_PATHNAME (D)
5319 -- /FULL_PATHNAME
5321 -- If this switch is set, the output file names will be preceded by their
5322 -- directory (if the file was found in the search path). If this switch
5323 -- is not set, the directory will not be printed.
5325 S_Xref_Global : aliased constant S := "/IGNORE_LOCALS " &
5326 "-g";
5327 -- /NOIGNORE_LOCALS (D)
5328 -- /IGNORE_LOCALS
5330 -- If this switch is set, information is output only for library-level
5331 -- entities, ignoring local entities. The use of this switch may
5332 -- accelerate FIND and XREF.
5334 S_Xref_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
5335 "DEFAULT " &
5336 "-vP0 " &
5337 "MEDIUM " &
5338 "-vP1 " &
5339 "HIGH " &
5340 "-vP2";
5341 -- /MESSAGES_PROJECT_FILE[=messages-option]
5343 -- Specifies the "verbosity" of the parsing of project files.
5344 -- messages-option may be one of the following:
5346 -- DEFAULT (D) No messages are output if there is no error or warning.
5348 -- MEDIUM A small number of messages are output.
5350 -- HIGH A great number of messages are output, most of them not
5351 -- being useful for the user.
5353 S_Xref_Nostinc : aliased constant S := "/NOSTD_INCLUDES " &
5354 "-nostdinc";
5355 -- /NOSTD_INCLUDES
5357 -- Do not look for sources in the system default directory.
5359 S_Xref_Nostlib : aliased constant S := "/NOSTD_LIBRARIES " &
5360 "-nostdlib";
5361 -- /NOSTD_LIBRARIES
5363 -- Do not look for library files in the system default directory.
5365 S_Xref_Object : aliased constant S := "/OBJECT_SEARCH=*" &
5366 "-aO*";
5367 -- /OBJECT_SEARCH=(directory,...)
5369 -- When searching for library and object files, look in the specified
5370 -- directories. The order in which library files are searched is the same
5371 -- as for MAKE.
5373 S_Xref_Project : aliased constant S := "/PROJECT=@" &
5374 "-p@";
5375 -- /PROJECT=file
5377 -- Specify a project file to use. By default, FIND and XREF will try to
5378 -- locate a project file in the current directory.
5380 -- If a project file is either specified or found by the tools, then the
5381 -- content of the source directory and object directory lines are added
5382 -- as if they had been specified respectively by /SOURCE_SEARCH and
5383 -- /OBJECT_SEARCH.
5385 S_Xref_Prj : aliased constant S := "/PROJECT_FILE=<" &
5386 "-P>";
5387 -- /PROJECT_FILE=filename
5389 -- Specifies the main project file to be used. The project files rooted
5390 -- at the main project file will be parsed before doing any processing.
5391 -- The source and object directories to be searched will be communicated
5392 -- to gnatxref through logical names ADA_PRJ_INCLUDE_FILE and
5393 -- ADA_PRJ_OBJECTS_FILE.
5395 S_Xref_Search : aliased constant S := "/SEARCH=*" &
5396 "-I*";
5397 -- /SEARCH=(directory,...)
5399 -- Equivalent to:
5400 -- /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
5402 S_Xref_Source : aliased constant S := "/SOURCE_SEARCH=*" &
5403 "-aI*";
5404 -- /SOURCE_SEARCH=(directory,...)
5406 -- When looking for source files also look in the specified directories.
5407 -- The order in which source file search is undertaken is the same as for
5408 -- MAKE.
5410 S_Xref_Output : aliased constant S := "/UNUSED " &
5411 "-u";
5412 -- /SOURCE_SEARCH=(directory,...)
5414 -- When looking for source files also look in the specified directories.
5415 -- The order in which source file search is undertaken is the same as for
5416 -- MAKE.
5418 S_Xref_Tags : aliased constant S := "/TAGS " &
5419 "-v";
5420 -- /NOTAGS (D)
5421 -- /TAGS
5423 -- Print a 'tags' file for vi.
5425 Xref_Switches : aliased constant Switches :=
5426 (S_Xref_All 'Access,
5427 S_Xref_Deriv 'Access,
5428 S_Xref_Ext 'Access,
5429 S_Xref_Full 'Access,
5430 S_Xref_Global 'Access,
5431 S_Xref_Mess 'Access,
5432 S_Xref_Nostinc 'Access,
5433 S_Xref_Nostlib 'Access,
5434 S_Xref_Object 'Access,
5435 S_Xref_Project 'Access,
5436 S_Xref_Prj 'Access,
5437 S_Xref_Search 'Access,
5438 S_Xref_Source 'Access,
5439 S_Xref_Output 'Access,
5440 S_Xref_Tags 'Access);
5442 end VMS_Data;