OSDN Git Service

Fix aliasing bug that also caused memory usage problems.
[pf3gnuchains/gcc-fork.git] / gcc / ada / ali.ads
index 7fbf1a4..44f5ffa 100644 (file)
@@ -253,7 +253,7 @@ package ALI is
 
       Dynamic_Elab : Boolean;
       --  Set to True if the unit was compiled with dynamic elaboration
-      --  checks (i.e. either -gnatE or pragma Elaboration_Checks (Static)
+      --  checks (i.e. either -gnatE or pragma Elaboration_Checks (RM)
       --  was used to compile the unit).
 
       Elaborate_Body : Boolean;
@@ -476,7 +476,7 @@ package ALI is
       --  Indicates presence of ED parameter
 
       Interface : Boolean := False;
-      --  True if the Unit is an Interface of a Stand-Alole Library
+      --  True if the Unit is an Interface of a Stand-Alone Library
 
    end record;
 
@@ -593,8 +593,10 @@ package ALI is
    No_Sdep_Id : constant Sdep_Id := Sdep_Id'First;
    --  Special value indicating no Sdep table entry
 
-   First_Sdep_Entry : constant Sdep_Id := No_Sdep_Id + 1;
-   --  Id of first actual entry in table
+   First_Sdep_Entry : Sdep_Id := No_Sdep_Id + 1;
+   --  Id of first Sdep entry for current ali file. This is initialized to
+   --  the first Sdep entry in the table, and then incremented appropriately
+   --  as successive ALI files are scanned.
 
    type Sdep_Record is record
 
@@ -808,13 +810,14 @@ package ALI is
    --  Initialize the ALI tables. Also resets all switch values to defaults.
 
    function Scan_ALI
-     (F            : File_Name_Type;
-      T            : Text_Buffer_Ptr;
-      Ignore_ED    : Boolean;
-      Err          : Boolean;
-      Read_Xref    : Boolean := False;
-      Read_Lines   : String := "";
-      Ignore_Lines : String := "X") return ALI_Id;
+     (F             : File_Name_Type;
+      T             : Text_Buffer_Ptr;
+      Ignore_ED     : Boolean;
+      Err           : Boolean;
+      Read_Xref     : Boolean := False;
+      Read_Lines    : String  := "";
+      Ignore_Lines  : String  := "X";
+      Ignore_Errors : Boolean := False) return ALI_Id;
    --  Given the text, T, of an ALI file, F, scan and store the information
    --  from the file, and return the Id of the resulting entry in the ALI
    --  table. Switch settings may be modified as described above in the
@@ -854,5 +857,12 @@ package ALI is
    --    Ignore_Lines and Read_Lines parameters are ignored (i.e. the
    --    use of True for Read_XREF is equivalent to specifying an
    --    argument of "UWDX" for Read_Lines.
+   --
+   --    Ignore_Errors is normally False. If it is set True, then Scan_ALI
+   --    will do its best to scan through a file and extract all information
+   --    it can, even if there are errors. In this case Err is only set if
+   --    Scan_ALI was completely unable to process the file (e.g. it did not
+   --    look like an ALI file at all). Ignore_Errors is intended to improve
+   --    the downward compatibility of new compilers with old tools.
 
 end ALI;