diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-19 14:29:25 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-19 14:29:25 +0200 |
commit | a961aa79587ca417a9920cd2ba4df4d3144fd26d (patch) | |
tree | fbc3350cd46472344fa50199f9069aaab0f8bfc6 /gcc/ada/sem_res.adb | |
parent | 11c260d7cd8c3aaee5502f8d5ff192327b2a904d (diff) | |
download | gcc-a961aa79587ca417a9920cd2ba4df4d3144fd26d.zip gcc-a961aa79587ca417a9920cd2ba4df4d3144fd26d.tar.gz gcc-a961aa79587ca417a9920cd2ba4df4d3144fd26d.tar.bz2 |
[multiple changes]
2010-10-19 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb, exp_ch4.ads (Expand_Quantified_Expression): New procedure
* exp_util.adb (Insert_Actions): Include Quantified_Expression.
* expander.adb: Call Expand_Qualified_Expression.
* par.adb: New procedure P_Quantified_Expression. Make
P_Loop_Parameter_Specification global for use in quantified expressions.
* par-ch3.adb (P_Subtype_Mark_Resync): Allow "some" as an identifier if
version < Ada2012.
* par-ch4.adb: New procedure P_Quantified_Expression.
* par-ch5.adb: P_Loop_Parameter_Specification is now global.
* scans.adb, scans.ads: Introduce token Some. For now leave as
unreserved.
* scn.adb (Scan_Reserved_Identifier): For earlier versions of Ada,
treat Some as a regular identifier.
* sem.adb: Call Analyze_Quantified_Expression.
* sem_ch4.adb, sem_ch4.ads: New procedure Analyze_Quantified_Expression.
* sem_ch5.adb, sem_ch5.ads: Analyze_Iteration_Scheme is public, for use
in quantified expressions.
* sem_res.adb: New procedure Resolve_Qualified_Expression.
* sinfo.adb, sinfo.ads: New node N_Quantified_Expression
* snames.ads-tmpl: New name Some.
* sprint.adb: Output quantified_expression.
2010-10-19 Robert Dewar <dewar@adacore.com>
* a-exexda.adb: Minor reformatting
Minor code reorganization.
From-SVN: r165698
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index c05bda9..cc8ac85 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -192,6 +192,7 @@ package body Sem_Res is procedure Resolve_Op_Expon (N : Node_Id; Typ : Entity_Id); procedure Resolve_Op_Not (N : Node_Id; Typ : Entity_Id); procedure Resolve_Qualified_Expression (N : Node_Id; Typ : Entity_Id); + procedure Resolve_Quantified_Expression (N : Node_Id; Typ : Entity_Id); procedure Resolve_Range (N : Node_Id; Typ : Entity_Id); procedure Resolve_Real_Literal (N : Node_Id; Typ : Entity_Id); procedure Resolve_Reference (N : Node_Id; Typ : Entity_Id); @@ -2698,6 +2699,9 @@ package body Sem_Res is when N_Qualified_Expression => Resolve_Qualified_Expression (N, Ctx_Type); + when N_Quantified_Expression + => Resolve_Quantified_Expression (N, Ctx_Type); + when N_Raise_xxx_Error => Set_Etype (N, Ctx_Type); @@ -7767,6 +7771,18 @@ package body Sem_Res is Eval_Qualified_Expression (N); end Resolve_Qualified_Expression; + ----------------------------------- + -- Resolve_Quantified_Expression -- + ----------------------------------- + + procedure Resolve_Quantified_Expression (N : Node_Id; Typ : Entity_Id) is + begin + -- The loop structure is already resolved during its analysis, only the + -- resolution of the condition needs to be done. + + Resolve (Condition (N), Typ); + end Resolve_Quantified_Expression; + ------------------- -- Resolve_Range -- ------------------- |