+2015-02-20 Robert Dewar <dewar@adacore.com>
+
+ * switch-c.adb, bindgen.adb: Minor reformatting.
+
+2015-02-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
+ Invariant'class is allowed on an abstract type.
+
+2015-02-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Access_Definition): If the access definition is
+ for a protected component and defines an access to protected
+ subprogram, do not create an itype reference for it because a
+ full type declaration will be built in order to generate the
+ proper equivalent type.
+ (Analyze_Subtype_Declaration): Add information of incomplete
+ subtypes, for Ada 2012 extended uses of incomplete types.
+
2015-02-20 Gary Dismukes <dismukes@adacore.com>
* sem_res.adb: Minor reformatting.
-- create a reference to it after the enclosing protected definition
-- because the itype will be used in the subsequent bodies.
- if Ekind (Current_Scope) = E_Protected_Type then
+ -- If the anonymous access itself is protected, a full type
+ -- declaratiton will be created for it, so that the equivalent
+ -- record type can be constructed. For further details, see
+ -- Replace_Anonymous_Access_To_Protected-Subprogram.
+
+ if Ekind (Current_Scope) = E_Protected_Type
+ and then not Protected_Present (Access_To_Subprogram_Definition (N))
+ then
Build_Itype_Reference (Anon_Type, Parent (Current_Scope));
end if;
end if;
if Has_Discriminants (T) then
- Set_Discriminant_Constraint (Id,
- Discriminant_Constraint (T));
+ Set_Discriminant_Constraint
+ (Id, Discriminant_Constraint (T));
Set_Stored_Constraint_From_Discriminant_Constraint (Id);
end if;
- when E_Incomplete_Type =>
+ when Incomplete_Kind =>
if Ada_Version >= Ada_2005 then
-- In Ada 2005 an incomplete type can be explicitly tagged:
- -- propagate indication.
+ -- propagate indication. Note that we also have to include
+ -- subtypes for Ada 2012 extended use of incomplete types.
Set_Ekind (Id, E_Incomplete_Subtype);
Set_Is_Tagged_Type (Id, Is_Tagged_Type (T));
if Is_Tagged_Type (Id) then
Set_No_Tagged_Streams_Pragma
(Id, No_Tagged_Streams_Pragma (T));
+ Set_Direct_Primitive_Operations (Id, New_Elmt_List);
end if;
-- Ada 2005 (AI-412): Decorate an incomplete subtype of an