aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdlmain.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-21 07:00:35 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-21 07:00:35 +0200
commit3826656eaff634b0349b610f274203b3026d3f87 (patch)
tree402c0f3537664318e0007f347d3dd59d9eb806d8 /src/ghdldrv/ghdlmain.adb
parentbd1885c3d60019a28bb8261d8a17cef5533d27f9 (diff)
downloadghdl-3826656eaff634b0349b610f274203b3026d3f87.tar.gz
ghdl-3826656eaff634b0349b610f274203b3026d3f87.tar.bz2
ghdl-3826656eaff634b0349b610f274203b3026d3f87.zip
Rework exit handling to correctly report exit status.
Fix ticket 77.
Diffstat (limited to 'src/ghdldrv/ghdlmain.adb')
-rw-r--r--src/ghdldrv/ghdlmain.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb
index 45d9615f9..606119e63 100644
--- a/src/ghdldrv/ghdlmain.adb
+++ b/src/ghdldrv/ghdlmain.adb
@@ -321,6 +321,9 @@ package body Ghdlmain is
First_Arg := Argument_Count + 1;
end if;
+ -- Set before running the action, so that it can be changed.
+ Set_Exit_Status (Success);
+
declare
Args : Argument_List (1 .. Argument_Count - First_Arg + 1);
begin
@@ -336,7 +339,6 @@ package body Ghdlmain is
-- Name_Table.Disp_Stats;
-- Iirs.Disp_Stats;
--end if;
- Set_Exit_Status (Success);
exception
when Option_Error
| Compile_Error