aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.ads
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2007-12-13 11:48:09 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2007-12-13 11:48:09 +0100
commit7d7af38a4beb098888bab5d365c57c957033c900 (patch)
tree63a8d81a2d72713eadec60590e4714fa1864c3a2 /gcc/ada/sem_ch3.ads
parent2242f4ddc32a339aee5f44a36735dad9ae34e99a (diff)
downloadgcc-7d7af38a4beb098888bab5d365c57c957033c900.zip
gcc-7d7af38a4beb098888bab5d365c57c957033c900.tar.gz
gcc-7d7af38a4beb098888bab5d365c57c957033c900.tar.bz2
sem_ch3.ads, [...] (Check_Abstract_Overriding): Avoid generation of spurious error if parent is an interface type...
2007-12-06 Javier Miranda <miranda@adacore.com> Ed Schonberg <schonberg@adacore.com> * sem_ch3.ads, sem_ch3.adb (Check_Abstract_Overriding): Avoid generation of spurious error if parent is an interface type; caused because predefined primitive bodies will be generated later by Freeze_Record_Type. (Process_Subtype): The subtype inherits the Known_To_Have_Preelab_Init flag. (Derive_Subprograms): Handle derivations of predefined primitives after all the user-defined primitives to ensure that they are found in proper order in instantiations. (Add_Interface_Tag_Components, Inherit_Components): Update occurrences of Related_Interface to Related_Type. (Record_Type_Declaration): Minor reordering of calls to decorate the Tag component because the entity must have set its Ekind attribute before setting its Is_Tag attribute. (Analyze_Subtype_Declaration): In the case of subtypes with Private_Kind, inherit Known_To_Have_Preelab_Init from the parent. From-SVN: r130883
Diffstat (limited to 'gcc/ada/sem_ch3.ads')
-rw-r--r--gcc/ada/sem_ch3.ads10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/sem_ch3.ads b/gcc/ada/sem_ch3.ads
index 79f8259..3afb0a2 100644
--- a/gcc/ada/sem_ch3.ads
+++ b/gcc/ada/sem_ch3.ads
@@ -120,18 +120,16 @@ package Sem_Ch3 is
-- subprogram of the parent type.
procedure Derive_Subprograms
- (Parent_Type : Entity_Id;
- Derived_Type : Entity_Id;
- Generic_Actual : Entity_Id := Empty);
+ (Parent_Type : Entity_Id;
+ Derived_Type : Entity_Id;
+ Generic_Actual : Entity_Id := Empty);
-- To complete type derivation, collect/retrieve the primitive operations
-- of the parent type, and replace the subsidiary subtypes with the derived
-- type, to build the specs of the inherited ops. For generic actuals, the
-- mapping of the primitive operations to those of the parent type is also
-- done by rederiving the operations within the instance. For tagged types,
-- the derived subprograms are aliased to those of the actual, not those of
- -- the ancestor. The last two params are used in case of derivation from
- -- abstract interface types: No_Predefined_Prims is used to avoid the
- -- derivation of predefined primitives from an abstract interface.
+ -- the ancestor.
--
-- Note: one might expect this to be private to the package body, but
-- there is one rather unusual usage in package Exp_Dist.