[COMMITTED,20/30] ada: Fix list of implementation-defined attributes

Message ID 20240520074858.222435-20-poulhies@adacore.com
State Committed
Commit ea65d5b38051aca5071157092546665c446cef60
Headers
Series [COMMITTED,01/30] ada: Rework and augment documentation on strict aliasing |

Commit Message

Marc Poulhiès May 20, 2024, 7:48 a.m. UTC
  From: Piotr Trojanek <trojanek@adacore.com>

Several of the implementation-defined attributes were wrongly recognized
as defined by the Ada RM.

This change only affects code with restriction
No_Implementation_Attributes.

gcc/ada/

	* sem_attr.ads (Attribute_Impl_Def): Fix list of
	implementation-defined attributes.

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

---
 gcc/ada/sem_attr.ads | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
  

Patch

diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads
index 40ec423c4c7..52359e40ef6 100644
--- a/gcc/ada/sem_attr.ads
+++ b/gcc/ada/sem_attr.ads
@@ -609,6 +609,33 @@  package Sem_Attr is
       --  for constructing this definition in package System (see note above
       --  in Default_Bit_Order description). This is a static attribute.
 
+      Attribute_Atomic_Always_Lock_Free    |
+      Attribute_Bit_Position               |
+      Attribute_Compiler_Version           |
+      Attribute_Descriptor_Size            |
+      Attribute_Enabled                    |
+      Attribute_Fast_Math                  |
+      Attribute_From_Any                   |
+      Attribute_Has_Access_Values          |
+      Attribute_Has_Tagged_Values          |
+      Attribute_Initialized                |
+      Attribute_Library_Level              |
+      Attribute_Pool_Address               |
+      Attribute_Restriction_Set            |
+      Attribute_Scalar_Storage_Order       |
+      Attribute_Simple_Storage_Pool        |
+      Attribute_Small_Denominator          |
+      Attribute_Small_Numerator            |
+      Attribute_System_Allocator_Alignment |
+      Attribute_To_Any                     |
+      Attribute_TypeCode                   |
+      Attribute_Type_Key                   |
+      Attribute_Unconstrained_Array        |
+      Attribute_Update                     |
+      Attribute_Valid_Value                |
+      Attribute_Wchar_T_Size               => True,
+      --  See description in GNAT RM
+
       others => False);
 
    --  The following table lists all attributes that yield a result of a