diff options
Diffstat (limited to 'gcc/ada/comperr.adb')
-rw-r--r-- | gcc/ada/comperr.adb | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/gcc/ada/comperr.adb b/gcc/ada/comperr.adb index 55d8c89841a..a3ffd6d74bd 100644 --- a/gcc/ada/comperr.adb +++ b/gcc/ada/comperr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.2 $ +-- $Revision$ -- -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- -- @@ -76,17 +76,31 @@ package body Comperr is (X : String; Code : Integer := 0) is + -- The procedures below output a "bug box" with information about + -- the cause of the compiler abort and about the preferred method + -- of reporting bugs. The default is a bug box appropriate for + -- the FSF version of GNAT, but there are specializations for + -- the GNATPRO and Public releases by Ada Core Technologies. + + Public_Version : constant Boolean := Gnat_Version_Type = "PUBLIC "; + -- Set True for the public version of GNAT + + GNATPRO_Version : constant Boolean := Gnat_Version_Type = "GNATPRO"; + -- Set True for the GNATPRO version of GNAT + procedure End_Line; -- Add blanks up to column 76, and then a final vertical bar + -------------- + -- End_Line -- + -------------- + procedure End_Line is begin Repeat_Char (' ', 76, '|'); Write_Eol; end End_Line; - Public_Version : constant Boolean := (Gnat_Version_String (5) = 'p'); - -- Start of processing for Compiler_Abort begin @@ -98,13 +112,13 @@ package body Comperr is Abort_In_Progress := True; - -- If errors have already occurred, then we guess that the abort may - -- well be caused by previous errors, and we don't make too much fuss - -- about it, since we want to let the programmer fix the errors first. + -- If any errors have already occurred, then we guess that the abort + -- may well be caused by previous errors, and we don't make too much + -- fuss about it, since we want to let programmer fix the errors first. -- Debug flag K disables this behavior (useful for debugging) - if Errors_Detected /= 0 and then not Debug_Flag_K then + if Total_Errors_Detected /= 0 and then not Debug_Flag_K then Errout.Finalize; Set_Standard_Error; @@ -252,16 +266,25 @@ package body Comperr is -- Otherwise we use the standard fixed text else - Write_Str - ("| Please submit bug report by email to report@gnat.com."); - End_Line; + if Public_Version or GNATPRO_Version then + Write_Str + ("| Please submit bug report by email " & + "to report@gnat.com."); + End_Line; - if not Public_Version then + else Write_Str - ("| Use a subject line meaningful to you" & - " and us to track the bug."); + ("| Please submit bug report by email " & + "to gcc-bugs@gcc.gnu.org."); End_Line; + end if; + + Write_Str + ("| Use a subject line meaningful to you" & + " and us to track the bug."); + End_Line; + if GNATPRO_Version then Write_Str ("| (include your customer number #nnn " & "in the subject line)."); @@ -286,7 +309,7 @@ package body Comperr is ("| (concatenated together with no headers between files)."); End_Line; - if Public_Version then + if not GNATPRO_Version then Write_Str ("| (use plain ASCII or MIME attachment)."); End_Line; |