summaryrefslogtreecommitdiff
path: root/gcc/ada/ali.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-17 21:00:59 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-17 21:00:59 +0000
commit8880be8571f9ef03b3cd47702aa15d31f4c0dad3 (patch)
tree425ca9a59ec19c276fa2119f9e7b007ba368384d /gcc/ada/ali.adb
parent303e829182e62008667899110e4f22831d1c419d (diff)
downloadgcc-8880be8571f9ef03b3cd47702aa15d31f4c0dad3.tar.gz
* ali.adb: Type reference does not reset current file.
* ali.adb: Recognize and scan renaming reference * ali.ads: Add spec for storing renaming references. * lib-xref.ads: Add documentation for handling of renaming references * lib-xref.adb: Implement output of renaming reference. * checks.adb: (Determine_Range): Document local variables (Determine_Range): Make sure Hbound is initialized. It looks as though there could be a real problem here with an uninitialized reference to Hbound, but no actual example of failure has been found. * g-socket.ads: Fix comment of Shutdown_Socket and Close_Socket. These functions should not fail silently because if they are called twice, this probably means that there is a race condition in the user program. Anyway, this behaviour is consistent with the rest of this unit. When an error occurs, an exception is raised with the error message as exception message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/ali.adb')
-rw-r--r--gcc/ada/ali.adb32
1 files changed, 28 insertions, 4 deletions
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb
index 8ce631efa1c..c0d744ffb93 100644
--- a/gcc/ada/ali.adb
+++ b/gcc/ada/ali.adb
@@ -134,7 +134,7 @@ package body ALI is
-- all lower case. This only happends for systems where file names are
-- not case sensitive, and ensures that gnatbind works correctly on
-- such systems, regardless of the case of the file name. Note that
- -- a name can be terminated by a right typeref bracket.
+ -- a name can be terminated by a right typeref bracket or '='.
function Get_Nat return Nat;
-- Skip blanks, then scan out an unsigned integer value in Nat range
@@ -305,8 +305,11 @@ package body ALI is
loop
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len) := Getc;
- exit when At_End_Of_Field;
- exit when Nextc = ')' or else Nextc = '}' or else Nextc = '>';
+ exit when At_End_Of_Field
+ or else Nextc = ')'
+ or else Nextc = '}'
+ or else Nextc = '>'
+ or else Nextc = '=';
end loop;
-- Convert file name to all lower case if file names are not case
@@ -1305,8 +1308,29 @@ package body ALI is
XE.Lib := (Getc = '*');
XE.Entity := Get_Name;
+ -- Renaming reference is present
+
+ if Nextc = '=' then
+ P := P + 1;
+ XE.Rref_Line := Get_Nat;
+
+ if Getc /= ':' then
+ Fatal_Error;
+ end if;
+
+ XE.Rref_Col := Get_Nat;
+
+ -- No renaming reference present
+
+ else
+ XE.Rref_Line := 0;
+ XE.Rref_Col := 0;
+ end if;
+
Skip_Space;
+ -- See if type reference present
+
case Nextc is
when '<' => XE.Tref := Tref_Derived;
when '(' => XE.Tref := Tref_Access;
@@ -1332,7 +1356,6 @@ package body ALI is
if Nextc = '|' then
XE.Tref_File_Num :=
Sdep_Id (N + Nat (First_Sdep_Entry) - 1);
- Current_File_Num := XE.Tref_File_Num;
P := P + 1;
N := Get_Nat;
@@ -1347,6 +1370,7 @@ package body ALI is
end if;
P := P + 1; -- skip closing bracket
+ Skip_Space;
-- No typeref entry present