+2009-04-17 Robert Dewar <dewar@adacore.com>
+
+ * g-moreex.adb: Add comments.
+
+ * s-auxdec.ads: Add ??? comment for uncommented pragma Warnings (Off)
+
+ * s-auxdec-vms_64.ads: Add ??? comment for uncommented pragma
+ Warnings (Off)
+
+ * prepcomp.adb: Add ??? comment
+
+ * a-tasatt.adb: Minor reformatting
+
+ * g-trasym-vms-alpha.adb: Add ??? comment
+
+ * g-trasym-vms-ia64.adb: Add ??? comment
+
+ * xoscons.adb: Minor reformatting
+
+ * s-tassta.adb: Minor reformatting
+
+ * s-scaval.adb: Add ??? comment
+
+ * stand.ads: Minor code clean up (remove junk with of Namet)
+
+ * s-strcom.adb, s-strcom.ads, s-string.adb, s-string.ads, s-sopco3.adb,
+ s-sopco3.ads, s-strops.adb, s-strops.ads, s-sopco5.adb, s-sopco5.ads,
+ s-wchcnv.adb, s-wchcnv.ads, s-ststop.adb, s-ststop.ads, s-soflin.adb,
+ s-soflin.ads, s-traceb.adb, s-traceb.ads, s-traent.adb, s-traent.ads,
+ s-secsta.adb, s-secsta.ads, s-utf_32.adb, s-utf_32.ads, s-wchcon.adb,
+ s-wchjis.adb, s-wchcon.ads, s-wchjis.ads, s-sopco4.adb, s-sopco4.ads,
+ s-stache.adb, s-stache.ads, s-stoele.adb, s-stoele.ads, s-stalib.adb,
+ s-stalib.ads, s-os_lib.ads, s-purexc.ads: Remove no longer needed
+ Warnings off pragmas.
+
2009-04-17 Pascal Obry <obry@adacore.com>
* initialize.c: Fix test for reallocating the arguments array.
-- For reference to directly addressed task attributes
pragma Warnings (On);
- -- End of warnings off region for directly addressed
- -- attribute conversion functions.
+ -- End warnings off region for directly addressed attribute conversions
function To_Access_Address is new Ada.Unchecked_Conversion
(Access_Node, Access_Address);
(Local_Deallocator, Deallocator);
-- To defeat accessibility check
- pragma Warnings (On);
-
------------------------
-- Storage Management --
------------------------
-- --
-- B o d y --
-- --
--- Copyright (C) 2000-2006, AdaCore --
+-- Copyright (C) 2000-2008, AdaCore --
-- --
-- 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- --
use type Ada.Exceptions.Exception_Occurrence_Access;
begin
- pragma Warnings (Off);
- if EOA = null then
- return Ada.Exceptions.Null_Occurrence;
- else
- return EOA.all;
- end if;
- pragma Warnings (On);
-
- -- ???Note that both of the above return statements violate the Ada
- -- 2005 rule forbidding copying of limited objects (see RM-7.5(2.8/2)).
- -- When compiled with -gnatg, the compiler gives a warning instead of
- -- an error, so we can turn it off.
- -- To fix this, remove the pragmas Warnings above, and use the following
- -- code. We can't do that yet, because AI-318 is not yet implemented.
- --
- -- return Result : Ada.Exceptions.Exception_Occurrence do
- -- if EOA = null then
- -- Ada.Exceptions.Save_Occurrence
- -- (Target => Result,
- -- Source => Ada.Exceptions.Null_Occurrence);
- -- else
- -- Ada.Exceptions.Save_Occurrence
- -- (Target => Result,
- -- Source => EOA.all);
- -- end if;
- -- end return;
+ return Result : Ada.Exceptions.Exception_Occurrence do
+ if EOA = null then
+ Ada.Exceptions.Save_Occurrence
+ (Target => Result,
+ Source => Ada.Exceptions.Null_Occurrence);
+ else
+ Ada.Exceptions.Save_Occurrence
+ (Target => Result,
+ Source => EOA.all);
+ end if;
+ end return;
end Occurrence;
-----------------------
package body GNAT.Traceback.Symbolic is
- pragma Warnings (Off);
+ pragma Warnings (Off); -- Needs comment ???
pragma Linker_Options ("--for-linker=sys$library:trace.exe");
use Interfaces.C;
package body GNAT.Traceback.Symbolic is
- pragma Warnings (Off);
+ pragma Warnings (Off); -- ??? needs comment
pragma Linker_Options ("--for-linker=sys$library:trace.exe");
use System;
Source_Index_Of_Preproc_Data_File : Source_File_Index := No_Source_File;
- -- The following variable should be a constant, but this is not
- -- possible. Warnings are Off because it is never assigned a value.
+ -- The following variable should be a constant, but this is not possible
+ -- because its type GNAT.Dynamic_Tables.Instance has a component P of
+ -- unitialized private type GNAT.Dynamic_Tables.Table_Private and there are
+ -- no exported values for this private type.
+ -- Warnings are Off because it is never assigned a value.
pragma Warnings (Off);
No_Mapping : Prep.Symbol_Table.Instance;
-- Floating point type declarations for VAX floating point data types
pragma Warnings (Off);
+ -- ??? needs comment
type F_Float is digits 6;
pragma Float_Representation (VAX_Float, F_Float);
-- Floating point type declarations for VAX floating point data types
pragma Warnings (Off);
+ -- ??? needs comment
type F_Float is digits 6;
pragma Float_Representation (VAX_Float, F_Float);
-- be used by other predefined packages. User access to this package is via
-- a renaming of this package in GNAT.OS_Lib (file g-os_lib.ads).
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System;
with System.Strings;
-- an exception message. It can be used from Pure units. This unit is for
-- internal use only, it is not generally available to applications.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Pure_Exceptions is
pragma Pure;
-- On other targets the type is 8 bytes, and type Byte8 is used for
-- values that are then converted to ByteLF.
- pragma Warnings (Off);
+ pragma Warnings (Off); -- why ???
function To_ByteLF is new Ada.Unchecked_Conversion (Byte8, ByteLF);
pragma Warnings (On);
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Soft_Links;
with System.Parameters;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Storage_Elements;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get an
-------------------------
procedure Task_Termination_NT (Excep : EO) is
- pragma Warnings (Off, Excep);
+ pragma Unreferenced (Excep);
begin
null;
end Task_Termination_NT;
-- initialized to non-tasking versions, and then if the tasking support is
-- initialized, they are set to the real tasking versions.
-pragma Warnings (Off);
--- When compiling this package with older compilers, there are many warnings,
--- so we suppress them throughout most of this file. Pragmas Compiler_Unit,
--- Preelaborate_05, and Favor_Top_Level are not supported by older compilers.
-
pragma Compiler_Unit;
with Ada.Exceptions;
Len : Natural)
return String;
pragma Favor_Top_Level (Traceback_Decorator_Wrapper_Call);
- pragma Warnings (On);
-- Declarations for the no tasking versions of the required routines
------------------------
-- Here we define a single type that encapsulates the various task
- -- specific data. This type is used to store the necessary data into
- -- the Task_Control_Block or into a global variable in the non tasking
- -- case.
+ -- specific data. This type is used to store the necessary data into the
+ -- Task_Control_Block or into a global variable in the non tasking case.
type TSD is record
Pri_Stack_Info : aliased Stack_Checking.Stack_Info;
- -- Information on stack (Base/Limit/Size) that is used
- -- by System.Stack_Checking. If this TSD does not belong to
- -- the environment task, the Size field must be initialized
- -- to the tasks requested stack size before the task can do
- -- its first stack check.
+ -- Information on stack (Base/Limit/Size) used by System.Stack_Checking.
+ -- If this TSD does not belong to the environment task, the Size field
+ -- must be initialized to the tasks requested stack size before the task
+ -- can do its first stack check.
pragma Warnings (Off);
+ -- Needed because we are giving a non-static default to an object in
+ -- a preelaborated unit, which is formally not permitted, but OK here.
+
Jmpbuf_Address : System.Address := System.Null_Address;
- -- Address of jump buffer used to store the address of the
- -- current longjmp/setjmp buffer for exception management.
- -- These buffers are threaded into a stack, and the address
- -- here is the top of the stack. A null address means that
- -- no exception handler is currently active.
+ -- Address of jump buffer used to store the address of the current
+ -- longjmp/setjmp buffer for exception management. These buffers are
+ -- threaded into a stack, and the address here is the top of the stack.
+ -- A null address means that no exception handler is currently active.
Sec_Stack_Addr : System.Address := System.Null_Address;
pragma Warnings (On);
-- Address of currently allocated secondary stack
Current_Excep : aliased EO;
- -- Exception occurrence that contains the information for the
- -- current exception. Note that any exception in the same task
- -- destroys this information, so the data in this variable must
- -- be copied out before another exception can occur.
+ -- Exception occurrence that contains the information for the current
+ -- exception. Note that any exception in the same task destroys this
+ -- information, so the data in this variable must be copied out before
+ -- another exception can occur.
--
-- Also act as a list of the active exceptions in the case of the GCC
-- exception mechanism, organized as a stack with the most recent first.
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops_Concat_3 is
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops_Concat_3 is
pragma Pure;
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops_Concat_4 is
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops_Concat_4 is
pragma Pure;
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops_Concat_5 is
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops_Concat_5 is
pragma Pure;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
-- As noted in the spec, this dummy body is present because otherwise we
-- have bootstrapping path problems (there used to be a real body).
-- This package defines basic types and objects. Operations related to
-- stack checking can be found in package System.Stack_Checking.Operations.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.Storage_Elements;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
-- The purpose of this body is simply to ensure that the two with'ed units
-- are properly included in the link. They are not with'ed from the spec
-- elaboration circularities with Ada.Exceptions if polling is on.
pragma Warnings (Off);
--- Kill warnings from unused withs
+-- Kill warnings from unused withs. These unused with's are here to make
+-- sure the relevant units are loaded and properly elaborated.
with System.Soft_Links;
-- Referenced directly from generated code using external symbols so it
-- package and the packages it references are included in all Ada programs,
-- together with the included data.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
-- extra declarations that can be introduced into System using Extend_System.
-- It is a good idea to avoid use clauses for this package!
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Storage_Elements is
pragma Pure;
type Storage_Element is mod 2 ** Storage_Unit;
for Storage_Element'Size use Storage_Unit;
- pragma Warnings (Off);
pragma Universal_Aliasing (Storage_Element);
- pragma Warnings (On);
- -- This type is used by the expansion to implement aggregate copy.
- -- We turn off warnings for this pragma to deal with being compiled
- -- with an earlier GNAT version that does not recognize this pragma.
+ -- This type is used by the expander to implement aggregate copy
type Storage_Array is
array (Storage_Offset range <>) of aliased Storage_Element;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Conversion;
-- This package contains functions for runtime comparisons on strings
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Compare is
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Strings is
-- be used by other predefined packages. User access to this package is via
-- a renaming of this package in GNAT.String (file g-string.ads).
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Unchecked_Deallocation;
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.String_Ops is
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.String_Ops is
pragma Pure;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Streams; use Ada.Streams;
with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
-- or
-- String_Output_Blk_IO (Some_Stream, Some_String);
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Ada.Streams;
Initialization.Undefer_Abort (Self_ID);
end Move_Activation_Chain;
- -- Compiler interface only. Do not call from within the RTS.
+ -- Compiler interface only. Do not call from within the RTS
--------------------
-- Set_Entry_Name --
-- Note: this unit must be compiled using -fno-optimize-sibling-calls.
-- See comment below in body of Call_Chain for details on the reason.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Traceback is
-- --
------------------------------------------------------------------------------
--- This package provides a method for generating a traceback of the
--- current execution location. The traceback shows the locations of
--- calls in the call chain, up to either the top or a designated
--- number of levels.
+-- This package provides a method for generating a traceback of the current
+-- execution location. The traceback shows the locations of calls in the call
+-- chain, up to either the top or a designated number of levels.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
-- Traceback is the address of an array of addresses where the
-- result will be stored.
--
- -- Max_Len is the length of the Traceback array. If the call chain
- -- is longer than this, then additional entries are discarded, and
- -- the traceback is missing some of the highest level entries.
+ -- Max_Len is the length of the Traceback array. If the call chain is
+ -- longer than this, then additional entries are discarded, and the
+ -- traceback is missing some of the highest level entries.
--
- -- Len is the returned actual number of addresses stored
- -- in the Traceback array.
+ -- Len is the returned number of addresses stored in the Traceback array
--
-- Exclude_Min/Exclude_Max, if non null, provide a range of addresses
-- to ignore from the computation of the traceback.
-- this procedure, 2 means 1 + exclude the frame for this procedure's
-- caller, ...
--
- -- On return, the Traceback array is filled in, and Len indicates
- -- the number of stored entries. The first entry is the most recent
- -- call, and the last entry is the highest level call.
+ -- On return, the Traceback array is filled in, and Len indicates the
+ -- number of stored entries. The first entry is the most recent call,
+ -- and the last entry is the highest level call.
function C_Call_Chain
(Traceback : System.Address;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.Traceback_Entries is
-- version of the package, an entry is a mere code location representing the
-- address of a call instruction part of the call-chain.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.Traceback_Entries is
pragma Preelaborate;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
pragma Style_Checks (Off);
-- Allow long lines in this unit
-- the same services. The reason this package is in System is so that it can
-- with'ed by other packages in the Ada and System hierarchies.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.UTF_32 is
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with Interfaces; use Interfaces;
with System.WCh_Con; use System.WCh_Con;
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
with System.WCh_Con;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.WCh_Con is
-- This unit may be used directly from an application program by providing
-- an appropriate WITH, and the interface can be expected to remain stable.
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.WCh_Con is
pragma Pure;
-- --
------------------------------------------------------------------------------
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package body System.WCh_JIS is
-- This package contains routines used for converting between internal
-- JIS codes and the two external forms we support (EUC and Shift-JIS)
-pragma Warnings (Off);
pragma Compiler_Unit;
-pragma Warnings (On);
package System.WCh_JIS is
pragma Pure;
with Types; use Types;
--- Do we really need the with of Namet?
-
-pragma Warnings (Off);
-with Namet; use Namet;
-pragma Elaborate_All (Namet);
-pragma Warnings (On);
-
package Stand is
type Standard_Entity_Type is (
-- --
------------------------------------------------------------------------------
--- This program generates the spec of System.OS_Constants (s-oscons.ads).
+-- This program generates the spec of System.OS_Constants (s-oscons.ads)
-- It works in conjunction with a C template file which must be pre-processed
-- and compiled using the cross compiler. Two input files are used:
-- - the preprocessed C file: s-oscons-tmplt.i
-- - the generated assembly file: s-oscons-tmplt.s
--- The contents of s-oscons.ads is written on standard output.
+-- The contents of s-oscons.ads is written on standard output
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Exceptions; use Ada.Exceptions;