aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2013-07-08 07:46:22 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-07-08 09:46:22 +0200
commit85f6a831a631b643880fe66e480af0c0b465ba9f (patch)
tree6d6a2a6184ed688b0a87365ae4a2948303b33441 /gcc/ada
parente530a2d13b66e9ce876c4a2a0a677e3d5cc8e1ec (diff)
downloadgcc-85f6a831a631b643880fe66e480af0c0b465ba9f.zip
gcc-85f6a831a631b643880fe66e480af0c0b465ba9f.tar.gz
gcc-85f6a831a631b643880fe66e480af0c0b465ba9f.tar.bz2
sem_ch8.adb, [...]: Minor reformatting.
2013-07-08 Robert Dewar <dewar@adacore.com> * sem_ch8.adb, sem_ch8.ads: Minor reformatting. From-SVN: r200755
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/sem_ch8.adb12
-rw-r--r--gcc/ada/sem_ch8.ads14
3 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index cf2deca..0fa4a2e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-08 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
+
2013-07-08 Gary Dismukes <dismukes@adacore.com>
* gnat_rm.texi: Minor reformatting and rewording for consistency.
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index da47aab..c0795b7 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -7664,6 +7664,8 @@ package body Sem_Ch8 is
begin
-- Restore visibility of previous scope stack, if any
+ -- Should use Remove_Elmt, so that elements can be reused ???
+
Elmt := First_Elmt (List);
while Present (Elmt) loop
Set_Is_Immediately_Visible (Node (Elmt));
@@ -7690,7 +7692,13 @@ package body Sem_Ch8 is
procedure Remove_From_Visibility (E : Entity_Id);
-- If E is immediately visible then append it to the result and remove
- -- it temporarily from visibility
+ -- it temporarily from visibility.
+
+ ----------------------------
+ -- Remove_From_Visibility --
+ ----------------------------
+
+ -- Need comment on why we do this instead of old approach???
procedure Remove_From_Visibility (E : Entity_Id) is
begin
@@ -7700,6 +7708,8 @@ package body Sem_Ch8 is
end if;
end Remove_From_Visibility;
+ -- Start of processing for Save_Scope_Stack
+
begin
if SS_Last >= Scope_Stack.First
and then Scope_Stack.Table (SS_Last).Entity /= Standard_Standard
diff --git a/gcc/ada/sem_ch8.ads b/gcc/ada/sem_ch8.ads
index 6a5c89c..99d2b14 100644
--- a/gcc/ada/sem_ch8.ads
+++ b/gcc/ada/sem_ch8.ads
@@ -148,7 +148,8 @@ package Sem_Ch8 is
-- with-clause on system. N is absent when the function is called to find
-- the visibility of implicit operators.
- function Save_Scope_Stack (Handle_Use : Boolean := True) return Elist_Id;
+ function Save_Scope_Stack
+ (Handle_Use : Boolean := True) return Elist_Id;
procedure Restore_Scope_Stack
(List : Elist_Id;
Handle_Use : Boolean := True);
@@ -156,10 +157,13 @@ package Sem_Ch8 is
-- be compiled in the course of the compilation of another unit U2. This
-- happens whenever Rtsfind is called. U1, the unit retrieved by Rtsfind,
-- must be compiled in its own context, and the current scope stack
- -- containing U2 and local scopes must be made unreachable. On return, the
- -- contents of the scope stack must be made accessible again. The flag
- -- Handle_Use indicates whether local use clauses must be removed or
- -- installed. In the case of inlining of instance bodies, the visibility
+ -- containing U2 and local scopes must be made unreachable. This is
+ -- achieved using a call to Save_Scope_Stack. On return, the contents
+ -- of the scope stack must be made accessible again with a call to
+ -- Restore_Scope_Stack.
+ --
+ -- The flag Handle_Use indicates whether local use clauses must be removed
+ -- or installed. In the case of inlining of instance bodies, the visibility
-- handling is done fully in Inline_Instance_Body, and use clauses are
-- handled there. Save_Scope_Stack returns the list of entities which have
-- been temporarily removed from visibility; that list must be passed to