diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-29 15:26:18 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-29 15:26:18 +0000 |
commit | 28d5d68f82021e25f4f1b896c23ddf4f7eea2558 (patch) | |
tree | a4934a87437d9d9c541d4ad11fffc49ce2d20e86 /gcc/ada/sem_ch7.adb | |
parent | 46e32b5e808a1f6150b506f28e3987df38334879 (diff) | |
download | gcc-28d5d68f82021e25f4f1b896c23ddf4f7eea2558.tar.gz |
2014-01-29 Ed Schonberg <schonberg@adacore.com>
* checks.adb: minor clarification.
* sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
search for primitive operations to the entities that immediately
follow the type declaration.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
-rw-r--r-- | gcc/ada/sem_ch7.adb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index 4b6a6e42482..d0d80ba2b21 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -1812,6 +1812,15 @@ package body Sem_Ch7 is end if; Next_Entity (Prim_Op); + + -- Derived operations appear immediately after the type + -- declaration (or the following subtype indication for + -- a derived scalar type). Further declarations cannot + -- include inherited operations of the type. + + if Present (Prim_Op) then + exit when Ekind (Prim_Op) not in Overloadable_Kind; + end if; end loop; end if; end if; |