[multiple changes]
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com> * expander.adb (Expand): Add a warning about using return statements in Ghost management code. * exp_ch3.adb (Freeze_Type): Add a warning about using return statements in Ghost management code. * exp_ch7.adb (Build_Invariant_Procedure_Body, Build_Invariant_Procedure_Declaration): Add a warning about using return statements in Ghost management code. * exp_disp.adb (Make_DT): Add a warning about using return statements in Ghost management code. * exp_util.adb (Build_DIC_Procedure_Body, Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a warning about using return statements in Ghost management code. * freeze.adb (Freeze_Entity): Add a warning about using return statements in Ghost management code. * sem.adb (Analyze, Do_Analyze): Add a warning about using return statements in Ghost management code. * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add a warning about using return statements in Ghost management code. * sem_ch5.adb (Analyze_Assignment): Add a warning about using return statements in Ghost management code. * sem_ch6.adb (Analyze_Procedure_Call, Analyze_Subprogram_Body_Helper): Add a warning about using return statements in Ghost management code. * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about using return statements in Ghost management code. * sem_ch12.adb (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation, Instantiate_Package_Body, Instantiate_Subprogram_Body): Add a warning about using return statements in Ghost management code. * sem_ch13.adb (Build_Predicate_Functions, Build_Predicate_Function_Declarations): Add a warning about using return statements in Ghost management code. * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part, Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma, Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about using return statements in Ghost management code. 2017-01-13 Tristan Gingold <gingold@adacore.com> * s-mmosin-mingw.adb: Fix pragma import. 2017-01-13 Arnaud Charlet <charlet@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in codepeer mode. From-SVN: r244396
This commit is contained in:
parent
d65a80fd55
commit
b0bf18adaa
@ -1,3 +1,51 @@
|
||||
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* expander.adb (Expand): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* exp_ch3.adb (Freeze_Type): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* exp_ch7.adb (Build_Invariant_Procedure_Body,
|
||||
Build_Invariant_Procedure_Declaration): Add a warning about
|
||||
using return statements in Ghost management code.
|
||||
* exp_disp.adb (Make_DT): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* exp_util.adb (Build_DIC_Procedure_Body,
|
||||
Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
|
||||
warning about using return statements in Ghost management code.
|
||||
* freeze.adb (Freeze_Entity): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* sem.adb (Analyze, Do_Analyze): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
|
||||
a warning about using return statements in Ghost management code.
|
||||
* sem_ch5.adb (Analyze_Assignment): Add a warning about using
|
||||
return statements in Ghost management code.
|
||||
* sem_ch6.adb (Analyze_Procedure_Call,
|
||||
Analyze_Subprogram_Body_Helper): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
|
||||
using return statements in Ghost management code.
|
||||
* sem_ch12.adb (Analyze_Package_Instantiation,
|
||||
Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
|
||||
Instantiate_Subprogram_Body): Add a warning about using return
|
||||
statements in Ghost management code.
|
||||
* sem_ch13.adb (Build_Predicate_Functions,
|
||||
Build_Predicate_Function_Declarations): Add a warning about
|
||||
using return statements in Ghost management code.
|
||||
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
|
||||
Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
|
||||
Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
|
||||
using return statements in Ghost management code.
|
||||
|
||||
2017-01-13 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* s-mmosin-mingw.adb: Fix pragma import.
|
||||
|
||||
2017-01-13 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
|
||||
codepeer mode.
|
||||
|
||||
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* atree.adb (Allocate_Initialize_Node): A newly created node is
|
||||
|
@ -7011,6 +7011,10 @@ package body Exp_Ch3 is
|
||||
-- for initialization) are chained in the Actions field list of the freeze
|
||||
-- node using Append_Freeze_Actions.
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
function Freeze_Type (N : Node_Id) return Boolean is
|
||||
procedure Process_RACW_Types (Typ : Entity_Id);
|
||||
-- Validate and generate stubs for all RACW types associated with type
|
||||
|
@ -3455,6 +3455,10 @@ package body Exp_Ch7 is
|
||||
-- Build_Invariant_Procedure_Body --
|
||||
------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Build_Invariant_Procedure_Body
|
||||
(Typ : Entity_Id;
|
||||
Partial_Invariant : Boolean := False)
|
||||
@ -4674,6 +4678,10 @@ package body Exp_Ch7 is
|
||||
-- Build_Invariant_Procedure_Declaration --
|
||||
-------------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Build_Invariant_Procedure_Declaration
|
||||
(Typ : Entity_Id;
|
||||
Partial_Invariant : Boolean := False)
|
||||
|
@ -3613,6 +3613,10 @@ package body Exp_Disp is
|
||||
-- ...
|
||||
-- end;
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
function Make_DT (Typ : Entity_Id; N : Node_Id := Empty) return List_Id is
|
||||
Loc : constant Source_Ptr := Sloc (Typ);
|
||||
|
||||
|
@ -1191,6 +1191,10 @@ package body Exp_Util is
|
||||
-- Build_DIC_Procedure_Body --
|
||||
------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Build_DIC_Procedure_Body (Typ : Entity_Id) is
|
||||
procedure Add_DIC_Check
|
||||
(DIC_Prag : Node_Id;
|
||||
@ -1924,6 +1928,10 @@ package body Exp_Util is
|
||||
-- Build_DIC_Procedure_Declaration --
|
||||
-------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Build_DIC_Procedure_Declaration (Typ : Entity_Id) is
|
||||
Loc : constant Source_Ptr := Sloc (Typ);
|
||||
|
||||
@ -7899,6 +7907,10 @@ package body Exp_Util is
|
||||
-- Make_Predicate_Call --
|
||||
-------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
function Make_Predicate_Call
|
||||
(Typ : Entity_Id;
|
||||
Expr : Node_Id;
|
||||
|
@ -77,6 +77,10 @@ package body Expander is
|
||||
-- Expand --
|
||||
------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Expand (N : Node_Id) is
|
||||
Mode : Ghost_Mode_Type;
|
||||
|
||||
|
@ -2002,6 +2002,10 @@ package body Freeze is
|
||||
-- Freeze_Entity --
|
||||
-------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
function Freeze_Entity
|
||||
(E : Entity_Id;
|
||||
N : Node_Id;
|
||||
|
@ -286,6 +286,11 @@ procedure Gnat1drv is
|
||||
|
||||
Debug_Generated_Code := False;
|
||||
|
||||
-- Disable Exception_Extra_Info (-gnateE) which generates more
|
||||
-- complex trees with no added value, and may confuse CodePeer.
|
||||
|
||||
Exception_Extra_Info := False;
|
||||
|
||||
-- Turn cross-referencing on in case it was disabled (e.g. by -gnatD)
|
||||
-- to support source navigation.
|
||||
|
||||
|
@ -60,7 +60,7 @@ package body System.Mmap.OS_Interface is
|
||||
Mb : Natural;
|
||||
Wcstr : Address;
|
||||
Wc : Natural) return Integer;
|
||||
pragma Import (C, MultiByteToWideChar);
|
||||
pragma Import (Stdcall, MultiByteToWideChar, "MultiByteToWideChar");
|
||||
|
||||
Current_Codepage : Interfaces.C.unsigned;
|
||||
pragma Import (C, Current_Codepage, "__gnat_current_codepage");
|
||||
|
@ -97,6 +97,10 @@ package body Sem is
|
||||
-- Analyze --
|
||||
-------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze (N : Node_Id) is
|
||||
Mode : Ghost_Mode_Type;
|
||||
Mode_Set : Boolean := False;
|
||||
@ -1337,6 +1341,10 @@ package body Sem is
|
||||
-- Do_Analyze --
|
||||
----------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must
|
||||
-- be replaced by gotos which jump to the end of the routine and restore
|
||||
-- the Ghost mode.
|
||||
|
||||
procedure Do_Analyze is
|
||||
Save_Ghost_Mode : constant Ghost_Mode_Type := Ghost_Mode;
|
||||
|
||||
|
@ -3573,6 +3573,10 @@ package body Sem_Ch12 is
|
||||
-- Analyze_Package_Instantiation --
|
||||
-----------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Package_Instantiation (N : Node_Id) is
|
||||
Loc : constant Source_Ptr := Sloc (N);
|
||||
Gen_Id : constant Node_Id := Name (N);
|
||||
@ -4839,6 +4843,10 @@ package body Sem_Ch12 is
|
||||
-- Analyze_Subprogram_Instantiation --
|
||||
--------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Subprogram_Instantiation
|
||||
(N : Node_Id;
|
||||
K : Entity_Kind)
|
||||
@ -10786,6 +10794,10 @@ package body Sem_Ch12 is
|
||||
-- Instantiate_Package_Body --
|
||||
------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Instantiate_Package_Body
|
||||
(Body_Info : Pending_Body_Info;
|
||||
Inlined_Body : Boolean := False;
|
||||
@ -11204,6 +11216,10 @@ package body Sem_Ch12 is
|
||||
-- Instantiate_Subprogram_Body --
|
||||
---------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Instantiate_Subprogram_Body
|
||||
(Body_Info : Pending_Body_Info;
|
||||
Body_Optional : Boolean := False)
|
||||
|
@ -8244,6 +8244,10 @@ package body Sem_Ch13 is
|
||||
-- the typPredicateM version of the function, in which any occurrence of a
|
||||
-- Raise_Expression is converted to "return False".
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Build_Predicate_Functions (Typ : Entity_Id; N : Node_Id) is
|
||||
Loc : constant Source_Ptr := Sloc (Typ);
|
||||
|
||||
@ -8894,6 +8898,10 @@ package body Sem_Ch13 is
|
||||
-- Build_Predicate_Function_Declaration --
|
||||
------------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
function Build_Predicate_Function_Declaration
|
||||
(Typ : Entity_Id) return Node_Id
|
||||
is
|
||||
|
@ -3303,6 +3303,10 @@ package body Sem_Ch3 is
|
||||
-- Analyze_Object_Declaration --
|
||||
--------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Object_Declaration (N : Node_Id) is
|
||||
Loc : constant Source_Ptr := Sloc (N);
|
||||
Id : constant Entity_Id := Defining_Identifier (N);
|
||||
@ -19413,6 +19417,10 @@ package body Sem_Ch3 is
|
||||
-- Process_Full_View --
|
||||
-----------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Process_Full_View (N : Node_Id; Full_T, Priv_T : Entity_Id) is
|
||||
procedure Collect_Implemented_Interfaces
|
||||
(Typ : Entity_Id;
|
||||
|
@ -88,6 +88,10 @@ package body Sem_Ch5 is
|
||||
-- Analyze_Assignment --
|
||||
------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Assignment (N : Node_Id) is
|
||||
Lhs : constant Node_Id := Name (N);
|
||||
Rhs : constant Node_Id := Expression (N);
|
||||
|
@ -1505,10 +1505,15 @@ package body Sem_Ch6 is
|
||||
-- Analyze_Procedure_Call --
|
||||
----------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Procedure_Call (N : Node_Id) is
|
||||
procedure Analyze_Call_And_Resolve;
|
||||
-- Do Analyze and Resolve calls for procedure call
|
||||
-- At end, check illegal order dependence.
|
||||
-- Do Analyze and Resolve calls for procedure call. At the end, check
|
||||
-- for illegal order dependence.
|
||||
-- ??? where is the check for illegal order dependencies?
|
||||
|
||||
------------------------------
|
||||
-- Analyze_Call_And_Resolve --
|
||||
@ -2136,6 +2141,10 @@ package body Sem_Ch6 is
|
||||
-- specification matters, and is used to create a proper declaration for
|
||||
-- the subprogram, or to perform conformance checks.
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Subprogram_Body_Helper (N : Node_Id) is
|
||||
Body_Spec : Node_Id := Specification (N);
|
||||
Body_Id : Entity_Id := Defining_Entity (Body_Spec);
|
||||
|
@ -193,6 +193,10 @@ package body Sem_Ch7 is
|
||||
-- Analyze_Package_Body_Helper --
|
||||
---------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Package_Body_Helper (N : Node_Id) is
|
||||
procedure Hide_Public_Entities (Decls : List_Id);
|
||||
-- Attempt to hide all public entities found in declarative list Decls
|
||||
|
@ -361,6 +361,10 @@ package body Sem_Prag is
|
||||
-- Analyze_Contract_Cases_In_Decl_Part --
|
||||
-----------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Contract_Cases_In_Decl_Part
|
||||
(N : Node_Id;
|
||||
Freeze_Id : Entity_Id := Empty)
|
||||
@ -2650,6 +2654,10 @@ package body Sem_Prag is
|
||||
-- Analyze_Initial_Condition_In_Decl_Part --
|
||||
--------------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Initial_Condition_In_Decl_Part (N : Node_Id) is
|
||||
Pack_Decl : constant Node_Id := Find_Related_Package_Or_Body (N);
|
||||
Pack_Id : constant Entity_Id := Defining_Entity (Pack_Decl);
|
||||
@ -12466,6 +12474,10 @@ package body Sem_Prag is
|
||||
-- The identifiers Assertions and Statement_Assertions are not
|
||||
-- allowed, since they have special meaning for Check_Policy.
|
||||
|
||||
-- WARNING: The code below manages Ghost regions. Return statements
|
||||
-- must be replaced by gotos which jump to the end of the code and
|
||||
-- restore the Ghost mode.
|
||||
|
||||
when Pragma_Check => Check : declare
|
||||
Cname : Name_Id;
|
||||
Eloc : Source_Ptr;
|
||||
@ -23547,6 +23559,10 @@ package body Sem_Prag is
|
||||
-- Analyze_Pre_Post_Condition_In_Decl_Part --
|
||||
---------------------------------------------
|
||||
|
||||
-- WARNING: This routine manages Ghost regions. Return statements must be
|
||||
-- replaced by gotos which jump to the end of the routine and restore the
|
||||
-- Ghost mode.
|
||||
|
||||
procedure Analyze_Pre_Post_Condition_In_Decl_Part
|
||||
(N : Node_Id;
|
||||
Freeze_Id : Entity_Id := Empty)
|
||||
|
Loading…
Reference in New Issue
Block a user