]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Allow 'Reduce with -gnat2022
authorArnaud Charlet <charlet@adacore.com>
Sun, 20 Mar 2022 09:12:32 +0000 (09:12 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 17 May 2022 08:25:44 +0000 (08:25 +0000)
After a period of experimentation, allow 'Reduce in Ada 2022 mode.

gcc/ada/

* sem_attr.adb (Analyze_Attribute [Attribute_Reduce]): Allow
'Reduce for Ada 2022 and above.
* sem_attr.ads (Attribute_Impl_Def): 'Reduce is no longer
implementation defined.

gcc/ada/sem_attr.adb
gcc/ada/sem_attr.ads

index b3965f3664e840363fdb7c69834d69a6a0664fac..c7cb3329c040e5da63917917bc6b609e569aca52 100644 (file)
@@ -5775,11 +5775,7 @@ package body Sem_Attr is
 
       when Attribute_Reduce =>
          Check_E2;
-
-         if not Extensions_Allowed then
-            Error_Attr
-              ("% attribute only supported under -gnatX", P);
-         end if;
+         Error_Msg_Ada_2022_Feature ("Reduce attribute", Sloc (N));
 
          declare
             Stream : constant Node_Id := Prefix (N);
index b9a7cd28149a371288d439dbab9297e207ef7736..37e77fd27e09618a889563c5aa4e265f444c13dc 100644 (file)
@@ -407,13 +407,6 @@ package Sem_Attr is
       --  as Range applied to the array itself. The result is of type universal
       --  integer.
 
-      ------------
-      -- Reduce --
-      ------------
-
-      Attribute_Reduce => True,
-      --  See AI12-0262-1
-
       ---------
       -- Ref --
       ---------