aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-05-21 11:47:45 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-07 16:23:19 +0000
commitcce46226b0bb33c688398f861c70dbb06c3e7bda (patch)
tree1c4cb9e5fcd7e4d4712cc5236ef5ee9ce7a7c60e
parent18b267aeeb126290355ec394fbc0f6a1fba1f340 (diff)
downloadgcc-cce46226b0bb33c688398f861c70dbb06c3e7bda.zip
gcc-cce46226b0bb33c688398f861c70dbb06c3e7bda.tar.gz
gcc-cce46226b0bb33c688398f861c70dbb06c3e7bda.tar.bz2
[Ada] Stronger assertion about flag for checking static expressions
gcc/ada/ * sem_eval.adb (Set_Checking_Potentially_Static_Expression): Stronger assertion.
-rw-r--r--gcc/ada/sem_eval.adb7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb
index 7a70fd8..a3a2864 100644
--- a/gcc/ada/sem_eval.adb
+++ b/gcc/ada/sem_eval.adb
@@ -6481,11 +6481,10 @@ package body Sem_Eval is
procedure Set_Checking_Potentially_Static_Expression (Value : Boolean) is
begin
- -- Verify that we're not currently checking for a potentially static
- -- expression unless we're disabling such checking.
+ -- Verify that we only start/stop checking for a potentially static
+ -- expression and do not start or stop it twice in a row.
- pragma Assert
- (not Checking_For_Potentially_Static_Expression or else not Value);
+ pragma Assert (Checking_For_Potentially_Static_Expression /= Value);
Checking_For_Potentially_Static_Expression := Value;
end Set_Checking_Potentially_Static_Expression;