-- --
-- B o d y --
-- --
--- 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- --
procedure Register_Opt_Config_Switches is
begin
Ada_Version_Config := Ada_Version;
+ Ada_Version_Explicit_Config := Ada_Version_Explicit;
+ Assertions_Enabled_Config := Assertions_Enabled;
Dynamic_Elaboration_Checks_Config := Dynamic_Elaboration_Checks;
Exception_Locations_Suppressed_Config := Exception_Locations_Suppressed;
Extensions_Allowed_Config := Extensions_Allowed;
External_Name_Exp_Casing_Config := External_Name_Exp_Casing;
External_Name_Imp_Casing_Config := External_Name_Imp_Casing;
+ Persistent_BSS_Mode_Config := Persistent_BSS_Mode;
Polling_Required_Config := Polling_Required;
Use_VADS_Size_Config := Use_VADS_Size;
end Register_Opt_Config_Switches;
procedure Restore_Opt_Config_Switches (Save : Config_Switches_Type) is
begin
Ada_Version := Save.Ada_Version;
+ Ada_Version_Explicit := Save.Ada_Version_Explicit;
+ Assertions_Enabled := Save.Assertions_Enabled;
Dynamic_Elaboration_Checks := Save.Dynamic_Elaboration_Checks;
Exception_Locations_Suppressed := Save.Exception_Locations_Suppressed;
Extensions_Allowed := Save.Extensions_Allowed;
External_Name_Exp_Casing := Save.External_Name_Exp_Casing;
External_Name_Imp_Casing := Save.External_Name_Imp_Casing;
+ Persistent_BSS_Mode := Save.Persistent_BSS_Mode;
Polling_Required := Save.Polling_Required;
Use_VADS_Size := Save.Use_VADS_Size;
end Restore_Opt_Config_Switches;
procedure Save_Opt_Config_Switches (Save : out Config_Switches_Type) is
begin
Save.Ada_Version := Ada_Version;
+ Save.Ada_Version_Explicit := Ada_Version_Explicit;
+ Save.Assertions_Enabled := Assertions_Enabled;
Save.Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks;
Save.Exception_Locations_Suppressed := Exception_Locations_Suppressed;
Save.Extensions_Allowed := Extensions_Allowed;
Save.External_Name_Exp_Casing := External_Name_Exp_Casing;
Save.External_Name_Imp_Casing := External_Name_Imp_Casing;
+ Save.Persistent_BSS_Mode := Persistent_BSS_Mode;
Save.Polling_Required := Polling_Required;
Save.Use_VADS_Size := Use_VADS_Size;
end Save_Opt_Config_Switches;
begin
if Internal_Unit then
Ada_Version := Ada_Version_Runtime;
+ Assertions_Enabled := False;
Dynamic_Elaboration_Checks := False;
Extensions_Allowed := True;
External_Name_Exp_Casing := As_Is;
External_Name_Imp_Casing := Lowercase;
+ Persistent_BSS_Mode := False;
Use_VADS_Size := False;
else
Ada_Version := Ada_Version_Config;
+ Assertions_Enabled := Assertions_Enabled_Config;
Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks_Config;
Extensions_Allowed := Extensions_Allowed_Config;
External_Name_Exp_Casing := External_Name_Exp_Casing_Config;
External_Name_Imp_Casing := External_Name_Imp_Casing_Config;
+ Persistent_BSS_Mode := Persistent_BSS_Mode_Config;
Use_VADS_Size := Use_VADS_Size_Config;
end if;
Exception_Locations_Suppressed := Exception_Locations_Suppressed_Config;
Polling_Required := Polling_Required_Config;
+ Ada_Version_Explicit := Ada_Version_Explicit_Config;
end Set_Opt_Config_Switches;
---------------
---------------
procedure Tree_Read is
- Tree_Version_String_Len : Nat;
- Ada_Version_Config_Val : Nat;
+ Tree_Version_String_Len : Nat;
+ Ada_Version_Config_Val : Nat;
+ Ada_Version_Explicit_Config_Val : Nat;
+ Assertions_Enabled_Config_Val : Nat;
begin
Tree_Read_Int (Tree_ASIS_Version_Number);
Tree_Read_Data (Warning_Mode'Address,
Warning_Mode_Type'Object_Size / Storage_Unit);
Tree_Read_Int (Ada_Version_Config_Val);
+ Tree_Read_Int (Ada_Version_Explicit_Config_Val);
+ Tree_Read_Int (Assertions_Enabled_Config_Val);
Tree_Read_Bool (All_Errors_Mode);
Tree_Read_Bool (Assertions_Enabled);
Tree_Read_Bool (Enable_Overflow_Checks);
Tree_Read_Bool (Full_List);
- Ada_Version_Config := Ada_Version_Type'Val (Ada_Version_Config_Val);
+ Ada_Version_Config :=
+ Ada_Version_Type'Val (Ada_Version_Config_Val);
+ Ada_Version_Explicit_Config :=
+ Ada_Version_Type'Val (Ada_Version_Explicit_Config_Val);
+ Assertions_Enabled_Config :=
+ Boolean'Val (Assertions_Enabled_Config_Val);
-- Read version string: we have to check the length first
Tree_Write_Data (Warning_Mode'Address,
Warning_Mode_Type'Object_Size / Storage_Unit);
Tree_Write_Int (Ada_Version_Type'Pos (Ada_Version_Config));
+ Tree_Write_Int (Ada_Version_Type'Pos (Ada_Version_Explicit_Config));
+ Tree_Write_Int (Boolean'Pos (Assertions_Enabled_Config));
Tree_Write_Bool (All_Errors_Mode);
Tree_Write_Bool (Assertions_Enabled);
Tree_Write_Bool (Enable_Overflow_Checks);
-- --
------------------------------------------------------------------------------
--- This package contains global flags set by the initialization
--- routine from the command line and referenced throughout the compiler,
--- the binder, gnatmake or other GNAT tools. The comments indicate which
--- options are used by which programs (GNAT, GNATBIND, GNATMAKE, etc).
+-- This package contains global flags set by the initialization routine from
+-- the command line and referenced throughout the compiler, the binder, or
+-- other GNAT tools. The comments indicate which options are used by which
+-- programs (GNAT, GNATBIND, GNATMAKE, etc).
with Gnatvsn; use Gnatvsn;
with Hostparm; use Hostparm;
Ada_Version : Ada_Version_Type := Ada_Version_Default;
-- GNAT
- -- Current Ada version for compiler
+ -- Current Ada version for compiler, as set by configuration pragmas,
+ -- compiler switches, or implicitly (to Ada_Version_Runtime) when a
+ -- predefined or internal file is compiled.
+
+ Ada_Version_Explicit : Ada_Version_Type := Ada_Version_Default;
+ -- GNAT
+ -- Like Ada_Version, but does not get set implicitly for predefined
+ -- or internal units, so it reflects the Ada version explicitly set
+ -- using configuration pragmas or compiler switches (or if neither
+ -- appears, it remains set to Ada_Version_Default). This is used in
+ -- the rare cases (notably for pragmas Preelaborate_05 and Pure_05)
+ -- where in the run-time we want the explicit version set.
Ada_Version_Runtime : Ada_Version_Type := Ada_05;
-- GNAT
- -- Ada version used to compile the runtime
+ -- Ada version used to compile the runtime. Used to set Ada_Version (but
+ -- not Ada_Version_Explicit) when compiling predefined or internal units.
Ada_Final_Suffix : constant String := "final";
Ada_Final_Name : String_Ptr := new String'("ada" & Ada_Final_Suffix);
Assertions_Enabled : Boolean := False;
-- GNAT
- -- Enable assertions made using pragma Assert.
+ -- Enable assertions made using pragma Assert
ASIS_Mode : Boolean := False;
-- GNAT
Bind_Main_Program : Boolean := True;
-- GNATBIND
- -- Set to False if not binding main Ada program.
+ -- Set to False if not binding main Ada program
Bind_For_Library : Boolean := False;
-- GNATBIND
Check_Only : Boolean := False;
-- GNATBIND
- -- Set to True to do checks only, no output of binder file.
+ -- Set to True to do checks only, no output of binder file
Check_Readonly_Files : Boolean := False;
-- GNATMAKE
- -- Set to True to check readonly files during the make process.
+ -- Set to True to check readonly files during the make process
Check_Source_Files : Boolean := True;
-- GNATBIND, GNATMAKE
Check_Switches : Boolean := False;
-- GNATMAKE
- -- Set to True to check compiler options during the make process.
+ -- Set to True to check compiler options during the make process
Check_Unreferenced : Boolean := False;
-- GNAT
Check_Unreferenced_Formals : Boolean := False;
-- GNAT
- -- Set True to check for unreferenced formals. This is turned
- -- on by -gnatwa/wf/wu and turned off by -gnatwA/wF/wU.
+ -- Set True to check for unreferenced formals. This is turned on by
+ -- -gnatwa/wf/wu and turned off by -gnatwA/wF/wU.
Check_Withs : Boolean := False;
-- GNAT
Front_End_Setjmp_Longjmp_Exceptions;
-- GNAT
-- Set to the appropriate value depending on the default as given in
- -- system.ads (ZCX_By_Default, GCC_ZCX_Support, Front_End_ZCX_Support)
- -- and the use of -gnatL -gnatZ (and -gnatdX). The C convention is
- -- there to make this variable accessible to gigi.
+ -- system.ads (ZCX_By_Default, GCC_ZCX_Support, Front_End_ZCX_Support) and
+ -- the use of -gnatL -gnatZ (and -gnatdX). The C convention is there to
+ -- make this variable accessible to gigi.
Exception_Tracebacks : Boolean := False;
-- GNATBIND
-- GNATMAKE
-- Set to force recompilations even when the objects are up-to-date.
- Force_RM_Elaboration_Order : Boolean := False;
- -- GNATBIND
- -- True if binding with forced RM elaboration order (-f switch set)
- -- Note: this is considered an obsolescent option, to be removed in
- -- some future release. It is no longer documented. The proper way
- -- to get this effect is to use -gnatE and suppress elab checks.
-
Full_Path_Name_For_Brief_Errors : Boolean := False;
-- GNAT, GNATMAKE, GNATCLEAN
-- When True, in Brief_Output mode, each error message line
GCC_Version : constant Nat := get_gcc_version;
-- GNATMAKE
- -- Indicates which version of gcc is in use (2 = 2.8.1, 3 = 3.x).
+ -- Indicates which version of gcc is in use (2 = 2.8.1, 3 = 3.x)
Global_Discard_Names : Boolean := False;
-- GNAT, GNATBIND
Front_End_Inlining : Boolean := False;
-- GNAT
- -- Set True to activate inlining by front-end expansion.
+ -- Set True to activate inlining by front-end expansion
Inline_Processing_Required : Boolean := False;
-- GNAT
Minimal_Recompilation : Boolean := False;
-- GNATMAKE
- -- Set to True if minimal recompilation mode requested.
+ -- Set to True if minimal recompilation mode requested
Multiple_Unit_Index : Int;
-- GNAT
-- GNATBIND
-- True if output of list of objects is requested (-O switch set)
+ Persistent_BSS_Mode : Boolean := False;
+ -- GNAT
+ -- True if a Persistent_BSS configuration pragma is in effect, causing
+ -- potentially persistent data to be placed in the persistent_bss section.
+
Pessimistic_Elab_Order : Boolean := False;
-- GNATBIND
-- True if pessimistic elaboration order is to be chosen (-p switch set)
Stack_Checking_Enabled : Boolean;
-- GNAT
- -- Set to indicate if -fstack-check switch is set for the compilation.
- -- True means that the switch is set, so that stack checking is enabled.
- -- False means that the switch is not set (no stack checking). This
- -- value is obtained from the external imported value flag_stack_check
- -- in the gcc backend (see Frontend) and may be referenced throughout
- -- the compilation phases.
+ -- Set to indicate if -fstack-check switch is set for the compilation. True
+ -- means that the switch is set, so that stack checking is enabled. False
+ -- means that the switch is not set (no stack checking). This value is
+ -- obtained from the external imported value flag_stack_check in the gcc
+ -- backend (see Frontend) and may be referenced throughout the compilation
+ -- phases.
Style_Check : Boolean := False;
-- GNAT
-- is never appropriate in GNAT_Mode (and causes troubles, including
-- bogus circularities, if we try to compile the run-time library with
-- a System extension). If GNAT_Mode is not set, then System_Extend_Unit
- -- is a copy of the value set in System_Extend_Pragma_Ary.
+ -- is a copy of the value set in System_Extend_Pragma_Arg.
Subunits_Missing : Boolean := False;
-- GNAT
Table_Factor : Int := 1;
-- GNAT
-- Factor by which all initial table sizes set in Alloc are multiplied.
- -- Used in Table to calculate initial table sizes (the initial table
- -- size is the value in Alloc, used as the Table_Initial parameter
- -- value, multiplied by the factor given here. The default value is
- -- used if no -gnatT switch appears.
+ -- Used in Table to calculate initial table sizes (the initial table size
+ -- is the value in Alloc, used as the Table_Initial parameter value,
+ -- multiplied by the factor given here. The default value is used if no
+ -- -gnatT switch appears.
Task_Dispatching_Policy : Character := ' ';
-- GNAT, GNATBIND
Time_Slice_Value : Nat;
-- GNATBIND
- -- Time slice value. Valid only if Time_Slice_Set is True, i.e. if a
- -- Time_Slice pragma has been processed. Set to the time slice value
- -- in microseconds. Negative values are stored as zero, and the value
- -- is not larger than 1_000_000_000 (1000 seconds). Values larger than
- -- this are reset to this maximum. This can also be set with the -gnatTnn
- -- switch.
+ -- Time slice value. Valid only if Time_Slice_Set is True, i.e. if
+ -- Time_Slice pragma has been processed. Set to the time slice value in
+ -- microseconds. Negative values are stored as zero, and the value is not
+ -- larger than 1_000_000_000 (1000 seconds). Values larger than this are
+ -- reset to this maximum. This can also be set with the -gnatTnn switch.
Tolerate_Consistency_Errors : Boolean := False;
-- GNATBIND
- -- Tolerate time stamp and other consistency errors. If this flag is
- -- set to True (-t), then inconsistencies result in warnings rather than
- -- errors.
+ -- Tolerate time stamp and other consistency errors. If this flag is set to
+ -- True (-t), then inconsistencies result in warnings rather than errors.
Tree_Output : Boolean := False;
-- GNAT
Universal_Addressing_On_AAMP : Boolean := False;
-- GNAAMP
- -- Indicates if library-level objects should be accessed and updated
- -- using universal addressing instructions on the AAMP architecture.
- -- This flag is set to True when pragma Universal_Data is given as
- -- a configuration pragma.
+ -- Indicates if library-level objects should be accessed and updated using
+ -- universal addressing instructions on the AAMP architecture. This flag is
+ -- set to True when pragma Universal_Data is given as a configuration
+ -- pragma.
Unreserve_All_Interrupts : Boolean := False;
-- GNAT, GNATBIND
- -- Normally set False, set True if a valid Unreserve_All_Interrupts
- -- pragma appears anywhere in the main unit for GNAT, or if any ALI
- -- file has the corresponding attribute set in GNATBIND.
+ -- Normally set False, set True if a valid Unreserve_All_Interrupts pragma
+ -- appears anywhere in the main unit for GNAT, or if any ALI file has the
+ -- corresponding attribute set in GNATBIND.
Upper_Half_Encoding : Boolean := False;
-- GNAT
-- Normally set False, indicating that upper half ASCII characters are
-- used in the normal way to represent themselves. If the wide character
- -- encoding method uses the upper bit for this encoding, then this flag
- -- is set True, and upper half characters in the source indicate the
- -- start of a wide character sequence.
+ -- encoding method uses the upper bit for this encoding, then this flag is
+ -- set True, and upper half characters in the source indicate the start of
+ -- a wide character sequence.
Usage_Requested : Boolean := False;
-- GNAT, GNATBIND, GNATMAKE
-- GNAT
-- This flag determines if validity checking is on or off. The initial
-- state is on, and the required default validity checks are active. The
- -- actual set of checks that is performed if Validity_Checks_On is set
- -- is defined by the switches in package Sem_Val. The Validity_Checks_On
- -- flag is controlled by pragma Validity_Checks (On | Off), and also
- -- some generated compiler code (typically code that has to do with
- -- validity check generation) is compiled with this flag set to False.
- -- This flag is set to False by the -gnatp switch.
+ -- actual set of checks that is performed if Validity_Checks_On is set is
+ -- defined by the switches in package Sem_Val. The Validity_Checks_On flag
+ -- is controlled by pragma Validity_Checks (On | Off), and also some
+ -- generated compiler code (typically code that has to do with validity
+ -- check generation) is compiled with this flag set to False. This flag is
+ -- set to False by the -gnatp switch.
Verbose_Mode : Boolean := False;
- -- GNAT, GNATBIND, GNATMAKE, GNATLINK, GNATLS, GNATCHOP, GNATNAME,
- -- GNATCLEAN
+ -- GNAT, GNATBIND, GNATMAKE, GNATLINK, GNATLS, GNATNAME, GNATCLEAN
-- 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_Ada_2005_Compatibility : Boolean := True;
+ -- GNAT
+ -- Set to True to active all warnings on Ada 2005 compatibility issues,
+ -- including warnings on Ada 2005 obsolescent features used in Ada 2005
+ -- mode. Set False by -gnatwY.
+
Warn_On_Bad_Fixed_Value : Boolean := False;
-- GNAT
-- Set to True to generate warnings for static fixed-point expression
Warn_On_Modified_Unread : Boolean := False;
-- GNAT
- -- Set to True to generate warnings if a variable is assigned but is
- -- never read. The default is that this warning is suppressed.
+ -- Set to True to generate warnings if a variable is assigned but is never
+ -- read. The default is that this warning is suppressed.
Warn_On_No_Value_Assigned : Boolean := True;
-- GNAT
Warn_On_Obsolescent_Feature : Boolean := False;
-- GNAT
- -- Set to True to generate warnings on use of any feature in Annex J
- -- or if a subprogram is called for which a pragma Obsolescent applies.
+ -- Set to True to generate warnings on use of any feature in Annex or if a
+ -- subprogram is called for which a pragma Obsolescent applies.
Warn_On_Redundant_Constructs : Boolean := False;
-- GNAT
-- description of type in unit System.WCh_Con for a list of the methods
-- that are currently supported. Note that brackets notation is always
-- recognized in source programs regardless of the setting of this
- -- variable. The default setting causes only the brackets notation
- -- to be recognized. If this is the main unit, this setting also
- -- controls the output of the W=? parameter in the ALI file, which
- -- is used to provide the default for Wide_Text_IO files.
+ -- variable. The default setting causes only the brackets notation to be
+ -- recognized. If this is the main unit, this setting also controls the
+ -- output of the W=? parameter in the ALI file, which is used to provide
+ -- the default for Wide_Text_IO files.
Xref_Active : Boolean := True;
-- GNAT
Zero_Cost_Exceptions_Set : Boolean := False;
-- GNAT
-- These values are to record the setting of the zero cost exception
- -- handling mode set by argument switches (-gnatZ/-gnatL). If the
- -- value is set by one of these switches, then Zero_Cost_Exceptions_Set
- -- is set to True, and Zero_Cost_Exceptions_Val indicates the setting.
+ -- handling mode set by argument switches (-gnatZ/-gnatL). If the value is
+ -- set by one of these switches, then Zero_Cost_Exceptions_Set is set to
+ -- True, and Zero_Cost_Exceptions_Val indicates the setting.
----------------------------
-- Configuration Settings --
----------------------------
- -- These are settings that are used to establish the mode at the start
- -- of each unit. The values defined below can be affected either by
- -- command line switches, or by the use of appropriate configuration
- -- pragmas in the gnat.adc file.
+ -- These are settings that are used to establish the mode at the start of
+ -- each unit. The values defined below can be affected either by command
+ -- line switches, or by the use of appropriate configuration pragmas in the
+ -- gnat.adc file.
Ada_Version_Config : Ada_Version_Type;
-- GNAT
-- 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 the most up to date version of Ada).
+ -- 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 the most up
+ -- to date version of Ada).
+
+ Ada_Version_Explicit_Config : Ada_Version_Type;
+ -- GNAT
+ -- Same as above but used to initialize Ada_Version_Explicit. Currently
+ -- this will always have the same value as Ada_Version_Config.
+
+ Assertions_Enabled_Config : Boolean;
+ -- GNAT
+ -- This is the value of the configuration switch for assertions enabled
+ -- mode, as possibly set by the command line switch -gnata, and possibly
+ -- modified by the use of the configuration pragma Assertion_Policy.
Dynamic_Elaboration_Checks_Config : Boolean := False;
-- GNAT
Extensions_Allowed_Config : Boolean;
-- GNAT
- -- This is the flag that indicates whether extensions are allowed.
- -- It can be set True either by use of the -gnatX switch, or by use
- -- of the configuration pragma Extensions_Allowed (On). It is always
- -- set to True for internal GNAT units, since extensions are always
- -- permitted in such units.
+ -- This is the flag that indicates whether extensions are allowed. It can
+ -- be set True either by use of the -gnatX switch, or by use of the
+ -- configuration pragma Extensions_Allowed (On). It is always set to True
+ -- for internal GNAT units, since extensions are always permitted in such
+ -- units.
External_Name_Exp_Casing_Config : External_Casing_Type;
-- GNAT
- -- This is the value of the configuration switch that controls casing
- -- of external symbols for which an explicit external name is given. It
- -- can be set to Uppercase by the command line switch -gnatF, and further
- -- modified by the use of the configuration pragma External_Name_Casing
- -- in the gnat.adc file. This flag is used to set the initial value
- -- for External_Name_Exp_Casing at the start of analyzing each unit.
- -- Note however that the setting of this flag is ignored for internal
- -- and predefined units (which are always compiled with As_Is mode).
+ -- This is the value of the configuration switch that controls casing of
+ -- external symbols for which an explicit external name is given. It can be
+ -- set to Uppercase by the command line switch -gnatF, and further modified
+ -- by the use of the configuration pragma External_Name_Casing in the
+ -- gnat.adc file. This flag is used to set the initial value for
+ -- External_Name_Exp_Casing at the start of analyzing each unit. Note
+ -- however that the setting of this flag is ignored for internal and
+ -- predefined units (which are always compiled with As_Is mode).
External_Name_Imp_Casing_Config : External_Casing_Type;
-- GNAT
- -- This is the value of the configuration switch that controls casing
- -- of external symbols where the external name is implicitly given. It
- -- can be set to Uppercase by the command line switch -gnatF, and further
- -- modified by the use of the configuration pragma External_Name_Casing
- -- in the gnat.adc file. This flag is used to set the initial value
- -- for External_Name_Imp_Casing at the start of analyzing each unit.
- -- Note however that the setting of this flag is ignored for internal
- -- and predefined units (which are always compiled with Lowercase mode).
+ -- This is the value of the configuration switch that controls casing of
+ -- external symbols where the external name is implicitly given. It can be
+ -- set to Uppercase by the command line switch -gnatF, and further modified
+ -- by the use of the configuration pragma External_Name_Casing in the
+ -- gnat.adc file. This flag is used to set the initial value for
+ -- External_Name_Imp_Casing at the start of analyzing each unit. Note
+ -- however that the setting of this flag is ignored for internal and
+ -- predefined units (which are always compiled with Lowercase mode).
+
+ Persistent_BSS_Mode_Config : Boolean;
+ -- GNAT
+ -- This is the value of the configuration switch that controls whether
+ -- potentially persistent data is to be placed in the persistent_bss
+ -- section. It can be set True by use of the pragma Persistent_BSS.
+ -- This flag is used to set the initial value of Persistent_BSS_Mode
+ -- at the start of each compilation unit, except that it is always
+ -- set False for predefined units.
Polling_Required_Config : Boolean;
-- GNAT
-- This is the value of the configuration switch that controls polling
-- mode. It can be set True by the command line switch -gnatP, and then
- -- further modified by the use of pragma Polling in the gnat.adc file.
- -- This flag is used to set the initial value for Polling_Required
- -- at the start of analyzing each unit.
+ -- further modified by the use of pragma Polling in the gnat.adc file. This
+ -- flag is used to set the initial value for Polling_Required at the start
+ -- of analyzing each unit.
Use_VADS_Size_Config : Boolean;
-- GNAT
- -- This is the value of the configuration switch that controls the use
- -- of VADS_Size instead of Size whereever the attribute Size is used.
- -- It can be set True by the use of the pragma Use_VADS_Size in the
- -- gnat.adc file. This flag is used to set the initial value for
- -- Use_VADS_Size at the start of analyzing each unit. Note however that
- -- the setting of this flag is ignored for internal and predefined
- -- units (which are always compiled with the standard Size semantics).
+ -- This is the value of the configuration switch that controls the use of
+ -- VADS_Size instead of Size whereever the attribute Size is used. It can
+ -- be set True by the use of the pragma Use_VADS_Size in the gnat.adc file.
+ -- This flag is used to set the initial value for Use_VADS_Size at the
+ -- start of analyzing each unit. Note however that the setting of this flag
+ -- is ignored for internal and predefined units (which are always compiled
+ -- with the standard Size semantics).
type Config_Switches_Type is private;
-- Type used to save values of the switches set from Config values
procedure Save_Opt_Config_Switches (Save : out Config_Switches_Type);
-- This procedure saves the current values of the switches which are
- -- initialized from the above Config values, and then resets these
- -- switches according to the Config value settings.
+ -- initialized from the above Config values, and then resets these switches
+ -- according to the Config value settings.
procedure Set_Opt_Config_Switches (Internal_Unit : Boolean);
- -- This procedure sets the switches to the appropriate initial values.
- -- The parameter Internal_Unit is True for an internal or predefined
- -- unit, and affects the way the switches are set (see above).
+ -- This procedure sets the switches to the appropriate initial values. The
+ -- parameter Internal_Unit is True for an internal or predefined unit, and
+ -- affects the way the switches are set (see above).
procedure Restore_Opt_Config_Switches (Save : Config_Switches_Type);
- -- This procedure restores a set of switch values previously saved
- -- by a call to Save_Opt_Switches.
+ -- This procedure restores a set of switch values previously saved by a
+ -- call to Save_Opt_Switches.
procedure Register_Opt_Config_Switches;
-- This procedure is called after processing the gnat.adc file to record
- -- the values of the Config switches, as possibly modified by the use
- -- of command line switches and configuration pragmas.
+ -- the values of the Config switches, as possibly modified by the use of
+ -- command line switches and configuration pragmas.
------------------------
-- Other Global Flags --
-- (False). When expansion is deactivated all calls to expander routines
-- have no effect. Note that the initial setting of False is merely to
-- prevent saving of an undefined value for an initial call to the
- -- Expander_Mode_Save_And_Set procedure. For more information on the
- -- use of this flag, see package Expander. Indeed this flag might more
- -- logically be in the spec of Expander, but it is referenced by Errout,
- -- and it really seems wrong for Errout to depend on Expander.
+ -- Expander_Mode_Save_And_Set procedure. For more information on the use of
+ -- this flag, see package Expander. Indeed this flag might more logically
+ -- be in the spec of Expander, but it is referenced by Errout, and it
+ -- really seems wrong for Errout to depend on Expander.
-----------------------
-- Tree I/O Routines --
-- from the Gnatvsn package which is a part of ASIS implementation.
Tree_Version_String : String (Gnat_Version_String'Range);
- -- Used to store the compiler version string read from a tree file to
- -- check if it is the same as stored in the version string in Gnatvsn.
- -- Therefore its length is taken directly from the version string in
- -- Gnatvsn. If the length of the version string stored in the tree is
- -- different, then versions are for sure different, and a string containing
- -- '?' characters is assigned to this variable as a result of tree read.
+ -- Used to store the compiler version string read from a tree file to check
+ -- if it is the same as stored in the version string in Gnatvsn. Therefore
+ -- its length is taken directly from the version string in Gnatvsn. If the
+ -- length of the version string stored in the tree is different, then
+ -- versions are for sure different, and a string containing '?' characters
+ -- is assigned to this variable as a result of tree read.
Tree_ASIS_Version_Number : Int;
-- Used to store the ASIS version number read from a tree file to check if
type Config_Switches_Type is record
Ada_Version : Ada_Version_Type;
+ Ada_Version_Explicit : Ada_Version_Type;
+ Assertions_Enabled : Boolean;
Dynamic_Elaboration_Checks : Boolean;
Exception_Locations_Suppressed : Boolean;
Extensions_Allowed : Boolean;
External_Name_Exp_Casing : External_Casing_Type;
External_Name_Imp_Casing : External_Casing_Type;
+ Persistent_BSS_Mode : Boolean;
Polling_Required : Boolean;
Use_VADS_Size : Boolean;
end record;