From: Ronan Desplanques <[email protected]>

This patch reduces the scope of a recently introduced variable because
it was much larger than it needed to be.

gcc/ada/ChangeLog:

        * libgnat/s-stratt.adb (W_80IEEE): Make constant local.

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

---
 gcc/ada/libgnat/s-stratt.adb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/libgnat/s-stratt.adb b/gcc/ada/libgnat/s-stratt.adb
index 61bfa38f638..9315ae11ed4 100644
--- a/gcc/ada/libgnat/s-stratt.adb
+++ b/gcc/ada/libgnat/s-stratt.adb
@@ -1036,8 +1036,6 @@ package body System.Stream_Attributes is
       Ada.Streams.Write (Stream.all, From_WWC (Item));
    end W_WWC;
 
-   N_IEEE_Extended_Precision_Bytes : constant := 10;
-
    procedure W_80IEEE (Stream : not null access RST; Item : Long_Long_Float) is
    begin
       if XDR_Support then
@@ -1047,6 +1045,8 @@ package body System.Stream_Attributes is
 
       declare
          X : S_LLF := From_LLF (Item);
+
+         N_IEEE_Extended_Precision_Bytes : constant := 10;
       begin
          X (N_IEEE_Extended_Precision_Bytes + 1 .. X'Last) := (others => 0);
          Ada.Streams.Write (Stream.all, X);
-- 
2.51.0

Reply via email to