-- --
-- 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- --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
List_Representation_Info_Mechanisms := True;
end if;
- -- Output copyright notice if full list mode
+ -- Output copyright notice if full list mode unless we have a list
+ -- file, in which case we defer this so that it is output in the file
- if (Verbose_Mode or Full_List)
- and then (not Debug_Flag_7)
+ if (Verbose_Mode or else (Full_List and Full_List_File_Name = null))
+ and then not Debug_Flag_7
then
Write_Eol;
Write_Str ("GNAT ");
Write_Str (Gnat_Version_String);
Write_Eol;
- Write_Str ("Copyright 1992-2005 Free Software Foundation, Inc.");
+ Write_Str ("Copyright 1992-" &
+ Current_Year &
+ ", Free Software Foundation, Inc.");
Write_Eol;
end if;
if Targparm.ZCX_By_Default_On_Target then
if Targparm.GCC_ZCX_Support_On_Target then
- Exception_Mechanism := Back_End_ZCX_Exceptions;
- else
- Exception_Mechanism := Front_End_ZCX_Exceptions;
- end if;
- end if;
-
- -- We take the command line exception mechanism into account
-
- if Opt.Zero_Cost_Exceptions_Set then
- if Opt.Zero_Cost_Exceptions_Val = False then
- Exception_Mechanism := Front_End_Setjmp_Longjmp_Exceptions;
-
- elsif Debug_Flag_XX then
- Exception_Mechanism := Front_End_ZCX_Exceptions;
-
- elsif Targparm.GCC_ZCX_Support_On_Target then
- Exception_Mechanism := Back_End_ZCX_Exceptions;
-
- elsif Targparm.Front_End_ZCX_Support_On_Target then
- Exception_Mechanism := Front_End_ZCX_Exceptions;
-
+ Exception_Mechanism := Back_End_Exceptions;
else
Osint.Fail
("Zero Cost Exceptions not supported on this target");
and then not Compilation_Errors
then
Error_Msg_N
- ("package % does not require a body?!", Main_Unit_Node);
+ ("package % does not require a body?", Main_Unit_Node);
Error_Msg_Name_1 := Fname;
Error_Msg_N
- ("body in file{?! will be ignored", Main_Unit_Node);
+ ("body in file{? will be ignored", Main_Unit_Node);
-- Ada 95 cases of a body file present when no body is
-- permitted. This we consider to be an error.
Errout.Finalize;
Tree_Gen;
Namet.Finalize;
- Exit_Program (E_Success);
+
+ -- Use a goto instead of calling Exit_Program so that finalization
+ -- occurs normally.
+
+ goto End_Of_Program;
elsif Original_Operating_Mode = Check_Semantics then
Back_End_Mode := Declarations_Only;
Comperr.Compiler_Abort ("Storage_Error");
end;
--- The outer exception handles an unrecoverable error
+ <<End_Of_Program>>
+ null;
+
+ -- The outer exception handles an unrecoverable error
exception
when Unrecoverable_Error =>