+2010-09-10 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Derive_Subprograms): An interface primitive operation
+ that is a renaming must be derived like any other primitive operation,
+ the renamed operation is not relevant to the derivation.
+
+2010-09-10 Robert Dewar <dewar@adacore.com>
+
+ * sem_aux.ads: Add comment for Is_Inherently_Limited_Type.
+ * checks.adb: Minor reformatting.
+
2010-09-10 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Add section on intent of style checking options.
end if;
end if;
- -- If this is a boolean expression, only its elementary consituents
- -- need checking: if they are valid, a boolean or short-circuit
- -- operation with them will be valid as well.
+ -- If this is a boolean expression, only its elementary consituents need
+ -- checking: if they are valid, a boolean or short-circuit operation
+ -- with them will be valid as well.
if Base_Type (Typ) = Standard_Boolean
and then
-- These are the types that are defined as return-by-reference types in Ada
-- 95 (see RM95-6.5(11-16)). In Ada 2005, these are the types that require
-- build-in-place for function calls. Note that build-in-place is allowed
- -- for other types, too.
+ -- for other types, too. This is also used for idenfitying pure procedures
+ -- whose calls should not be eliminated (RM 10.2.1(18/2)).
function Is_Limited_Type (Ent : Entity_Id) return Boolean;
-- Ent is any entity. Returns true if Ent is a limited type (limited
-- were not covered by the parent type. We exclude here null
-- interface primitives because they do not need special
-- management.
+ -- We also exclude interface operations that are renamings.
+ -- If the subprogram is an explicit renaming of an interface
+ -- primitive, it is a regular primitive operation, and the
+ -- presence of its alias is not relevant: it has to be derived
+ -- like any other primitive.
elsif Present (Alias (Subp))
+ and then
+ Nkind (Unit_Declaration_Node (Subp))
+ /= N_Subprogram_Renaming_Declaration
and then Is_Interface (Find_Dispatching_Type (Alias_Subp))
and then not
(Nkind (Parent (Alias_Subp)) = N_Procedure_Specification