diff options
author | Robert Dewar <dewar@adacore.com> | 2014-01-27 16:27:02 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-27 17:27:02 +0100 |
commit | 42959b0c5aa6a3ff084de4b27f4b3830c417697f (patch) | |
tree | 3dfaaf77aed500ab01118f57efe4e570c777627e /gcc/ada/sem_util.adb | |
parent | 84e90123e6f43db35b07d8081fcdcb7fd08cdeda (diff) | |
download | gcc-42959b0c5aa6a3ff084de4b27f4b3830c417697f.zip gcc-42959b0c5aa6a3ff084de4b27f4b3830c417697f.tar.gz gcc-42959b0c5aa6a3ff084de4b27f4b3830c417697f.tar.bz2 |
gnat_ugn.texi: Add Short_Enums to documentation of -gnatet/-gnateT.
2014-01-27 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Add Short_Enums to documentation of
-gnatet/-gnateT.
2014-01-27 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Correct check for input
item in same package.
* sem_util.ads, sem_util.adb (Within_Scope): New function.
From-SVN: r207134
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index cf00b2f..9c9a227 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -16100,6 +16100,25 @@ package body Sem_Util is return Is_Init_Proc (S); end Within_Init_Proc; + ------------------ + -- Within_Scope -- + ------------------ + + function Within_Scope (E : Entity_Id; S : Entity_Id) return Boolean is + SE : Entity_Id; + begin + SE := Scope (E); + loop + if SE = S then + return True; + elsif SE = Standard_Standard then + return False; + else + SE := Scope (SE); + end if; + end loop; + end Within_Scope; + ---------------- -- Wrong_Type -- ---------------- |