summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-22 09:46:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-22 09:46:29 +0000
commit71c11f4a4d4c92284eba02df854c1a521d73ab6c (patch)
tree90c235956a6ffcc7534101fd39971c423ec12a7b /gcc/ada/sem_ch10.adb
parent180a5dc0df968ab1ce2f1b97a15ad6e25d03fff9 (diff)
downloadgcc-71c11f4a4d4c92284eba02df854c1a521d73ab6c.tar.gz
2009-04-22 Bob Duff <duff@adacore.com>
* exp_pakd.adb: Minor comment fixes. * sinfo.ads, par-load.adb, sem_ch10.adb, lib-load.ads, lib-load.adb sem_ch12.adb: Change the meaning of the Library_Unit attribute to include units containing instantiations, as well as units that are generic instantiations. * sem.adb: Include dependents and corresponding specs/bodies in the unit walk. * gcc-interface/Make-lang.in: sem now depends on s-bitops, because of the packed array of Booleans. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index cd713c84f77..791601d77b1 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, 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- --
@@ -3283,7 +3283,7 @@ package body Sem_Ch10 is
and then Renamed_Entity (E) = WEnt
then
-- The unlimited view is visible through use clause and
- -- renamings. There is not need to generate the error
+ -- renamings. There is no need to generate the error
-- message here because Is_Visible_Through_Renamings
-- takes care of generating the precise error message.
@@ -4322,7 +4322,7 @@ package body Sem_Ch10 is
then
-- Generate the error message only if the current unit
-- is a package declaration; in case of subprogram
- -- bodies and package bodies we just return true to
+ -- bodies and package bodies we just return True to
-- indicate that the limited view must not be
-- installed.
@@ -4348,7 +4348,13 @@ package body Sem_Ch10 is
Next (Item);
end loop;
- if Present (Library_Unit (Aux_Unit)) then
+ -- If it's a body not acting as spec, follow pointer to
+ -- corresponding spec, otherwise follow pointer to parent spec.
+
+ if Present (Library_Unit (Aux_Unit))
+ and then Nkind_In (Unit (Aux_Unit),
+ N_Package_Body, N_Subprogram_Body)
+ then
if Aux_Unit = Library_Unit (Aux_Unit) then
-- Aux_Unit is a body that acts as a spec. Clause has
@@ -4359,6 +4365,7 @@ package body Sem_Ch10 is
else
Aux_Unit := Library_Unit (Aux_Unit);
end if;
+
else
Aux_Unit := Parent_Spec (Unit (Aux_Unit));
end if;