aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-04-25 12:35:29 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-25 12:35:29 +0200
commitf40f731b98bd4035eee5c9ceccaf9a324a280a9a (patch)
tree9c73dbaaa532510ffc0755b8caec4ded56bc313c /gcc/ada/sem_ch4.adb
parentd1ec4768ad4fb2fd97d2651b2cfceb55bf37d83f (diff)
downloadgcc-f40f731b98bd4035eee5c9ceccaf9a324a280a9a.zip
gcc-f40f731b98bd4035eee5c9ceccaf9a324a280a9a.tar.gz
gcc-f40f731b98bd4035eee5c9ceccaf9a324a280a9a.tar.bz2
[multiple changes]
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb (Set_Abstract_States): The attribute now applies to generic packages. * sem_ch4.adb (Referenced): Moved to sem_util. * sem_ch7.adb (Unit_Requires_Body): A [generic] package with a non-null abstract state needs a body. * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls to Collect_Subprogram_Inputs_Outputs. (Analyze_Global_Item): Verify the proper usage of an item with mode In_Out or Output relative to the enclosing context. (Analyze_Pragma): Abstract_State can now be applied to a generic package. Do not reset the Analyzed flag for pragmas Depends and Global as this is not needed. (Appears_In): Moved to library level. (Check_Mode_Restiction_In_Enclosing_Context): New routine. (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global seen along with comments on usage. * sem_util.ads, sem_util.adb (Referenced): New routine. 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Expand_Contract_Cases): Generate detailed error messages only when switch -gnateE is in effect. 2013-04-25 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute): Do not issue an error for a possibly misplaced 'Result or 'Old attribute when analyzing the aspect. From-SVN: r198290
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb41
1 files changed, 0 insertions, 41 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index e4b5139..04db9b0 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -3510,10 +3510,6 @@ package body Sem_Ch4 is
-- Determine whether if expression If_Expr lacks an else part or if it
-- has one, it evaluates to True.
- function Referenced (Id : Entity_Id; Expr : Node_Id) return Boolean;
- -- Determine whether entity Id is referenced within expression Expr
- -- This should be moved to sem_util ???
-
--------------------
-- Is_Empty_Range --
--------------------
@@ -3565,43 +3561,6 @@ package body Sem_Ch4 is
and then Is_True (Expr_Value (Else_Expr)));
end No_Else_Or_Trivial_True;
- ----------------
- -- Referenced --
- ----------------
-
- function Referenced (Id : Entity_Id; Expr : Node_Id) return Boolean is
- Seen : Boolean := False;
-
- function Is_Reference (N : Node_Id) return Traverse_Result;
- -- Determine whether node N denotes a reference to Id. If this is the
- -- case, set global flag Seen to True and stop the traversal.
-
- ------------------
- -- Is_Reference --
- ------------------
-
- function Is_Reference (N : Node_Id) return Traverse_Result is
- begin
- if Is_Entity_Name (N)
- and then Present (Entity (N))
- and then Entity (N) = Id
- then
- Seen := True;
- return Abandon;
- else
- return OK;
- end if;
- end Is_Reference;
-
- procedure Inspect_Expression is new Traverse_Proc (Is_Reference);
-
- -- Start of processing for Referenced
-
- begin
- Inspect_Expression (Expr);
- return Seen;
- end Referenced;
-
-- Local variables
Cond : constant Node_Id := Condition (N);