summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-02 17:35:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-02 17:35:25 +0200
commit316a0661918aacd3cc0acca417b5390ad1e3d535 (patch)
tree48433199b635c0174dbcc09d37dc391d03fde3a5 /gcc/ada/sem_ch5.adb
parent1e88210d7fff339ded2a3562b49498d835c8ecf8 (diff)
downloadgcc-316a0661918aacd3cc0acca417b5390ad1e3d535.tar.gz
[multiple changes]
2011-08-02 Yannick Moy <moy@adacore.com> * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads, sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to indicate that we are in a precondition or postcondition. This is used in Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to decide whether to flag the spec or body of the current subprogram as not in ALFA. 2011-08-02 Fabien Chouteau <chouteau@adacore.com> * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package list. * a-extiin.ads: New file. 2011-08-02 Bob Duff <duff@adacore.com> * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename now raises Name_Error instead of Use_Error in certain cases. The other parts of this AI were already implemented properly. From-SVN: r177187
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 5370f701a8a..6283207cc51 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1113,7 +1113,7 @@ package body Sem_Ch5 is
if Others_Present
and then List_Length (Alternatives (N)) = 1
then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction
("OTHERS as unique case alternative is not allowed", N);
end if;
@@ -1195,7 +1195,7 @@ package body Sem_Ch5 is
else
if Has_Loop_In_Inner_Open_Scopes (U_Name) then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction
("exit label must name the closest enclosing loop", N);
end if;
@@ -1242,14 +1242,14 @@ package body Sem_Ch5 is
if Present (Cond) then
if Nkind (Parent (N)) /= N_Loop_Statement then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction
("exit with when clause must be directly in loop", N);
end if;
else
if Nkind (Parent (N)) /= N_If_Statement then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
if Nkind (Parent (N)) = N_Elsif_Part then
Check_SPARK_Restriction
("exit must be in IF without ELSIF", N);
@@ -1258,7 +1258,7 @@ package body Sem_Ch5 is
end if;
elsif Nkind (Parent (Parent (N))) /= N_Loop_Statement then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction
("exit must be in IF directly in loop", N);
@@ -1266,14 +1266,14 @@ package body Sem_Ch5 is
-- leads to an error mentioning the ELSE.
elsif Present (Else_Statements (Parent (N))) then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction ("exit must be in IF without ELSE", N);
-- An exit in an ELSIF does not reach here, as it would have been
-- detected in the case (Nkind (Parent (N)) /= N_If_Statement).
elsif Present (Elsif_Parts (Parent (N))) then
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction ("exit must be in IF without ELSIF", N);
end if;
end if;
@@ -1302,7 +1302,7 @@ package body Sem_Ch5 is
Label_Ent : Entity_Id;
begin
- Mark_Non_ALFA_Subprogram_Body;
+ Mark_Non_ALFA_Subprogram;
Check_SPARK_Restriction ("goto statement is not allowed", N);
-- Actual semantic checks