diff options
author | Arnaud Charlet <charlet@adacore.com> | 2022-03-20 09:12:32 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-17 08:25:44 +0000 |
commit | c21a0097b63f1117b780f7b56332d40d5cbc9625 (patch) | |
tree | 286264442e6e966ca0dad0fac591ba4b5529e9cd | |
parent | 6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b (diff) | |
download | gcc-c21a0097b63f1117b780f7b56332d40d5cbc9625.zip gcc-c21a0097b63f1117b780f7b56332d40d5cbc9625.tar.gz gcc-c21a0097b63f1117b780f7b56332d40d5cbc9625.tar.bz2 |
[Ada] Allow 'Reduce with -gnat2022
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.
-rw-r--r-- | gcc/ada/sem_attr.adb | 6 | ||||
-rw-r--r-- | gcc/ada/sem_attr.ads | 7 |
2 files changed, 1 insertions, 12 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index b3965f3..c7cb3329 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -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); diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads index b9a7cd2..37e77fd 100644 --- a/gcc/ada/sem_attr.ads +++ b/gcc/ada/sem_attr.ads @@ -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 -- --------- |