aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2024-03-25 22:52:14 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-20 09:47:05 +0200
commit95a13b096df2aa6dc096f65846d6c19067552792 (patch)
treee6e880e3d4c04a2cf170120bec57d4baecd8dded
parent32aa8b92c59d9c8343a618c7d1614bed7b0e107d (diff)
downloadgcc-95a13b096df2aa6dc096f65846d6c19067552792.zip
gcc-95a13b096df2aa6dc096f65846d6c19067552792.tar.gz
gcc-95a13b096df2aa6dc096f65846d6c19067552792.tar.bz2
ada: Fix list of attributes defined by Ada 2012
Recognize references to attributes Old, Overlaps_Storage and Result as language-defined in Ada 2012 and implementation-defined in earlier versions of Ada. Other attributes introduced by Ada 2012 RM are correctly categorized. This change only affects code with restriction No_Implementation_Attributes. gcc/ada/ * sem_attr.adb (Attribute_12): Add attributes Old, Overlaps_Storage and Result.
-rw-r--r--gcc/ada/sem_attr.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 414224e..df52229b 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -170,7 +170,10 @@ package body Sem_Attr is
(Attribute_First_Valid |
Attribute_Has_Same_Storage |
Attribute_Last_Valid |
- Attribute_Max_Alignment_For_Allocation => True,
+ Attribute_Max_Alignment_For_Allocation |
+ Attribute_Old |
+ Attribute_Overlaps_Storage |
+ Attribute_Result => True,
others => False);
-- The following array is the list of attributes defined in the Ada 2022