-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- GNATBIND, GNATLINK
-- Set True if binder file to be generated in Ada rather than C
- Ada_95 : Boolean := True;
+ type Ada_Version_Type is (Ada_83, Ada_95, Ada_05);
+ -- Versions of Ada for Ada_Version below. Note that these are ordered,
+ -- so that tests like Ada_Version >= Ada_95 are legitimate and useful.
+
+ Ada_Version_Default : Ada_Version_Type := Ada_95;
+ -- GNAT
+ -- Default Ada version if no switch given
+
+ Ada_Version : Ada_Version_Type := Ada_Version_Default;
-- GNAT
- -- Set True if operating in Ada 95 mode
- -- Set False if operating in Ada 83 mode
+ -- Current Ada version for compiler
- Ada_83 : Boolean := False;
+ Ada_Version_Runtime : Ada_Version_Type := Ada_05;
-- GNAT
- -- Set True if operating in Ada 83 mode
- -- Set False if operating in Ada 95 mode
+ -- Ada version used to compile the runtime
Ada_Final_Suffix : constant String := "final";
Ada_Final_Name : String_Ptr := new String'("ada" & Ada_Final_Suffix);
-- GNAT
-- Set False to disable address clause warnings
+ Address_Is_Private : Boolean := False;
+ -- GNAT, GNATBIND
+ -- Set True if package System has the line "type Address is private;"
+
All_Errors_Mode : Boolean := False;
-- GNAT
-- Flag set to force display of multiple errors on a single line and
Create_Mapping_File : Boolean := False;
-- GNATMAKE
- -- Set to True (-C switch) to indicate that gnatmake
- -- invokes the compiler with a mapping file (-gnatem compiler switch).
+ -- Set to True (-C switch) to indicate that gnatmake will invoke
+ -- the compiler with a mapping file (-gnatem compiler switch).
subtype Debug_Level_Value is Nat range 0 .. 3;
Debugger_Level : Debug_Level_Value := 0;
-- GNATBIND
- -- The value given to the -g parameter.
- -- The default value for -g with no value is 2
- -- This is usually ignored by GNATBIND, except in the VMS version
- -- where it is passed as an argument to __gnat_initialize to trigger
- -- the activation of the remote debugging interface (is this true???).
+ -- The value given to the -g parameter. The default value for -g with
+ -- no value is 2. This is usually ignored by GNATBIND, except in the
+ -- VMS version where it is passed as an argument to __gnat_initialize
+ -- to trigger the activation of the remote debugging interface.
+ -- Is this still true ???
Debug_Generated_Code : Boolean := False;
-- GNAT
-- of the original source code. Causes debugging information to be
-- written with respect to the generated code file that is written.
+ Default_Exit_Status : Int := 0;
+ -- GNATBIND
+ -- Set the default exit status value. Set by the -Xnnn switch for the
+ -- binder.
+
Default_Sec_Stack_Size : Int := -1;
-- GNATBIND
-- Set to default secondary stack size in units of kilobytes. Set by
-- default was set by the binder, and that the default should be the
-- initial value of System.Secondary_Stack.Default_Secondary_Stack_Size.
+ Detect_Blocking : Boolean := False;
+ -- GNAT
+ -- Set True to force the run time to raise Program_Error if calls to
+ -- potentially blocking operations are detected from protected actions.
+
Display_Compilation_Progress : Boolean := False;
-- GNATMAKE
-- Set True (-d switch) to display information on progress while compiling
- -- files. Internal flag to be used in conjunction with an IDE such as
- -- Glide.
+ -- files. Internal flag to be used in conjunction with an IDE (e.g GPS).
type Distribution_Stub_Mode_Type is
-- GNAT
Extensions_Allowed : Boolean := False;
-- GNAT
-- Set to True by switch -gnatX if GNAT specific language extensions
- -- are allowed. For example, "with type" is a GNAT extension.
+ -- are allowed. For example, "limited with" is a GNAT extension.
type External_Casing_Type is (
As_Is, -- External names cased as they appear in the Ada source
-- effect if an explicit Link_Name is supplied (a link name is always
-- used exactly as given).
+ External_Unit_Compilation_Allowed : Boolean := False;
+ -- GNATMAKE
+ -- When True (set by gnatmake switch -x), allow compilation of sources
+ -- that are not part of any project file.
+
Float_Format : Character := ' ';
-- GNAT
-- A non-blank value indicates that a Float_Format pragma has been
GCC_Version : constant Nat := get_gcc_version;
-- GNATMAKE
-- Indicates which version of gcc is in use (2 = 2.8.1, 3 = 3.x).
- -- Used in particular to decide if gcc switch -shared-libgcc should be
- -- used (it cannot be used for 2.8.1).
Global_Discard_Names : Boolean := False;
-- GNAT, GNATBIND
-- 'p' PC (US, IBM page 437)
-- '8' PC (European, IBM page 850)
-- 'f' Full upper set (all distinct)
- -- 'n' No upper characters (Ada/83 rules)
+ -- 'n' No upper characters (Ada 83 rules)
-- 'w' Latin-1 plus wide characters allowed in identifiers
--
-- The setting affects the set of letters allowed in identifiers and the
-- then elaboration flag checks are to be generated in the binder
-- generated file.
+ Follow_Links : Boolean := False;
+ -- GNATMAKE
+ -- Set to True (-eL) to process the project files in trusted mode
+
Front_End_Inlining : Boolean := False;
-- GNAT
-- Set True to activate inlining by front-end expansion.
-- When True signals gnatmake to ignore compilation errors and keep
-- processing sources until there is no more work.
+ Keep_Temporary_Files : Boolean := False;
+ -- GNATCMD
+ -- When True the temporary files created by the GNAT driver are not
+ -- deleted. Set by switch -dn or qualifier /KEEP_TEMPORARY_FILES.
+
Link_Only : Boolean := False;
-- GNATMAKE
-- Set to True to skip compile and bind steps
-- Set to True when either Compile_Only, Bind_Only or Link_Only is
-- set to True.
+ Main_Index : Int := 0;
+ -- GNATMAKE
+ -- This is set to non-zero by gnatmake switch -eInnn to indicate that
+ -- the main program is the nnn unit in a multi-unit source file.
+
Mapping_File_Name : String_Ptr := null;
-- GNAT
-- File name of mapping between unit names, file names and path names.
-- extension, as set by the appropriate switch. If no switch is given,
-- then this value is initialized by Osint to the appropriate value.
+ Max_Line_Length : Int := Hostparm.Max_Line_Length;
+ -- This is a copy of Max_Line_Length used by the scanner. It is usually
+ -- set to be a copy of Hostparm.Max_Line_Length, and is used to check
+ -- the maximum line length in the scanner when style checking is inactive.
+ -- The only time it is set to a different value is during the scanning of
+ -- configuration pragma files, where we want to turn off all checking and
+ -- in particular we want to allow long lines. So we reset this value to
+ -- Column_Number'Last during scanning of configuration pragma files.
+
Maximum_Processes : Positive := 1;
-- GNATMAKE
-- Maximum number of processes that should be spawned to carry out
-- Set True if generated code uses the System.Secondary_Stack package.
-- For the binder, set if any unit uses the secondary stack package.
+ Setup_Projects : Boolean := False;
+ -- GNAT DRIVER
+ -- Set to True for GNAT SETUP: the Project Manager creates non existing
+ -- object, library and exec directories.
+
Shared_Libgnat : Boolean;
-- GNATBIND
-- Set to True if a shared libgnat is requested by using the -shared
-- Set to True to get verbose mode (full error message text and location
-- information sent to standard output, also header, copyright and summary)
+ Warn_On_Bad_Fixed_Value : Boolean := False;
+ -- GNAT
+ -- Set to True to generate warnings for static fixed-point expression
+ -- values that are not an exact multiple of the small value of the type.
+
Warn_On_Constant : Boolean := False;
-- GNAT
-- Set to True to generate warnings for variables that could be declared
-- command line switches, or by the use of appropriate configuration
-- pragmas in the gnat.adc file.
- Ada_83_Config : Boolean;
+ Ada_Version_Config : Ada_Version_Type;
-- GNAT
- -- This is the value of the configuration switch for Ada 83 mode, as set
- -- by the command line switch -gnat83, and possibly modified by the use
- -- of configuration pragmas Ada_95 and Ada_83 in the gnat.adc file. This
- -- switch is used to set the initial value for Ada_83 mode at the start
+ -- This is the value of the configuration switch for the Ada 83 mode, as
+ -- set by the command line switches -gnat83/95/05, and possibly modified
+ -- by the use of configuration pragmas Ada_83/Ada95/Ada05. This switch
+ -- is used to set the initial value for Ada_Version mode at the start
-- of analysis of a unit. Note however, that the setting of this flag
-- is ignored for internal and predefined units (which are always compiled
- -- in Ada 95 mode).
+ -- in the most up to date version of Ada).
Dynamic_Elaboration_Checks_Config : Boolean := False;
-- GNAT
private
type Config_Switches_Type is record
- Ada_83 : Boolean;
+ Ada_Version : Ada_Version_Type;
Dynamic_Elaboration_Checks : Boolean;
Exception_Locations_Suppressed : Boolean;
Extensions_Allowed : Boolean;