aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch5.adb33
1 files changed, 17 insertions, 16 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 0b1db85..380d601 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1389,16 +1389,7 @@ package body Sem_Ch5 is
----------------------------
procedure Analyze_Case_Statement (N : Node_Id) is
- Exp : Node_Id;
- Exp_Type : Entity_Id;
- Exp_Btype : Entity_Id;
- Last_Choice : Nat;
-
- Others_Present : Boolean;
- -- Indicates if Others was present
-
- pragma Warnings (Off, Last_Choice);
- -- Don't care about assigned value
+ Exp : constant Node_Id := Expression (N);
Statements_Analyzed : Boolean := False;
-- Set True if at least some statement sequences get analyzed. If False
@@ -1406,9 +1397,6 @@ package body Sem_Ch5 is
-- the case statement, and as a result it is not a good idea to output
-- warning messages about unreachable code.
- Save_Unblocked_Exit_Count : constant Nat := Unblocked_Exit_Count;
- -- Recursively save value of this global, will be restored on exit
-
procedure Non_Static_Choice_Error (Choice : Node_Id);
-- Error routine invoked by the generic instantiation below when the
-- case statement has a non static choice.
@@ -1492,11 +1480,21 @@ package body Sem_Ch5 is
Analyze_Statements (Statements (Alternative));
end Process_Statements;
+ -- Local variables
+
+ Exp_Type : Entity_Id;
+ Exp_Btype : Entity_Id;
+
+ Others_Present : Boolean;
+ -- Indicates if Others was present
+
+ Save_Unblocked_Exit_Count : constant Nat := Unblocked_Exit_Count;
+ -- Recursively save value of this global, will be restored on exit
+
-- Start of processing for Analyze_Case_Statement
begin
Unblocked_Exit_Count := 0;
- Exp := Expression (N);
Analyze (Exp);
-- The expression must be of any discrete type. In rare cases, the
@@ -1775,8 +1773,6 @@ package body Sem_Ch5 is
-- on which they depend will not be available at the freeze point.
procedure Analyze_If_Statement (N : Node_Id) is
- E : Node_Id;
-
Save_Unblocked_Exit_Count : constant Nat := Unblocked_Exit_Count;
-- Recursively save value of this global, will be restored on exit
@@ -1841,6 +1837,11 @@ package body Sem_Ch5 is
end if;
end Analyze_Cond_Then;
+ -- Local variables
+
+ E : Node_Id;
+ -- For iterating over elsif parts
+
-- Start of processing for Analyze_If_Statement
begin