From: Ronan Desplanques Date: Thu, 9 Oct 2025 08:08:50 +0000 (+0200) Subject: ada: Move constant declaration X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebfc39db7fed86b61f6682cd5b081e1ed7a92b9d;p=thirdparty%2Fgcc.git 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. --- 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);