public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] ada: Remove Ttypes.Max_Unaligned_Field
@ 2023-06-15  8:04 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-06-15  8:04 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

This constant has been unused for ages.  The corresponding getter function
is also removed from the Get_Targ package, but the corresponding constant
declared in Set_Targ is preserved for the sake of backward compatibility
of the target file format.

gcc/ada/

	* get_targ.ads (Get_Max_Unaligned_Field): Delete.
	* ada_get_targ.adb (Get_Max_Unaligned_Field): Likewise.
	* get_targ.adb (Get_Max_Unaligned_Field): Likewise.
	* set_targ.ads (Max_Unaligned_Field): Adjust comment.
	* set_targ.adb: Set Max_Unaligned_Field to 1 during elaboration.
	* ttypes.ads (Max_Unaligned_Field): Delete.

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

---
 gcc/ada/ada_get_targ.adb | 9 ---------
 gcc/ada/get_targ.adb     | 9 ---------
 gcc/ada/get_targ.ads     | 4 ----
 gcc/ada/set_targ.adb     | 2 +-
 gcc/ada/set_targ.ads     | 2 +-
 gcc/ada/ttypes.ads       | 4 ----
 6 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/gcc/ada/ada_get_targ.adb b/gcc/ada/ada_get_targ.adb
index 6aadb77e52c..5de9fc4ddbe 100644
--- a/gcc/ada/ada_get_targ.adb
+++ b/gcc/ada/ada_get_targ.adb
@@ -208,15 +208,6 @@ package body Get_Targ is
       return 0;
    end Get_Double_Scalar_Alignment;
 
-   -----------------------------
-   -- Get_Max_Unaligned_Field --
-   -----------------------------
-
-   function Get_Max_Unaligned_Field return Pos is
-   begin
-      return 64;  -- Can be different on some targets
-   end Get_Max_Unaligned_Field;
-
    -----------------------------
    -- Register_Back_End_Types --
    -----------------------------
diff --git a/gcc/ada/get_targ.adb b/gcc/ada/get_targ.adb
index b2b89324126..342289992bc 100644
--- a/gcc/ada/get_targ.adb
+++ b/gcc/ada/get_targ.adb
@@ -278,15 +278,6 @@ package body Get_Targ is
       return null;
    end Get_Back_End_Config_File;
 
-   -----------------------------
-   -- Get_Max_Unaligned_Field --
-   -----------------------------
-
-   function Get_Max_Unaligned_Field return Pos is
-   begin
-      return 64;  -- Can be different on some targets
-   end Get_Max_Unaligned_Field;
-
    -----------------------------
    -- Register_Back_End_Types --
    -----------------------------
diff --git a/gcc/ada/get_targ.ads b/gcc/ada/get_targ.ads
index ef9c5727eb8..25206596076 100644
--- a/gcc/ada/get_targ.ads
+++ b/gcc/ada/get_targ.ads
@@ -110,10 +110,6 @@ package Get_Targ is
 
    --  Other subprograms
 
-   function Get_Max_Unaligned_Field return Pos;
-   --  Returns the maximum supported size in bits for a field that is
-   --  not aligned on a storage unit boundary.
-
    type C_String is array (0 .. 255) of aliased Character;
    pragma Convention (C, C_String);
 
diff --git a/gcc/ada/set_targ.adb b/gcc/ada/set_targ.adb
index b37c8b724bc..4165615f44b 100644
--- a/gcc/ada/set_targ.adb
+++ b/gcc/ada/set_targ.adb
@@ -943,7 +943,7 @@ begin
             Long_Long_Size             := Get_Long_Long_Size;
             Long_Size                  := Get_Long_Size;
             Maximum_Alignment          := Get_Maximum_Alignment;
-            Max_Unaligned_Field        := Get_Max_Unaligned_Field;
+            Max_Unaligned_Field        := 1;
             Pointer_Size               := Get_Pointer_Size;
             Short_Enums                := Get_Short_Enums;
             Short_Size                 := Get_Short_Size;
diff --git a/gcc/ada/set_targ.ads b/gcc/ada/set_targ.ads
index 623de6ae6d2..4342059e66d 100644
--- a/gcc/ada/set_targ.ads
+++ b/gcc/ada/set_targ.ads
@@ -74,7 +74,7 @@ package Set_Targ is
    Long_Long_Size             : Pos; -- Standard.Long_Long_Integer'Size
    Long_Size                  : Pos; -- Standard.Long_Integer'Size
    Maximum_Alignment          : Pos; -- Maximum permitted alignment
-   Max_Unaligned_Field        : Pos; -- Maximum size for unaligned bit field
+   Max_Unaligned_Field        : Pos; -- Kept only for backward compatibility
    Pointer_Size               : Pos; -- System.Address'Size
    Short_Enums                : Nat; -- Foreign enums use short size?
    Short_Size                 : Pos; -- Standard.Short_Integer'Size
diff --git a/gcc/ada/ttypes.ads b/gcc/ada/ttypes.ads
index 953781d1a5f..c8188ea9f98 100644
--- a/gcc/ada/ttypes.ads
+++ b/gcc/ada/ttypes.ads
@@ -185,10 +185,6 @@ package Ttypes is
                                   Set_Targ.System_Allocator_Alignment;
    --  The alignment in storage units of addresses returned by malloc
 
-   Max_Unaligned_Field : constant Pos := Set_Targ.Max_Unaligned_Field;
-   --  The maximum supported size in bits for a field that is not aligned
-   --  on a storage unit boundary.
-
    Bytes_Big_Endian : Boolean := Set_Targ.Bytes_BE /= 0;
    --  Important note: for Ada purposes, the important setting is the bytes
    --  endianness (Bytes_Big_Endian), not the bits value (Bits_Big_Endian).
-- 
2.40.0


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

only message in thread, other threads:[~2023-06-15  8:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15  8:04 [COMMITTED] ada: Remove Ttypes.Max_Unaligned_Field 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).