aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch11.adb
diff options
context:
space:
mode:
authorGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
commita926878ddbd5a98b272c22171ce58663fc04c3e0 (patch)
tree86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/ada/sem_ch11.adb
parent542730f087133690b47e036dfd43eb0db8a650ce (diff)
parent07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff)
downloadgcc-devel/autopar_devel.zip
gcc-devel/autopar_devel.tar.gz
gcc-devel/autopar_devel.tar.bz2
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/ada/sem_ch11.adb')
-rw-r--r--gcc/ada/sem_ch11.adb24
1 files changed, 6 insertions, 18 deletions
diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb
index 78c18f3..940c93b 100644
--- a/gcc/ada/sem_ch11.adb
+++ b/gcc/ada/sem_ch11.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2020, 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- --
@@ -433,7 +433,7 @@ package body Sem_Ch11 is
if ((Is_Subprogram (Current_Scope) or else Is_Entry (Current_Scope))
and then Chars (Current_Scope) /= Name_uPostconditions)
- or else Ekind_In (Current_Scope, E_Block, E_Task_Type)
+ or else Ekind (Current_Scope) in E_Block | E_Task_Type
then
Warn_On_Useless_Assignments (Current_Scope);
end if;
@@ -460,8 +460,6 @@ package body Sem_Ch11 is
Check_Compiler_Unit ("raise expression", N);
end if;
- Check_SPARK_05_Restriction ("raise expression is not allowed", N);
-
-- Check exception restrictions on the original source
if Comes_From_Source (N) then
@@ -517,10 +515,6 @@ package body Sem_Ch11 is
Par : Node_Id;
begin
- if Comes_From_Source (N) then
- Check_SPARK_05_Restriction ("raise statement is not allowed", N);
- end if;
-
Check_Unreachable_Code (N);
-- Check exception restrictions on the original source
@@ -543,7 +537,7 @@ package body Sem_Ch11 is
-- Skip past null statements and pragmas
while Present (P)
- and then Nkind_In (P, N_Null_Statement, N_Pragma)
+ and then Nkind (P) in N_Null_Statement | N_Pragma
loop
P := Prev (P);
end loop;
@@ -600,11 +594,9 @@ package body Sem_Ch11 is
if No (Exception_Id) then
P := Parent (N);
- while not Nkind_In (P, N_Exception_Handler,
- N_Subprogram_Body,
- N_Package_Body,
- N_Task_Body,
- N_Entry_Body)
+ while Nkind (P) not in
+ N_Exception_Handler | N_Subprogram_Body | N_Package_Body |
+ N_Task_Body | N_Entry_Body
loop
P := Parent (P);
end loop;
@@ -722,10 +714,6 @@ package body Sem_Ch11 is
-- Start of processing for Analyze_Raise_xxx_Error
begin
- if Nkind (Original_Node (N)) = N_Raise_Statement then
- Check_SPARK_05_Restriction ("raise statement is not allowed", N);
- end if;
-
if No (Etype (N)) then
Set_Etype (N, Standard_Void_Type);
end if;