]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix list of attributes defined by Ada 2012
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 25 Mar 2024 21:52:14 +0000 (22:52 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 20 May 2024 07:47:05 +0000 (09:47 +0200)
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.

gcc/ada/sem_attr.adb

index 414224e86b699dab6b68c2443bc3f3c9cbb2ad34..df52229b6aafcb180cb1702d0a6d537a2d16b77d 100644 (file)
@@ -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