[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
This commit is contained in:
parent
1e88210d7f
commit
316a066191
|
@ -1,3 +1,25 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2011-08-02 Vincent Celier <celier@adacore.com>
|
2011-08-02 Vincent Celier <celier@adacore.com>
|
||||||
|
|
||||||
* link.c: Only import "auto-host.h" when building the gnattools.
|
* link.c: Only import "auto-host.h" when building the gnattools.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 2004-2010, Free Software Foundation, Inc. --
|
-- Copyright (C) 2004-2011, Free Software Foundation, Inc. --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
@ -40,6 +40,7 @@ with Ada.Unchecked_Deallocation;
|
||||||
with Ada.Characters.Handling; use Ada.Characters.Handling;
|
with Ada.Characters.Handling; use Ada.Characters.Handling;
|
||||||
|
|
||||||
with System.CRTL; use System.CRTL;
|
with System.CRTL; use System.CRTL;
|
||||||
|
with System.OS_Constants;
|
||||||
with System.OS_Lib; use System.OS_Lib;
|
with System.OS_Lib; use System.OS_Lib;
|
||||||
with System.Regexp; use System.Regexp;
|
with System.Regexp; use System.Regexp;
|
||||||
with System.File_IO; use System.File_IO;
|
with System.File_IO; use System.File_IO;
|
||||||
|
@ -1060,10 +1061,22 @@ package body Ada.Directories is
|
||||||
Rename_File (Old_Name, New_Name, Success);
|
Rename_File (Old_Name, New_Name, Success);
|
||||||
|
|
||||||
if not Success then
|
if not Success then
|
||||||
|
-- AI05-0231-1: Name_Error should be raised in case a directory
|
||||||
|
-- component of New_Name does not exist (as in New_Name =>
|
||||||
|
-- "/no-such-dir/new-filename"). ENOENT indicates that. ENOENT
|
||||||
|
-- also indicate that the Old_Name does not exist, but we already
|
||||||
|
-- checked for that above. All other errors are Use_Error.
|
||||||
|
|
||||||
|
if Errno = System.OS_Constants.ENOENT then
|
||||||
|
raise Name_Error with
|
||||||
|
"file """ & Containing_Directory (New_Name) & """ not found";
|
||||||
|
|
||||||
|
else
|
||||||
raise Use_Error with
|
raise Use_Error with
|
||||||
"file """ & Old_Name & """ could not be renamed";
|
"file """ & Old_Name & """ could not be renamed";
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
end if;
|
||||||
end Rename;
|
end Rename;
|
||||||
|
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 2000-2010, Free Software Foundation, Inc. --
|
-- Copyright (C) 2000-2011, Free Software Foundation, Inc. --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
@ -513,6 +513,7 @@ package body Impunit is
|
||||||
"a-cborma", -- Ada.Containers.Bounded_Ordered_Maps
|
"a-cborma", -- Ada.Containers.Bounded_Ordered_Maps
|
||||||
"a-cbhase", -- Ada.Containers.Bounded_Hashed_Sets
|
"a-cbhase", -- Ada.Containers.Bounded_Hashed_Sets
|
||||||
"a-cbhama", -- Ada.Containers.Bounded_Hashed_Maps
|
"a-cbhama", -- Ada.Containers.Bounded_Hashed_Maps
|
||||||
|
"a-extiin", -- Ada.Execution_Time.Interrupts
|
||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
-- GNAT Defined Additions to Ada 20012 --
|
-- GNAT Defined Additions to Ada 20012 --
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
|
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
@ -240,6 +240,14 @@ package Sem is
|
||||||
-- then Full_Analysis above must be False. You should really regard this as
|
-- then Full_Analysis above must be False. You should really regard this as
|
||||||
-- a read only flag.
|
-- a read only flag.
|
||||||
|
|
||||||
|
In_Pre_Post_Expression : Boolean := False;
|
||||||
|
-- Switch to indicate that we are in a precondition or postcondition. The
|
||||||
|
-- analysis is not expected to process a precondition or a postcondition as
|
||||||
|
-- a sub-analysis for another precondition or postcondition, so this switch
|
||||||
|
-- needs not be saved for recursive calls. When this switch is True then
|
||||||
|
-- In_Spec_Expression above must be True also. You should really regard
|
||||||
|
-- this as a read only flag.
|
||||||
|
|
||||||
In_Deleted_Code : Boolean := False;
|
In_Deleted_Code : Boolean := False;
|
||||||
-- If the condition in an if-statement is statically known, the branch
|
-- If the condition in an if-statement is statically known, the branch
|
||||||
-- that is not taken is analyzed with expansion disabled, and the tree
|
-- that is not taken is analyzed with expansion disabled, and the tree
|
||||||
|
|
|
@ -443,7 +443,7 @@ package body Sem_Ch11 is
|
||||||
P : Node_Id;
|
P : Node_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("raise statement is not allowed", N);
|
Check_SPARK_Restriction ("raise statement is not allowed", N);
|
||||||
Check_Unreachable_Code (N);
|
Check_Unreachable_Code (N);
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ package body Sem_Ch11 is
|
||||||
-- Start of processing for Analyze_Raise_xxx_Error
|
-- Start of processing for Analyze_Raise_xxx_Error
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("raise statement is not allowed", N);
|
Check_SPARK_Restriction ("raise statement is not allowed", N);
|
||||||
|
|
||||||
if No (Etype (N)) then
|
if No (Etype (N)) then
|
||||||
|
|
|
@ -81,7 +81,7 @@ package body Sem_Ch2 is
|
||||||
and then Is_Object (Entity (N))
|
and then Is_Object (Entity (N))
|
||||||
and then not Is_In_ALFA (Entity (N))
|
and then not Is_In_ALFA (Entity (N))
|
||||||
then
|
then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end Analyze_Identifier;
|
end Analyze_Identifier;
|
||||||
|
|
|
@ -3036,7 +3036,7 @@ package body Sem_Ch3 is
|
||||||
if Is_In_ALFA (T) and then not Aliased_Present (N) then
|
if Is_In_ALFA (T) and then not Aliased_Present (N) then
|
||||||
Set_Is_In_ALFA (Id);
|
Set_Is_In_ALFA (Id);
|
||||||
else
|
else
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- These checks should be performed before the initialization expression
|
-- These checks should be performed before the initialization expression
|
||||||
|
|
|
@ -350,7 +350,7 @@ package body Sem_Ch4 is
|
||||||
|
|
||||||
procedure Analyze_Aggregate (N : Node_Id) is
|
procedure Analyze_Aggregate (N : Node_Id) is
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
if No (Etype (N)) then
|
if No (Etype (N)) then
|
||||||
Set_Etype (N, Any_Composite);
|
Set_Etype (N, Any_Composite);
|
||||||
|
@ -371,7 +371,7 @@ package body Sem_Ch4 is
|
||||||
C : Node_Id;
|
C : Node_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("allocator is not allowed", N);
|
Check_SPARK_Restriction ("allocator is not allowed", N);
|
||||||
|
|
||||||
-- Deal with allocator restrictions
|
-- Deal with allocator restrictions
|
||||||
|
@ -991,7 +991,7 @@ package body Sem_Ch4 is
|
||||||
if not Is_Subprogram (Nam_Ent)
|
if not Is_Subprogram (Nam_Ent)
|
||||||
or else not Is_In_ALFA (Nam_Ent)
|
or else not Is_In_ALFA (Nam_Ent)
|
||||||
then
|
then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Analyze_One_Call (N, Nam_Ent, True, Success);
|
Analyze_One_Call (N, Nam_Ent, True, Success);
|
||||||
|
@ -1370,7 +1370,7 @@ package body Sem_Ch4 is
|
||||||
L : Node_Id;
|
L : Node_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
Candidate_Type := Empty;
|
Candidate_Type := Empty;
|
||||||
|
|
||||||
|
@ -1520,7 +1520,7 @@ package body Sem_Ch4 is
|
||||||
return;
|
return;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("conditional expression is not allowed", N);
|
Check_SPARK_Restriction ("conditional expression is not allowed", N);
|
||||||
|
|
||||||
Else_Expr := Next (Then_Expr);
|
Else_Expr := Next (Then_Expr);
|
||||||
|
@ -1721,7 +1721,7 @@ package body Sem_Ch4 is
|
||||||
-- Start of processing for Analyze_Explicit_Dereference
|
-- Start of processing for Analyze_Explicit_Dereference
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("explicit dereference is not allowed", N);
|
Check_SPARK_Restriction ("explicit dereference is not allowed", N);
|
||||||
|
|
||||||
Analyze (P);
|
Analyze (P);
|
||||||
|
@ -2483,7 +2483,7 @@ package body Sem_Ch4 is
|
||||||
-- Start of processing for Analyze_Membership_Op
|
-- Start of processing for Analyze_Membership_Op
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
Analyze_Expression (L);
|
Analyze_Expression (L);
|
||||||
|
|
||||||
|
@ -2606,7 +2606,7 @@ package body Sem_Ch4 is
|
||||||
|
|
||||||
procedure Analyze_Null (N : Node_Id) is
|
procedure Analyze_Null (N : Node_Id) is
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("null is not allowed", N);
|
Check_SPARK_Restriction ("null is not allowed", N);
|
||||||
|
|
||||||
Set_Etype (N, Any_Access);
|
Set_Etype (N, Any_Access);
|
||||||
|
@ -3235,7 +3235,7 @@ package body Sem_Ch4 is
|
||||||
T : Entity_Id;
|
T : Entity_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
Analyze_Expression (Expr);
|
Analyze_Expression (Expr);
|
||||||
|
|
||||||
|
@ -3295,7 +3295,7 @@ package body Sem_Ch4 is
|
||||||
Iterator : Node_Id;
|
Iterator : Node_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("quantified expression is not allowed", N);
|
Check_SPARK_Restriction ("quantified expression is not allowed", N);
|
||||||
|
|
||||||
Set_Etype (Ent, Standard_Void_Type);
|
Set_Etype (Ent, Standard_Void_Type);
|
||||||
|
@ -3461,7 +3461,7 @@ package body Sem_Ch4 is
|
||||||
Acc_Type : Entity_Id;
|
Acc_Type : Entity_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
Analyze (P);
|
Analyze (P);
|
||||||
|
|
||||||
|
@ -4326,7 +4326,7 @@ package body Sem_Ch4 is
|
||||||
-- Start of processing for Analyze_Slice
|
-- Start of processing for Analyze_Slice
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("slice is not allowed", N);
|
Check_SPARK_Restriction ("slice is not allowed", N);
|
||||||
|
|
||||||
Analyze (P);
|
Analyze (P);
|
||||||
|
@ -4371,7 +4371,7 @@ package body Sem_Ch4 is
|
||||||
T : Entity_Id;
|
T : Entity_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-- If Conversion_OK is set, then the Etype is already set, and the
|
-- If Conversion_OK is set, then the Etype is already set, and the
|
||||||
-- only processing required is to analyze the expression. This is
|
-- only processing required is to analyze the expression. This is
|
||||||
|
@ -4503,7 +4503,7 @@ package body Sem_Ch4 is
|
||||||
|
|
||||||
procedure Analyze_Unchecked_Type_Conversion (N : Node_Id) is
|
procedure Analyze_Unchecked_Type_Conversion (N : Node_Id) is
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Find_Type (Subtype_Mark (N));
|
Find_Type (Subtype_Mark (N));
|
||||||
Analyze_Expression (Expression (N));
|
Analyze_Expression (Expression (N));
|
||||||
Set_Etype (N, Entity (Subtype_Mark (N)));
|
Set_Etype (N, Entity (Subtype_Mark (N)));
|
||||||
|
|
|
@ -1113,7 +1113,7 @@ package body Sem_Ch5 is
|
||||||
if Others_Present
|
if Others_Present
|
||||||
and then List_Length (Alternatives (N)) = 1
|
and then List_Length (Alternatives (N)) = 1
|
||||||
then
|
then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("OTHERS as unique case alternative is not allowed", N);
|
("OTHERS as unique case alternative is not allowed", N);
|
||||||
end if;
|
end if;
|
||||||
|
@ -1195,7 +1195,7 @@ package body Sem_Ch5 is
|
||||||
|
|
||||||
else
|
else
|
||||||
if Has_Loop_In_Inner_Open_Scopes (U_Name) then
|
if Has_Loop_In_Inner_Open_Scopes (U_Name) then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("exit label must name the closest enclosing loop", N);
|
("exit label must name the closest enclosing loop", N);
|
||||||
end if;
|
end if;
|
||||||
|
@ -1242,14 +1242,14 @@ package body Sem_Ch5 is
|
||||||
|
|
||||||
if Present (Cond) then
|
if Present (Cond) then
|
||||||
if Nkind (Parent (N)) /= N_Loop_Statement then
|
if Nkind (Parent (N)) /= N_Loop_Statement then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("exit with when clause must be directly in loop", N);
|
("exit with when clause must be directly in loop", N);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
else
|
else
|
||||||
if Nkind (Parent (N)) /= N_If_Statement then
|
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
|
if Nkind (Parent (N)) = N_Elsif_Part then
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("exit must be in IF without ELSIF", N);
|
("exit must be in IF without ELSIF", N);
|
||||||
|
@ -1258,7 +1258,7 @@ package body Sem_Ch5 is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
elsif Nkind (Parent (Parent (N))) /= N_Loop_Statement then
|
elsif Nkind (Parent (Parent (N))) /= N_Loop_Statement then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("exit must be in IF directly in loop", N);
|
("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.
|
-- leads to an error mentioning the ELSE.
|
||||||
|
|
||||||
elsif Present (Else_Statements (Parent (N))) then
|
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);
|
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
|
-- An exit in an ELSIF does not reach here, as it would have been
|
||||||
-- detected in the case (Nkind (Parent (N)) /= N_If_Statement).
|
-- detected in the case (Nkind (Parent (N)) /= N_If_Statement).
|
||||||
|
|
||||||
elsif Present (Elsif_Parts (Parent (N))) then
|
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);
|
Check_SPARK_Restriction ("exit must be in IF without ELSIF", N);
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
@ -1302,7 +1302,7 @@ package body Sem_Ch5 is
|
||||||
Label_Ent : Entity_Id;
|
Label_Ent : Entity_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("goto statement is not allowed", N);
|
Check_SPARK_Restriction ("goto statement is not allowed", N);
|
||||||
|
|
||||||
-- Actual semantic checks
|
-- Actual semantic checks
|
||||||
|
|
|
@ -638,13 +638,13 @@ package body Sem_Ch6 is
|
||||||
(Nkind (Parent (Parent (N))) /= N_Subprogram_Body
|
(Nkind (Parent (Parent (N))) /= N_Subprogram_Body
|
||||||
or else Present (Next (N)))
|
or else Present (Next (N)))
|
||||||
then
|
then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("RETURN should be the last statement in function", N);
|
("RETURN should be the last statement in function", N);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
else
|
else
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("extended RETURN is not allowed", N);
|
Check_SPARK_Restriction ("extended RETURN is not allowed", N);
|
||||||
|
|
||||||
-- Analyze parts specific to extended_return_statement:
|
-- Analyze parts specific to extended_return_statement:
|
||||||
|
|
|
@ -101,7 +101,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("abort statement is not allowed", N);
|
Check_SPARK_Restriction ("abort statement is not allowed", N);
|
||||||
|
|
||||||
T_Name := First (Names (N));
|
T_Name := First (Names (N));
|
||||||
|
@ -140,7 +140,7 @@ package body Sem_Ch9 is
|
||||||
procedure Analyze_Accept_Alternative (N : Node_Id) is
|
procedure Analyze_Accept_Alternative (N : Node_Id) is
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
if Present (Pragmas_Before (N)) then
|
if Present (Pragmas_Before (N)) then
|
||||||
Analyze_List (Pragmas_Before (N));
|
Analyze_List (Pragmas_Before (N));
|
||||||
|
@ -174,7 +174,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("accept statement is not allowed", N);
|
Check_SPARK_Restriction ("accept statement is not allowed", N);
|
||||||
|
|
||||||
-- Entry name is initialized to Any_Id. It should get reset to the
|
-- Entry name is initialized to Any_Id. It should get reset to the
|
||||||
|
@ -406,7 +406,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("select statement is not allowed", N);
|
Check_SPARK_Restriction ("select statement is not allowed", N);
|
||||||
Check_Restriction (Max_Asynchronous_Select_Nesting, N);
|
Check_Restriction (Max_Asynchronous_Select_Nesting, N);
|
||||||
Check_Restriction (No_Select_Statements, N);
|
Check_Restriction (No_Select_Statements, N);
|
||||||
|
@ -453,7 +453,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("select statement is not allowed", N);
|
Check_SPARK_Restriction ("select statement is not allowed", N);
|
||||||
Check_Restriction (No_Select_Statements, N);
|
Check_Restriction (No_Select_Statements, N);
|
||||||
|
|
||||||
|
@ -500,7 +500,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_Restriction (No_Delay, N);
|
Check_Restriction (No_Delay, N);
|
||||||
|
|
||||||
if Present (Pragmas_Before (N)) then
|
if Present (Pragmas_Before (N)) then
|
||||||
|
@ -552,7 +552,7 @@ package body Sem_Ch9 is
|
||||||
E : constant Node_Id := Expression (N);
|
E : constant Node_Id := Expression (N);
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("delay statement is not allowed", N);
|
Check_SPARK_Restriction ("delay statement is not allowed", N);
|
||||||
Check_Restriction (No_Relative_Delay, N);
|
Check_Restriction (No_Relative_Delay, N);
|
||||||
Check_Restriction (No_Delay, N);
|
Check_Restriction (No_Delay, N);
|
||||||
|
@ -571,7 +571,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("delay statement is not allowed", N);
|
Check_SPARK_Restriction ("delay statement is not allowed", N);
|
||||||
Check_Restriction (No_Delay, N);
|
Check_Restriction (No_Delay, N);
|
||||||
Check_Potentially_Blocking_Operation (N);
|
Check_Potentially_Blocking_Operation (N);
|
||||||
|
@ -600,7 +600,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-- Entry_Name is initialized to Any_Id. It should get reset to the
|
-- Entry_Name is initialized to Any_Id. It should get reset to the
|
||||||
-- matching entry entity. An error is signalled if it is not reset
|
-- matching entry entity. An error is signalled if it is not reset
|
||||||
|
@ -833,7 +833,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
if Present (Index) then
|
if Present (Index) then
|
||||||
Analyze (Index);
|
Analyze (Index);
|
||||||
|
@ -861,7 +861,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("entry call is not allowed", N);
|
Check_SPARK_Restriction ("entry call is not allowed", N);
|
||||||
|
|
||||||
if Present (Pragmas_Before (N)) then
|
if Present (Pragmas_Before (N)) then
|
||||||
|
@ -897,7 +897,7 @@ package body Sem_Ch9 is
|
||||||
begin
|
begin
|
||||||
Generate_Definition (Def_Id);
|
Generate_Definition (Def_Id);
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-- Case of no discrete subtype definition
|
-- Case of no discrete subtype definition
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Analyze (Def);
|
Analyze (Def);
|
||||||
|
|
||||||
-- There is no elaboration of the entry index specification. Therefore,
|
-- There is no elaboration of the entry index specification. Therefore,
|
||||||
|
@ -1009,7 +1009,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Set_Ekind (Body_Id, E_Protected_Body);
|
Set_Ekind (Body_Id, E_Protected_Body);
|
||||||
Spec_Id := Find_Concurrent_Spec (Body_Id);
|
Spec_Id := Find_Concurrent_Spec (Body_Id);
|
||||||
|
|
||||||
|
@ -1128,7 +1128,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("protected definition is not allowed", N);
|
Check_SPARK_Restriction ("protected definition is not allowed", N);
|
||||||
Analyze_Declarations (Visible_Declarations (N));
|
Analyze_Declarations (Visible_Declarations (N));
|
||||||
|
|
||||||
|
@ -1182,7 +1182,7 @@ package body Sem_Ch9 is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_Restriction (No_Protected_Types, N);
|
Check_Restriction (No_Protected_Types, N);
|
||||||
|
|
||||||
T := Find_Type_Name (N);
|
T := Find_Type_Name (N);
|
||||||
|
@ -1324,7 +1324,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("requeue statement is not allowed", N);
|
Check_SPARK_Restriction ("requeue statement is not allowed", N);
|
||||||
Check_Restriction (No_Requeue_Statements, N);
|
Check_Restriction (No_Requeue_Statements, N);
|
||||||
Check_Unreachable_Code (N);
|
Check_Unreachable_Code (N);
|
||||||
|
@ -1599,7 +1599,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("select statement is not allowed", N);
|
Check_SPARK_Restriction ("select statement is not allowed", N);
|
||||||
Check_Restriction (No_Select_Statements, N);
|
Check_Restriction (No_Select_Statements, N);
|
||||||
|
|
||||||
|
@ -1720,7 +1720,7 @@ package body Sem_Ch9 is
|
||||||
begin
|
begin
|
||||||
Generate_Definition (Id);
|
Generate_Definition (Id);
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-- The node is rewritten as a protected type declaration, in exact
|
-- The node is rewritten as a protected type declaration, in exact
|
||||||
-- analogy with what is done with single tasks.
|
-- analogy with what is done with single tasks.
|
||||||
|
@ -1782,7 +1782,7 @@ package body Sem_Ch9 is
|
||||||
begin
|
begin
|
||||||
Generate_Definition (Id);
|
Generate_Definition (Id);
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-- The node is rewritten as a task type declaration, followed by an
|
-- The node is rewritten as a task type declaration, followed by an
|
||||||
-- object declaration of that anonymous task type.
|
-- object declaration of that anonymous task type.
|
||||||
|
@ -1860,7 +1860,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Set_Ekind (Body_Id, E_Task_Body);
|
Set_Ekind (Body_Id, E_Task_Body);
|
||||||
Set_Scope (Body_Id, Current_Scope);
|
Set_Scope (Body_Id, Current_Scope);
|
||||||
Spec_Id := Find_Concurrent_Spec (Body_Id);
|
Spec_Id := Find_Concurrent_Spec (Body_Id);
|
||||||
|
@ -1981,7 +1981,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("task definition is not allowed", N);
|
Check_SPARK_Restriction ("task definition is not allowed", N);
|
||||||
|
|
||||||
if Present (Visible_Declarations (N)) then
|
if Present (Visible_Declarations (N)) then
|
||||||
|
@ -2016,7 +2016,7 @@ package body Sem_Ch9 is
|
||||||
begin
|
begin
|
||||||
Check_Restriction (No_Tasking, N);
|
Check_Restriction (No_Tasking, N);
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
T := Find_Type_Name (N);
|
T := Find_Type_Name (N);
|
||||||
Generate_Definition (T);
|
Generate_Definition (T);
|
||||||
|
|
||||||
|
@ -2122,7 +2122,7 @@ package body Sem_Ch9 is
|
||||||
procedure Analyze_Terminate_Alternative (N : Node_Id) is
|
procedure Analyze_Terminate_Alternative (N : Node_Id) is
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
if Present (Pragmas_Before (N)) then
|
if Present (Pragmas_Before (N)) then
|
||||||
Analyze_List (Pragmas_Before (N));
|
Analyze_List (Pragmas_Before (N));
|
||||||
|
@ -2144,7 +2144,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction ("select statement is not allowed", N);
|
Check_SPARK_Restriction ("select statement is not allowed", N);
|
||||||
Check_Restriction (No_Select_Statements, N);
|
Check_Restriction (No_Select_Statements, N);
|
||||||
|
|
||||||
|
@ -2181,7 +2181,7 @@ package body Sem_Ch9 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Tasking_Used := True;
|
Tasking_Used := True;
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
if Present (Pragmas_Before (N)) then
|
if Present (Pragmas_Before (N)) then
|
||||||
Analyze_List (Pragmas_Before (N));
|
Analyze_List (Pragmas_Before (N));
|
||||||
|
|
|
@ -253,8 +253,11 @@ package body Sem_Prag is
|
||||||
-- Preanalyze the boolean expression, we treat this as a spec expression
|
-- Preanalyze the boolean expression, we treat this as a spec expression
|
||||||
-- (i.e. similar to a default expression).
|
-- (i.e. similar to a default expression).
|
||||||
|
|
||||||
|
pragma Assert (In_Pre_Post_Expression = False);
|
||||||
|
In_Pre_Post_Expression := True;
|
||||||
Preanalyze_Spec_Expression
|
Preanalyze_Spec_Expression
|
||||||
(Get_Pragma_Arg (Arg1), Standard_Boolean);
|
(Get_Pragma_Arg (Arg1), Standard_Boolean);
|
||||||
|
In_Pre_Post_Expression := False;
|
||||||
|
|
||||||
-- Remove the subprogram from the scope stack now that the pre-analysis
|
-- Remove the subprogram from the scope stack now that the pre-analysis
|
||||||
-- of the precondition/postcondition is done.
|
-- of the precondition/postcondition is done.
|
||||||
|
|
|
@ -5964,12 +5964,12 @@ package body Sem_Res is
|
||||||
-- types or array types except String.
|
-- types or array types except String.
|
||||||
|
|
||||||
if Is_Boolean_Type (T) then
|
if Is_Boolean_Type (T) then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
("comparison is not defined on Boolean type", N);
|
("comparison is not defined on Boolean type", N);
|
||||||
|
|
||||||
elsif Is_Array_Type (T) then
|
elsif Is_Array_Type (T) then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
if Base_Type (T) /= Standard_String then
|
if Base_Type (T) /= Standard_String then
|
||||||
Check_SPARK_Restriction
|
Check_SPARK_Restriction
|
||||||
|
@ -6828,7 +6828,7 @@ package body Sem_Res is
|
||||||
-- operands have equal static bounds.
|
-- operands have equal static bounds.
|
||||||
|
|
||||||
if Is_Array_Type (T) then
|
if Is_Array_Type (T) then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-- Protect call to Matching_Static_Array_Bounds to avoid costly
|
-- Protect call to Matching_Static_Array_Bounds to avoid costly
|
||||||
-- operation if not needed.
|
-- operation if not needed.
|
||||||
|
@ -7378,7 +7378,7 @@ package body Sem_Res is
|
||||||
if Is_Array_Type (B_Typ)
|
if Is_Array_Type (B_Typ)
|
||||||
and then Nkind (N) in N_Binary_Op
|
and then Nkind (N) in N_Binary_Op
|
||||||
then
|
then
|
||||||
Mark_Non_ALFA_Subprogram_Body;
|
Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
Left_Typ : constant Node_Id := Etype (Left_Opnd (N));
|
Left_Typ : constant Node_Id := Etype (Left_Opnd (N));
|
||||||
|
|
|
@ -141,7 +141,7 @@ package body Sem_Util is
|
||||||
-- T is a derived tagged type. Check whether the type extension is null.
|
-- T is a derived tagged type. Check whether the type extension is null.
|
||||||
-- If the parent type is fully initialized, T can be treated as such.
|
-- If the parent type is fully initialized, T can be treated as such.
|
||||||
|
|
||||||
procedure Mark_Non_ALFA_Subprogram_Body_Unconditional;
|
procedure Mark_Non_ALFA_Subprogram_Unconditional;
|
||||||
-- Perform the action for Mark_Non_ALFA_Subprogram_Body, which allows the
|
-- Perform the action for Mark_Non_ALFA_Subprogram_Body, which allows the
|
||||||
-- latter to be small and inlined.
|
-- latter to be small and inlined.
|
||||||
|
|
||||||
|
@ -2315,34 +2315,42 @@ package body Sem_Util is
|
||||||
end if;
|
end if;
|
||||||
end Current_Subprogram;
|
end Current_Subprogram;
|
||||||
|
|
||||||
-----------------------------------
|
------------------------------
|
||||||
-- Mark_Non_ALFA_Subprogram_Body --
|
-- Mark_Non_ALFA_Subprogram --
|
||||||
-----------------------------------
|
------------------------------
|
||||||
|
|
||||||
procedure Mark_Non_ALFA_Subprogram_Body is
|
procedure Mark_Non_ALFA_Subprogram is
|
||||||
begin
|
begin
|
||||||
-- Isolate marking of the current subprogram body so that the body of
|
-- Isolate marking of the current subprogram body so that the body of
|
||||||
-- Mark_Non_ALFA_Subprogram_Body is small and inlined.
|
-- Mark_Non_ALFA_Subprogram is small and inlined.
|
||||||
|
|
||||||
if ALFA_Mode then
|
if ALFA_Mode then
|
||||||
Mark_Non_ALFA_Subprogram_Body_Unconditional;
|
Mark_Non_ALFA_Subprogram_Unconditional;
|
||||||
end if;
|
end if;
|
||||||
end Mark_Non_ALFA_Subprogram_Body;
|
end Mark_Non_ALFA_Subprogram;
|
||||||
|
|
||||||
-------------------------------------------------
|
--------------------------------------------
|
||||||
-- Mark_Non_ALFA_Subprogram_Body_Unconditional --
|
-- Mark_Non_ALFA_Subprogram_Unconditional --
|
||||||
-------------------------------------------------
|
--------------------------------------------
|
||||||
|
|
||||||
procedure Mark_Non_ALFA_Subprogram_Body_Unconditional is
|
procedure Mark_Non_ALFA_Subprogram_Unconditional is
|
||||||
Cur_Subp : constant Entity_Id := Current_Subprogram;
|
Cur_Subp : constant Entity_Id := Current_Subprogram;
|
||||||
begin
|
begin
|
||||||
if Present (Cur_Subp)
|
if Present (Cur_Subp)
|
||||||
and then (Is_Subprogram (Cur_Subp)
|
and then (Is_Subprogram (Cur_Subp)
|
||||||
or else Is_Generic_Subprogram (Cur_Subp))
|
or else Is_Generic_Subprogram (Cur_Subp))
|
||||||
then
|
then
|
||||||
|
-- If the non-ALFA construct is in a precondition or postcondition,
|
||||||
|
-- then mark the subprogram as not in ALFA. Otherwise, mark the
|
||||||
|
-- subprogram body as not in ALFA.
|
||||||
|
|
||||||
|
if In_Pre_Post_Expression then
|
||||||
|
Set_Is_In_ALFA (Cur_Subp, False);
|
||||||
|
else
|
||||||
Set_Body_Is_In_ALFA (Cur_Subp, False);
|
Set_Body_Is_In_ALFA (Cur_Subp, False);
|
||||||
end if;
|
end if;
|
||||||
end Mark_Non_ALFA_Subprogram_Body_Unconditional;
|
end if;
|
||||||
|
end Mark_Non_ALFA_Subprogram_Unconditional;
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
-- Defining_Entity --
|
-- Defining_Entity --
|
||||||
|
|
|
@ -277,9 +277,12 @@ package Sem_Util is
|
||||||
-- Current_Scope is returned. The returned value is Empty if this is called
|
-- Current_Scope is returned. The returned value is Empty if this is called
|
||||||
-- from a library package which is not within any subprogram.
|
-- from a library package which is not within any subprogram.
|
||||||
|
|
||||||
procedure Mark_Non_ALFA_Subprogram_Body;
|
procedure Mark_Non_ALFA_Subprogram;
|
||||||
-- If Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
|
-- If Current_Subprogram is not Empty, mark either its specification or its
|
||||||
-- False, otherwise do nothing.
|
-- body as not being in ALFA. If called during the analysis of a
|
||||||
|
-- precondition or postcondition, as indicated by the flag
|
||||||
|
-- In_Pre_Post_Expression, mark the specification as not being in ALFA.
|
||||||
|
-- Otherwise, mark the body as not being in ALFA.
|
||||||
|
|
||||||
function Defining_Entity (N : Node_Id) return Entity_Id;
|
function Defining_Entity (N : Node_Id) return Entity_Id;
|
||||||
-- Given a declaration N, returns the associated defining entity. If the
|
-- Given a declaration N, returns the associated defining entity. If the
|
||||||
|
|
Loading…
Reference in New Issue