Commit 87b3f81f by Arnaud Charlet

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
parent e9906cbf
......@@ -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 "
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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);
......
......@@ -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 --
......
......@@ -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);
......
......@@ -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);
......
......@@ -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.
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment