summaryrefslogtreecommitdiff
path: root/gcc/ada/lib.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 07:53:24 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 07:53:24 +0000
commit948ef2b825ca5bace1ec247e7c6a121c9c271b71 (patch)
tree81769ea78a2ec7af5e792a2936b265ee2eb8060b /gcc/ada/lib.ads
parent6e62b6c3b01ad9adc92f4bbed7e97677b1fbcb07 (diff)
downloadgcc-948ef2b825ca5bace1ec247e7c6a121c9c271b71.tar.gz
2005-09-01 Ed Schonberg <schonberg@adacore.com>
Hristian Kirtchev <kirtchev@adacore.com> Javier Miranda <miranda@adacore.com> * exp_ch6.adb (Expand_Call): If an actual is a function call rewritten from object notation, the original node is unanalyzed and carries no semantic information, so that accessiblity checks must be performed on the type of the actual itself. (Expand_N_Subprogram_Declaration): Change last actual parameter for compatibility with Build_Protected_Sub_Specification. (Check_Overriding_Inherited_Interfaces): Add suport to handle overloaded primitives. (Register_Interface_DT_Entry): Use the new name of the formal the the calls to Expand_Interface_Thunk * exp_dbug.ads: Augment comments on encoding of protected types to include the generation of dispatching subprograms when the type implements at least one interface. * lib.ads: Extend information in Load_Stack to include whether a given load comes from a Limited_With_Clause. * lib-load.adb (From_Limited_With_Chain): New predicate to determine whether a potential circularity is harmless, because it includes units loaded through a limited_with clause. Extends previous treatment which did not handle properly arbitrary combinations of limited and non-limited clauses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib.ads')
-rw-r--r--gcc/ada/lib.ads32
1 files changed, 17 insertions, 15 deletions
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads
index 3b6bb68e1f3..e906ff25610 100644
--- a/gcc/ada/lib.ads
+++ b/gcc/ada/lib.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -239,11 +239,6 @@ package Lib is
-- Main_Unit is a body with a separate spec, in which case it is the
-- entity for the spec.
- Unit_Exception_Table_Present : Boolean;
- -- Set true if a unit exception table is present for the unit (i.e.
- -- zero cost exception handling is active and there is at least one
- -- subprogram in the extended unit).
-
-----------------
-- Units Table --
-----------------
@@ -623,7 +618,7 @@ package Lib is
function Generic_Separately_Compiled
(Sfile : File_Name_Type) return Boolean;
- -- Same as the previous function, but works directly on a unit file name.
+ -- Same as the previous function, but works directly on a unit file name
private
pragma Inline (Cunit);
@@ -722,16 +717,23 @@ private
type Unit_Ref_Table is array (Pos range <>) of Unit_Number_Type;
-- Type to hold list of indirect references to unit number table
- -- The Load_Stack table contains a list of unit numbers (indexes into the
- -- unit table) of units being loaded on a single dependency chain. The
- -- First entry is the main unit. The second entry, if present is a unit
- -- on which the first unit depends, etc. This stack is used to generate
- -- error messages showing the dependency chain if a file is not found.
- -- The Load function makes an entry in this table when it is called, and
- -- removes the entry just before it returns.
+ type Load_Stack_Entry is record
+ Unit_Number : Unit_Number_Type;
+ From_Limited_With : Boolean;
+ end record;
+
+ -- The Load_Stack table contains a list of unit numbers (indices into the
+ -- unit table) of units being loaded on a single dependency chain, and a
+ -- flag to indicate whether this unit is loaded through a limited_with
+ -- clause. The First entry is the main unit. The second entry, if present
+ -- is a unit on which the first unit depends, etc. This stack is used to
+ -- generate error messages showing the dependency chain if a file is not
+ -- found, or whether a true circular dependency exists. The Load_Unit
+ -- function makes an entry in this table when it is called, and removes
+ -- the entry just before it returns.
package Load_Stack is new Table.Table (
- Table_Component_Type => Unit_Number_Type,
+ Table_Component_Type => Load_Stack_Entry,
Table_Index_Type => Nat,
Table_Low_Bound => 0,
Table_Initial => Alloc.Load_Stack_Initial,