+2014-11-20 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch7.adb, sem_ch5.adb, sem_ch7.adb, sem_util.adb,
+ sem_ch6.adb: Minor reformatting.
+
+2014-11-20 Javier Miranda <miranda@adacore.com>
+
+ * exp_ch4.adb (Expand_N_Type_Conversion): Add missing implicit
+ conversion to force the displacement of the pointer to the object
+ to reference the secondary dispatch table.
+
2014-11-11 Simon Wright <simon@pushface.org>
PR ada/42978
-- Ada 2005 (AI-251): Handle interface type conversion
- if Is_Interface (Actual_Op_Typ) then
+ if Is_Interface (Actual_Op_Typ)
+ or else Is_Interface (Actual_Targ_Typ)
+ then
Expand_Interface_Conversion (N);
goto Done;
end if;
-- Generate:
-- [Deep_]Finalize (Obj_Ref);
- -- Set type of dereference, so that proper conversion are
- -- generated when operation is inherited.
+
+ -- Set type of dereference, so that proper conversion are
+ -- generated when operation is inherited.
Obj_Ref := New_Occurrence_Of (Obj_Id, Loc);
else
Set_Etype (Def_Id, Entity (Element));
- -- If subtype indication was given, verify that it
- -- covers the element type of the container.
+ -- If subtype indication was given, verify that it covers
+ -- the element type of the container.
if Present (Subt)
and then not Covers (Bas, Etype (Def_Id))
("\to iterate directly over the elements of a container, "
& "write `of &`", Name (N), Original_Node (Name (N)));
- -- No point in continuing analysis of iterator spec.
+ -- No point in continuing analysis of iterator spec
return;
end if;
-- If both are functions/operators, check return types conform
if Old_Type /= Standard_Void_Type
- and then New_Type /= Standard_Void_Type
+ and then
+ New_Type /= Standard_Void_Type
then
-- If we are checking interface conformance we omit controlling
-- arguments and result, because we are only checking the conformance
function Requires_Completion_In_Body
(Id : Entity_Id;
- Pack_Id : Entity_Id) return Boolean is
+ Pack_Id : Entity_Id) return Boolean
+ is
begin
-- Always ignore child units. Child units get added to the entity list
-- of a parent unit, but are not original entities of the parent, and
and then Present (Generalized_Indexing (N))
then
Nam := Generalized_Indexing (N);
-
else
Nam := N;
end if;
-- as an access type internally, this function tests only for access types
-- known to the programmer. See also Has_Tagged_Component.
- function Has_Defaulted_Discriminants (Typ : Entity_Id) return Boolean;
- -- Simple predicate to test for defaulted discriminants
+ function Has_Defaulted_Discriminants (Typ : Entity_Id) return Boolean;
+ -- Simple predicate to test for defaulted discriminants
type Alignment_Result is (Known_Compatible, Unknown, Known_Incompatible);
-- Result of Has_Compatible_Alignment test, description found below. Note