aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2005-01-03 16:43:24 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-01-03 16:43:24 +0100
commit87b3f81fc94c4a40ddc8ef8107757696fd2accad (patch)
treecc56ad2870547da06116c5f927b552a16d94614f /gcc/ada
parente9906cbf174623cc53b32ad2a0f6d603d6f975b5 (diff)
downloadgcc-87b3f81fc94c4a40ddc8ef8107757696fd2accad.zip
gcc-87b3f81fc94c4a40ddc8ef8107757696fd2accad.tar.gz
gcc-87b3f81fc94c4a40ddc8ef8107757696fd2accad.tar.bz2
ug_words, [...]: Added alpha-ivms transitioning section to porting guide chapter (vms version).
* ug_words, gnat_ugn.texi: Added alpha-ivms transitioning section to porting guide chapter (vms version). Revised doc title (removed "for native platforms") and subtitle. Add discussion on warning flag for obsolescent features. First we note that it applies to obsolete GNAT features, which was previously omitted. Second we contrast the behavior with that of the new Ada 2005 AI-368 restriction No_Obsolescent_Features. Preliminary rewriting of GNAT & libraries chapter in order to take into account default project locations & new project manager capabilities. * cstand.adb (Create_Operators): Clean up format and documentation of unary and binary operator result tables. No change in code, just reformatting and addition of comments. * errout.ads, gnatfind.adb, s-maccod.ads, sem.adb, sem_ch2.adb: Minor reformatting * atree.ads, elists.ads, lib.ads, namet.ads, nlists.ads, repinfo.ads, sinput.ads, stringt.ads, uintp.ads, urealp.ads: Minor clarification to comments for Tree_Read and Tree_Write. * exp_attr.ads: Minor reformatting. * comperr.adb (Compiler_Abort): Add specialized message for GAP versions. * exp_pakd.adb (Create_Packed_Array_Type): Add a guard to check whether the ancestor type is private, as may be the case with nested instantiations. From-SVN: r92852
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/comperr.adb13
-rw-r--r--gcc/ada/cstand.adb81
-rw-r--r--gcc/ada/elists.ads11
-rw-r--r--gcc/ada/errout.ads227
-rw-r--r--gcc/ada/exp_attr.ads6
-rw-r--r--gcc/ada/exp_pakd.adb5
-rw-r--r--gcc/ada/gnat_ugn.texi706
-rw-r--r--gcc/ada/gnatfind.adb8
-rw-r--r--gcc/ada/lib.ads10
-rw-r--r--gcc/ada/namet.ads163
-rw-r--r--gcc/ada/nlists.ads9
-rw-r--r--gcc/ada/repinfo.ads6
-rw-r--r--gcc/ada/s-maccod.ads9
-rw-r--r--gcc/ada/sem.adb4
-rw-r--r--gcc/ada/sem_ch2.adb3
-rw-r--r--gcc/ada/sinput.ads10
-rw-r--r--gcc/ada/stringt.ads11
-rw-r--r--gcc/ada/ug_words2
-rw-r--r--gcc/ada/uintp.ads11
-rw-r--r--gcc/ada/urealp.ads11
20 files changed, 916 insertions, 390 deletions
diff --git a/gcc/ada/comperr.adb b/gcc/ada/comperr.adb
index 69302f7..1725890 100644
--- a/gcc/ada/comperr.adb
+++ b/gcc/ada/comperr.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2004 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- --
@@ -95,6 +95,7 @@ package body Comperr is
Is_Public_Version : constant Boolean := Get_Gnat_Build_Type = Public;
Is_FSF_Version : constant Boolean := Get_Gnat_Build_Type = FSF;
+ Is_GAP_Version : constant Boolean := Get_Gnat_Build_Type = GAP;
-- Start of processing for Compiler_Abort
@@ -314,6 +315,16 @@ package body Comperr is
"for submitting bugs.");
End_Line;
+ elsif Is_GAP_Version then
+ Write_Str
+ ("| (use plain ASCII or MIME attachment, or FTP "
+ & "to your GAP account.).");
+ End_Line;
+
+ Write_Str
+ ("| Please use your GAP account to report this.");
+ End_Line;
+
elsif not Is_FSF_Version then
Write_Str
("| (use plain ASCII or MIME attachment, or FTP "
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb
index 3962655..73afd40 100644
--- a/gcc/ada/cstand.adb
+++ b/gcc/ada/cstand.adb
@@ -189,35 +189,76 @@ package body CStand is
procedure Create_Operators is
Op_Node : Entity_Id;
- -- Following list has two entries for concatenation, to include
- -- explicitly the operation on wide strings.
+ -- The following tables define the binary and unary operators and their
+ -- corresponding result type.
Binary_Ops : constant array (S_Binary_Ops) of Name_Id :=
- (Name_Op_Add, Name_Op_And, Name_Op_Concat, Name_Op_Concat,
- Name_Op_Divide, Name_Op_Eq, Name_Op_Expon, Name_Op_Ge,
- Name_Op_Gt, Name_Op_Le, Name_Op_Lt, Name_Op_Mod,
- Name_Op_Multiply, Name_Op_Ne, Name_Op_Or, Name_Op_Rem,
- Name_Op_Subtract, Name_Op_Xor);
+
+ -- There is one entry here for each binary operator, except for the
+ -- case of concatenation, where there are two entries, one for a
+ -- String result, and one for a Wide_String result.
+
+ (Name_Op_Add,
+ Name_Op_And,
+ Name_Op_Concat,
+ Name_Op_Concat,
+ Name_Op_Divide,
+ Name_Op_Eq,
+ Name_Op_Expon,
+ Name_Op_Ge,
+ Name_Op_Gt,
+ Name_Op_Le,
+ Name_Op_Lt,
+ Name_Op_Mod,
+ Name_Op_Multiply,
+ Name_Op_Ne,
+ Name_Op_Or,
+ Name_Op_Rem,
+ Name_Op_Subtract,
+ Name_Op_Xor);
Bin_Op_Types : constant array (S_Binary_Ops) of Entity_Id :=
- (Universal_Integer, Standard_Boolean,
- Standard_String, Standard_Wide_String,
- Universal_Integer, Standard_Boolean,
- Universal_Integer, Standard_Boolean,
- Standard_Boolean, Standard_Boolean,
- Standard_Boolean, Universal_Integer,
- Universal_Integer, Standard_Boolean,
- Standard_Boolean, Universal_Integer,
- Universal_Integer, Standard_Boolean);
+
+ -- This table has the corresponding result types. The entries are
+ -- ordered so they correspond to the Binary_Ops array above.
+
+ (Universal_Integer, -- Add
+ Standard_Boolean, -- And
+ Standard_String, -- Concat (String)
+ Standard_Wide_String, -- Concat (Wide_String)
+ Universal_Integer, -- Divide
+ Standard_Boolean, -- Eq
+ Universal_Integer, -- Expon
+ Standard_Boolean, -- Ge
+ Standard_Boolean, -- Gt
+ Standard_Boolean, -- Le
+ Standard_Boolean, -- Lt
+ Universal_Integer, -- Mod
+ Universal_Integer, -- Multiply
+ Standard_Boolean, -- Ne
+ Standard_Boolean, -- Or
+ Universal_Integer, -- Rem
+ Universal_Integer, -- Subtract
+ Standard_Boolean); -- Xor
Unary_Ops : constant array (S_Unary_Ops) of Name_Id :=
- (Name_Op_Abs, Name_Op_Subtract, Name_Op_Not, Name_Op_Add);
+
+ -- There is one entry here for each unary operator
+
+ (Name_Op_Abs,
+ Name_Op_Subtract,
+ Name_Op_Not,
+ Name_Op_Add);
Unary_Op_Types : constant array (S_Unary_Ops) of Entity_Id :=
- (Universal_Integer, Universal_Integer,
- Standard_Boolean, Universal_Integer);
- -- Corresponding to Abs, Minus, Not, and Plus.
+ -- This table has the corresponding result types. The entries are
+ -- ordered so they correspond to the Unary_Ops array above.
+
+ (Universal_Integer, -- Abs
+ Universal_Integer, -- Subtract
+ Standard_Boolean, -- Not
+ Universal_Integer); -- Add
begin
for J in S_Binary_Ops loop
diff --git a/gcc/ada/elists.ads b/gcc/ada/elists.ads
index 7715c0a..b94dc3a 100644
--- a/gcc/ada/elists.ads
+++ b/gcc/ada/elists.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-1998 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2004 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- --
@@ -63,12 +63,13 @@ package Elists is
-- Lock tables used for element lists before calling backend
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function Last_Elist_Id return Elist_Id;
-- Returns Id of last allocated element list header
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index ffc44bd..f3ffa2d 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -24,10 +24,10 @@
-- --
------------------------------------------------------------------------------
--- This package contains the routines to output error messages. They
--- are basically system independent, however in some environments, e.g.
--- when the parser is embedded into an editor, it may be appropriate
--- to replace the implementation of this package.
+-- This package contains the routines to output error messages. They are
+-- basically system independent, however in some environments, e.g. when the
+-- parser is embedded into an editor, it may be appropriate to replace the
+-- implementation of this package.
with Err_Vars;
with Erroutc;
@@ -41,13 +41,13 @@ package Errout is
Serious_Errors_Detected : Nat renames Err_Vars.Serious_Errors_Detected;
-- This is a count of errors that are serious enough to stop expansion,
- -- and hence to prevent generation of an object file even if the
- -- switch -gnatQ is set.
+ -- and hence to prevent generation of an object file even if the switch
+ -- -gnatQ is set.
Total_Errors_Detected : Nat renames Err_Vars.Total_Errors_Detected;
- -- Number of errors detected so far. Includes count of serious errors
- -- and non-serious errors, so this value is always greater than or
- -- equal to the Serious_Errors_Detected value.
+ -- Number of errors detected so far. Includes count of serious errors and
+ -- non-serious errors, so this value is always greater than or equal to
+ -- the Serious_Errors_Detected value.
Warnings_Detected : Nat renames Err_Vars.Warnings_Detected;
-- Number of warnings detected
@@ -56,32 +56,32 @@ package Errout is
-- Count of configurable run time violations so far. This is used to
-- suppress certain cascaded error messages when we know that we may not
-- have fully expanded some items, due to high integrity violations (i.e.
- -- the use of constructs not permitted by the library in use, or
- -- improper constructs in No_Run_Time mode).
+ -- the use of constructs not permitted by the library in use, or improper
+ -- constructs in No_Run_Time mode).
type Compiler_State_Type is (Parsing, Analyzing);
Compiler_State : Compiler_State_Type;
- -- Indicates current state of compilation. This is put in the Errout
- -- spec because it affects the action of the error message handling.
- -- In particular, an attempt is made by Errout to suppress cascaded
- -- error messages in Parsing mode, but not in the other modes.
+ -- Indicates current state of compilation. This is put in the Errout spec
+ -- because it affects the action of the error message handling. In
+ -- particular, an attempt is made by Errout to suppress cascaded error
+ -- messages in Parsing mode, but not in the other modes.
Current_Error_Source_File : Source_File_Index
renames Err_Vars.Current_Error_Source_File;
-- Id of current messages. Used to post file name when unit changes. This
-- is initialized to Main_Source_File at the start of a compilation, which
- -- means that no file names will be output unless there are errors in units
- -- other than the main unit. However, if the main unit has a pragma
- -- Source_Reference line, then this is initialized to No_Source_File,
- -- to force an initial reference to the real source file name.
+ -- means that no file names will be output unless there are errors in
+ -- units other than the main unit. However, if the main unit has a pragma
+ -- Source_Reference line, then this is initialized to No_Source_File, to
+ -- force an initial reference to the real source file name.
Raise_Exception_On_Error : Nat renames Err_Vars.Raise_Exception_On_Error;
-- If this value is non-zero, then any attempt to generate an error
- -- message raises the exception Error_Msg_Exception, and the error
- -- message is not output. This is used for defending against junk
- -- resulting from illegalities, and also for substitution of more
- -- appropriate error messages from higher semantic levels. It is
- -- a counter so that the increment/decrement protocol nests neatly.
+ -- message raises the exception Error_Msg_Exception, and the error message
+ -- is not output. This is used for defending against junk resulting from
+ -- illegalities, and also for substitution of more appropriate error
+ -- messages from higher semantic levels. It is a counter so that the
+ -- increment/decrement protocol nests neatly.
Error_Msg_Exception : exception renames Err_Vars.Error_Msg_Exception;
-- Exception raised if Raise_Exception_On_Error is true
@@ -135,50 +135,50 @@ package Errout is
-- Insertion character % (Percent: insert name from Names table)
-- The character % is replaced by the text for the name specified by
- -- the Name_Id value stored in Error_Msg_Name_1. A blank precedes
- -- the name if it is preceded by a non-blank character other than a
- -- left parenthesis. The name is enclosed in quotes unless manual
- -- quotation mode is set. If the Name_Id is set to No_Name, then
- -- no insertion occurs; if the Name_Id is set to Error_Name, then
- -- the string <error> is inserted. A second and third % may appear
- -- in a single message, similarly replaced by the names which are
- -- specified by the Name_Id values stored in Error_Msg_Name_2 and
- -- Error_Msg_Name_3. The names are decoded and cased according to
- -- the current identifier casing mode.
+ -- the Name_Id value stored in Error_Msg_Name_1. A blank precedes the
+ -- name if it is preceded by a non-blank character other than left
+ -- parenthesis. The name is enclosed in quotes unless manual quotation
+ -- mode is set. If the Name_Id is set to No_Name, then no insertion
+ -- occurs; if the Name_Id is set to Error_Name, then the string
+ -- <error> is inserted. A second and third % may appear in a single
+ -- message, similarly replaced by the names which are specified by the
+ -- Name_Id values stored in Error_Msg_Name_2 and Error_Msg_Name_3. The
+ -- names are decoded and cased according to the current identifier
+ -- casing mode.
-- Insertion character $ (Dollar: insert unit name from Names table)
- -- The character $ is treated similarly to %, except that the name
- -- is obtained from the Unit_Name_Type value in Error_Msg_Unit_1
- -- and Error_Msg_Unit_2, as provided by Get_Unit_Name_String in
- -- package Uname. Note that this name includes the postfix (spec)
- -- or (body) strings. If this postfix is not required, use the
- -- normal % insertion for the unit name.
+ -- The character $ is treated similarly to %, except that the name is
+ -- obtained from the Unit_Name_Type value in Error_Msg_Unit_1 and
+ -- Error_Msg_Unit_2, as provided by Get_Unit_Name_String in package
+ -- Uname. Note that this name includes the postfix (spec) or (body)
+ -- strings. If this postfix is not required, use the normal %
+ -- insertion for the unit name.
-- Insertion character { (Left brace: insert literally from names table)
- -- The character { is treated similarly to %, except that the
- -- name is output literally as stored in the names table without
- -- adjusting the casing. This can be used for file names and in
- -- other situations where the name string is to be output unchanged.
+ -- The character { is treated similarly to %, except that the name is
+ -- output literally as stored in the names table without adjusting the
+ -- casing. This can be used for file names and in other situations
+ -- where the name string is to be output unchanged.
-- Insertion character * (Asterisk, insert reserved word name)
- -- The insertion character * is treated exactly like % except that
- -- the resulting name is cased according to the default conventions
- -- for reserved words (see package Scans).
+ -- The insertion character * is treated exactly like % except that the
+ -- resulting name is cased according to the default conventions for
+ -- reserved words (see package Scans).
-- Insertion character & (Ampersand: insert name from node)
-- The insertion character & is treated similarly to %, except that
-- the name is taken from the Chars field of the given node, and may
- -- refer to a child unit name, or a selected component. The casing
- -- is, if possible, taken from the original source reference, which
- -- is obtained from the Sloc field of the given node or nodes. If no
- -- Sloc is available (happens e.g. for nodes in package Standard),
- -- then the default case (see Scans spec) is used. The nodes to be
- -- used are stored in Error_Msg_Node_1, Error_Msg_Node_2. No insertion
- -- occurs for the Empty node, and the Error node results in the
- -- insertion of the characters <error>. In addition, if the special
- -- global variable Error_Msg_Qual_Level is non-zero, then the
- -- reference will include up to the given number of levels of
- -- qualification, using the scope chain.
+ -- refer to a child unit name, or a selected component. The casing is,
+ -- if possible, taken from the original source reference, which is
+ -- obtained from the Sloc field of the given node or nodes. If no Sloc
+ -- is available (happens e.g. for nodes in package Standard), then the
+ -- default case (see Scans spec) is used. The nodes to be used are
+ -- stored in Error_Msg_Node_1, Error_Msg_Node_2. No insertion occurs
+ -- for the Empty node, and the Error node results in the insertion of
+ -- the characters <error>. In addition, if the special global variable
+ -- Error_Msg_Qual_Level is non-zero, then the reference will include
+ -- up to the given number of levels of qualification, using the scope
+ -- chain.
-- Insertion character # (Pound: insert line number reference)
-- The character # is replaced by the string indicating the source
@@ -188,28 +188,29 @@ package Errout is
-- for locations in current file: at line nnn:ccc
-- for locations in other files: at filename:nnn:ccc
--
- -- By convention, the # insertion character is only used at the end
- -- of an error message, so the above strings only appear as the last
+ -- By convention, the # insertion character is only used at the end of
+ -- an error message, so the above strings only appear as the last
-- characters of an error message.
-- Insertion character } (Right brace: insert type reference)
-- The character } is replaced by a string describing the type
-- referenced by the entity whose Id is stored in Error_Msg_Node_1.
-- the string gives the name or description of the type, and also
- -- where appropriate the location of its declaration. Special
- -- cases like "some integer type" are handled appropriately. Only
- -- one } is allowed in a message, since there is not enough room
- -- for two (the insertion can be quite long, including a file name)
- -- In addition, if the special global variable Error_Msg_Qual_Level
- -- is non-zero, then the reference will include up to the given
- -- number of levels of qualification, using the scope chain.
+ -- where appropriate the location of its declaration. Special cases
+ -- like "some integer type" are handled appropriately. Only one } is
+ -- allowed in a message, since there is not enough room for two (the
+ -- insertion can be quite long, including a file name) In addition, if
+ -- the special global variable Error_Msg_Qual_Level is non-zero, then
+ -- the reference will include up to the given number of levels of
+ -- qualification, using the scope chain.
-- Insertion character @ (At: insert column number reference)
-- The character @ is replaced by null if the RM_Column_Check mode is
-- off (False). If the switch is on (True), then @ is replaced by the
- -- text string " in column nnn" where nnn is the decimal representation
- -- of the column number stored in Error_Msg_Col plus one (the plus one
- -- is because the number is stored 0-origin and displayed 1-origin).
+ -- text string " in column nnn" where nnn is the decimal
+ -- representation of the column number stored in Error_Msg_Col plus
+ -- one (the plus one is because the number is stored 0-origin and
+ -- displayed 1-origin).
-- Insertion character ^ (Carret: insert integer value)
-- The character ^ is replaced by the decimal conversion of the Uint
@@ -235,12 +236,12 @@ package Errout is
-- a warning instead of a normal error message, and the text of the
-- message will be preceded by "Warning:" instead of "Error:" The
-- handling of warnings if further controlled by the Warning_Mode
- -- option (-w switch), see package Opt for further details, and
- -- also by the current setting from pragma Warnings. This pragma
- -- applies only to warnings issued from the semantic phase (not
- -- the parser), but currently all relevant warnings are posted
- -- by the semantic phase anyway. Messages starting with (style)
- -- are also treated as warning messages.
+ -- option (-w switch), see package Opt for further details, and also
+ -- by the current setting from pragma Warnings. This pragma applies
+ -- only to warnings issued from the semantic phase (not the parser),
+ -- but currently all relevant warnings are posted by the semantic
+ -- phase anyway. Messages starting with (style) are also treated as
+ -- warning messages.
-- Insertion character A-Z (Upper case letter: Ada reserved word)
-- If two or more upper case letters appear in the message, they are
@@ -249,10 +250,10 @@ package Errout is
-- quotes are added unless manual quotation mode is currently set.
-- Insertion character ` (Backquote: set manual quotation mode)
- -- The backquote character always appears in pairs. Each backquote
- -- of the pair is replaced by a double quote character. In addition,
- -- Any reserved keywords, or name insertions between these backquotes
- -- are not surrounded by the usual automatic double quotes. See the
+ -- The backquote character always appears in pairs. Each backquote of
+ -- the pair is replaced by a double quote character. In addition, Any
+ -- reserved keywords, or name insertions between these backquotes are
+ -- not surrounded by the usual automatic double quotes. See the
-- section below on manual quotation mode for further details.
-- Insertion character ' (Quote: literal character)
@@ -264,17 +265,17 @@ package Errout is
-- Insertion character \ (Backslash: continuation message)
-- Indicates that the message is a continuation of a message
- -- previously posted. This is used to ensure that such groups
- -- of messages are treated as a unit. The \ character must be
- -- the first character of the message text.
+ -- previously posted. This is used to ensure that such groups of
+ -- messages are treated as a unit. The \ character must be the first
+ -- character of the message text.
-- Insertion character | (vertical bar, non-serious error)
-- By default, error messages (other than warning messages) are
- -- considered to be fatal error messages which prevent expansion
- -- or generation of code in the presence of the -gnatQ switch.
- -- If the insertion character | appears, the message is considered
- -- to be non-serious, and does not cause Serious_Errors_Detected
- -- to be incremented (so expansion is not prevented by such a msg).
+ -- considered to be fatal error messages which prevent expansion or
+ -- generation of code in the presence of the -gnatQ switch. If the
+ -- insertion character | appears, the message is considered to be
+ -- non-serious, and does not cause Serious_Errors_Detected to be
+ -- incremented (so expansion is not prevented by such a msg).
----------------------------------------
-- Specialization of Messages for VMS --
@@ -458,11 +459,11 @@ package Errout is
Ploc : Source_Ptr;
end record;
- -- Note: Ploc points to the terminating semicolon in the List_Off and
- -- Page cases, and to the pragma keyword for List_On. In the case of
- -- a pragma List_Off, a List_On entry is also made in the table,
- -- pointing to the pragma keyword. This ensures that, as required,
- -- a List (Off) pragma is listed even in list off mode.
+ -- Note: Ploc points to the terminating semicolon in the List_Off and Page
+ -- cases, and to the pragma keyword for List_On. In the case of a pragma
+ -- List_Off, a List_On entry is also made in the table, pointing to the
+ -- pragma keyword. This ensures that, as required, a List (Off) pragma is
+ -- listed even in list off mode.
package List_Pragmas is new Table.Table (
Table_Component_Type => List_Pragma_Record,
@@ -529,13 +530,13 @@ package Errout is
procedure Error_Msg_N (Msg : String; N : Node_Or_Entity_Id);
-- Output a message at the Sloc of the given node. This routine can be
- -- called from the parser or the semantic analyzer, although the call
- -- from the latter is much more common (and is the most usual way of
- -- generating error messages from the analyzer). The message text may
- -- contain a single & insertion, which will reference the given node.
- -- The message is suppressed if the node N already has a message posted,
- -- or if it is a warning and warnings and N is an entity node for which
- -- warnings are suppressed.
+ -- called from the parser or the semantic analyzer, although the call from
+ -- the latter is much more common (and is the most usual way of generating
+ -- error messages from the analyzer). The message text may contain a
+ -- single & insertion, which will reference the given node. The message is
+ -- suppressed if the node N already has a message posted, or if it is a
+ -- warning and warnings and N is an entity node for which warnings are
+ -- suppressed.
procedure Error_Msg_F (Msg : String; N : Node_Id);
-- Similar to Error_Msg_N except that the message is placed on the
@@ -547,9 +548,9 @@ package Errout is
E : Node_Or_Entity_Id);
-- Output a message at the Sloc of the given node N, with an insertion of
-- the name from the given entity node E. This is used by the semantic
- -- routines, where this is a common error message situation. The Msg
- -- text will contain a & or } as usual to mark the insertion point.
- -- This routine can be called from the parser or the analyzer.
+ -- routines, where this is a common error message situation. The Msg text
+ -- will contain a & or } as usual to mark the insertion point. This
+ -- routine can be called from the parser or the analyzer.
procedure Error_Msg_FE
(Msg : String;
@@ -623,10 +624,10 @@ package Errout is
-- (treat warnings as errors) mode.
procedure Error_Msg_CRT (Feature : String; N : Node_Id);
- -- Posts a non-fatal message on node N saying that the feature
- -- identified by the Feature argument is not supported in either
- -- configurable run-time mode or no run-time mode (as appropriate).
- -- In the former case, the name of the library is output if available.
+ -- Posts a non-fatal message on node N saying that the feature identified
+ -- by the Feature argument is not supported in either configurable
+ -- run-time mode or no run-time mode (as appropriate). In the former case,
+ -- the name of the library is output if available.
procedure dmsg (Id : Error_Msg_Id) renames Erroutc.dmsg;
-- Debugging routine to dump an error message
@@ -642,13 +643,13 @@ package Errout is
procedure Set_Identifier_Casing
(Identifier_Name : System.Address;
File_Name : System.Address);
- -- The identifier is a null terminated string that represents the name
- -- of an identifier appearing in the source program. File_Name is a null
+ -- The identifier is a null terminated string that represents the name of
+ -- an identifier appearing in the source program. File_Name is a null
-- terminated string giving the corresponding file name for the identifier
-- as obtained from the front end by the use of Full_Debug_Name to the
- -- source file referenced by the corresponding source location value.
- -- On return, the name is in Name_Buffer, null terminated with Name_Len
- -- set. This name is the identifier name as passed, cased according to
- -- the default identifier casing for the given file.
+ -- source file referenced by the corresponding source location value. On
+ -- return, the name is in Name_Buffer, null terminated with Name_Len set.
+ -- This name is the identifier name as passed, cased according to the
+ -- default identifier casing for the given file.
end Errout;
diff --git a/gcc/ada/exp_attr.ads b/gcc/ada/exp_attr.ads
index b0c66e4..9cf5832 100644
--- a/gcc/ada/exp_attr.ads
+++ b/gcc/ada/exp_attr.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992,1993,1994 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- --
@@ -29,5 +29,7 @@
with Types; use Types;
package Exp_Attr is
- procedure Expand_N_Attribute_Reference (N : Node_Id);
+
+ procedure Expand_N_Attribute_Reference (N : Node_Id);
+
end Exp_Attr;
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb
index ca0ce83..1608e43 100644
--- a/gcc/ada/exp_pakd.adb
+++ b/gcc/ada/exp_pakd.adb
@@ -851,12 +851,15 @@ package body Exp_Pakd is
-- If our immediate ancestor subtype is constrained, and it already
-- has a packed array type, then just share the same type, since the
- -- bounds must be the same.
+ -- bounds must be the same. If the ancestor is not an array type but
+ -- a private type, as can happen with multiple instantiations, create
+ -- a new packed type, to avoid privacy issues.
if Ekind (Typ) = E_Array_Subtype then
Ancest := Ancestor_Subtype (Typ);
if Present (Ancest)
+ and then Is_Array_Type (Ancest)
and then Is_Constrained (Ancest)
and then Present (Packed_Array_Type (Ancest))
then
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 989a25f..0fa31b9 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -89,19 +89,19 @@
@set EDITION GNAT
@ifset unw
-@set PLATFORM Unix and Windows
+@set PLATFORM
@set FILE gnat_ugn_unw
@end ifset
@ifset vms
-@set PLATFORM OpenVMS Alpha
+@set PLATFORM OpenVMS
@set FILE gnat_ugn_vms
@end ifset
-@settitle @value{EDITION} User's Guide for Native Platforms / @value{PLATFORM}
+@settitle @value{EDITION} User's Guide @value{PLATFORM}
@dircategory GNU Ada tools
@direntry
-* @value{EDITION} User's Guide (@value{FILE}) for Native Platforms / @value{PLATFORM}
+* @value{EDITION} User's Guide (@value{FILE}) @value{PLATFORM}
@end direntry
@include gcc-common.texi
@@ -127,7 +127,7 @@ A copy of the license is included in the section entitled
@titlepage
@title @value{EDITION} User's Guide
-@center @titlefont{for Native Platforms}
+@c @center @titlefont{for Native Platforms}
@sp 1
@flushright
@@ -138,7 +138,7 @@ A copy of the license is included in the section entitled
@subtitle GNAT, The GNU Ada 95 Compiler
@subtitle GCC version @value{version-GCC}
-@author Ada Core Technologies, Inc.
+@author AdaCore
@page
@vskip 0pt plus 1filll
@@ -152,14 +152,14 @@ A copy of the license is included in the section entitled
@top @value{EDITION} User's Guide
@noindent
-@value{EDITION} User's Guide for Native Platforms / @value{PLATFORM}
+@value{EDITION} User's Guide @value{PLATFORM}
@noindent
GNAT, The GNU Ada 95 Compiler@*
GCC version @value{version-GCC}@*
@noindent
-Ada Core Technologies, Inc.@*
+AdaCore@*
@menu
* About This Guide::
@@ -607,6 +607,9 @@ Compatibility and Porting Guide
* Compatibility with DEC Ada 83::
* Compatibility with Other Ada 95 Systems::
* Representation Clauses::
+@ifset vms
+* Transitioning from Alpha to Integrity OpenVMS::
+@end ifset
@ifset unw
Microsoft Windows Topics
@@ -633,9 +636,10 @@ Microsoft Windows Topics
@noindent
@ifset vms
-This guide describes the use of of @value{EDITION},
+This guide describes the use of @value{EDITION},
a full language compiler for the Ada
-95 programming language, implemented on HP OpenVMS Alpha platforms.
+95 programming language, implemented on HP's Alpha and
+Integrity (ia64) OpenVMS platforms.
@end ifset
@ifclear vms
This guide describes the use of @value{EDITION},
@@ -4680,6 +4684,17 @@ of the renamed packages (like @code{Text_IO}) and use of package
would generate many annoying positive warnings. The default is that
such warnings are not generated.
+In addition to the above cases, warnings are also generated for
+GNAT features that have been provided in past versions but which
+have been superceded (typically by features in the new Ada standard).
+For example, @code{pragma Ravenscar} will be flagged since its
+function is replaced by @code{pragma Profile(Ravenscar)}.
+
+Note that this warning option functions differently from the
+restriction @code{No_Obsolescent_Features} in two respects.
+First, the restriction applies only to annex J features.
+Second, the restriction does flag uses of package @code{ASCII}.
+
@item -gnatwJ
@emph{Suppress warnings on obsolescent features (Annex J).}
@cindex @option{-gnatwJ} (@code{gcc})
@@ -6654,7 +6669,7 @@ The content of the @file{ada_source_path} file which is part of the GNAT
installation tree and is used to store standard libraries such as the
GNAT Run Time Library (RTL) source files.
@ifclear vms
-@ref{Installing the library}
+@ref{Installing a library}
@end ifclear
@end enumerate
@@ -7572,7 +7587,7 @@ installation tree and is used to store standard libraries such as the
GNAT Run Time Library (RTL) unless the switch @option{-nostdlib} is
specified.
@ifclear vms
-@ref{Installing the library}
+@ref{Installing a library}
@end ifclear
@end enumerate
@@ -15470,9 +15485,8 @@ $ gnatmetric [@var{switches}] @var{filename} [@var{-cargs gcc_switches}]
where
@itemize @bullet
@item
-@var{switches} is an optional sequence of switches specifying
-the set of metrics to compute and defining the destination for the
-output information
+@var{switches} specify the metrics to compute and define the destination for
+the output
@item
@var{filename} is the name (including the extension) of the source file to
@@ -15481,7 +15495,7 @@ command are allowed. The file name may contain path information; in this case
it does not have to follow the GNAT file naming rules
@item
-@option{-cargs gcc_switches} is a list of switches that are valid switches for
+@option{-cargs gcc_switches} is a list of switches for
@command{gcc}. They will be passed on to all compiler invocations made by
@command{gnatmetric} to generate the ASIS trees. Here you can provide
@option{-I} switches to form the source search path,
@@ -15513,8 +15527,8 @@ The following subsections describe the various switches accepted by
@cindex Output file control in @command{gnatmetric}
@noindent
-@command{gnatmetric} has two output formats. It can generate the output in
-textual (human-readable) form, and also as XML. By default only textual
+@command{gnatmetric} has two output formats. It can generate a
+textual (human-readable) form, and also XML. By default only textual
output is generated.
When generating the output in textual form, @command{gnatmetric} creates
@@ -15534,7 +15548,7 @@ Some of the computed metrics are summed over the units passed to
By default this information is sent to @file{stdout}, but a file
can be specified with the @option{-og} switch.
-The following switches may be used to control the @command{gnatmetric} output:
+The following switches control the @command{gnatmetric} output:
@table @option
@cindex @option{^-x^/XML^} (@command{gnatmetric})
@@ -15551,11 +15565,12 @@ Put textual files with detailed metrics into @var{output_dir}
@cindex @option{^-o^/SUFFIX_DETAILS^} (@command{gnatmetric})
@item ^-o @var{file_suffix}^/SUFFIX_DETAILS=@var{file_suffix}^
-Use @var{file_suffix} to form the name of the file for the detailed metrics.
+Use @var{file_suffix}, instead of ^@file{.metrix}^@file{$METRIX}^
+in the name of the output file.
@cindex @option{^-og^/GLOBAL_OUTPUT^} (@command{gnatmetric})
@item ^-og @var{file_name}^/GLOBAL_OUTPUT=@var{file_name}^
-Put global metrics info into @var{file_name}
+Put global metrics into @var{file_name}
@cindex @option{^-ox^/XML_OUTPUT^} (@command{gnatmetric})
@item ^-ox @var{file_name}^/XML_OUTPUT=@var{file_name}^
@@ -15583,15 +15598,13 @@ compute metrics for:
@itemize @bullet
@item
-a library item or a subunit into a compilation unit;
+a library item or a subunit in a compilation unit;
@item
all kinds of bodies;
@item
declarations of tasks and protected types and objects, package and generic
-
-@item
package declarations;
@end itemize
@@ -15636,35 +15649,35 @@ format effectors (blank lines)
@end itemize
If @command{gnatmetric} is invoked on more than one source file, it sums the
-values of the line metrics for all the files being processed and then prints
-out the cumulative results.
+values of the line metrics for all the files being processed and then
+generates the cumulative results.
By default, all the line metrics are computed and reported. You can use the
following switches to select the specific line metrics to be computed and
reported (if any of these parameters is set, only explicitly specified line
-metrics are computed)
+metrics are computed).
@table @option
@cindex @option{^-la^/LINES_ALL^} (@command{gnatmetric})
@item ^-la^/LINES_ALL^
-Compute and print out the number of all lines
+The number of all lines
@cindex @option{^-lcode^/CODE_LINES^} (@command{gnatmetric})
@item ^-lcode^/CODE_LINES^
-Compute and print out the number of code lines
+The number of code lines
@cindex @option{^-lcomm^/COMENT_LINES^} (@command{gnatmetric})
@item ^-lcomm^/COMENT_LINES^
-Compute and print out the number of comment lines
+The number of comment lines
@cindex @option{^-leol^/MIXED_CODE_COMMENTS^} (@command{gnatmetric})
@item ^-leol^/MIXED_CODE_COMMENTS^
-Compute and print out the number of code lines containing
+The number of code lines containing
end-of-line comments
@cindex @option{^-lb^/BLANK_LINES^} (@command{gnatmetric})
@item ^-lb^/BLANK_LINES^
- Compute and print out the number of blank lines
+The number of blank lines
@end table
@@ -15673,14 +15686,15 @@ end-of-line comments
@cindex Syntax metrics control in @command{gnatmetric}
@noindent
-For any program unit, @command{gnatmetri}c computes the total number of
+For any program unit, @command{gnatmetric} computes the total number of
declarations and the total number of statements. The sum of all the statements
-and all the declarations is considered as @emph{LSLOC} (Logical Source
-Lines Of Code)
+and all the declarations is considered as @emph{LSLOC} (``Logical Source
+Lines Of Code'')
and is reported as a separate metric.
-For any body and any task, protected, package and generic package declaration a
-maximal nesting level of nested program units is computed. According to
+For any body and any task, protected, package and generic package declaration
+the maximal static nesting level of nested program units is computed.
+According to
@cite{Ada 95 Language Reference Manual}, 10.1(1), ``A program unit is either a
package, a task unit, a protected unit, a
protected entry, a generic unit, or an explicitly declared subprogram other
@@ -15724,21 +15738,20 @@ types are counted and reported separately:
@itemize @bullet
@item
-abstract types;
+Abstract types
@item
-tagged types (abstract, non-abstract, private, non-private). Type
-extensions are @emph{not} counted as tagged types; the idea is to count
-possible roots for classes of extendable types;
+Root tagged types (abstract, non-abstract, private, non-private). Type
+extensions are @emph{not} counted
@item
-private types (including private extensions);
+Private types (including private extensions)
@item
-task types;
+Task types
@item
-protected types.
+Protected types
@end itemize
@@ -15761,39 +15774,35 @@ if any of these is set, only the explicitly specified metrics are computed.
@table @option
@cindex @option{^-ed^/DECLARATION_TOTAL^} (@command{gnatmetric})
@item ^-ed^/DECLARATION_TOTAL^
-Compute and print out the total number of declarations
+The total number of declarations
@cindex @option{^-es^/STATEMENT_TOTAL^} (@command{gnatmetric})
@item ^-es^/STATEMENT_TOTAL^
-Compute and print out the total number of statements
+The total number of statements
@cindex @option{^-eps^/^} (@command{gnatmetric})
@item ^-eps^/INT_SUBPROGRAMS^
-Compute and print out the number of public subprograms in a
-compilation unit
+The number of public subprograms in a compilation unit
@cindex @option{^-eas^/SUBPROGRAMS_ALL^} (@command{gnatmetric})
@item ^-eas^/SUBPROGRAMS_ALL^
-Compute and print out the number of all the subprograms in a
-compilation unit
+The number of all the subprograms in a compilation unit
@cindex @option{^-ept^/INT_TYPES^} (@command{gnatmetric})
@item ^-ept^/INT_TYPES^
-Compute and print out the number of public types in a compilation
-unit
+The number of public types in a compilation unit
@cindex @option{^-eat^/TYPES_ALL^} (@command{gnatmetric})
@item ^-eat^/TYPES_ALL^
-Compute and print out the number of all the types in a compilation
-unit
+The number of all the types in a compilation unit
@cindex @option{^-enu^/PROGRAM_NESTING_MAX^} (@command{gnatmetric})
@item ^-enu^/PROGRAM_NESTING_MAX^
-Compute and print out the maximal program unit nesting level
+The maximal program unit nesting level
@cindex @option{^-ec^/CONSTRUCT_NESTING_MAX^} (@command{gnatmetric})
@item ^-ec^/CONSTRUCT_NESTING_MAX^
-Compute and print out the maximal construct nesting level
+The maximal construct nesting level
@end table
@@ -15842,7 +15851,7 @@ cyclomatic complexity, which is the sum of these two values.
@noindent
When computing cyclomatic and essential complexity, @command{gnatmetric} skips
-the code in the exception handlers and in all the nested program units
+the code in the exception handlers and in all the nested program units.
By default, all the complexity metrics are computed and reported.
For more finely-grained control you can use
@@ -15878,8 +15887,8 @@ Additional @command{gnatmetric} switches are as follows:
Take the argument source files from the specified file. This file should be an
ordinary textual file containing file names separated by spaces or
line breaks. You can use this switch more then once in the same call to
-@command{gnatmetric}. You also can combine this switch with explicit list of
-files.
+@command{gnatmetric}. You also can combine this switch with
+an explicit list of files.
@item ^-v^/VERBOSE^
@cindex @option{^-v^/VERBOSE^} (@code{gnatmetric})
@@ -16864,9 +16873,8 @@ where @code{gnatclean} was invoked.
@cindex Library, building, installing, using
@noindent
-This chapter describes how to build and use
-libraries with GNAT, and also shows how to recompile the GNAT run-time library.
-You should be familiar with the
+This chapter describes how to build and use libraries with GNAT, and also shows
+how to recompile the GNAT run-time library. You should be familiar with the
Project Manager facility (see @ref{GNAT Project Manager}) before reading this
chapter.
@@ -16889,50 +16897,50 @@ or, on platforms that support it, be dynamically linked, in which case
its code is shared by all applications making use of this library.
GNAT supports both types of libraries.
-In the static case, the compiled code can be provided in different ways.
-The simplest approach is to provide directly the
-set of objects resulting from compilation of the library source files.
-Alternatively, you can group the objects into an archive using whatever
-commands are provided by the operating system. For the latter case,
-the objects are grouped into a shared library.
-
-In the GNAT environment, a library has two types of components:
+In the static case, the compiled code can be provided in different ways. The
+simplest approach is to provide directly the set of objects resulting from
+compilation of the library source files. Alternatively, you can group the
+objects into an archive using whatever commands are provided by the operating
+system. For the latter case, the objects are grouped into a shared library.
+
+In the GNAT environment, a library has three types of components:
@itemize @bullet
@item
Source files.
@item
-Compiled code and @file{ALI} files.
+@file{ALI} files.
See @ref{The Ada Library Information Files}.
+@item
+Object files, an archive or a shared library.
@end itemize
@noindent
-A GNAT library may either completely expose its source files to the
-compilation context of the user's application.
-Alternatively, it may expose
-a limited subset of its source files, called @emph{interface units},
-in which case the library is referred to as a @emph{stand-alone library}
-(see @ref{Stand-alone Ada Libraries}). In addition, GNAT fully supports
-foreign libraries, which are only available in the object format.
+A GNAT library may expose all its source files, which is useful for
+documentation purposes. Alternatively, it may expose only the units needed by
+an external user to make use of the library. That is to say, the specs
+expliciting the library services along with all the units needed to compile
+those specs, which can include generic bodies or any body implementing an
+inlined routine. In the case of @emph{stand-alone libraries} those exposed
+units are called @emph{interface units} (see @ref{Stand-alone Ada Libraries}).
-All compilation units comprising
-an application are elaborated, in an order partially defined by Ada language
-semantics.
-Where possible, GNAT provides facilities
-to ensure that compilation units of a library are automatically elaborated;
-however, there are cases where this must be responsibility of a user. This will
-be addressed in greater detail below.
+All compilation units comprising an application, including those in a library,
+need to be elaborated in an order partially defined by Ada's semantics. GNAT
+computes the elaboration order from the @file{ALI} files and this is why they
+constitute a mandatory part of GNAT libraries. Except in the case of
+@emph{stand-alone libraries}, where a specific library elaboration routine is
+produced independantly of the application(s) using the library.
@node General Ada Libraries
@section General Ada Libraries
@menu
-* Building the library::
-* Installing the library::
-* Using the library::
+* Building a library::
+* Installing a library::
+* Using a library::
@end menu
-@node Building the library
-@subsection Building the library
+@node Building a library
+@subsection Building a library
@noindent
The easiest way to build a library is to use the Project Manager,
@@ -16945,7 +16953,7 @@ control different aspects of library configuration, additional optional
project-level attributes can be specified:
@table @code
@item Library_Kind
-This attribute controls whether the library is to be static or shared
+This attribute controls whether the library is to be static or dynamic
@item Library_Version
This attribute specifies what is the library version; this value is used
@@ -16966,15 +16974,29 @@ or are not up to date, assembly of the library archive, and installation of
the library, i.e. copying associated source, object and @file{ALI} files
to the specified location.
-It is not entirely trivial to correctly perform all the steps required to
+Here is a simple library project file:
+@smallexample @c ada
+project My_Lib is
+ for Source_Dirs use ("src1", "src2");
+ for Object_Dir use "obj";
+ for Library_Name use "mylib";
+ for Library_Dir use "lib";
+ for Library_Kind use "dynamic";
+end My_lib;
+@end smallexample
+and the compilation command to build and install the library:
+@smallexample @c ada
+ $ gnatmake -Pmy_lib
+@end smallexample
+
+It is not entirely trivial to perform manually all the steps required to
produce a library. We recommend that you use the GNAT Project Manager
for this task. In special cases where this is not desired, the necessary
steps are discussed below.
There are various possibilities for compiling the units that make up the
-library: for example with a Makefile (see @ref{Using the GNU make Utility})
-or with a conventional script.
-For simple libraries, it is also possible to create a
+library: for example with a Makefile (see @ref{Using the GNU make Utility}) or
+with a conventional script. For simple libraries, it is also possible to create
dummy main program which depends upon all the packages that comprise the
interface of the library. This dummy main program can then be given to
@command{gnatmake}, which will ensure that all necessary objects are built.
@@ -17023,28 +17045,62 @@ $ chmod -w *.ali
@noindent
Please note that the library must have a name of the form @file{libxxx.a} or
-@file{libxxx.so} in order to be accessed by the directive @option{-lxxx}
-at link time.
+@file{libxxx.so} (or @file{libxxx.dll} on Windows) in order to be accessed by
+the directive @option{-lxxx} at link time.
-@node Installing the library
-@subsection Installing the library
+@node Installing a library
+@subsection Installing a library
@noindent
-In the GNAT model, installing a library consists in copying into a specific
-location the files that make up this library. When the library is built using
-projects, it is automatically installed in the location specified in the
-project by means of the attribute @code{Library_Dir},
-otherwise the user must specify the destination.
-GNAT also supports installing the sources in a
-different directory from the other files (@file{ALI}, objects, archives)
-since the source path and the object path can be specified separately.
+When using project files, installing libraries is part of the library build
+process and thus, no further action is needed in order to make use of the
+libraries that are built as part of the general application build. A usable
+version of the library is installed in the directory specified by the
+@code{Library_Dir} attribute of the library project file.
-The system administrator can place general purpose libraries in the default
-compiler paths, by specifying the libraries' location in the configuration
-files @file{ada_source_path} and @file{ada_object_path}.
-These configuration files must be located in the GNAT
-installation tree at the same place as the gcc spec file. The location of
-the gcc spec file can be determined as follows:
+One may want to install a library in a context different from where the library
+is built. This is, for instance, the case of third party suppliers, who whish
+to distribute a library in binary form where the user is not expected to be
+able to recompile the library. The simplest option, in this case, is to provide
+project file slightly different from the one used to build the library which
+makes use of the @code{externally_built} attribute. For instance the project
+file used to build the library in the previous section can be changed into the
+following one when the library is installed:
+
+@smallexample @c ada
+project My_Lib is
+ for Source_Dirs use ("src1", "src2");
+ for Library_Name use "mylib";
+ for Library_Dir use "lib";
+ for Library_Kind use "dynamic";
+ for Externally_Built use "true";
+end My_lib;
+@end smallexample
+
+This project file assumes that the directories "src1", "src2" & "lib" exist in
+the directory containing the project file. The @code{externally_built}
+attribute makes it clear to the GNAT builder that it should not attempt to
+recompile any of the units from this library. It allows the library provider to
+restrict the source set to the minimum necessary for clients to make use of the
+library as described in the first section of this chapter. It is the
+responsability of the library provider to install the necessary sources, ALI
+files & libraries in the directories mentioned in the project file. For
+convenience to the user, it is recommended to install the user's library
+project file in a location that will be searched automatically by the GNAT
+builder. That is to say, any directory refernced in the @code{ADA_LIBRARY_PATH}
+environmenbt variable (see @ref{Importing Projects}), or in the default GNAT
+library location that can be queried with @code{gnatls -v} and is usually of
+the form $gnat_install_root/lib/gnat.
+
+When project files are not an option, it is also possible, but not recommended,
+to install the library so that the sources needed to use the library be on the
+Ada source path and the ALI files & libraries be on the Ada Object path (see
+@ref{Search Paths and the Run-Time Library (RTL)}. Alternatively, he system
+administrator can place general purpose libraries in the default compiler
+paths, by specifying the libraries' location in the configuration files
+@file{ada_source_path} and @file{ada_object_path}. These configuration files
+must be located in the GNAT installation tree at the same place as the gcc spec
+file. The location of the gcc spec file can be determined as follows:
@smallexample
$ gcc -v
@end smallexample
@@ -17080,15 +17136,20 @@ library, by reordering the lines in the configuration files. In general, a
library must be installed before the GNAT library if it redefines
any part of it.
-@node Using the library
-@subsection Using the library
+@node Using a library
+@subsection Using a library
-@noindent
-Once again, the project facility greatly simplifies the addition of libraries
-to the compilation. If the project file for an application lists a library
-project in its @code{with} clause, the Project Manager will ensure that the
-library files are consistent, and that they are considered during the
-compilation and linking of the application.
+@noindent Once again, the project facility greatly simplifies the use of
+libraries. In this context, using a library is just a matter of adding a
+@code{with} clause in the user project. For instance, to make use of the
+library "My_Lib" used as an examples in earlier sections, is just a matter of
+writing something like:
+@smallexample @c ada
+with "my_lib";
+project My_Proj is
+ ...
+end My_Proj;
+@end smallexample
Even if you have a third-party, non-Ada library, you can still use GNAT's
Project Manager facility to provide a wrapper for it. The following project for
@@ -17288,7 +17349,7 @@ read-only.
@noindent
Using SALs is not different from using other libraries
-(see @ref{Using the library}).
+(see @ref{Using a library}).
@node Creating a Stand-alone Library to be used in a non-Ada context
@subsection Creating a Stand-alone Library to be used in a non-Ada context
@@ -18817,8 +18878,13 @@ $ RUN/DEBUG <PROGRAM_NAME>
@cindex Debugging
@noindent
-This chapter discusses how to debug Ada programs. An incorrect Ada program
-may be handled in three ways by the GNAT compiler:
+This chapter discusses how to debug Ada programs.
+@ifset vms
+It applies to the Alpha OpenVMS platform;
+the debugger for Integrity OpenVMS is scheduled for a subsequent release.
+@end ifset
+
+An incorrect Ada program may be handled in three ways by the GNAT compiler:
@enumerate
@item
@@ -26136,9 +26202,12 @@ applications developed in other Ada environments.
@menu
* Compatibility with Ada 83::
* Implementation-dependent characteristics::
-* Compatibility with DEC Ada 83::
* Compatibility with Other Ada 95 Systems::
* Representation Clauses::
+* Compatibility with DEC Ada 83::
+@ifset vms
+* Transitioning from Alpha to Integrity OpenVMS::
+@end ifset
@end menu
@node Compatibility with Ada 83
@@ -26642,6 +26711,393 @@ attributes are recognized, although only a subset of them can sensibly
be implemented. The description of pragmas in this reference manual
indicates whether or not they are applicable to non-VMS systems.
+
+@ifset vms
+@node Transitioning from Alpha to Integrity OpenVMS
+@section Transitioning from Alpha to Integrity OpenVMS
+
+@menu
+* Introduction to transitioning::
+* Migration of 32 bit code::
+* Taking advantage of 64 bit addressing::
+* Technical details::
+@end menu
+
+@node Introduction to transitioning
+@subsection Introduction to transitioning
+
+@noindent
+This guide is meant to assist users of GNAT Pro
+for Alpha OpenVMS who are planning to transition to the IA64 architecture.
+GNAT Pro for Open VMS Integrity has been designed to meet
+three main goals:
+
+@enumerate
+@item
+Providing a full conforming implementation of the Ada 95 language
+
+@item
+Allowing maximum backward compatibility, thus easing migration of existing
+Ada source code
+
+@item
+Supplying a path for exploiting the full IA64 address range
+@end enumerate
+
+@noindent
+Ada's strong typing semantics has made it
+impractical to have different 32-bit and 64-bit modes. As soon as
+one object could possibly be outside the 32-bit address space, this
+would make it necessary for the @code{System.Address} type to be 64 bits.
+In particular, this would cause inconsistencies if 32-bit code is
+called from 64-bit code that raises an exception.
+
+This issue has been resolved by always using 64-bit addressing
+at the system level, but allowing for automatic conversions between
+32-bit and 64-bit addresses where required. Thus users who
+do not currently require 64-bit addressing capabilities, can
+recompile their code with only minimal changes (and indeed
+if the code is written in portable Ada, with no assumptions about
+the size of the @code{Address} type, then no changes at all are necessary).
+At the same time,
+this approach provides a simple, gradual upgrade path to future
+use of larger memories than available for 32-bit systems.
+Also, newly written applications or libraries will by default
+be fully compatible with future systems exploiting 64-bit
+addressing capabilities present in IA64.
+
+@ref{Migration of 32 bit code}, will focus on porting applications
+that do not require more than 2 GB of
+addressable memory. This code will be referred to as
+@emph{32-bit code}.
+For applications intending to exploit the full ia64 address space,
+@ref{Taking advantage of 64 bit addressing},
+will consider further changes that may be required.
+Such code is called @emph{64-bit code} in the
+remainder of this guide.
+
+
+@node Migration of 32 bit code
+@subsection Migration of 32-bit code
+
+@menu
+* Address types::
+* Access types::
+* Unchecked conversions::
+* Predefined constants::
+* Single source compatibility::
+* Experience with source compatibility::
+@end menu
+
+@node Address types
+@subsubsection Address types
+
+@noindent
+To solve the problem of mixing 64-bit and 32-bit addressing,
+while maintaining maximum backward compatibility, the following
+approach has been taken:
+
+@itemize @bullet
+@item
+@code{System.Address} always has a size of 64 bits
+
+@item
+@code{System.Short_Address} is a 32-bit subtype of @code{System.Address}
+@end itemize
+
+
+@noindent
+Since @code{System.Short_Address} is a subtype of @code{System.Address},
+a @code{Short_Address}
+may be used where an @code{Address} is required, and vice versa, without
+needing explicit type conversions.
+By virtue of the Open VMS Integrity parameter passing conventions,
+even imported
+and exported subprograms that have 32-bit address parameters are
+compatible with those that have 64-bit address parameters.
+(See @ref{Making code 64 bit clean}, for details.)
+
+The areas that may need attention are those where record types have
+been defined that contain components of the type @code{System.Address}, and
+where objects of this type are passed to code expecting a record layout with
+32-bit addresses.
+
+Different compilers on different platforms cannot be
+expected to represent the same type in the same way,
+since alignment constraints
+and other system-dependent properties affect the compiler's decision.
+For that reason, Ada code
+generally uses representation clauses to specify the expected
+layout where required.
+
+If such a representation clause uses 32 bits for a component having
+the type @code{System.Address}, GNAT Pro for OpenVMS Integrity will detect
+that error and produce a specific diagnostic message.
+The developer should then determine whether the representation
+should be 64 bits or not and make either of two changes:
+change the size to 64 bits and leave the type as @code{System.Address}, or
+leave the size as 32 bits and change the type to @code{System.Short_Address}.
+Since @code{Short_Address} is a subtype of @code{Address}, no changes are
+required in any code setting or accessing the field; the compiler will
+automatically perform any needed conversions between address
+formats.
+
+@node Access types
+@subsubsection Access types
+
+@noindent
+By default, objects designated by access values are always
+allocated in the 32-bit
+address space. Thus legacy code will never contain
+any objects that are not addressable with 32-bit addresses, and
+the compiler will never raise exceptions as result of mixing
+32-bit and 64-bit addresses.
+
+However, the access values themselves are represented in 64 bits, for optimum
+performance and future compatibility with 64-bit code. As was
+the case with @code{System.Address}, the compiler will give an error message
+if an object or record component has a representation clause that
+requires the access value to fit in 32 bits. In such a situation,
+an explicit size clause for the access type, specifying 32 bits,
+will have the desired effect.
+
+General access types (declared with @code{access all}) can never be
+32 bits, as values of such types must be able to refer to any object
+of the designated type,
+including objects residing outside the 32-bit address range.
+Existing Ada 83 code will not contain such type definitions,
+however, since general access types were introduced in Ada 95.
+
+@node Unchecked conversions
+@subsubsection Unchecked conversions
+
+@noindent
+In the case of an @code{Unchecked_Conversion} where the source type is a
+64-bit access type or the type @code{System.Address}, and the target
+type is a 32-bit type, the compiler will generate a warning.
+Even though the generated code will still perform the required
+conversions, it is highly recommended in these cases to use
+respectively a 32-bit access type or @code{System.Short_Address}
+as the source type.
+
+@node Predefined constants
+@subsubsection Predefined constants
+
+@noindent
+The following predefined constants have changed:
+
+@multitable {@code{System.Address_Size}} {2**32} {2**64}
+@item @b{Constant} @tab @b{Old} @tab @b{New}
+@item @code{System.Word_Size} @tab 32 @tab 64
+@item @code{System.Memory_Size} @tab 2**32 @tab 2**64
+@item @code{System.Address_Size} @tab 32 @tab 64
+@end multitable
+
+@noindent
+If you need to refer to the specific
+memory size of a 32-bit implementation, instead of the
+actual memory size, use @code{System.Short_Memory_Size}
+rather than @code{System.Memory_Size}.
+Similarly, references to @code{System.Address_Size} may need
+to be replaced by @code{System.Short_Address'Size}.
+The program @command{gnatfind} may be useful for locating
+references to the above constants, so that you can verify that they
+are still correct.
+
+@node Single source compatibility
+@subsubsection Single source compatibility
+
+@noindent
+In order to allow the same source code to be compiled on
+both Alpha and IA64 platforms, GNAT Pro for Alpha/OpenVMS
+defines @code{System.Short_Address} and System.Short_Memory_Size
+as aliases of respectively @code{System.Address} and
+@code{System.Memory_Size}.
+(These aliases also leave the door open for a possible
+future ``upgrade'' of OpenVMS Alpha to a 64-bit address space.)
+
+@node Experience with source compatibility
+@subsubsection Experience with source compatibility
+
+@noindent
+The Security Server and STARLET provide an interesting ``test case''
+for source compatibility issues, since it is in such system code
+where assumptions about @code{Address} size might be expected to occur.
+Indeed, there were a small number of occasions in the Security Server
+file @file{jibdef.ads}
+where a representation clause for a record type specified
+32 bits for a component of type @code{Address}.
+All of these errors were detected by the compiler.
+The repair was obvious and immediate; to simply replace @code{Address} by
+@code{Short_Address}.
+
+In the case of STARLET, there were several record types that should
+have had representation clauses but did not. In these record types
+there was an implicit assumption that an @code{Address} value occupied
+32 bits.
+These compiled without error, but their usage resulted in run-time error
+returns from STARLET system calls.
+To assist in the compile-time detection of such situations, we
+plan to include a switch to generate a warning message when a
+record component is of type @code{Address}.
+
+
+@c ****************************************
+@node Taking advantage of 64 bit addressing
+@subsection Taking advantage of 64-bit addressing
+
+@menu
+* Making code 64 bit clean::
+* Allocating memory from the 64 bit storage pool::
+* Restrictions on use of 64 bit objects::
+* Using 64 bit storage pools by default::
+* General access types::
+* STARLET and other predefined libraries::
+@end menu
+
+@node Making code 64 bit clean
+@subsubsection Making code 64-bit clean
+
+@noindent
+In order to prevent problems that may occur when (parts of) a
+system start using memory outside the 32-bit address range,
+we recommend some additional guidelines:
+
+@itemize @bullet
+@item
+For imported subprograms that take parameters of the
+type @code{System.Address}, ensure that these subprograms can
+indeed handle 64-bit addresses. If not, or when in doubt,
+change the subprogram declaration to specify
+@code{System.Short_Address} instead.
+
+@item
+Resolve all warnings related to size mismatches in
+unchecked conversions. Failing to do so causes
+erroneous execution if the source object is outside
+the 32-bit address space.
+
+@item
+(optional) Explicitly use the 32-bit storage pool
+for access types used in a 32-bit context, or use
+generic access types where possible
+(see @ref{Restrictions on use of 64 bit objects}).
+@end itemize
+
+@noindent
+If these rules are followed, the compiler will automatically insert
+any necessary checks to ensure that no addresses or access values
+passed to 32-bit code ever refer to objects outside the 32-bit
+address range.
+Any attempt to do this will raise @code{Constraint_Error}.
+
+@node Allocating memory from the 64 bit storage pool
+@subsubsection Allocating memory from the 64-bit storage pool
+
+@noindent
+For any access type @code{T} that potentially requires memory allocations
+beyond the 32-bit address space,
+use the following representation clause:
+
+@smallexample @c ada
+ for T'Storage_Pool use System.Pool_64;
+@end smallexample
+
+
+@node Restrictions on use of 64 bit objects
+@subsubsection Restrictions on use of 64-bit objects
+
+@noindent
+Taking the address of an object allocated from a 64-bit storage pool,
+and then passing this address to a subprogram expecting
+@code{System.Short_Address},
+or assigning it to a variable of type @code{Short_Address}, will cause
+@code{Constraint_Error} to be raised. In case the code is not 64-bit clean
+(see @ref{Making code 64 bit clean}), or checks are suppressed,
+no exception is raised and execution
+will become erroneous.
+
+@node Using 64 bit storage pools by default
+@subsubsection Using 64-bit storage pools by default
+
+@noindent
+In some cases it may be desirable to have the compiler allocate
+from 64-bit storage pools by default. This may be the case for
+libraries that are 64-bit clean, but may be used in both 32-bit
+and 64-bit contexts. For these cases the following configuration
+pragma may be specified:
+
+@smallexample @c ada
+ pragma Pool_64_Default;
+@end smallexample
+
+@noindent
+Any code compiled in the context of this pragma will by default
+use the @code{System.Pool_64} storage pool. This default may be overridden
+for a specific access type @code{T} by the representation clause:
+
+@smallexample @c ada
+ for T'Storage_Pool use System.Pool_32;
+@end smallexample
+
+@noindent
+Any object whose address may be passed to a subprogram with a
+@code{Short_Address} argument, or assigned to a variable of type
+@code{Short_Address}, needs to be allocated from this pool.
+
+@node General access types
+@subsubsection General access types
+
+@noindent
+Objects designated by access values from a
+general access type (declared with @code{access all}) are never allocated
+from a 64-bit storage pool. Code that uses general access types will
+accept objects allocated in either 32-bit or 64-bit address spaces,
+but never allocate objects outside the 32-bit address space.
+Using general access types ensures maximum compatibility with both
+32-bit and 64-bit code.
+
+
+@node STARLET and other predefined libraries
+@subsubsection STARLET and other predefined libraries
+
+@noindent
+All code that comes as part of GNAT is 64-bit clean, but the
+restrictions given in @ref{Restrictions on use of 64 bit objects},
+still apply. Look at the package
+specifications to see in which contexts objects allocated
+in 64-bit address space are acceptable.
+
+@node Technical details
+@subsection Technical details
+
+@noindent
+GNAT Pro for Open VMS Integrity takes advantage of the freedom given in the Ada
+standard with respect to the type of @code{System.Address}. Previous versions
+of GNAT Pro have defined this type as private and implemented it as
+a modular type.
+
+In order to allow defining @code{System.Short_Address} as a proper subtype,
+and to match the implicit sign extension in parameter passing,
+in GNAT Pro for Open VMS Integrity, @code{System.Address} is defined as a
+visible (i.e., non-private) integer type.
+Standard operations on the type, such as the binary operators ``+'', ``-'',
+etc., that take @code{Address} operands and return an @code{Address} result,
+have been hidden by declaring these
+@code{abstract}, an Ada 95 feature that helps avoid the potential ambiguities
+that would otherwise result from overloading.
+(Note that, although @code{Address} is a visible integer type,
+good programming practice dictates against exploiting the type's
+integer properties such as literals, since this will compromise
+code portability.)
+
+Defining @code{Address} as a visible integer type helps achieve
+maximum compatibility for existing Ada code,
+without sacrificing the capabilities of the IA64 architecture.
+@end ifset
+
+
+@c ************************************************
@ifset unw
@node Microsoft Windows Topics
@appendix Microsoft Windows Topics
diff --git a/gcc/ada/gnatfind.adb b/gcc/ada/gnatfind.adb
index 44abac5..980f31f 100644
--- a/gcc/ada/gnatfind.adb
+++ b/gcc/ada/gnatfind.adb
@@ -36,9 +36,10 @@ with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.Strings; use GNAT.Strings;
----------------
--- Gnatfind --
----------------
+
+--------------
+-- Gnatfind --
+--------------
procedure Gnatfind is
Output_Ref : Boolean := False;
@@ -208,6 +209,7 @@ procedure Gnatfind is
end if;
-- Next arguments are the files to search
+
else
Add_Xref_File (S);
Wide_Search := False;
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads
index 9ec0278..74c8a07 100644
--- a/gcc/ada/lib.ads
+++ b/gcc/ada/lib.ads
@@ -561,11 +561,13 @@ package Lib is
procedure Lock;
-- Lock internal tables before calling back end
- procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
-
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines.
+
+ procedure Tree_Write;
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function Is_Loaded (Uname : Unit_Name_Type) return Boolean;
-- Determines if unit with given name is already loaded, i.e. there is
diff --git a/gcc/ada/namet.ads b/gcc/ada/namet.ads
index 1858968..bf4ec2c 100644
--- a/gcc/ada/namet.ads
+++ b/gcc/ada/namet.ads
@@ -100,12 +100,12 @@ package Namet is
-- characters may appear for such entries.
-- Note: the encodings Uhh (upper half characters), Whhhh (wide characters),
--- and Qx (character literal names) are described in the spec, since they
--- are visible throughout the system (e.g. in debugging output). However,
--- no code should depend on these particular encodings, so it should be
--- possible to change the encodings by making changes only to the Namet
--- specification (to change these comments) and the body (which actually
--- implements the encodings).
+-- and Qx (character literal names) are described in the spec, since they are
+-- visible throughout the system (e.g. in debugging output). However, no code
+-- should depend on these particular encodings, so it should be possible to
+-- change the encodings by making changes only to the Namet specification (to
+-- change these comments) and the body (which actually implements the
+-- encodings).
-- The names are hashed so that a given name appears only once in the table,
-- except that names entered with Name_Enter as opposed to Name_Find are
@@ -118,19 +118,19 @@ package Namet is
-- Two values, one of type Int and one of type Byte, are stored with each
-- names table entry and subprograms are provided for setting and retrieving
--- these associated values. The usage of these values is up to the client.
--- In the compiler, the Int field is used to point to a chain of potentially
--- visible entities (see Sem.Ch8 for details), and the Byte field is used
--- to hold the Token_Type value for reserved words (see Sem for details).
--- In the binder, the Byte field is unused, and the Int field is used in
--- various ways depending on the name involved (see binder documentation).
+-- these associated values. The usage of these values is up to the client. In
+-- the compiler, the Int field is used to point to a chain of potentially
+-- visible entities (see Sem.Ch8 for details), and the Byte field is used to
+-- hold the Token_Type value for reserved words (see Sem for details). In the
+-- binder, the Byte field is unused, and the Int field is used in various
+-- ways depending on the name involved (see binder documentation).
Name_Buffer : String (1 .. 16*1024);
-- This buffer is used to set the name to be stored in the table for the
-- Name_Find call, and to retrieve the name for the Get_Name_String call.
- -- The plus 1 in the length allows for cases of adding ASCII.NUL. The
- -- 16K here is intended to be an infinite value that ensures that we
- -- never overflow the buffer (names this long are too absurd to worry!)
+ -- The plus 1 in the length allows for cases of adding ASCII.NUL. The 16K
+ -- here is intended to be an infinite value that ensures that we never
+ -- overflow the buffer (names this long are too absurd to worry!)
Name_Len : Natural;
-- Length of name stored in Name_Buffer. Used as an input parameter for
@@ -147,9 +147,9 @@ package Namet is
procedure Get_Name_String (Id : Name_Id);
-- Get_Name_String is used to retrieve the string associated with an entry
- -- in the names table. The resulting string is stored in Name_Buffer
- -- and Name_Len is set. It is an error to call Get_Name_String with one
- -- of the special name Id values (No_Name or Error_Name).
+ -- in the names table. The resulting string is stored in Name_Buffer and
+ -- Name_Len is set. It is an error to call Get_Name_String with one of the
+ -- special name Id values (No_Name or Error_Name).
function Get_Name_String (Id : Name_Id) return String;
-- This functional form returns the result as a string without affecting
@@ -157,18 +157,18 @@ package Namet is
procedure Get_Unqualified_Name_String (Id : Name_Id);
-- Similar to the above except that qualification (as defined in unit
- -- Exp_Dbug) is removed (including both preceding __ delimited names,
- -- and also the suffixes used to indicate package body entities and to
+ -- Exp_Dbug) is removed (including both preceding __ delimited names, and
+ -- also the suffixes used to indicate package body entities and to
-- distinguish between overloaded entities). Note that names are not
- -- qualified until just before the call to gigi, so this routine is
- -- only needed by processing that occurs after gigi has been called.
- -- This includes all ASIS processing, since ASIS works on the tree
- -- written after gigi has been called.
+ -- qualified until just before the call to gigi, so this routine is only
+ -- needed by processing that occurs after gigi has been called. This
+ -- includes all ASIS processing, since ASIS works on the tree written
+ -- after gigi has been called.
procedure Get_Name_String_And_Append (Id : Name_Id);
- -- Like Get_Name_String but the resulting characters are appended to
- -- the current contents of the entry stored in Name_Buffer, and Name_Len
- -- is incremented to include the added characters.
+ -- Like Get_Name_String but the resulting characters are appended to the
+ -- current contents of the entry stored in Name_Buffer, and Name_Len is
+ -- incremented to include the added characters.
procedure Get_Decoded_Name_String (Id : Name_Id);
-- Same calling sequence an interface as Get_Name_String, except that the
@@ -179,22 +179,22 @@ package Namet is
procedure Get_Unqualified_Decoded_Name_String (Id : Name_Id);
-- Similar to the above except that qualification (as defined in unit
- -- Exp_Dbug) is removed (including both preceding __ delimited names,
- -- and also the suffix used to indicate package body entities). Note
- -- that names are not qualified until just before the call to gigi, so
- -- this routine is only needed by processing that occurs after gigi has
- -- been called. This includes all ASIS processing, since ASIS works on
- -- the tree written after gigi has been called.
+ -- Exp_Dbug) is removed (including both preceding __ delimited names, and
+ -- also the suffix used to indicate package body entities). Note that
+ -- names are not qualified until just before the call to gigi, so this
+ -- routine is only needed by processing that occurs after gigi has been
+ -- called. This includes all ASIS processing, since ASIS works on the tree
+ -- written after gigi has been called.
procedure Get_Decoded_Name_String_With_Brackets (Id : Name_Id);
-- This routine is similar to Decoded_Name, except that the brackets
- -- notation (Uhh replaced by ["hh"], Whhhh replaced by ["hhhh"]) is
- -- used for all non-lower half characters, regardless of the setting
- -- of Opt.Wide_Character_Encoding_Method, and also in that characters
- -- in the range 16#80# .. 16#FF# are converted to brackets notation
- -- in all cases. This routine can be used when there is a requirement
- -- for a canonical representation not affected by the character set
- -- options (e.g. in the binder generation of symbols).
+ -- notation (Uhh replaced by ["hh"], Whhhh replaced by ["hhhh"]) is used
+ -- for all non-lower half characters, regardless of the setting of
+ -- Opt.Wide_Character_Encoding_Method, and also in that characters in the
+ -- range 16#80# .. 16#FF# are converted to brackets notation in all cases.
+ -- This routine can be used when there is a requirement for a canonical
+ -- representation not affected by the character set options (e.g. in the
+ -- binder generation of symbols).
function Get_Name_Table_Byte (Id : Name_Id) return Byte;
pragma Inline (Get_Name_Table_Byte);
@@ -210,8 +210,8 @@ package Namet is
procedure Initialize;
-- Initializes the names table, including initializing the first 26
- -- entries in the table (for the 1-character lower case names a-z)
- -- Note that Initialize must not be called if Tree_Read is used.
+ -- entries in the table (for the 1-character lower case names a-z) Note
+ -- that Initialize must not be called if Tree_Read is used.
procedure Lock;
-- Lock name table before calling back end. Space for up to 10 extra
@@ -219,8 +219,8 @@ package Namet is
procedure Unlock;
-- Unlocks the name table to allow use of the 10 extra names and 1000
- -- extra characters reserved by the Lock call. See gnat1drv for details
- -- of the need for this.
+ -- extra characters reserved by the Lock call. See gnat1drv for details of
+ -- the need for this.
function Length_Of_Name (Id : Name_Id) return Nat;
pragma Inline (Length_Of_Name);
@@ -230,18 +230,18 @@ package Namet is
-- Length_Of_Name does not affect the contents of Name_Len and Name_Buffer.
function Name_Chars_Address return System.Address;
- -- Return starting address of name characters table (used in Back_End
- -- call to Gigi).
+ -- Return starting address of name characters table (used in Back_End call
+ -- to Gigi).
function Name_Find return Name_Id;
- -- Name_Find is called with a string stored in Name_Buffer whose length
- -- is in Name_Len (i.e. the characters of the name are in subscript
- -- positions 1 to Name_Len in Name_Buffer). It searches the names
- -- table to see if the string has already been stored. If so the Id of
- -- the existing entry is returned. Otherwise a new entry is created with
- -- its Name_Table_Info field set to zero. The contents of Name_Buffer
- -- and Name_Len are not modified by this call. Note that it is permissible
- -- for Name_Len to be set to zero to lookup the null name string.
+ -- Name_Find is called with a string stored in Name_Buffer whose length is
+ -- in Name_Len (i.e. the characters of the name are in subscript positions
+ -- 1 to Name_Len in Name_Buffer). It searches the names table to see if
+ -- the string has already been stored. If so the Id of the existing entry
+ -- is returned. Otherwise a new entry is created with its Name_Table_Info
+ -- field set to zero. The contents of Name_Buffer and Name_Len are not
+ -- modified by this call. Note that it is permissible for Name_Len to be
+ -- set to zero to lookup the null name string.
function Name_Enter return Name_Id;
-- Name_Enter has the same calling interface as Name_Find. The difference
@@ -255,7 +255,7 @@ package Namet is
-- hashing by Name_Find in any case.
function Name_Entries_Address return System.Address;
- -- Return starting address of Names table. Used in Back_End call to Gigi.
+ -- Return starting address of Names table (used in Back_End call to Gigi)
function Name_Entries_Count return Nat;
-- Return current number of entries in the names table
@@ -274,16 +274,16 @@ package Namet is
-- with an underscore. This call destroys the value of Name_Len and
-- Name_Buffer (it loads these as for Get_Name_String).
--
- -- Note: if the name is qualified (has a double underscore), then
- -- only the final entity name is considered, not the qualifying
- -- names. Consider for example that the name:
+ -- Note: if the name is qualified (has a double underscore), then only the
+ -- final entity name is considered, not the qualifying names. Consider for
+ -- example that the name:
--
-- pkg__B_1__xyz
--
- -- is not an internal name, because the B comes from the internal
- -- name of a qualifying block, but the xyz means that this was
- -- indeed a declared identifier called "xyz" within this block
- -- and there is nothing internal about that name.
+ -- is not an internal name, because the B comes from the internal name of
+ -- a qualifying block, but the xyz means that this was indeed a declared
+ -- identifier called "xyz" within this block and there is nothing internal
+ -- about that name.
function Is_Internal_Name return Boolean;
-- Like the form with an Id argument, except that the name to be tested is
@@ -295,8 +295,8 @@ package Namet is
-- the name table info entries associated with current entries in the
-- names table. There is no harm in keeping the names entries themselves
-- from one compilation to another, but we can't keep the entity info,
- -- since this refers to tree nodes, which are destroyed between each
- -- main source file.
+ -- since this refers to tree nodes, which are destroyed between each main
+ -- source file.
procedure Add_Char_To_Name_Buffer (C : Character);
pragma Inline (Add_Char_To_Name_Buffer);
@@ -328,19 +328,20 @@ package Namet is
-- Stores given character code at the end of Name_Buffer, updating the
-- value in Name_Len appropriately. Lower case letters and digits are
-- stored unchanged. Other 8-bit characters are stored using the Uhh
- -- encoding (hh = hex code), and other 16-bit wide-character values
- -- are stored using the Whhhh (hhhh = hex code) encoding. Note that
- -- this procedure does not fold upper case letters (they are stored
- -- using the Uhh encoding). If folding is required, it must be done
- -- by the caller prior to the call.
+ -- encoding (hh = hex code), and other 16-bit wide-character values are
+ -- stored using the Whhhh (hhhh = hex code) encoding. Note that this
+ -- procedure does not fold upper case letters (they are stored using the
+ -- Uhh encoding). If folding is required, it must be done by the caller
+ -- prior to the call.
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
procedure Get_Last_Two_Chars (N : Name_Id; C1, C2 : out Character);
-- Obtains last two characters of a name. C1 is last but one character
@@ -375,10 +376,10 @@ package Namet is
private
- -- This table stores the actual string names. Although logically there
- -- is no need for a terminating character (since the length is stored
- -- in the name entry table), we still store a NUL character at the end
- -- of every name (for convenience in interfacing to the C world).
+ -- This table stores the actual string names. Although logically there is
+ -- no need for a terminating character (since the length is stored in the
+ -- name entry table), we still store a NUL character at the end of every
+ -- name (for convenience in interfacing to the C world).
package Name_Chars is new Table.Table (
Table_Component_Type => Character,
@@ -390,10 +391,10 @@ private
type Name_Entry is record
Name_Chars_Index : Int;
- -- Starting location of characters in the Name_Chars table minus
- -- one (i.e. pointer to character just before first character). The
- -- reason for the bias of one is that indexes in Name_Buffer are
- -- one's origin, so this avoids unnecessary adds and subtracts of 1.
+ -- Starting location of characters in the Name_Chars table minus one
+ -- (i.e. pointer to character just before first character). The reason
+ -- for the bias of one is that indexes in Name_Buffer are one's origin,
+ -- so this avoids unnecessary adds and subtracts of 1.
Name_Len : Short;
-- Length of this name in characters
diff --git a/gcc/ada/nlists.ads b/gcc/ada/nlists.ads
index b3d9e86..c8c1330 100644
--- a/gcc/ada/nlists.ads
+++ b/gcc/ada/nlists.ads
@@ -292,12 +292,13 @@ package Nlists is
-- Called to lock tables before back end is called
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function Parent (List : List_Id) return Node_Id;
pragma Inline (Parent);
diff --git a/gcc/ada/repinfo.ads b/gcc/ada/repinfo.ads
index bdc67b7..72a31ed 100644
--- a/gcc/ada/repinfo.ads
+++ b/gcc/ada/repinfo.ads
@@ -277,7 +277,8 @@ package Repinfo is
-- also returned unmodified.
procedure Tree_Read;
- -- Read in the value of the Rep_Table
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines.
------------------------
-- Compiler Interface --
@@ -287,7 +288,8 @@ package Repinfo is
-- Procedure to list representation information
procedure Tree_Write;
- -- Write out the value of the Rep_Table
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
--------------------------
-- Debugging Procedures --
diff --git a/gcc/ada/s-maccod.ads b/gcc/ada/s-maccod.ads
index 0c970d6..87d7fcc 100644
--- a/gcc/ada/s-maccod.ads
+++ b/gcc/ada/s-maccod.ads
@@ -97,24 +97,21 @@ pragma Pure (Machine_Code);
Outputs : Asm_Output_Operand := No_Output_Operands;
Inputs : Asm_Input_Operand_List;
Clobber : String := "";
- Volatile : Boolean := False)
- return Asm_Insn;
+ Volatile : Boolean := False) return Asm_Insn;
function Asm (
Template : String;
Outputs : Asm_Output_Operand_List;
Inputs : Asm_Input_Operand := No_Input_Operands;
Clobber : String := "";
- Volatile : Boolean := False)
- return Asm_Insn;
+ Volatile : Boolean := False) return Asm_Insn;
function Asm (
Template : String;
Outputs : Asm_Output_Operand := No_Output_Operands;
Inputs : Asm_Input_Operand := No_Input_Operands;
Clobber : String := "";
- Volatile : Boolean := False)
- return Asm_Insn;
+ Volatile : Boolean := False) return Asm_Insn;
pragma Import (Intrinsic, Asm);
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index 2d2c86a..e242bc9 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -1267,8 +1267,8 @@ package body Sem is
-- Start of processing for Semantics
begin
- Compiler_State := Analyzing;
- Current_Sem_Unit := Get_Cunit_Unit_Number (Comp_Unit);
+ Compiler_State := Analyzing;
+ Current_Sem_Unit := Get_Cunit_Unit_Number (Comp_Unit);
if Generic_Main then
Expander_Mode_Save_And_Set (False);
diff --git a/gcc/ada/sem_ch2.adb b/gcc/ada/sem_ch2.adb
index 0656bde..7015fbd 100644
--- a/gcc/ada/sem_ch2.adb
+++ b/gcc/ada/sem_ch2.adb
@@ -6,7 +6,7 @@
-- --
-- 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- --
@@ -41,7 +41,6 @@ package body Sem_Ch2 is
procedure Analyze_Character_Literal (N : Node_Id) is
begin
-
-- The type is eventually inherited from the context. If expansion
-- has already established the proper type, do not modify it.
diff --git a/gcc/ada/sinput.ads b/gcc/ada/sinput.ads
index 90f388d..53e8889 100644
--- a/gcc/ada/sinput.ads
+++ b/gcc/ada/sinput.ads
@@ -564,11 +564,13 @@ package Sinput is
procedure Write_Time_Stamp (S : Source_File_Index);
-- Writes time stamp of specified file in YY-MM-DD HH:MM.SS format
- procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
-
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines.
+
+ procedure Tree_Write;
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
private
pragma Inline (File_Name);
diff --git a/gcc/ada/stringt.ads b/gcc/ada/stringt.ads
index 8453ab5..6a6291a 100644
--- a/gcc/ada/stringt.ads
+++ b/gcc/ada/stringt.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2004 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- --
@@ -128,12 +128,13 @@ package Stringt is
-- Return address of Strings table (used by Back_End call to Gigi)
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
procedure Write_Char_Code (Code : Char_Code);
-- Procedure to write a character code value, used for debugging purposes
diff --git a/gcc/ada/ug_words b/gcc/ada/ug_words
index e83e2e9..21ccc3f 100644
--- a/gcc/ada/ug_words
+++ b/gcc/ada/ug_words
@@ -30,6 +30,8 @@ gnatls ^ GNAT LIST
Gnatls ^ GNAT LIST
gnatmake ^ GNAT MAKE
Gnatmake ^ GNAT MAKE
+gnatmetric ^ GNAT METRIC
+Gnatmetric ^ GNAT METRIC
gnatname ^ GNAT NAME
Gnatname ^ GNAT NAME
gnatpp ^ GNAT PRETTY
diff --git a/gcc/ada/uintp.ads b/gcc/ada/uintp.ads
index 76a2633..f1babd1 100644
--- a/gcc/ada/uintp.ads
+++ b/gcc/ada/uintp.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2004, 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- --
@@ -100,12 +100,13 @@ package Uintp is
-- gigi processing.
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write.
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function UI_Abs (Right : Uint) return Uint;
pragma Inline (UI_Abs);
diff --git a/gcc/ada/urealp.ads b/gcc/ada/urealp.ads
index 05b847d..57bc0fa 100644
--- a/gcc/ada/urealp.ads
+++ b/gcc/ada/urealp.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2004 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- --
@@ -139,12 +139,13 @@ package Urealp is
-- during Gigi processing.
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function Rbase (Real : Ureal) return Nat;
-- Return the base of the universal real.