]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Attributes Put_Image and Object_Size are defined by Ada 2022
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 1 Feb 2024 12:15:27 +0000 (13:15 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 13 May 2024 08:03:34 +0000 (10:03 +0200)
Recognize references to attributes Put_Image and Object_Size as
language-defined in Ada 2022 and implementation-defined in earlier
versions of Ada. Other attributes listed in Ada 2022 RM, K.2 and
currently implemented in GNAT are correctly categorized.

This change only affects code with restriction
No_Implementation_Attributes.

gcc/ada/

* sem_attr.adb (Attribute_22): Add Put_Image and Object_Size.
* sem_attr.ads (Attribute_Imp_Def): Remove Object_Size.

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

index 65442d45a85f3899f46e195ca0dcda8c823410c8..b979ffdf0b1c96c7cf9d3da197ca1af96c9552a7 100644 (file)
@@ -181,7 +181,9 @@ package body Sem_Attr is
      (Attribute_Enum_Rep                     |
       Attribute_Enum_Val                     |
       Attribute_Index                        |
-      Attribute_Preelaborable_Initialization => True,
+      Attribute_Object_Size                  |
+      Attribute_Preelaborable_Initialization |
+      Attribute_Put_Image                    => True,
       others                                 => False);
 
    --  The following array contains all attributes that imply a modification
index 4c9f27043c6614092f9f083d4c107c45233ec457..65b7b534711d8979d9735e3e6014fcddc2bf6bc1 100644 (file)
@@ -373,17 +373,6 @@ package Sem_Attr is
       --  other composite object passed by reference, there is no other way
       --  of specifying that a zero address should be passed.
 
-      -----------------
-      -- Object_Size --
-      -----------------
-
-      Attribute_Object_Size => True,
-      --  Type'Object_Size is the same as Type'Size for all types except
-      --  fixed-point types and discrete types. For fixed-point types and
-      --  discrete types, this attribute gives the size used for default
-      --  allocation of objects and components of the size. See section in
-      --  Einfo ("Handling of Type'Size values") for further details.
-
       -------------------------
       -- Passed_By_Reference --
       -------------------------