Commit b534f49e by Arnaud Charlet

[multiple changes]

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.

From-SVN: r220856
parent 9816367c
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> 2015-02-20 Gary Dismukes <dismukes@adacore.com>
* sem_res.adb: Minor reformatting. * sem_res.adb: Minor reformatting.
......
...@@ -1979,6 +1979,7 @@ package body Bindgen is ...@@ -1979,6 +1979,7 @@ package body Bindgen is
end if; end if;
-- Add a "-Ldir" for each directory in the object path -- Add a "-Ldir" for each directory in the object path
if VM_Target /= CLI_Target then if VM_Target /= CLI_Target then
for J in 1 .. Nb_Dir_In_Obj_Search_Path loop for J in 1 .. Nb_Dir_In_Obj_Search_Path loop
declare declare
......
...@@ -878,7 +878,14 @@ package body Sem_Ch3 is ...@@ -878,7 +878,14 @@ package body Sem_Ch3 is
-- create a reference to it after the enclosing protected definition -- create a reference to it after the enclosing protected definition
-- because the itype will be used in the subsequent bodies. -- 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)); Build_Itype_Reference (Anon_Type, Parent (Current_Scope));
end if; end if;
...@@ -4978,16 +4985,17 @@ package body Sem_Ch3 is ...@@ -4978,16 +4985,17 @@ package body Sem_Ch3 is
end if; end if;
if Has_Discriminants (T) then if Has_Discriminants (T) then
Set_Discriminant_Constraint (Id, Set_Discriminant_Constraint
Discriminant_Constraint (T)); (Id, Discriminant_Constraint (T));
Set_Stored_Constraint_From_Discriminant_Constraint (Id); Set_Stored_Constraint_From_Discriminant_Constraint (Id);
end if; end if;
when E_Incomplete_Type => when Incomplete_Kind =>
if Ada_Version >= Ada_2005 then if Ada_Version >= Ada_2005 then
-- In Ada 2005 an incomplete type can be explicitly tagged: -- 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_Ekind (Id, E_Incomplete_Subtype);
Set_Is_Tagged_Type (Id, Is_Tagged_Type (T)); Set_Is_Tagged_Type (Id, Is_Tagged_Type (T));
...@@ -4996,6 +5004,7 @@ package body Sem_Ch3 is ...@@ -4996,6 +5004,7 @@ package body Sem_Ch3 is
if Is_Tagged_Type (Id) then if Is_Tagged_Type (Id) then
Set_No_Tagged_Streams_Pragma Set_No_Tagged_Streams_Pragma
(Id, No_Tagged_Streams_Pragma (T)); (Id, No_Tagged_Streams_Pragma (T));
Set_Direct_Primitive_Operations (Id, New_Elmt_List);
end if; end if;
-- Ada 2005 (AI-412): Decorate an incomplete subtype of an -- Ada 2005 (AI-412): Decorate an incomplete subtype of an
......
...@@ -15732,7 +15732,7 @@ package body Sem_Prag is ...@@ -15732,7 +15732,7 @@ package body Sem_Prag is
-- Not allowed for abstract type -- Not allowed for abstract type
if Is_Abstract_Type (Typ) then if Is_Abstract_Type (Typ) and then not Class_Present (N) then
Error_Pragma_Arg Error_Pragma_Arg
("pragma% not allowed for abstract type", Arg1); ("pragma% not allowed for abstract type", Arg1);
end if; end if;
......
...@@ -219,10 +219,8 @@ package body Switch.C is ...@@ -219,10 +219,8 @@ package body Switch.C is
(Switch_Chars (Ptr + 4 .. Max)) (Switch_Chars (Ptr + 4 .. Max))
then then
Runtime_Dir := Runtime_Dir :=
new String' new String'(System.OS_Lib.Normalize_Pathname
(System.OS_Lib.Normalize_Pathname
(Switch_Chars (Ptr + 4 .. Max))); (Switch_Chars (Ptr + 4 .. Max)));
else else
Runtime_Dir := Runtime_Dir :=
new String'(Switch_Chars (Ptr + 4 .. Max)); new String'(Switch_Chars (Ptr + 4 .. Max));
......
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