summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatbind.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-15 09:41:02 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-15 09:41:02 +0000
commit3829683d41973adc18f48a12177abc4ed5ef7f24 (patch)
tree921c605ccba93811b8c7c3d497efd18629df3359 /gcc/ada/gnatbind.adb
parent0cf37fd6b75bb0b07a537dd3c5cfa35f69b21214 (diff)
downloadgcc-3829683d41973adc18f48a12177abc4ed5ef7f24.tar.gz
* gnatbind.adb (Scan_Bind_Arg): Replace error by warning on -M and
native platforms. (Gnatbind): Do not call Exit_Program (E_Success) at the end, so that finalization can occur normally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatbind.adb')
-rw-r--r--gcc/ada/gnatbind.adb24
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb
index e9222c94595..e1dddd984c6 100644
--- a/gcc/ada/gnatbind.adb
+++ b/gcc/ada/gnatbind.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -364,13 +364,14 @@ procedure Gnatbind is
-- -Mname
elsif Argv'Length >= 3 and then Argv (2) = 'M' then
- if Is_Cross_Compiler then
- Opt.Bind_Alternate_Main_Name := True;
- Opt.Alternate_Main_Name := new String'(Argv (3 .. Argv'Last));
- else
- Fail ("-M option only valid for a cross-compiler");
+ if not Is_Cross_Compiler then
+ Write_Line
+ ("gnatbind: -M not expected to be used on native platforms");
end if;
+ Opt.Bind_Alternate_Main_Name := True;
+ Opt.Alternate_Main_Name := new String'(Argv (3 .. Argv'Last));
+
-- All other options are single character and are handled by
-- Scan_Binder_Switches.
@@ -525,7 +526,9 @@ begin
Write_Str ("GNATBIND ");
Write_Str (Gnat_Version_String);
Write_Eol;
- Write_Str ("Copyright 1995-2005 Free Software Foundation, Inc.");
+ Write_Str ("Copyright 1995-" &
+ Current_Year &
+ ", Free Software Foundation, Inc.");
Write_Eol;
end if;
@@ -720,10 +723,15 @@ begin
if Total_Errors > 0 then
Exit_Program (E_Errors);
+
elsif Total_Warnings > 0 then
Exit_Program (E_Warnings);
+
else
- Exit_Program (E_Success);
+ -- Do not call Exit_Program (E_Success), so that finalization occurs
+ -- normally.
+
+ null;
end if;
end Gnatbind;