diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-20 14:31:47 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-20 14:31:47 +0200 |
commit | 20250fb87c79d840eb23c51bbe63467910c14fd9 (patch) | |
tree | 8b386d757c16c16568dbb9d414547e2d7eda794a /gcc/ada/sem_prag.ads | |
parent | 9e3be36e465b0699d161e1e1ff9a78fd216c2c60 (diff) | |
download | gcc-20250fb87c79d840eb23c51bbe63467910c14fd9.zip gcc-20250fb87c79d840eb23c51bbe63467910c14fd9.tar.gz gcc-20250fb87c79d840eb23c51bbe63467910c14fd9.tar.bz2 |
[multiple changes]
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
reformatting.
* lib.ads, sem_util.adb: Minor typo in comment.
2016-06-20 Yannick Moy <moy@adacore.com>
* sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
Add parameter Keep_Pragma_Id to optionally keep
the identifier of the pragma instead of converting
to pragma Check. Also set type of new function call
appropriately. (Collect_Inherited_Class_Wide_Conditions):
Call Build_Pragma_Check_Equivalent with the new parameter
Keep_Pragma_Id set to True to keep the identifier of the copied
pragma.
* sinfo.ads: Add comment.
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Build_Invariant_Procedure_Body):
Always install the scope of the invariant procedure
in order to produce better error messages. Do not
insert the body when the context is a generic unit.
(Build_Invariant_Procedure_Declaration): Perform minimal
decoration of the invariant procedure and its formal parameter
in case they are not analyzed. Do not insert the declaration
when the context is a generic unit.
From-SVN: r237600
Diffstat (limited to 'gcc/ada/sem_prag.ads')
-rw-r--r-- | gcc/ada/sem_prag.ads | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 7afb6e6..d860708 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2016, 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- -- @@ -245,14 +245,18 @@ package Sem_Prag is -- Perform preanalysis of pragma Test_Case function Build_Pragma_Check_Equivalent - (Prag : Node_Id; - Subp_Id : Entity_Id := Empty; - Inher_Id : Entity_Id := Empty) return Node_Id; - -- Transform a [refined] pre- or postcondition denoted by Prag into an + (Prag : Node_Id; + Subp_Id : Entity_Id := Empty; + Inher_Id : Entity_Id := Empty; + Keep_Pragma_Id : Boolean := False) return Node_Id; + -- Transform a pre- or [refined] postcondition denoted by Prag into an -- equivalent pragma Check. When the pre- or postcondition is inherited, - -- the routine replaces the references of all formals of Inher_Id and - -- primitive operations of its controlling type by references to the - -- corresponding entities of Subp_Id and the descendant type. + -- the routine replaces the references of all formals of Inher_Id + -- and primitive operations of its controlling type by references + -- to the corresponding entities of Subp_Id and the descendant type. + -- Keep_Pragma_Id is True when the newly created pragma should be + -- in fact of the same kind as the source pragma Prag. This is used + -- in GNATprove_Mode to generate the inherited pre- and postconditions. procedure Check_Applicable_Policy (N : Node_Id); -- N is either an N_Aspect or an N_Pragma node. There are two cases. If |