From: Robert Dewar Date: Fri, 22 May 2015 10:14:35 +0000 (+0000) Subject: sem_util.ads: Minor addition of ??? comment. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90d6b7bc3a61e77363377ef6e5dfc71cf8ecff71;p=gcc.git sem_util.ads: Minor addition of ??? comment. 2015-05-22 Robert Dewar * sem_util.ads: Minor addition of ??? comment. * sem_prag.adb, sem_util.adb: Minor reformatting. * sem_ch13.adb: minor reformatting. From-SVN: r223532 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e4320981b14..8f1acdb816d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2015-05-22 Robert Dewar + + * 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 * a-reatim.ads: Add Compile_Time_Error to ensure Duration diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index e985e93f10d..edb1c796df1 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -3893,6 +3893,9 @@ package body Sem_Ch13 is ("indexing function must have at least two parameters"); 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 declare Inherited : Node_Id; @@ -3901,13 +3904,12 @@ package body Sem_Ch13 is if Attr = Name_Constant_Indexing then Inherited := Find_Aspect (Etype (Ent), Aspect_Constant_Indexing); + elsif Attr = Name_Variable_Indexing then Inherited := Find_Aspect (Etype (Ent), Aspect_Variable_Indexing); end if; - -- What if neither branch taken above ??? - if Present (Inherited) then if Debug_Flag_Dot_XX then null; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index bdd2eec2466..5ab6f502113 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -2710,7 +2710,7 @@ package body Sem_Prag is Legal : out Boolean); -- Subsidiary to the analysis of pragmas Abstract_State and Part_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 -- set when the indicator is legal. diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 196310f3651..3b91465229c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -9323,7 +9323,6 @@ package body Sem_Util is function Has_Variable_Input (Const_Id : Entity_Id) return Boolean is Expr : constant Node_Id := Expression (Declaration_Node (Const_Id)); - begin return Present (Expr) and then not Compile_Time_Known_Value_Or_Aggr (Expr); diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 4255e9624ac..17dced9cefb 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1050,6 +1050,9 @@ package Sem_Util is -- Determine whether the initialization expression of constant Const_Id has -- "variable input" (SPARK RM 7.1.1(2)). This roughly maps to the semantic -- 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; -- Given an arbitrary type, determine whether it contains at least one