From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id BB845395CC1D; Wed, 7 Jul 2021 16:26:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB845395CC1D MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2128] [Ada] Stronger assertion about flag for checking static expressions X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 18b267aeeb126290355ec394fbc0f6a1fba1f340 X-Git-Newrev: cce46226b0bb33c688398f861c70dbb06c3e7bda Message-Id: <20210707162646.BB845395CC1D@sourceware.org> Date: Wed, 7 Jul 2021 16:26:46 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 16:26:46 -0000 https://gcc.gnu.org/g:cce46226b0bb33c688398f861c70dbb06c3e7bda commit r12-2128-gcce46226b0bb33c688398f861c70dbb06c3e7bda Author: Piotr Trojanek Date: Fri May 21 11:47:45 2021 +0200 [Ada] Stronger assertion about flag for checking static expressions gcc/ada/ * sem_eval.adb (Set_Checking_Potentially_Static_Expression): Stronger assertion. Diff: --- gcc/ada/sem_eval.adb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 7a70fd83b2a..a3a28644909 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;