aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 051082f..2e1b8dd8 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -34,7 +34,7 @@ with MLib.Fil;
with Namet; use Namet;
with Opt; use Opt;
with Osint; use Osint;
-with Output;
+with Output; use Output;
with Prj; use Prj;
with Prj.Env;
with Prj.Ext; use Prj.Ext;
@@ -1375,6 +1375,10 @@ procedure GNATCmd is
-- Start of processing for GNATCmd
begin
+ -- All output from GNATCmd is debugging or error output: send to stderr
+
+ Set_Standard_Error;
+
-- Initializations
Csets.Initialize;
@@ -1901,6 +1905,10 @@ begin
Env => Root_Environment,
Packages_To_Check => Packages_To_Check);
+ -- Prj.Pars.Parse calls Set_Standard_Output, reset to stderr
+
+ Set_Standard_Error;
+
if Project = Prj.No_Project then
Fail ("""" & Project_File.all & """ processing failed");
end if;