aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_case.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2010-06-18 09:41:49 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-18 11:41:49 +0200
commit19d846a008c51b4425b88771aa2768bd882499cc (patch)
tree6345fad875d9b717d4e71879be479d45f16114aa /gcc/ada/sem_case.ads
parent305caf424d1720f082b9cdfc072d29ae553afebc (diff)
downloadgcc-19d846a008c51b4425b88771aa2768bd882499cc.zip
gcc-19d846a008c51b4425b88771aa2768bd882499cc.tar.gz
gcc-19d846a008c51b4425b88771aa2768bd882499cc.tar.bz2
checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case expression (cannot count on a particular branch being executed).
2010-06-18 Robert Dewar <dewar@adacore.com> * checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case expression (cannot count on a particular branch being executed). * exp_ch4.adb (Expand_N_Case_Expression): New procedure. * exp_ch4.ads (Expand_N_Case_Expression): New procedure. * exp_util.adb (Insert_Actions): Deal with proper insertion of actions within case expression. * expander.adb (Expand): Add call to Expand_N_Case_Expression * par-ch4.adb Add calls to P_Case_Expression at appropriate points (P_Case_Expression): New procedure (P_Case_Expression_Alternative): New procedure * par.adb (P_Case_Expression): New procedure * par_sco.adb (Process_Decisions): Add dummy place holder entry for N_Case_Expression. * sem.adb (Analyze): Add call to Analyze_Case_Expression * sem_case.ads (Analyze_Choices): Also used for case expressions now, this is a documentation change only. * sem_ch4.ads, sem_ch4.adb (Analyze_Case_Expression): New procedure. * sem_ch6.adb (Fully_Conformant_Expressions): Add handling of case expressions. * sem_eval.ads, sem_eval.adb (Eval_Case_Expression): New procedure. * sem_res.adb (Resolve_Case_Expression): New procedure. * sem_scil.adb (Find_SCIL_Node): Add processing for N_Case_Expression_Alternative. * sinfo.ads, sinfo.adb (N_Case_Expression): New node. (N_Case_Expression_Alternative): New node. * sprint.adb (Sprint_Node_Actual): Add processing for new nodes N_Case_Expression and N_Case_Expression_Alternative. 2010-06-18 Robert Dewar <dewar@adacore.com> * par-ch7.adb, sem_warn.adb, types.ads, par-ch3.adb: Minor reformatting. * gnat1drv.adb: Fix typo. 2010-06-18 Robert Dewar <dewar@adacore.com> * par-prag.adb (Prag, case Style_Checks): All_Checks sets gnat style for -gnatg. * sem_prag.adb (Analyze_Pragma, case Style_Checks): All_Checks sets gnat style for -gnatg. * gnat_rm.texi: Add documentation for ALL_CHECKS in GNAT mode. From-SVN: r160971
Diffstat (limited to 'gcc/ada/sem_case.ads')
-rw-r--r--gcc/ada/sem_case.ads18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/ada/sem_case.ads b/gcc/ada/sem_case.ads
index dcc7293..78ae7c6 100644
--- a/gcc/ada/sem_case.ads
+++ b/gcc/ada/sem_case.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -68,7 +68,7 @@ package Sem_Case is
-- Processing to carry out for a non static Choice
with procedure Process_Associated_Node (A : Node_Id);
- -- Associated to each case alternative, aggregate component
+ -- Associated with each case alternative, aggregate component
-- association or record variant A there is a node or list of nodes
-- that need semantic processing. This routine implements that
-- processing.
@@ -76,9 +76,9 @@ package Sem_Case is
package Generic_Choices_Processing is
function Number_Of_Choices (N : Node_Id) return Nat;
- -- Iterates through the choices of N, (N can be a case statement,
- -- array aggregate or record variant), counting all the Choice nodes
- -- except for the Others choice.
+ -- Iterates through the choices of N, (N can be a case expression, case
+ -- statement, array aggregate or record variant), counting all the
+ -- Choice nodes except for the Others choice.
procedure Analyze_Choices
(N : Node_Id;
@@ -87,10 +87,10 @@ package Sem_Case is
Last_Choice : out Nat;
Raises_CE : out Boolean;
Others_Present : out Boolean);
- -- From a case statement, array aggregate or record variant N, this
- -- routine analyzes the corresponding list of discrete choices.
- -- Subtyp is the subtype of the discrete choices. The type against
- -- which the discrete choices must be resolved is its base type.
+ -- From a case expression, case statement, array aggregate or record
+ -- variant N, this routine analyzes the corresponding list of discrete
+ -- choices. Subtyp is the subtype of the discrete choices. The type
+ -- against which the discrete choices must be resolved is its base type.
--
-- On entry Choice_Table must be big enough to contain all the discrete
-- choices encountered. The lower bound of Choice_Table must be one.