public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-419] ada: Attributes Put_Image and Object_Size are defined by Ada 2022
@ 2024-05-13  8:37 Marc Poulhi?s
  0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2024-05-13  8:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7e348a40db285d451652ed8f7f022ca4c9022da7

commit r15-419-g7e348a40db285d451652ed8f7f022ca4c9022da7
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Thu Feb 1 13:15:27 2024 +0100

    ada: Attributes Put_Image and Object_Size are defined by Ada 2022
    
    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.

Diff:
---
 gcc/ada/sem_attr.adb |  4 +++-
 gcc/ada/sem_attr.ads | 11 -----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 65442d45a85f..b979ffdf0b1c 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -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
diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads
index 4c9f27043c66..65b7b534711d 100644
--- a/gcc/ada/sem_attr.ads
+++ b/gcc/ada/sem_attr.ads
@@ -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 --
       -------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-13  8:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13  8:37 [gcc r15-419] ada: Attributes Put_Image and Object_Size are defined by Ada 2022 Marc Poulhi?s

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).