public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED 01/30] ada: Fix list of attributes defined by Ada 2022
@ 2024-06-20  8:52 Marc Poulhiès
  2024-06-20  8:52 ` [COMMITTED 02/30] ada: Improve preprocessor error handling Marc Poulhiès
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: Marc Poulhiès @ 2024-06-20  8:52 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

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_Impl_Def): Remove Object_Size.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 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 9c3bc62d321..c2bb094492d 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -185,7 +185,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 52359e40ef6..17dce1fb0b0 100644
--- a/gcc/ada/sem_attr.ads
+++ b/gcc/ada/sem_attr.ads
@@ -381,17 +381,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 --
       -------------------------
-- 
2.45.1


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2024-06-20  8:53 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-20  8:52 [COMMITTED 01/30] ada: Fix list of attributes defined by Ada 2022 Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 02/30] ada: Improve preprocessor error handling Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 03/30] ada: Update documentation for 'Super Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 04/30] ada: Treat Info-Warnings as Info messages Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 05/30] ada: Add switch for suppressing info messages Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 06/30] ada: Convert -gnatw.n messages to warnings Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 07/30] ada: Change messages for -gnatw.v " Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 08/30] ada: Document -gnatd_w for CCG Marc Poulhiès
2024-06-20  8:52 ` [COMMITTED 09/30] ada: Fix minor issues in comments Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 10/30] ada: Do not compute Has_Controlled_Component twice during freezing Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 11/30] ada: Add Dump_Buffers hooks for code coverage Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 12/30] ada: Couple of minor fixes in GNAT Reference Manual Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 13/30] ada: Remove Max_Entry_Queue_Depth pragma/aspect Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 14/30] ada: Fix style in freezing code Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 15/30] ada: Remove redundant conditions from " Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 16/30] ada: Streamline propagation of controlled flags on types Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 17/30] ada: Add documentation for Subprogram_Variant aspect and pragma Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 18/30] ada: Update Bit Ordering references in GNAT Reference Manual Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 19/30] ada: Enforce strict alignment for array types with aliased component Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 20/30] ada: Fix crash on real literal in declare expression of expression function Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 21/30] ada: Fix bogus error with "=" operator on array of private unchecked union Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 22/30] ada: New pragma to default all interrupts to system Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 23/30] ada: Fix composition of primitive equality for untagged records with variant part Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 24/30] ada: Fix assertion failure during analysis of instantiation of formal package Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 25/30] ada: Fix inlining of fixed-lower-bound array for GNATprove Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 26/30] ada: Crash on selected component of formal derived type in generic instance Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 27/30] ada: Replace "All" argument to Extensions_Allowed pragma with "All_Extensions" Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 28/30] ada: Rewrite generic formal/actual matching Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 29/30] ada: Fix checking of SPARK RM on ghost with concurrent part Marc Poulhiès
2024-06-20  8:53 ` [COMMITTED 30/30] ada: Reference to nonexistent operator in reduction expression accepted 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).