aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 12:41:56 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 12:41:56 +0100
commitfd0d899b57a1c3283bf47e414cad99e0f1bd3a2c (patch)
tree98f11f6ca28a2ea30f5c66786ecba925fd13bb5b /gcc/ada/sem_util.adb
parent33f9ea08c652e009b218398cf9c98dab7e9af7af (diff)
downloadgcc-fd0d899b57a1c3283bf47e414cad99e0f1bd3a2c.zip
gcc-fd0d899b57a1c3283bf47e414cad99e0f1bd3a2c.tar.gz
gcc-fd0d899b57a1c3283bf47e414cad99e0f1bd3a2c.tar.bz2
[multiple changes]
2009-11-30 Vincent Celier <celier@adacore.com> * prj-tree.ads: Minor comment updates * prj-tree.adb: Minor reformatting 2009-11-30 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Derive_Subprogram): Indicate that an inherited predefined control operation is hidden if the parent type is not visibly controlled. * sem_ch6.adb (Check_Overriding_Indicator): Do not report error if overridden operation is not visible, as may be the case with predefined control operations. * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on non-overriding control operation when type is not visibly controlled, if the subprogram has an explicit overriding indicator. * sem_util.ads, sem_util.adb (Is_Visibly_Controlled): Moved here from sem_disp.adb. From-SVN: r154791
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index cbcbc16..48c7dff 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -7238,6 +7238,18 @@ package body Sem_Util is
end if;
end Is_Variable;
+ ---------------------------
+ -- Is_Visibly_Controlled --
+ ---------------------------
+
+ function Is_Visibly_Controlled (T : Entity_Id) return Boolean is
+ Root : constant Entity_Id := Root_Type (T);
+ begin
+ return Chars (Scope (Root)) = Name_Finalization
+ and then Chars (Scope (Scope (Root))) = Name_Ada
+ and then Scope (Scope (Scope (Root))) = Standard_Standard;
+ end Is_Visibly_Controlled;
+
------------------------
-- Is_Volatile_Object --
------------------------