From d57092f2f3331c333c92296661a310d0285bd576 Mon Sep 17 00:00:00 2001 From: Viljar Indus Date: Mon, 28 Jul 2025 16:06:27 +0300 Subject: [PATCH] ada: Add default assertion level for assertions 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 | 2 ++ gcc/ada/sem_prag.adb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index ce76b7dca01..f0caf960269 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 8bb309e64cc..e73cdedb4f6 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -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; -- 2.47.3