]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix standard output stream for gnatcmd output
authorRonan Desplanques <desplanques@adacore.com>
Wed, 21 Aug 2024 13:10:38 +0000 (15:10 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 2 Sep 2024 08:22:50 +0000 (10:22 +0200)
Before this patch, the gnat command sent to standard error pieces of
information that are a better match for standard output. This patch
makes this information go to standard output.

gcc/ada/

* gnatcmd.adb (GNATCmd): Fix standard output stream.

gcc/ada/gnatcmd.adb

index c1b817bd78643340582ccf7c65933d771360b6f9..ed37a348103aeb07547dc041456fbcd9c966ec28 100644 (file)
@@ -278,7 +278,8 @@ procedure GNATCmd is
 --  Start of processing for GNATCmd
 
 begin
-   --  All output from GNATCmd is debugging or error output: send to stderr
+   --  Almost all output from GNATCmd is debugging or error output: send to
+   --  stderr.
 
    Set_Standard_Error;
 
@@ -349,6 +350,7 @@ begin
          elsif Command_Arg <= Argument_Count
            and then Argument (Command_Arg) = Ada_Help_Switch
          then
+            Set_Standard_Output;
             Usage;
             Exit_Program (E_Success);
 
@@ -364,6 +366,7 @@ begin
 
          --  Add the following so that output is consistent with or without the
          --  --help flag.
+         Set_Standard_Output;
          Write_Eol;
          Write_Line ("Report bugs to report@adacore.com");
          return;