Some of the restrictions were initially implemented as specific to GNAT,
but now they are part of Ada; likewise, some of recently added
restrictions were considered to be part of Ada, but are not yet in the
standard. This patch updates their categorization based on Ada 202x
Draft 32.

Only a No_Implementation_Restrictions restriction, which is specific to
GNAT, is affected.

Cleanup related to a new restriction No_Uninitialized_Local_Scalars.

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

gcc/ada/

        * libgnat/s-rident.ads (Implementation_Restriction): Remove
        No_Dynamic_Attachment, No_Implementation_Attributes,
        No_Implementation_Pragmas, No_Local_Protected_Objects,
        No_Protected_Type_Allocators, No_Relative_Delay,
        No_Requeue_Statements, No_Select_Statements,
        No_Task_Termination, Pure_Barriers and Simple_Barriers; add
        No_Dynamic_Sized_Objects,
        No_Implicit_Protected_Object_Allocations,
        No_Implicit_Task_Allocations, No_Task_At_Interrupt_Priority and
        Static_Dispatch_Tables; sort alphabetically.
        * restrict.ads (Restriction_Id): Change Pure_Barriers and
        No_Task_Termination from GNAT to Ada restrictions.
diff --git a/gcc/ada/libgnat/s-rident.ads b/gcc/ada/libgnat/s-rident.ads
--- a/gcc/ada/libgnat/s-rident.ads
+++ b/gcc/ada/libgnat/s-rident.ads
@@ -90,7 +90,7 @@ package System.Rident is
       --  does not violate the restriction.
 
      (Simple_Barriers,                           -- Ada 2012 (D.7 (10.9/3))
-      Pure_Barriers,                             -- GNAT
+      Pure_Barriers,                             -- Ada 2022 (D.7(10.11/5))
       No_Abort_Statements,                       -- (RM D.7(5), H.4(3))
       No_Access_Parameter_Allocators,            -- Ada 2012 (RM H.4 (8.3/3))
       No_Access_Subprograms,                     -- (RM H.4(17))
@@ -150,7 +150,7 @@ package System.Rident is
       No_Task_Attributes_Package,                -- GNAT
       No_Task_At_Interrupt_Priority,             -- GNAT
       No_Task_Hierarchy,                         -- (RM D.7(3), H.4(3))
-      No_Task_Termination,                       -- GNAT (Ravenscar)
+      No_Task_Termination,                       -- Ada 2005 (D.7(15.1/2))
       No_Tasks_Unassigned_To_CPU,                -- Ada 202x (D.7(10.10/4))
       No_Tasking,                                -- GNAT
       No_Terminate_Alternatives,                 -- (RM D.7(6))


diff --git a/gcc/ada/restrict.ads b/gcc/ada/restrict.ads
--- a/gcc/ada/restrict.ads
+++ b/gcc/ada/restrict.ads
@@ -109,50 +109,44 @@ package Restrict is
    --  is why this restriction itself is excluded from the list).
 
    Implementation_Restriction : constant array (All_Restrictions) of Boolean :=
-     (Simple_Barriers                    => True,
-      No_Calendar                        => True,
-      No_Default_Initialization          => True,
-      No_Direct_Boolean_Operators        => True,
-      No_Dispatching_Calls               => True,
-      No_Dynamic_Accessibility_Checks    => True,
-      No_Dynamic_Attachment              => True,
-      No_Elaboration_Code                => True,
-      No_Enumeration_Maps                => True,
-      No_Entry_Calls_In_Elaboration_Code => True,
-      No_Entry_Queue                     => True,
-      No_Exception_Handlers              => True,
-      No_Exception_Propagation           => True,
-      No_Exception_Registration          => True,
-      No_Finalization                    => True,
-      No_Fixed_IO                        => True,
-      No_Implementation_Attributes       => True,
-      No_Implementation_Pragmas          => True,
-      No_Implicit_Conditionals           => True,
-      No_Implicit_Aliasing               => True,
-      No_Implicit_Dynamic_Code           => True,
-      No_Implicit_Loops                  => True,
-      No_Initialize_Scalars              => True,
-      No_Local_Protected_Objects         => True,
-      No_Long_Long_Integers              => True,
-      No_Multiple_Elaboration            => True,
-      No_Protected_Type_Allocators       => True,
-      No_Relative_Delay                  => True,
-      No_Requeue_Statements              => True,
-      No_Secondary_Stack                 => True,
-      No_Select_Statements               => True,
-      No_Standard_Storage_Pools          => True,
-      No_Stream_Optimizations            => True,
-      No_Streams                         => True,
-      No_Tagged_Type_Registration        => True,
-      No_Task_Attributes_Package         => True,
-      No_Task_Termination                => True,
-      No_Tasking                         => True,
-      No_Wide_Characters                 => True,
-      Static_Priorities                  => True,
-      Static_Storage_Size                => True,
-      Pure_Barriers                      => True,
-      SPARK_05                           => True,
-      others                             => False);
+     (No_Calendar                              => True,
+      No_Default_Initialization                => True,
+      No_Direct_Boolean_Operators              => True,
+      No_Dispatching_Calls                     => True,
+      No_Dynamic_Accessibility_Checks          => True,
+      No_Dynamic_Sized_Objects                 => True,
+      No_Elaboration_Code                      => True,
+      No_Entry_Calls_In_Elaboration_Code       => True,
+      No_Entry_Queue                           => True,
+      No_Enumeration_Maps                      => True,
+      No_Exception_Handlers                    => True,
+      No_Exception_Propagation                 => True,
+      No_Exception_Registration                => True,
+      No_Finalization                          => True,
+      No_Fixed_IO                              => True,
+      No_Implicit_Aliasing                     => True,
+      No_Implicit_Conditionals                 => True,
+      No_Implicit_Dynamic_Code                 => True,
+      No_Implicit_Loops                        => True,
+      No_Implicit_Protected_Object_Allocations => True,
+      No_Implicit_Task_Allocations             => True,
+      No_Initialize_Scalars                    => True,
+      No_Long_Long_Integers                    => True,
+      No_Multiple_Elaboration                  => True,
+      No_Secondary_Stack                       => True,
+      No_Standard_Storage_Pools                => True,
+      No_Stream_Optimizations                  => True,
+      No_Streams                               => True,
+      No_Tagged_Type_Registration              => True,
+      No_Task_At_Interrupt_Priority            => True,
+      No_Task_Attributes_Package               => True,
+      No_Tasking                               => True,
+      No_Wide_Characters                       => True,
+      Static_Dispatch_Tables                   => True,
+      Static_Priorities                        => True,
+      Static_Storage_Size                      => True,
+      SPARK_05                                 => True,
+      others                                   => False);
 
    --------------------------
    -- No_Dependences Table --


Reply via email to