https://gcc.gnu.org/g:da377160f648ff09f8df1a5200d14106bf62b2d1

commit r16-1228-gda377160f648ff09f8df1a5200d14106bf62b2d1
Author: Piotr Trojanek <troja...@adacore.com>
Date:   Tue Feb 25 12:48:32 2025 +0100

    ada: Document representation clauses previously required by ASIS
    
    A record type used for name identifiers had representation clause to make 
sure
    that table with identifiers is written to an ASIS file without holes. Now 
ASIS
    mode has been deconstructed, but we still want this representation clause to
    ensure efficient implementation.
    
    Comment update; behavior is unaffected.
    
    gcc/ada/ChangeLog:
    
            * namet.ads (Name_Entry): Update comments to explain the current 
needs.

Diff:
---
 gcc/ada/namet.ads | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/namet.ads b/gcc/ada/namet.ads
index daa87d91caa6..7182fb87e7ec 100644
--- a/gcc/ada/namet.ads
+++ b/gcc/ada/namet.ads
@@ -609,6 +609,7 @@ private
       --  Int Value associated with this name
 
    end record;
+   --  The aliased non-boolean components are required to match the C structure
 
    for Name_Entry use record
       Name_Chars_Index      at  0 range 0 .. 31;
@@ -622,9 +623,10 @@ private
       Hash_Link             at  8 range 0 .. 31;
       Int_Info              at 12 range 0 .. 31;
    end record;
+   --  This ensures a matching layout between Ada and C
 
    for Name_Entry'Size use 16 * 8;
-   --  This ensures that we did not leave out any fields
+   --  This ensures that record is reasonably small
 
    --  This is the table that is referenced by Valid_Name_Id entries.
    --  It contains one entry for each unique name in the table.

Reply via email to