Commit 46f52a47 by Arnaud Charlet

[multiple changes]

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.

From-SVN: r164155
parent 46256d9d
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.
......
......@@ -4108,9 +4108,9 @@ package body Checks is
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
......
......@@ -172,7 +172,8 @@ package Sem_Aux is
-- 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
......
......@@ -12966,8 +12966,16 @@ package body Sem_Ch3 is
-- 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment