From ebfc39db7fed86b61f6682cd5b081e1ed7a92b9d Mon Sep 17 00:00:00 2001 From: Ronan Desplanques Date: Thu, 9 Oct 2025 10:08:50 +0200 Subject: [PATCH] ada: Move constant declaration 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. --- 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.47.3