]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Add default assertion level for assertions
authorViljar Indus <indus@adacore.com>
Mon, 28 Jul 2025 13:06:27 +0000 (16:06 +0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 9 Sep 2025 12:39:50 +0000 (14:39 +0200)
To standardize the comparisson between the levels of ghost
entities and levels of assertion pragmasTo standardize the comparisson
between the levels of ghost
entities and levels of assertion pragmas.

gcc/ada/ChangeLog:

* sem_ch13.adb (Analyze_Aspect_Specifications): add default
assertion level to assertion aspects.
* sem_prag.adb (Analyze_Pragma): Likewise.

gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb

index ce76b7dca0169357551b46b5b65cee162e0de859..f0caf9602694f4771ea5a3bbe869976254af4ba7 100644 (file)
@@ -3272,6 +3272,8 @@ package body Sem_Ch13 is
                   goto Continue;
                else
                   Check_Applicable_Policy (Aspect);
+                  Set_Aspect_Ghost_Assertion_Level
+                    (Aspect, Standard_Level_Default);
                end if;
 
             end if;
index 8bb309e64cc86aad125424c741b9836e85d11687..e73cdedb4f6a0e7c13acad21994c719686781d57 100644 (file)
@@ -12734,6 +12734,8 @@ package body Sem_Prag is
 
          else
             Check_Applicable_Policy (N, Empty);
+            Set_Pragma_Ghost_Assertion_Level
+              (N, Standard_Level_Default);
          end if;
       end if;