aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/contracts.adb
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2024-02-02 18:20:06 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-14 10:19:50 +0200
commitdf48963b9553a51023c0d115bdf6205309e04bfe (patch)
tree5e8ed8d6ba931aedfab087b456a47bdfed6dbdc3 /gcc/ada/contracts.adb
parent20dfaae2d1ba4749db13792105a32c5d8ef422e3 (diff)
downloadgcc-df48963b9553a51023c0d115bdf6205309e04bfe.zip
gcc-df48963b9553a51023c0d115bdf6205309e04bfe.tar.gz
gcc-df48963b9553a51023c0d115bdf6205309e04bfe.tar.bz2
ada: Update of SPARK RM legality rules on ghost code
Update checking of ghost code after a small change in SPARK RM rules 6.9(15) and 6.9(20), so that the Ghost assertion policy that matters when checking the validity of a reference to a ghost entity in an assertion expression is the Ghost assertion policy at the point of declaration of the entity. Also fix references to SPARK RM rules in comments, which were off by two in many cases after the insertion of rules 13 and 14 regarding generic instantiations. gcc/ada/ * contracts.adb: Fix references to SPARK RM rules. * freeze.adb: Same. * ghost.adb: Fix references to SPARK RM rules. (Check_Ghost_Context): Update checking of references to ghost entities in assertion expressions. * sem_ch6.adb: Fix references to SPARK RM rules. * sem_prag.adb: Same.
Diffstat (limited to 'gcc/ada/contracts.adb')
-rw-r--r--gcc/ada/contracts.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 810b360..9fc9e05 100644
--- a/gcc/ada/contracts.adb
+++ b/gcc/ada/contracts.adb
@@ -1114,7 +1114,7 @@ package body Contracts is
if Comes_From_Source (Obj_Id) and then Is_Ghost_Entity (Obj_Id) then
-- A Ghost object cannot be of a type that yields a synchronized
- -- object (SPARK RM 6.9(19)).
+ -- object (SPARK RM 6.9(21)).
if Yields_Synchronized_Object (Obj_Typ) then
Error_Msg_N ("ghost object & cannot be synchronized", Obj_Id);