Commit 90d6b7bc by Robert Dewar Committed by Arnaud Charlet

sem_util.ads: Minor addition of ??? comment.

2015-05-22  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads: Minor addition of ??? comment.
	* sem_prag.adb, sem_util.adb: Minor reformatting.
	* sem_ch13.adb: minor reformatting.

From-SVN: r223532
parent eb9008b7
2015-05-22 Robert Dewar <dewar@adacore.com> 2015-05-22 Robert Dewar <dewar@adacore.com>
* sem_util.ads: Minor addition of ??? comment.
* sem_prag.adb, sem_util.adb: Minor reformatting.
* sem_ch13.adb: minor reformatting.
2015-05-22 Robert Dewar <dewar@adacore.com>
* a-reatim.ads: Add Compile_Time_Error to ensure Duration * a-reatim.ads: Add Compile_Time_Error to ensure Duration
is 64-bits. is 64-bits.
* sem_ch13.adb: Improve error message. * sem_ch13.adb: Improve error message.
......
...@@ -3893,6 +3893,9 @@ package body Sem_Ch13 is ...@@ -3893,6 +3893,9 @@ package body Sem_Ch13 is
("indexing function must have at least two parameters"); ("indexing function must have at least two parameters");
return; return;
-- For a derived type, check that no indexing aspect is
-- specified for the type if it is also inherited
elsif Is_Derived_Type (Ent) then elsif Is_Derived_Type (Ent) then
declare declare
Inherited : Node_Id; Inherited : Node_Id;
...@@ -3901,13 +3904,12 @@ package body Sem_Ch13 is ...@@ -3901,13 +3904,12 @@ package body Sem_Ch13 is
if Attr = Name_Constant_Indexing then if Attr = Name_Constant_Indexing then
Inherited := Inherited :=
Find_Aspect (Etype (Ent), Aspect_Constant_Indexing); Find_Aspect (Etype (Ent), Aspect_Constant_Indexing);
elsif Attr = Name_Variable_Indexing then elsif Attr = Name_Variable_Indexing then
Inherited := Inherited :=
Find_Aspect (Etype (Ent), Aspect_Variable_Indexing); Find_Aspect (Etype (Ent), Aspect_Variable_Indexing);
end if; end if;
-- What if neither branch taken above ???
if Present (Inherited) then if Present (Inherited) then
if Debug_Flag_Dot_XX then if Debug_Flag_Dot_XX then
null; null;
......
...@@ -2710,7 +2710,7 @@ package body Sem_Prag is ...@@ -2710,7 +2710,7 @@ package body Sem_Prag is
Legal : out Boolean); Legal : out Boolean);
-- Subsidiary to the analysis of pragmas Abstract_State and Part_Of. -- Subsidiary to the analysis of pragmas Abstract_State and Part_Of.
-- Perform full analysis of indicator Part_Of. Item_Id is the entity of -- Perform full analysis of indicator Part_Of. Item_Id is the entity of
-- an abstract state, object or package instantiation. State is the -- an abstract state, object, or package instantiation. State is the
-- encapsulating state. Indic is the Part_Of indicator. Flag Legal is -- encapsulating state. Indic is the Part_Of indicator. Flag Legal is
-- set when the indicator is legal. -- set when the indicator is legal.
......
...@@ -9323,7 +9323,6 @@ package body Sem_Util is ...@@ -9323,7 +9323,6 @@ package body Sem_Util is
function Has_Variable_Input (Const_Id : Entity_Id) return Boolean is function Has_Variable_Input (Const_Id : Entity_Id) return Boolean is
Expr : constant Node_Id := Expression (Declaration_Node (Const_Id)); Expr : constant Node_Id := Expression (Declaration_Node (Const_Id));
begin begin
return return
Present (Expr) and then not Compile_Time_Known_Value_Or_Aggr (Expr); Present (Expr) and then not Compile_Time_Known_Value_Or_Aggr (Expr);
......
...@@ -1050,6 +1050,9 @@ package Sem_Util is ...@@ -1050,6 +1050,9 @@ package Sem_Util is
-- Determine whether the initialization expression of constant Const_Id has -- Determine whether the initialization expression of constant Const_Id has
-- "variable input" (SPARK RM 7.1.1(2)). This roughly maps to the semantic -- "variable input" (SPARK RM 7.1.1(2)). This roughly maps to the semantic
-- concept of a compile-time known value. -- concept of a compile-time known value.
-- How can a defined concept in SPARK mapped to an undefined predicate in
-- the compiler (which can change at any moment if the compiler feels like
-- getting more clever about what is compile-time known) ???
function Has_Volatile_Component (Typ : Entity_Id) return Boolean; function Has_Volatile_Component (Typ : Entity_Id) return Boolean;
-- Given an arbitrary type, determine whether it contains at least one -- Given an arbitrary type, determine whether it contains at least one
......
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