The following pragma is currently accepted:

  pragma Assertion_Policy (Assertion_Policy => Ignore);

because of what appears to be a typo in a previous commit on this topic.
With this patch the above pragma is rejected as illegal.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * sem_prag.adb (Is_Valid_Assertion_Kind): Return False on
        "Assertion_Policy"
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -31474,7 +31474,6 @@ package body Sem_Prag is
             --  RM defined
 
               Name_Assert
-            | Name_Assertion_Policy
             | Name_Static_Predicate
             | Name_Dynamic_Predicate
             | Name_Pre


Reply via email to